Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 310 lines (243 sloc) 12.082 kb
38bac74 @calavera google app engine template
calavera authored
1 #Google App Engine template
2
aa2e49f @calavera ask to install warbler
calavera authored
3 run 'jruby -S gem install warbler' if yes?('Install warbler gem?')
38bac74 @calavera google app engine template
calavera authored
4
0ea4b23 @calavera everything runs into rails root, we don't need inside(RAILS_ROOT)
calavera authored
5 run 'jruby -S warble pluginize'
6 run 'jruby -S warble config'
38bac74 @calavera google app engine template
calavera authored
7
b5f6ea5 @calavera app name from the rails root
calavera authored
8 freeze! 'RELEASE=2.3.2'
38bac74 @calavera google app engine template
calavera authored
9 run 'rm -rf vendor/rails/activerecord'
10 %w(actionmailer actionpack activeresource activesupport railties).each do |gem|
b5f6ea5 @calavera app name from the rails root
calavera authored
11 run %Q{rm -rf vendor/rails/#{gem}/test}
38bac74 @calavera google app engine template
calavera authored
12 end
13
14 inside('lib') do
15
16 # A LITTLE TRICK TO GET ALL THE MANDATORY JARS FASTER
17 run 'git clone git://github.com/olabini/yarbl.git'
18 run 'cp yarbl/lib/*.jar . && rm -rf yarbl'
19
20 run 'git clone git://github.com/olabini/bumble.git'
21 run 'git clone git://github.com/olabini/beeu.git'
22
23 # GET THE DEVELOPMENT VERSION OF JRUBY
24 # run 'git clone git://github.com/jruby/jruby.git'
25 # run 'ant jruby-complete'
26
27 # run 'mkdir tmp_unpack
28 # cd tmp_unpack
29 # jar xf ../jruby-complete.jar
30 # cd ..
31 # mkdir jruby-core
32 # mv tmp_unpack/org jruby-core/
33 # mv tmp_unpack/com jruby-core/
34 # mv tmp_unpack/jline jruby-core/
35 # mv tmp_unpack/jay jruby-core/
36 # mv tmp_unpack/jruby jruby-core/
37 # cd jruby-core
38 # jar cf ../jruby-core.jar .
39 # cd ../tmp_unpack
40 # jar cf ../ruby-stdlib.jar .
41 # cd ..
42 # rm -rf jruby-core
43 # rm -rf tmp_unpack
42fa05d @calavera jruby git repository deleted
calavera authored
44 # rm -rf jruby-complete.jar
45 # rm -rf jruby'
38bac74 @calavera google app engine template
calavera authored
46
47 # GET THE DEVELOPMENT VERSION OF JRUBY-RACK
48 #run 'git clone git://github.com/nicksieger/jruby-rack.git'
49 #run %q{cd jruby-rack && mvn package && mv target/jruby-rack-*.jar ../ && cd .. && rm -rf jruby-rack}
50
51 end
52
53 file 'appengine-web.xml',
54 %Q{<?xml version="1.0" encoding="utf-8"?>
55 <appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
b5f6ea5 @calavera app name from the rails root
calavera authored
56 <application>#{root.split('/').last}</application>
38bac74 @calavera google app engine template
calavera authored
57 <version>2</version>
58 <static-files />
59 <resource-files />
60 <sessions-enabled>true</sessions-enabled>
61 <system-properties>
62 <property name="jruby.management.enabled" value="false" />
63 <property name="os.arch" value="" />
64 <property name="jruby.compile.mode" value="JIT"/> <!-- JIT|FORCE|OFF -->
65 <property name="jruby.compile.fastest" value="true"/>
66 <property name="jruby.compile.frameless" value="true"/>
67 <property name="jruby.compile.positionless" value="true"/>
68 <property name="jruby.compile.threadless" value="false"/>
69 <property name="jruby.compile.fastops" value="false"/>
70 <property name="jruby.compile.fastcase" value="false"/>
71 <property name="jruby.compile.chainsize" value="500"/>
72 <property name="jruby.compile.lazyHandles" value="false"/>
73 <property name="jruby.compile.peephole" value="true"/>
74 </system-properties>
75 </appengine-web-app>
76 }
77
78 file 'datastore-indexes.xml',
79 %q{<?xml version="1.0" encoding="utf-8"?>
80 <datastore-indexes autoGenerate="true">
81 </datastore-indexes>
82 }
83
84 file 'config/environment.rb',
85 %q{# Be sure to restart your server when you modify this file
86
87 # Uncomment below to force Rails into production mode when
88 # you don't control web/app server and can't set it the proper way
89 # ENV['RAILS_ENV'] ||= 'production'
90
91 # Specifies gem version of Rails to use when vendor/rails is not present
92 RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
93
94 # Bootstrap the Rails environment, frameworks, and default configuration
95 require File.join(File.dirname(__FILE__), 'boot')
96
97 require 'big_table_servlet_store'
98
99 Rails::Initializer.run do |config|
100 # Settings in config/environments/* take precedence over those specified here.
101 # Application configuration should go into files in config/initializers
102 # -- all .rb files in that directory are automatically loaded.
103 # See Rails::Configuration for more options.
104
105 # Skip frameworks you're not going to use. To use Rails without a database
106 # you must remove the Active Record framework.
107 config.frameworks -= [ :active_record ]
108
109 # Specify gems that this application depends on.
110 # They can then be installed with "rake gems:install" on new installations.
111 # You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
112 # config.gem "bj"
113 # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
114 # config.gem "sqlite3-ruby", :lib => "sqlite3"
115 # config.gem "aws-s3", :lib => "aws/s3"
116
117 # Only load the plugins named here, in the order given. By default, all plugins
118 # in vendor/plugins are loaded in alphabetical order.
119 # :all can be used as a placeholder for all plugins not explicitly named
120 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
121
122 # Add additional load paths for your own custom dirs
123 # config.load_paths += %W( #{RAILS_ROOT}/extras )
124
125 # Force all environments to use the same logger level
126 # (by default production uses :info, the others :debug)
127 # config.log_level = :debug
128
129 # Make Time.zone default to the specified zone, and make Active Record store time values
130 # in the database in UTC, and return them converted to the specified local zone.
131 # Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time.
132 config.time_zone = 'UTC'
133
134 # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
135 # All files from config/locales/*.rb,yml are added automatically.
136 # config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
137 # config.i18n.default_locale = :de
138
139 # Your secret key for verifying cookie session data integrity.
140 # If you change this key, all old sessions will become invalid!
141 # Make sure the secret is at least 30 characters and all random,
142 # no regular words or you'll be exposed to dictionary attacks.
143 config.action_controller.session = {
144 :session_key => '_yarbl_session',
145 :secret => 'a8071c8e98c4862f8a801525f39fd5167680258a4415a9a68afab2ab98c445c1dd4abc66e3bb2089365434d54234aef7feb62b78a08c2f749e0ed6aeea369af7'
146 }
147
148 # Use the database for sessions instead of the cookie-based default,
149 # which shouldn't be used to store highly confidential information
150 # (create the session table with "rake db:sessions:create")
151
152 config.action_controller.session_store = :big_table_servlet_store
153
154 # Use SQL instead of Active Record's schema dumper when creating the test database.
155 # This is necessary if your schema can't be completely dumped by the schema dumper,
156 # like if you have constraints or database-specific column types
157 # config.active_record.schema_format = :sql
158
159 # Activate observers that should always be running
160 # Please note that observers generated using script/generate observer need to have an _observer suffix
161 # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
162 end
163
164 require 'bumble'
165 }
166
167 file 'config/warble.rb',
168 %q{# Warbler web application assembly configuration file
169 Warbler::Config.new do |config|
170 # Temporary directory where the application is staged
171 # config.staging_dir = "tmp/war"
172
173 # Application directories to be included in the webapp.
174 config.dirs = %w(app config lib log vendor tmp)
175
176 # Additional files/directories to include, above those in config.dirs
177 config.includes = FileList["appengine-web.xml", "datastore-indexes.xml"]
178
179 # Additional files/directories to exclude
180 # config.excludes = FileList["lib/tasks/*"]
181
182 # Additional Java .jar files to include. Note that if .jar files are placed
183 # in lib (and not otherwise excluded) then they need not be mentioned here.
184 # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
185 # own versions if you directly set the value
186 # config.java_libs += FileList["lib/java/*.jar"]
187
188 # Loose Java classes and miscellaneous files to be placed in WEB-INF/classes.
189 # config.java_classes = FileList["target/classes/**.*"]
190
191 # One or more pathmaps defining how the java classes should be copied into
192 # WEB-INF/classes. The example pathmap below accompanies the java_classes
193 # configuration above. See http://rake.rubyforge.org/classes/String.html#M000017
194 # for details of how to specify a pathmap.
195 # config.pathmaps.java_classes << "%{target/classes/,}p"
196
197 # Gems to be included. You need to tell Warbler which gems your application needs
198 # so that they can be packaged in the war file.
199 # The Rails gems are included by default unless the vendor/rails directory is present.
200 # config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"]
201 # config.gems << "tzinfo"
202
203 # Uncomment this if you don't want to package rails gem.
204 # config.gems -= ["rails"]
205
206 # The most recent versions of gems are used.
207 # You can specify versions of gems by using a hash assignment:
208 # config.gems["rails"] = "2.0.2"
209
210 # You can also use regexps or Gem::Dependency objects for flexibility or
211 # fine-grained control.
212 # config.gems << /^merb-/
213 # config.gems << Gem::Dependency.new("merb-core", "= 0.9.3")
214
215 # Include gem dependencies not mentioned specifically
216 config.gem_dependencies = true
217
218 # Files to be included in the root of the webapp. Note that files in public
219 # will have the leading 'public/' part of the path stripped during staging.
220 # config.public_html = FileList["public/**/*", "doc/**/*"]
221
222 # Pathmaps for controlling how public HTML files are copied into the .war
223 # config.pathmaps.public_html = ["%{public/,}p"]
224
225 # Name of the war file (without the .war) -- defaults to the basename
226 # of RAILS_ROOT
227 # config.war_name = "mywar"
228
229 # Value of RAILS_ENV for the webapp -- default as shown below
230 # config.webxml.rails.env = ENV['RAILS_ENV'] || 'production'
231
232 # Application booter to use, one of :rack, :rails, or :merb. (Default :rails)
233 # config.webxml.booter = :rails
234
235 # When using the :rack booter, "Rackup" script to use.
236 # The script is evaluated in a Rack::Builder to load the application.
237 # Examples:
238 # config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)}
239 # config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
240
241 # Control the pool of Rails runtimes. Leaving unspecified means
242 # the pool will grow as needed to service requests. It is recommended
243 # that you fix these values when running a production server!
244 config.webxml.jruby.min.runtimes = 1
245 config.webxml.jruby.max.runtimes = 2
246 config.webxml.jruby.init.serial = true
247 # config.webxml.jruby.runtime.initializer.threads = 1
248 # config.webxml.jruby.max.runtimes = 4
249
250 # JNDI data source name
251 # config.webxml.jndi = 'jdbc/rails'
252
253 config.java_libs = []
8763b6b @calavera production config added
calavera authored
254 end}
255
256 file 'config/environments/production.rb',
257 %q{# Settings specified here will take precedence over those in config/environment.rb
258
259 # The production environment is meant for finished, "live" apps.
260 # Code is not reloaded between requests
261 config.cache_classes = true
262
263 # Enable threaded mode
264 # config.threadsafe!
265
266 class ServletContextLogger
267 def debug(progname = nil, &block)
268 log(:DEBUG, progname, &block)
269 end
270
271 def error(progname = nil, &block)
272 log(:ERROR, progname, &block)
273 end
274
275 def fatal(progname = nil, &block)
276 log(:FATAL, progname, &block)
277 end
278
279 def info(progname = nil, &block)
280 log(:INFO, progname, &block)
281 end
282
283 def warn(progname = nil, &block)
284 log(:WARN, progname, &block)
285 end
286
287 def log(severity, progname, &block)
288 message = progname || block.call
289 $servlet_context.log("#{severity}: #{message}")
290 end
291
292 def method_missing(name, *args, &block)
293 end
294 end
295
296 # Use a different logger for distributed setups
297 config.logger = ServletContextLogger.new
298
299 # Full error reports are disabled and caching is turned on
300 config.action_controller.consider_all_requests_local = false
301 config.action_controller.perform_caching = true
302
303 # Use a different cache store in production
304 # config.cache_store = :mem_cache_store
305
306 # Enable serving of images, stylesheets, and javascripts from an asset server
307 # config.action_controller.asset_host = "http://assets.example.com"
308
309 # Disable delivery errors, bad email addresses will be ignored
310 # config.action_mailer.raise_delivery_errors = false}
Something went wrong with that request. Please try again.