Class: AppEngine::Admin::Application
- Inherits:
-
Object
- Object
- AppEngine::Admin::Application
- Defined in:
- lib/appengine-tools/bundler.rb
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #app_yaml ⇒ Object
- #bundled_jars ⇒ Object
- #config_ru ⇒ Object
- #favicon_ico ⇒ Object
- #gemfile ⇒ Object
- #gems_dir ⇒ Object
- #gems_jar ⇒ Object
- #generation_dir ⇒ Object
-
#initialize(root) ⇒ Application
constructor
A new instance of Application.
- #old_yaml ⇒ Object
- #path(*pieces) ⇒ Object
- #public_root ⇒ Object
- #robots_txt ⇒ Object
- #webinf ⇒ Object
- #webinf_lib ⇒ Object
Constructor Details
#initialize(root) ⇒ Application
Returns a new instance of Application.
30 31 32 |
# File 'lib/appengine-tools/bundler.rb', line 30 def initialize(root) @root = root end |
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
28 29 30 |
# File 'lib/appengine-tools/bundler.rb', line 28 def root @root end |
Instance Method Details
#app_yaml ⇒ Object
66 67 68 |
# File 'lib/appengine-tools/bundler.rb', line 66 def app_yaml path('WEB-INF', 'app.yaml') end |
#bundled_jars ⇒ Object
74 75 76 |
# File 'lib/appengine-tools/bundler.rb', line 74 def bundled_jars path('WEB-INF', 'appengine-generated', 'bundled_jars.yaml') end |
#config_ru ⇒ Object
62 63 64 |
# File 'lib/appengine-tools/bundler.rb', line 62 def config_ru path('config.ru') end |
#favicon_ico ⇒ Object
88 89 90 |
# File 'lib/appengine-tools/bundler.rb', line 88 def favicon_ico File.join(public_root ? public_root : @root, 'favicon.ico') end |
#gemfile ⇒ Object
58 59 60 |
# File 'lib/appengine-tools/bundler.rb', line 58 def gemfile path('Gemfile') end |
#gems_dir ⇒ Object
54 55 56 |
# File 'lib/appengine-tools/bundler.rb', line 54 def gems_dir path('.gems') end |
#gems_jar ⇒ Object
46 47 48 |
# File 'lib/appengine-tools/bundler.rb', line 46 def gems_jar path('WEB-INF', 'lib', 'gems.jar') end |
#generation_dir ⇒ Object
50 51 52 |
# File 'lib/appengine-tools/bundler.rb', line 50 def generation_dir path('WEB-INF', 'appengine-generated') end |
#old_yaml ⇒ Object
70 71 72 |
# File 'lib/appengine-tools/bundler.rb', line 70 def old_yaml path('app.yaml') end |
#path(*pieces) ⇒ Object
34 35 36 |
# File 'lib/appengine-tools/bundler.rb', line 34 def path(*pieces) File.join(@root, *pieces) end |
#public_root ⇒ Object
78 79 80 81 82 83 84 85 86 |
# File 'lib/appengine-tools/bundler.rb', line 78 def public_root @public_root ||= begin if File.exist?(app_yaml) app = YAML.load(IO.read(app_yaml)) return path(app['public_root']) if app['public_root'] end path('public') end end |
#robots_txt ⇒ Object
92 93 94 |
# File 'lib/appengine-tools/bundler.rb', line 92 def robots_txt File.join(public_root ? public_root : @root, 'robots.txt') end |
#webinf ⇒ Object
38 39 40 |
# File 'lib/appengine-tools/bundler.rb', line 38 def webinf path('WEB-INF') end |
#webinf_lib ⇒ Object
42 43 44 |
# File 'lib/appengine-tools/bundler.rb', line 42 def webinf_lib path('WEB-INF', 'lib') end |