Class: AppEngine::Admin::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/appengine-tools/bundler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#rootObject (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_yamlObject



66
67
68
# File 'lib/appengine-tools/bundler.rb', line 66

def app_yaml
  path('WEB-INF', 'app.yaml')
end

#bundled_jarsObject



74
75
76
# File 'lib/appengine-tools/bundler.rb', line 74

def bundled_jars
  path('WEB-INF', 'appengine-generated', 'bundled_jars.yaml')
end

#config_ruObject



62
63
64
# File 'lib/appengine-tools/bundler.rb', line 62

def config_ru
  path('config.ru')
end

#favicon_icoObject



88
89
90
# File 'lib/appengine-tools/bundler.rb', line 88

def favicon_ico
  File.join(public_root ? public_root : @root, 'favicon.ico')
end

#gemfileObject



58
59
60
# File 'lib/appengine-tools/bundler.rb', line 58

def gemfile
  path('Gemfile')
end

#gems_dirObject



54
55
56
# File 'lib/appengine-tools/bundler.rb', line 54

def gems_dir
  path('.gems')
end

#gems_jarObject



46
47
48
# File 'lib/appengine-tools/bundler.rb', line 46

def gems_jar
  path('WEB-INF', 'lib', 'gems.jar')
end

#generation_dirObject



50
51
52
# File 'lib/appengine-tools/bundler.rb', line 50

def generation_dir
  path('WEB-INF', 'appengine-generated')
end

#old_yamlObject



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_rootObject



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_txtObject



92
93
94
# File 'lib/appengine-tools/bundler.rb', line 92

def robots_txt
   File.join(public_root ? public_root : @root, 'robots.txt')
end

#webinfObject



38
39
40
# File 'lib/appengine-tools/bundler.rb', line 38

def webinf
  path('WEB-INF')
end

#webinf_libObject



42
43
44
# File 'lib/appengine-tools/bundler.rb', line 42

def webinf_lib
  path('WEB-INF', 'lib')
end