suspenders 1.37.0 → 1.38.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +6 -0
- data/bin/suspenders +6 -1
- data/lib/suspenders/adapters/heroku.rb +0 -2
- data/lib/suspenders/app_builder.rb +0 -14
- data/lib/suspenders/generators/app_generator.rb +0 -6
- data/lib/suspenders/version.rb +1 -1
- data/spec/features/github_spec.rb +1 -0
- data/spec/features/heroku_spec.rb +4 -2
- data/spec/features/new_project_spec.rb +7 -8
- data/spec/support/suspenders.rb +10 -0
- data/suspenders.gemspec +0 -5
- data/templates/Gemfile.erb +1 -1
- data/templates/_css_overrides.html.erb +0 -1
- data/templates/bin_deploy +1 -1
- data/templates/bin_setup_review_app.erb +1 -1
- data/templates/smtp.rb +4 -0
- metadata +3 -74
- data/templates/staging.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39d94edf60f71093f91ed7a93fd48593d2f11c3f
|
4
|
+
data.tar.gz: 3ac3fe49c1570a2bc73512b044f7e8ca0c16e636
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5e6d94dea4937ff82ed514950ecd9c399caf923f8013dcbe14d9f6fd017c070f5d0d09e5b2d39830a9acca9df18538cfe54c16f68221ffb8436f038ff87ab49
|
7
|
+
data.tar.gz: 3fbcf388da90d8aa42d520e911c839b8c2349a3fa4d8ad5d73e8a4ec17c190ba400dd12ec96972702c9aa8645cdc75dfaf5230800eddc1c00812c88113ef88ba
|
data/NEWS.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
1.38.0 (April 15, 2016)
|
2
|
+
|
3
|
+
* Update bourbon to `v5.0.0.beta.5`
|
4
|
+
* Drops staging environment in favor of configuration through env variables
|
5
|
+
* Bugfix: failing migrations were not making Heroku deploys fail
|
6
|
+
|
1
7
|
1.37.0 (March 13, 2016)
|
2
8
|
|
3
9
|
* Remove `RAILS_ENV` definitions
|
data/bin/suspenders
CHANGED
@@ -6,7 +6,12 @@ $LOAD_PATH << source_path
|
|
6
6
|
|
7
7
|
require 'suspenders'
|
8
8
|
|
9
|
-
if
|
9
|
+
if ARGV.empty?
|
10
|
+
puts "Please provide a path for the new application"
|
11
|
+
puts
|
12
|
+
puts "See --help for more info"
|
13
|
+
exit 0
|
14
|
+
elsif ['-v', '--version'].include? ARGV[0]
|
10
15
|
puts Suspenders::VERSION
|
11
16
|
exit 0
|
12
17
|
end
|
@@ -25,11 +25,9 @@ module Suspenders
|
|
25
25
|
end
|
26
26
|
|
27
27
|
def create_staging_heroku_app(flags)
|
28
|
-
rack_env = "RACK_ENV=staging"
|
29
28
|
app_name = heroku_app_name_for("staging")
|
30
29
|
|
31
30
|
run_toolbelt_command "create #{app_name} #{flags}", "staging"
|
32
|
-
run_toolbelt_command "config:add #{rack_env}", "staging"
|
33
31
|
end
|
34
32
|
|
35
33
|
def create_production_heroku_app(flags)
|
@@ -196,20 +196,6 @@ module Suspenders
|
|
196
196
|
)
|
197
197
|
end
|
198
198
|
|
199
|
-
def setup_staging_environment
|
200
|
-
staging_file = 'config/environments/staging.rb'
|
201
|
-
copy_file 'staging.rb', staging_file
|
202
|
-
|
203
|
-
config = <<-RUBY
|
204
|
-
|
205
|
-
Rails.application.configure do
|
206
|
-
# ...
|
207
|
-
end
|
208
|
-
RUBY
|
209
|
-
|
210
|
-
append_file staging_file, config
|
211
|
-
end
|
212
|
-
|
213
199
|
def setup_secret_token
|
214
200
|
template 'secrets.yml', 'config/secrets.yml', force: true
|
215
201
|
end
|
@@ -34,7 +34,6 @@ module Suspenders
|
|
34
34
|
invoke :setup_development_environment
|
35
35
|
invoke :setup_test_environment
|
36
36
|
invoke :setup_production_environment
|
37
|
-
invoke :setup_staging_environment
|
38
37
|
invoke :setup_secret_token
|
39
38
|
invoke :create_suspenders_views
|
40
39
|
invoke :configure_app
|
@@ -118,11 +117,6 @@ module Suspenders
|
|
118
117
|
build :setup_asset_host
|
119
118
|
end
|
120
119
|
|
121
|
-
def setup_staging_environment
|
122
|
-
say 'Setting up the staging environment'
|
123
|
-
build :setup_staging_environment
|
124
|
-
end
|
125
|
-
|
126
120
|
def setup_secret_token
|
127
121
|
say 'Moving secret token out of version control'
|
128
122
|
build :setup_secret_token
|
data/lib/suspenders/version.rb
CHANGED
@@ -5,6 +5,7 @@ RSpec.describe "Heroku" do
|
|
5
5
|
before(:all) do
|
6
6
|
clean_up
|
7
7
|
run_suspenders("--heroku=true")
|
8
|
+
setup_app_dependencies
|
8
9
|
end
|
9
10
|
|
10
11
|
it "suspends a project for Heroku" do
|
@@ -33,7 +34,7 @@ RSpec.describe "Heroku" do
|
|
33
34
|
bin_setup_path = "#{project_path}/bin/setup_review_app"
|
34
35
|
bin_setup = IO.read(bin_setup_path)
|
35
36
|
|
36
|
-
expect(bin_setup).to include("heroku run rake db:migrate --app #{app_name}-staging-pr-$1")
|
37
|
+
expect(bin_setup).to include("heroku run rake db:migrate --exit-code --app #{app_name}-staging-pr-$1")
|
37
38
|
expect(bin_setup).to include("heroku ps:scale worker=1 --app #{app_name}-staging-pr-$1")
|
38
39
|
expect(bin_setup).to include("heroku restart --app #{app_name}-staging-pr-$1")
|
39
40
|
expect(File.stat(bin_setup_path)).to be_executable
|
@@ -41,7 +42,7 @@ RSpec.describe "Heroku" do
|
|
41
42
|
bin_deploy_path = "#{project_path}/bin/deploy"
|
42
43
|
bin_deploy = IO.read(bin_deploy_path)
|
43
44
|
|
44
|
-
expect(bin_deploy).to include("heroku run rake db:migrate")
|
45
|
+
expect(bin_deploy).to include("heroku run rake db:migrate --exit-code")
|
45
46
|
expect(File.stat(bin_deploy_path)).to be_executable
|
46
47
|
|
47
48
|
readme = IO.read("#{project_path}/README.md")
|
@@ -77,6 +78,7 @@ RSpec.describe "Heroku" do
|
|
77
78
|
before(:all) do
|
78
79
|
clean_up
|
79
80
|
run_suspenders(%{--heroku=true --heroku-flags="--region eu"})
|
81
|
+
setup_app_dependencies
|
80
82
|
end
|
81
83
|
|
82
84
|
it "suspends a project with extra Heroku flags" do
|
@@ -5,6 +5,7 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
5
5
|
drop_dummy_database
|
6
6
|
remove_project_directory
|
7
7
|
run_suspenders
|
8
|
+
setup_app_dependencies
|
8
9
|
end
|
9
10
|
|
10
11
|
it "uses custom Gemfile" do
|
@@ -28,14 +29,6 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
31
|
-
it "inherits staging config from production" do
|
32
|
-
staging_file = IO.read("#{project_path}/config/environments/staging.rb")
|
33
|
-
config_stub = "Rails.application.configure do"
|
34
|
-
|
35
|
-
expect(staging_file).to match(/^require_relative "production"/)
|
36
|
-
expect(staging_file).to match(/#{config_stub}/), staging_file
|
37
|
-
end
|
38
|
-
|
39
32
|
it "creates .ruby-version from Suspenders .ruby-version" do
|
40
33
|
ruby_version_file = IO.read("#{project_path}/.ruby-version")
|
41
34
|
|
@@ -162,6 +155,12 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
162
155
|
expect(prod_env_file).not_to match(/"HOST"/)
|
163
156
|
end
|
164
157
|
|
158
|
+
it "configures email interceptor in smtp config" do
|
159
|
+
smtp_file = IO.read("#{project_path}/config/smtp.rb")
|
160
|
+
expect(smtp_file).
|
161
|
+
to match(/RecipientInterceptor.new\(ENV\["EMAIL_RECIPIENTS"\]\)/)
|
162
|
+
end
|
163
|
+
|
165
164
|
it "configures language in html element" do
|
166
165
|
layout_path = "/app/views/layouts/application.html.erb"
|
167
166
|
layout_file = IO.read("#{project_path}#{layout_path}")
|
data/spec/support/suspenders.rb
CHANGED
@@ -20,6 +20,16 @@ module SuspendersTestHelpers
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
def setup_app_dependencies
|
24
|
+
if File.exist?(project_path)
|
25
|
+
Dir.chdir(project_path) do
|
26
|
+
Bundler.with_clean_env do
|
27
|
+
`bundle check || bundle install`
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
23
33
|
def drop_dummy_database
|
24
34
|
if File.exist?(project_path)
|
25
35
|
Dir.chdir(project_path) do
|
data/suspenders.gemspec
CHANGED
@@ -31,9 +31,4 @@ rush to build something amazing; don't use it if you like missing deadlines.
|
|
31
31
|
s.add_dependency 'rails', Suspenders::RAILS_VERSION
|
32
32
|
|
33
33
|
s.add_development_dependency 'rspec', '~> 3.2'
|
34
|
-
s.add_development_dependency 'bitters', '~> 1.3'
|
35
|
-
s.add_development_dependency 'simple_form', '~> 3.2'
|
36
|
-
s.add_development_dependency 'title', '~> 0.0'
|
37
|
-
s.add_development_dependency 'quiet_assets', '~> 1.1'
|
38
|
-
s.add_development_dependency 'capybara-webkit', '~> 1.8'
|
39
34
|
end
|
data/templates/Gemfile.erb
CHANGED
data/templates/bin_deploy
CHANGED
@@ -14,6 +14,6 @@ heroku pg:backups restore \
|
|
14
14
|
DATABASE_URL \
|
15
15
|
--confirm <%= app_name.dasherize %>-staging-pr-$1 \
|
16
16
|
--app <%= app_name.dasherize %>-staging-pr-$1
|
17
|
-
heroku run rake db:migrate --app <%= app_name.dasherize %>-staging-pr-$1
|
17
|
+
heroku run rake db:migrate --exit-code --app <%= app_name.dasherize %>-staging-pr-$1
|
18
18
|
heroku ps:scale worker=1 --app <%= app_name.dasherize %>-staging-pr-$1
|
19
19
|
heroku restart --app <%= app_name.dasherize %>-staging-pr-$1
|
data/templates/smtp.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.38.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,76 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.2'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bitters
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.3'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '1.3'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: simple_form
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.2'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.2'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: title
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0.0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0.0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: quiet_assets
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '1.1'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '1.1'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: capybara-webkit
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '1.8'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '1.8'
|
125
55
|
description: |
|
126
56
|
Suspenders is a base Rails project that you can upgrade. It is used by
|
127
57
|
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
@@ -204,7 +134,6 @@ files:
|
|
204
134
|
- templates/shoulda_matchers_config_rspec.rb
|
205
135
|
- templates/smtp.rb
|
206
136
|
- templates/spec_helper.rb
|
207
|
-
- templates/staging.rb
|
208
137
|
- templates/suspenders_gitignore
|
209
138
|
- templates/suspenders_layout.html.erb.erb
|
210
139
|
homepage: http://github.com/thoughtbot/suspenders
|
@@ -228,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
157
|
version: '0'
|
229
158
|
requirements: []
|
230
159
|
rubyforge_project:
|
231
|
-
rubygems_version: 2.
|
160
|
+
rubygems_version: 2.6.2
|
232
161
|
signing_key:
|
233
162
|
specification_version: 4
|
234
163
|
summary: Generate a Rails app using thoughtbot's best practices.
|