Class: Geb::Site

Inherits:
Object
  • Object
show all
Includes:
Build, Core, Release, Remote, Template
Defined in:
lib/geb/site.rb,
lib/geb/site/core.rb,
lib/geb/site/build.rb,
lib/geb/site/remote.rb,
lib/geb/site/release.rb,
lib/geb/site/template.rb

Defined Under Namespace

Modules: Build, Core, Release, Remote, Template

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Remote

#launch_remote, #upload_release_to_remote

Methods included from Template

#bundle_template, #copy_template_from_path, #download_template_from_url, #fetch_http_response, #is_bundled_template?, #is_url?, #template_directory_exists?, #validate_template_url

Methods included from Release

#get_site_release_output_directory, #get_template_archive_release_path, #release, #released?

Methods included from Build

#build, #build_assets, #build_pages, #clear_site_output_directory, #get_page_files, #get_site_assets_directory, #get_site_local_output_directory, #output_site

Methods included from Core

#create, #load, #site_directory_exists?, #validate

Constructor Details

#initializeSite

site constructor initializes the site object and attributes



68
69
70
71
72
73
74
75
76
77
# File 'lib/geb/site.rb', line 68

def initialize

  @validated = false
  @loaded = false
  @releasing = false
  @site_path = nil
  @template_path = nil
  @pages = {}

end

Instance Attribute Details

#loadedBoolean (readonly)

Returns true if the site is loaded.

Returns:

  • (Boolean)

    true if the site is loaded



54
55
56
# File 'lib/geb/site.rb', line 54

def loaded
  @loaded
end

#pagesHash (readonly)

Returns the site pages to process.

Returns:

  • (Hash)

    the site pages to process



64
65
66
# File 'lib/geb/site.rb', line 64

def pages
  @pages
end

#releasingBoolean (readonly)

Note:

this is used to prevent recursive releases and to ensure site variables are correct

Note:

this is set to true when the site is being released and reset to false when the release is done

Returns true if the site is releasing.

Returns:

  • (Boolean)

    true if the site is releasing



60
61
62
# File 'lib/geb/site.rb', line 60

def releasing
  @releasing
end

#site_configGeb::Config (readonly)

Returns the site configuration.

Returns:



42
43
44
# File 'lib/geb/site.rb', line 42

def site_config
  @site_config
end

#site_pathObject (readonly)

Returns the value of attribute site_path.



38
39
40
# File 'lib/geb/site.rb', line 38

def site_path
  @site_path
end

#template_pathString (readonly)

Returns the path template the site is based on.

Returns:

  • (String)

    the path template the site is based on



46
47
48
# File 'lib/geb/site.rb', line 46

def template_path
  @template_path
end

#validatedBoolean (readonly)

Returns true if the site is validated.

Returns:

  • (Boolean)

    true if the site is validated



50
51
52
# File 'lib/geb/site.rb', line 50

def validated
  @validated
end