Module: Geb::Site::Release
- Included in:
- Geb::Site
- Defined in:
- lib/geb/site/release.rb
Defined Under Namespace
Classes: SiteReleasingError
Instance Method Summary collapse
-
#get_site_release_output_directory ⇒ String
get the site release output directory.
-
#get_template_archive_release_path ⇒ String
get the template archive path.
-
#release ⇒ Object
release the site.
-
#released? ⇒ Boolean
check if the site has been released.
Instance Method Details
#get_site_release_output_directory ⇒ String
get the site release output directory
52 53 54 |
# File 'lib/geb/site/release.rb', line 52 def get_site_release_output_directory return File.join(@site_path, @site_config.output_dir, Geb::Defaults::RELEASE_OUTPUT_DIR) end |
#get_template_archive_release_path ⇒ String
get the template archive path
46 47 48 |
# File 'lib/geb/site/release.rb', line 46 def get_template_archive_release_path return File.join(@site_path, @site_config.output_dir, Geb::Defaults::RELEASE_OUTPUT_DIR, Geb::Defaults::TEMPLATE_ARCHIVE_FILENAME) end |
#release ⇒ Object
release the site
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/geb/site/release.rb', line 23 def release # make sure the site is laoded, if not, raise an error raise Geb::Site::SiteNotLoadedError.new("Could not release the site.") unless @loaded # make sure the site is not already releasing, to prevent recursive releases raise Geb::Site::SiteReleasingError.new if @releasing # set the site to releasing @releasing = true # build the site build(); ensure # set the site to not releasing @releasing = false end |
#released? ⇒ Boolean
check if the site has been released. The site is considered released if the release directory exists and is not empty.
59 60 61 |
# File 'lib/geb/site/release.rb', line 59 def released? return Dir.exist?(get_site_release_output_directory()) && !Dir.empty?(get_site_release_output_directory()) end |