rapid-app 0.1.3 → 0.2.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/Rakefile +14 -2
- data/lib/rapid-app.rb +6 -1
- data/lib/rapid/app/settings.rb +163 -84
- data/lib/rapid/app/skeleton.rb +67 -79
- data/lib/rapid/app/version.rb +1 -1
- data/lib/rapid/app/web.rb +48 -0
- data/public/rapid/app/application.css +10 -0
- data/public/rapid/app/application.js +63 -0
- data/rapid-app.gemspec +1 -11
- data/spec/hello_world/3.2.1/.gitignore +15 -0
- data/spec/hello_world/3.2.1/Gemfile +39 -0
- data/spec/hello_world/3.2.1/README.rdoc +261 -0
- data/spec/hello_world/3.2.1/Rakefile +7 -0
- data/spec/hello_world/3.2.1/app/assets/images/rails.png +0 -0
- data/spec/hello_world/3.2.1/app/assets/javascripts/application.js +15 -0
- data/spec/hello_world/3.2.1/app/assets/stylesheets/application.css +13 -0
- data/spec/hello_world/3.2.1/app/controllers/application_controller.rb +3 -0
- data/spec/hello_world/3.2.1/app/helpers/application_helper.rb +2 -0
- data/spec/hello_world/3.2.1/app/mailers/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/app/models/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/app/views/layouts/application.html.erb +14 -0
- data/spec/hello_world/3.2.1/config.ru +4 -0
- data/spec/hello_world/3.2.1/config/application.rb +59 -0
- data/spec/hello_world/3.2.1/config/boot.rb +6 -0
- data/spec/hello_world/3.2.1/config/database.yml +25 -0
- data/spec/hello_world/3.2.1/config/environment.rb +5 -0
- data/spec/hello_world/3.2.1/config/environments/development.rb +37 -0
- data/spec/hello_world/3.2.1/config/environments/production.rb +67 -0
- data/spec/hello_world/3.2.1/config/environments/test.rb +37 -0
- data/spec/hello_world/3.2.1/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/hello_world/3.2.1/config/initializers/inflections.rb +15 -0
- data/spec/hello_world/3.2.1/config/initializers/mime_types.rb +5 -0
- data/spec/hello_world/3.2.1/config/initializers/secret_token.rb +7 -0
- data/spec/hello_world/3.2.1/config/initializers/session_store.rb +8 -0
- data/spec/hello_world/3.2.1/config/initializers/wrap_parameters.rb +14 -0
- data/spec/hello_world/3.2.1/config/locales/en.yml +5 -0
- data/spec/hello_world/3.2.1/config/routes.rb +58 -0
- data/spec/hello_world/3.2.1/db/seeds.rb +7 -0
- data/spec/hello_world/3.2.1/doc/README_FOR_APP +2 -0
- data/spec/hello_world/3.2.1/lib/assets/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/lib/tasks/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/log/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/public/404.html +26 -0
- data/spec/hello_world/3.2.1/public/422.html +26 -0
- data/spec/hello_world/3.2.1/public/500.html +25 -0
- data/spec/hello_world/3.2.1/public/favicon.ico +0 -0
- data/spec/hello_world/3.2.1/public/index.html +241 -0
- data/spec/hello_world/3.2.1/public/robots.txt +5 -0
- data/spec/hello_world/3.2.1/script/rails +6 -0
- data/spec/hello_world/3.2.1/test/fixtures/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/test/functional/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/test/integration/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/test/performance/browsing_test.rb +12 -0
- data/spec/hello_world/3.2.1/test/test_helper.rb +13 -0
- data/spec/hello_world/3.2.1/test/unit/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/vendor/assets/javascripts/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/vendor/assets/stylesheets/.gitkeep +0 -0
- data/spec/hello_world/3.2.1/vendor/plugins/.gitkeep +0 -0
- data/spec/rapid/app/skeleton_spec.rb +48 -40
- data/spec/support/project.rb +77 -0
- data/spec/templates/app/helpers/analytics/google_helper_spec.rb +22 -0
- data/spec/templates/config/application_spec.rb +23 -23
- data/spec/templates/config/deploy/production_spec.rb +45 -45
- data/spec/templates/config/deploy_spec.rb +32 -32
- data/spec/templates/config/environments/development_spec.rb +14 -0
- data/spec/templates/config/environments/production_spec.rb +15 -1
- data/spec/templates/config/environments/test_spec.rb +14 -0
- data/spec/templates/features/support/env_spec.rb +4 -4
- data/spec/templates/lib/tasks/test.rake_spec.rb +22 -21
- data/spec/templates/spec/spec_helper_spec.rb +4 -4
- data/templates/app/helpers/analytics/google_helper.rb +21 -0
- data/templates/config/application.rb +4 -2
- data/templates/config/deploy.rb +4 -4
- data/templates/config/deploy/production.rb +15 -15
- data/templates/config/environments/development.rb +12 -3
- data/templates/config/environments/production.rb +9 -2
- data/templates/config/environments/test.rb +5 -10
- data/templates/lib/tasks/test.rake +3 -0
- data/views/edit.haml +160 -0
- data/views/error.haml +3 -0
- data/views/layout.haml +7 -0
- metadata +115 -80
|
@@ -47,4 +47,18 @@ describe "templates/config/environments/development.rb" do
|
|
|
47
47
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
describe "development.protocol" do
|
|
51
|
+
|
|
52
|
+
it "should push" do
|
|
53
|
+
push 'development.domain' => 'www.example.com', 'development.protocol' => 'https'
|
|
54
|
+
@result.should include %(config.action_mailer.default_url_options = { :protocol => "https", :host => "www.example.com" }\n)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it "should pull" do
|
|
58
|
+
pull 'development.domain' => 'www.example.com', 'development.protocol' => 'https'
|
|
59
|
+
@result['development.protocol'].should == 'https'
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
|
|
50
64
|
end
|
|
@@ -23,7 +23,7 @@ describe "templates/config/environments/production.rb" do
|
|
|
23
23
|
|
|
24
24
|
it "should push" do
|
|
25
25
|
push 'production.domain' => 'www.example.com'
|
|
26
|
-
@result.should end_with %(config.
|
|
26
|
+
@result.should end_with %(config.action_mailer.default_url_options = { :host => "www.example.com" }\nend\n)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
it "should pull" do
|
|
@@ -47,4 +47,18 @@ describe "templates/config/environments/production.rb" do
|
|
|
47
47
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
describe "production.protocol" do
|
|
51
|
+
|
|
52
|
+
it "should push" do
|
|
53
|
+
push 'production.domain' => 'www.example.com', 'production.protocol' => 'https'
|
|
54
|
+
@result.should include %(config.action_mailer.default_url_options = { :protocol => "https", :host => "www.example.com" }\n)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it "should pull" do
|
|
58
|
+
pull 'production.domain' => 'www.example.com', 'production.protocol' => 'https'
|
|
59
|
+
@result['production.protocol'].should == 'https'
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
|
|
50
64
|
end
|
|
@@ -47,4 +47,18 @@ describe "templates/config/environments/test.rb" do
|
|
|
47
47
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
describe "test.protocol" do
|
|
51
|
+
|
|
52
|
+
it "should push" do
|
|
53
|
+
push 'test.domain' => 'www.example.com', 'test.protocol' => 'https'
|
|
54
|
+
@result.should include %(config.action_mailer.default_url_options = { :protocol => "https", :host => "www.example.com" }\n)
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
it "should pull" do
|
|
58
|
+
pull 'test.domain' => 'www.example.com', 'test.protocol' => 'https'
|
|
59
|
+
@result['test.protocol'].should == 'https'
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
|
|
50
64
|
end
|
|
@@ -32,22 +32,22 @@ describe "templates/features/support/env.rb" do
|
|
|
32
32
|
describe "database.active_record" do
|
|
33
33
|
|
|
34
34
|
it "should push true" do
|
|
35
|
-
push 'database.
|
|
35
|
+
push 'database.sqlite3' => true
|
|
36
36
|
@result.should include %(\n DatabaseCleaner.strategy = :transaction)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
it "should push false" do
|
|
40
|
-
push 'database.
|
|
40
|
+
push 'database.sqlite3' => false
|
|
41
41
|
@result.should_not include %(\n DatabaseCleaner.strategy = :transaction)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
it "should pull true" do
|
|
45
|
-
pull 'database.
|
|
45
|
+
pull 'database.sqlite3' => true
|
|
46
46
|
@result['database.active_record'].should == true
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
it "should pull false" do
|
|
50
|
-
pull 'database.
|
|
50
|
+
pull 'database.sqlite3' => false
|
|
51
51
|
@result['database.active_record'].should == false
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -42,12 +42,12 @@ describe "templates/lib/tasks/test.rake" do
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
it "should pull true" do
|
|
45
|
-
pull 'test.coverage' => true
|
|
45
|
+
pull 'test.cucumber' => true, 'test.coverage' => true
|
|
46
46
|
@result['test.coverage.threshold'].should == "90"
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
it "should pull false" do
|
|
50
|
-
pull 'test.coverage' => false
|
|
50
|
+
pull 'test.cucumber' => true, 'test.coverage' => false
|
|
51
51
|
@result['test.coverage'].should == false
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -56,12 +56,12 @@ describe "templates/lib/tasks/test.rake" do
|
|
|
56
56
|
describe "test.coverage.threshold" do
|
|
57
57
|
|
|
58
58
|
it "should push" do
|
|
59
|
-
push 'test.coverage.threshold' => 100
|
|
59
|
+
push 'test.cucumber' => true, 'test.coverage' => true, 'test.coverage.threshold' => 100
|
|
60
60
|
@result.should include %(--failure-threshold 100)
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
it "should pull" do
|
|
64
|
-
pull 'test.coverage.threshold' => 100
|
|
64
|
+
pull 'test.cucumber' => true, 'test.coverage' => true, 'test.coverage.threshold' => 100
|
|
65
65
|
@result['test.coverage.threshold'].should == '100'
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -70,24 +70,25 @@ describe "templates/lib/tasks/test.rake" do
|
|
|
70
70
|
describe "test.rspec" do
|
|
71
71
|
|
|
72
72
|
it "should push true" do
|
|
73
|
-
push 'test.rspec' => true
|
|
73
|
+
push 'test.coverage' => true, 'test.rspec' => true
|
|
74
|
+
|
|
74
75
|
@result.should include %(RSpec::Core::RakeTask)
|
|
75
76
|
@result.should include %(Rake::Task['rcov:spec'].invoke)
|
|
76
77
|
end
|
|
77
78
|
|
|
78
79
|
it "should push false" do
|
|
79
|
-
push 'test.rspec' => false
|
|
80
|
+
push 'test.coverage' => true, 'test.rspec' => false
|
|
80
81
|
@result.should_not include %(RSpec::Core::RakeTask)
|
|
81
82
|
@result.should_not include %(Rake::Task['rcov:spec'].invoke)
|
|
82
83
|
end
|
|
83
84
|
|
|
84
85
|
it "should pull true" do
|
|
85
|
-
pull 'test.rspec' => true
|
|
86
|
+
pull 'test.coverage' => true, 'test.rspec' => true
|
|
86
87
|
@result['test.rspec'].should == true
|
|
87
88
|
end
|
|
88
89
|
|
|
89
90
|
it "should pull false" do
|
|
90
|
-
pull 'test.rspec' => false
|
|
91
|
+
pull 'test.coverage' => true, 'test.rspec' => false
|
|
91
92
|
@result['test.rspec'].should == false
|
|
92
93
|
end
|
|
93
94
|
|
|
@@ -96,24 +97,24 @@ describe "templates/lib/tasks/test.rake" do
|
|
|
96
97
|
describe "test.cucumber" do
|
|
97
98
|
|
|
98
99
|
it "should push true" do
|
|
99
|
-
push 'test.cucumber' => true
|
|
100
|
+
push 'test.coverage' => true, 'test.cucumber' => true
|
|
100
101
|
@result.should include %(Cucumber::Rake::Task)
|
|
101
102
|
@result.should include %(Rake::Task['rcov:cucumber'].invoke)
|
|
102
103
|
end
|
|
103
104
|
|
|
104
105
|
it "should push false" do
|
|
105
|
-
push 'test.cucumber' => false
|
|
106
|
+
push 'test.coverage' => true, 'test.cucumber' => false
|
|
106
107
|
@result.should_not include %(Cucumber::Rake::Task)
|
|
107
108
|
@result.should_not include %(Rake::Task['rcov:cucumber'].invoke)
|
|
108
109
|
end
|
|
109
110
|
|
|
110
111
|
it "should pull true" do
|
|
111
|
-
pull 'test.cucumber' => true
|
|
112
|
+
pull 'test.coverage' => true, 'test.cucumber' => true
|
|
112
113
|
@result['test.cucumber'].should == true
|
|
113
114
|
end
|
|
114
115
|
|
|
115
116
|
it "should pull false" do
|
|
116
|
-
pull 'test.cucumber' => false
|
|
117
|
+
pull 'test.coverage' => true, 'test.cucumber' => false
|
|
117
118
|
@result['test.cucumber'].should == false
|
|
118
119
|
end
|
|
119
120
|
|
|
@@ -122,24 +123,24 @@ describe "templates/lib/tasks/test.rake" do
|
|
|
122
123
|
describe "test.tasks" do
|
|
123
124
|
|
|
124
125
|
it "should push" do
|
|
125
|
-
push
|
|
126
|
-
@result.should include %(\n task :all => %w(
|
|
127
|
-
@result.should include %(desc "Test the application using rapid:check,
|
|
126
|
+
push 'test.rake.all' => true, 'test.unit' => true
|
|
127
|
+
@result.should include %(\n task :all => %w(rapid:check test))
|
|
128
|
+
@result.should include %(desc "Test the application using rapid:check, test")
|
|
128
129
|
end
|
|
129
130
|
|
|
130
131
|
it "should pull" do
|
|
131
|
-
pull
|
|
132
|
-
@result['test.tasks'].should == %(%w(
|
|
132
|
+
pull 'test.rake.all' => true, 'test.unit' => true
|
|
133
|
+
@result['test.tasks'].should == %(%w(rapid:check test))
|
|
133
134
|
end
|
|
134
135
|
|
|
135
136
|
it "should push rspec" do
|
|
136
|
-
push 'test.unit' => false, 'test.rspec' => true
|
|
137
|
-
@result.should include %(\n task :all => %w(
|
|
137
|
+
push 'test.rake.all' => true, 'test.unit' => false, 'test.rspec' => true
|
|
138
|
+
@result.should include %(\n task :all => %w(rapid:check spec))
|
|
138
139
|
end
|
|
139
140
|
|
|
140
141
|
it "should pull rspec" do
|
|
141
|
-
pull 'test.unit' => false, 'test.rspec' => true
|
|
142
|
-
@result['test.tasks'].should == %(%w(
|
|
142
|
+
pull 'test.rake.all' => true, 'test.unit' => false, 'test.rspec' => true
|
|
143
|
+
@result['test.tasks'].should == %(%w(rapid:check spec))
|
|
143
144
|
end
|
|
144
145
|
|
|
145
146
|
end
|
|
@@ -32,22 +32,22 @@ describe "templates/spec/spec_helper.rb" do
|
|
|
32
32
|
describe "database.active_record" do
|
|
33
33
|
|
|
34
34
|
it "should push true" do
|
|
35
|
-
push 'database.
|
|
35
|
+
push 'database.sqlite3' => true
|
|
36
36
|
@result.should include %( DatabaseCleaner.strategy = :transaction)
|
|
37
37
|
end
|
|
38
38
|
|
|
39
39
|
it "should push false" do
|
|
40
|
-
push 'database.
|
|
40
|
+
push 'database.sqlite3' => false
|
|
41
41
|
@result.should_not include %( DatabaseCleaner.strategy = :transaction)
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
it "should pull true" do
|
|
45
|
-
pull 'database.
|
|
45
|
+
pull 'database.sqlite3' => true
|
|
46
46
|
@result['database.active_record'].should == true
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
it "should pull false" do
|
|
50
|
-
pull 'database.
|
|
50
|
+
pull 'database.sqlite3' => false
|
|
51
51
|
@result['database.active_record'].should == false
|
|
52
52
|
end
|
|
53
53
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module GoogleAnalyticsHelper
|
|
2
|
+
|
|
3
|
+
def google_analytics uid = "<%= analytics.google.uid %>"
|
|
4
|
+
return unless Rails.env == 'production'
|
|
5
|
+
|
|
6
|
+
raw %(
|
|
7
|
+
<script type="text/javascript">
|
|
8
|
+
var _gaq = _gaq || [];
|
|
9
|
+
_gaq.push(['_setAccount', '#{uid}']);
|
|
10
|
+
_gaq.push(['_trackPageview']);
|
|
11
|
+
|
|
12
|
+
(function() {
|
|
13
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
14
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
15
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
16
|
+
})();
|
|
17
|
+
|
|
18
|
+
</script>)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
end
|
|
@@ -13,13 +13,14 @@ require "active_resource/railtie"
|
|
|
13
13
|
|
|
14
14
|
if defined?(Bundler)
|
|
15
15
|
# If you precompile assets before deploying to production, use this line
|
|
16
|
-
Bundler.require
|
|
16
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
|
17
17
|
# If you want your assets lazily compiled in production, use this line
|
|
18
18
|
# Bundler.require(:default, :assets, Rails.env)
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
module <%= module_name %>
|
|
22
22
|
class Application < Rails::Application
|
|
23
|
+
<%= app.config.start %>
|
|
23
24
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
|
24
25
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
|
25
26
|
<% if timezone? %>
|
|
@@ -27,6 +28,7 @@ module <%= module_name %>
|
|
|
27
28
|
<% else %>
|
|
28
29
|
# config.time_zone = 'Central Time (US & Canada)'
|
|
29
30
|
<% end %>
|
|
30
|
-
|
|
31
|
+
|
|
32
|
+
<%= app.config.rest %>
|
|
31
33
|
end
|
|
32
34
|
end
|
data/templates/config/deploy.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'capistrano/ext/multistage'
|
|
2
2
|
require "bundler/capistrano"
|
|
3
3
|
|
|
4
|
-
<% if deploy.rvm? %>
|
|
4
|
+
<% if deploy.capistrano.production.rvm? %>
|
|
5
5
|
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
|
|
6
6
|
require "rvm/capistrano"
|
|
7
7
|
|
|
@@ -10,12 +10,12 @@ require "rvm/capistrano"
|
|
|
10
10
|
require "whenever/capistrano"
|
|
11
11
|
|
|
12
12
|
<% end %>
|
|
13
|
-
set :stages, <%= deploy.stages %>
|
|
13
|
+
set :stages, <%= deploy.capistrano.stages %>
|
|
14
14
|
set :default_stage, "production"
|
|
15
15
|
set :use_sudo, false
|
|
16
16
|
|
|
17
17
|
set :application, "<%= name %>"
|
|
18
|
-
set :repository, "<%= deploy.repository.url %>"
|
|
18
|
+
set :repository, "<%= deploy.capistrano.repository.url %>"
|
|
19
19
|
|
|
20
20
|
set :scm, :git
|
|
21
21
|
set :scm_verbose, true
|
|
@@ -25,7 +25,7 @@ set :copy_exclude, [".git/"]
|
|
|
25
25
|
set :rake, "bundle exec rake"
|
|
26
26
|
|
|
27
27
|
after "deploy:update_code", "deploy:cleanup"
|
|
28
|
-
<% if deploy.symlink? %>
|
|
28
|
+
<% if deploy.capistrano.symlink? %>
|
|
29
29
|
after "bundle:install", "deploy:symlink_shared"
|
|
30
30
|
|
|
31
31
|
namespace :deploy do
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
set :rails_env, "production"
|
|
2
|
-
set :user, "<%= deploy.production.user %>"
|
|
2
|
+
set :user, "<%= deploy.capistrano.production.user %>"
|
|
3
3
|
|
|
4
|
-
set :deploy_to, "<%= deploy.production.path %>"
|
|
5
|
-
set :branch, "<%= deploy.production.branch %>"
|
|
6
|
-
set :keep_releases, <%= deploy.production.keep %>
|
|
4
|
+
set :deploy_to, "<%= deploy.capistrano.production.path %>"
|
|
5
|
+
set :branch, "<%= deploy.capistrano.production.branch %>"
|
|
6
|
+
set :keep_releases, <%= deploy.capistrano.production.keep %>
|
|
7
7
|
|
|
8
|
-
<% if deploy.production.bin? %>
|
|
9
|
-
set :bundle_cmd, "<%= deploy.production.bin %>/bundle"
|
|
8
|
+
<% if deploy.capistrano.production.bin? %>
|
|
9
|
+
set :bundle_cmd, "<%= deploy.capistrano.production.bin %>/bundle"
|
|
10
10
|
|
|
11
11
|
<% end %>
|
|
12
|
-
<% if deploy.production.scheduler? %>
|
|
13
|
-
set :whenever_command, "<%= deploy.production.bin %>/bundle exec whenever"
|
|
12
|
+
<% if deploy.capistrano.production.scheduler? %>
|
|
13
|
+
set :whenever_command, "<%= deploy.capistrano.production.bin %>/bundle exec whenever"
|
|
14
14
|
|
|
15
15
|
<% end %>
|
|
16
|
-
role :web, "<%= deploy.production.domain %>"
|
|
17
|
-
role :app, "<%= deploy.production.domain %>"
|
|
18
|
-
role :db, "<%= deploy.production.domain %>", :primary => true
|
|
16
|
+
role :web, "<%= deploy.capistrano.production.domain %>"
|
|
17
|
+
role :app, "<%= deploy.capistrano.production.domain %>"
|
|
18
|
+
role :db, "<%= deploy.capistrano.production.domain %>", :primary => true
|
|
19
19
|
|
|
20
|
-
<% if deploy.production.rvm? %>
|
|
21
|
-
set :rvm_type, :<%= deploy.production.rvm.type %>
|
|
22
|
-
set :rvm_ruby_string, '<%= deploy.production.rvm.ruby %>@<%= deploy.production.rvm.gemset %>'
|
|
20
|
+
<% if deploy.capistrano.production.rvm? %>
|
|
21
|
+
set :rvm_type, :<%= deploy.capistrano.production.rvm.type %>
|
|
22
|
+
set :rvm_ruby_string, '<%= deploy.capistrano.production.rvm.ruby %>@<%= deploy.capistrano.production.rvm.gemset %>'
|
|
23
23
|
|
|
24
24
|
<% end %>
|
|
25
|
-
<% if deploy.production.server == 'passenger' %>
|
|
25
|
+
<% if deploy.capistrano.production.server == 'passenger' %>
|
|
26
26
|
namespace :deploy do
|
|
27
27
|
|
|
28
28
|
task :start, :roles => :app do
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
|
3
3
|
|
|
4
4
|
# In the development environment your application's code is reloaded on
|
|
5
|
-
# every request.
|
|
5
|
+
# every request. This slows down response time but is perfect for development
|
|
6
6
|
# since you don't have to restart the web server when you make code changes.
|
|
7
7
|
config.cache_classes = false
|
|
8
8
|
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
# Don't care if the mailer can't send
|
|
17
17
|
config.action_mailer.raise_delivery_errors = false
|
|
18
|
-
|
|
18
|
+
<% if development.delivery_method? %>
|
|
19
|
+
config.action_mailer.delivery_method = :<%= development.delivery_method %>
|
|
20
|
+
<% end %>
|
|
19
21
|
|
|
20
22
|
# Print deprecation notices to the Rails logger
|
|
21
23
|
config.active_support.deprecation = :log
|
|
@@ -23,6 +25,13 @@
|
|
|
23
25
|
# Only use best-standards-support built into browsers
|
|
24
26
|
config.action_dispatch.best_standards_support = :builtin
|
|
25
27
|
|
|
28
|
+
# Raise exception on mass assignment protection for Active Record models
|
|
29
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
|
30
|
+
|
|
31
|
+
# Log the query plan for queries taking more than this (works
|
|
32
|
+
# with SQLite, MySQL, and PostgreSQL)
|
|
33
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
34
|
+
|
|
26
35
|
# Do not compress assets
|
|
27
36
|
config.assets.compress = false
|
|
28
37
|
|
|
@@ -30,6 +39,6 @@
|
|
|
30
39
|
config.assets.debug = true
|
|
31
40
|
<% if development.domain? %>
|
|
32
41
|
|
|
33
|
-
config.action_mailer.default_url_options = {
|
|
42
|
+
config.action_mailer.default_url_options = { <% if development.protocol == 'https' %>:protocol => "https", <% end %>:host => "<%= development.domain %>"<% if development.port? %>, :port => <%= development.port %><% end %> }
|
|
34
43
|
<% end %>
|
|
35
44
|
end
|
|
@@ -33,8 +33,11 @@
|
|
|
33
33
|
# See everything in the log (default is :info)
|
|
34
34
|
# config.log_level = :debug
|
|
35
35
|
|
|
36
|
+
# Prepend all log lines with the following tags
|
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
|
38
|
+
|
|
36
39
|
# Use a different logger for distributed setups
|
|
37
|
-
# config.logger = SyslogLogger.new
|
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
|
38
41
|
|
|
39
42
|
# Use a different cache store in production
|
|
40
43
|
# config.cache_store = :mem_cache_store
|
|
@@ -57,8 +60,12 @@
|
|
|
57
60
|
|
|
58
61
|
# Send deprecation notices to registered listeners
|
|
59
62
|
config.active_support.deprecation = :notify
|
|
63
|
+
|
|
64
|
+
# Log the query plan for queries taking more than this (works
|
|
65
|
+
# with SQLite, MySQL, and PostgreSQL)
|
|
66
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
60
67
|
<% if production.domain? %>
|
|
61
68
|
|
|
62
|
-
config.action_mailer.default_url_options = {
|
|
69
|
+
config.action_mailer.default_url_options = { <% if production.protocol == 'https' %>:protocol => "https", <% end %>:host => "<%= production.domain %>"<% if production.port? %>, :port => <%= production.port %><% end %> }
|
|
63
70
|
<% end %>
|
|
64
71
|
end
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
# Settings specified here will take precedence over those in config/application.rb
|
|
3
3
|
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
|
5
|
-
# test suite.
|
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
|
6
6
|
# your test database is "scratch space" for the test suite and is wiped
|
|
7
|
-
# and recreated between test runs.
|
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
|
8
8
|
config.cache_classes = true
|
|
9
9
|
|
|
10
10
|
# Configure static asset server for tests with Cache-Control for performance
|
|
@@ -29,18 +29,13 @@
|
|
|
29
29
|
# ActionMailer::Base.deliveries array.
|
|
30
30
|
config.action_mailer.delivery_method = :test
|
|
31
31
|
|
|
32
|
-
#
|
|
33
|
-
|
|
34
|
-
# like if you have constraints or database-specific column types
|
|
35
|
-
# config.active_record.schema_format = :sql
|
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
|
36
34
|
|
|
37
35
|
# Print deprecation notices to the stderr
|
|
38
36
|
config.active_support.deprecation = :stderr
|
|
39
|
-
|
|
40
|
-
# Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
|
|
41
|
-
config.assets.allow_debugging = true
|
|
42
37
|
<% if test.domain? %>
|
|
43
38
|
|
|
44
|
-
config.action_mailer.default_url_options = {
|
|
39
|
+
config.action_mailer.default_url_options = { <% if test.protocol == 'https' %>:protocol => "https", <% end %>:host => "<%= test.domain %>"<% if test.port? %>, :port => <%= test.port %><% end %> }
|
|
45
40
|
<% end %>
|
|
46
41
|
end
|