ulbrich-jruby-enginize 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/templates/merb/app.rb
CHANGED
data/templates/merb/config.ru
CHANGED
|
@@ -4,9 +4,9 @@ require 'appengine-rack'
|
|
|
4
4
|
require 'merb-core'
|
|
5
5
|
|
|
6
6
|
AppEngine::Rack.configure_app(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
# :ssl_enabled => true,
|
|
8
|
+
:application => '{{name}}',
|
|
9
|
+
:version => 1)
|
|
10
10
|
|
|
11
11
|
Merb::Config.setup(:merb_root => File.dirname(__FILE__),
|
|
12
12
|
:environment => ENV['RACK_ENV'])
|
|
@@ -31,7 +31,7 @@ namespace :template do
|
|
|
31
31
|
desc 'Load missing gems to local gem repository'
|
|
32
32
|
task :gems do
|
|
33
33
|
puts 'Load missing gems to local gem repository'
|
|
34
|
-
`(sudo appcfg.rb gem install extlib merb-core) 1>&2`
|
|
34
|
+
`(sudo appcfg.rb gem install appengine-apis extlib merb-core) 1>&2`
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
data/templates/sinatra/app.rb
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
# This application
|
|
1
|
+
# This application file was generated by jruby-enginize.
|
|
2
2
|
|
|
3
3
|
require 'rubygems'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
require 'haml'
|
|
6
|
+
require 'sass'
|
|
7
|
+
require 'sinatra'
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
# Use AppEngine::URLFetch.fetch() for loading remote files.
|
|
10
|
+
|
|
11
|
+
require 'appengine-apis/urlfetch'
|
|
12
|
+
|
|
13
|
+
# Set to true if you need sessions.
|
|
14
|
+
|
|
15
|
+
set :sessions, false
|
|
16
|
+
|
|
17
|
+
# Configure Sinatra to reload during development.
|
|
18
|
+
|
|
19
|
+
class Sinatra::Reloader < Rack::Reloader
|
|
20
|
+
def safe_load(file, mtime, stderr = $stderr)
|
|
21
|
+
::Sinatra::Application.reset!
|
|
22
|
+
stderr.puts "#{self.class}: reseting routes"
|
|
23
|
+
super
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
configure :development do
|
|
28
|
+
use Sinatra::Reloader
|
|
11
29
|
end
|
|
12
30
|
|
|
13
31
|
# Helpers to include...
|
data/templates/sinatra/config.ru
CHANGED
|
@@ -4,7 +4,7 @@ namespace :template do
|
|
|
4
4
|
desc 'Load missing gems to local gem repository'
|
|
5
5
|
task :gems do
|
|
6
6
|
puts 'Load missing gems to local gem repository'
|
|
7
|
-
`(sudo appcfg.rb gem install
|
|
7
|
+
`(sudo appcfg.rb gem install appengine-apis haml sinatra) 1>&2`
|
|
8
8
|
puts 'Add patch for Haml 2.2.2 if needed'
|
|
9
9
|
`(sudo patch --batch --silent .gems/gems/haml-2.2.2/lib/haml/util.rb < lib/tasks/haml-2_2_2-util.patch) 2> /dev/null 1>&2`
|
|
10
10
|
end
|