voyage 1.0 → 1.44.0.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.
@@ -7,7 +7,7 @@ RSpec.describe "GitHub" do
7
7
  end
8
8
 
9
9
  it "suspends a project with --github option" do
10
- repo_name = 'test'
10
+ repo_name = "test"
11
11
  run_suspenders("--github=#{repo_name}")
12
12
  setup_app_dependencies
13
13
 
@@ -31,9 +31,9 @@ RSpec.describe "Heroku" do
31
31
  bin_setup_path = "#{project_path}/bin/setup"
32
32
  bin_setup = IO.read(bin_setup_path)
33
33
 
34
- expect(bin_setup).to include("heroku join --app #{app_name}-production")
35
- expect(bin_setup).to include("heroku join --app #{app_name}-staging")
36
- expect(bin_setup).to include("git config heroku.remote staging")
34
+ expect(bin_setup).to match(/^if heroku join --app #{app_name}-production/)
35
+ expect(bin_setup).to match(/^if heroku join --app #{app_name}-staging/)
36
+ expect(bin_setup).to match(/^git config heroku.remote staging/)
37
37
  expect(File.stat(bin_setup_path)).to be_executable
38
38
 
39
39
  readme = IO.read("#{project_path}/README.md")
@@ -41,10 +41,15 @@ RSpec.describe "Suspend a new project with default configuration" do
41
41
  end
42
42
  end
43
43
 
44
+ it "doesn't generate test directory" do
45
+ expect(File).not_to exist("#{project_path}/test")
46
+ end
47
+
44
48
  it "loads secret_key_base from env" do
45
49
  secrets_file = IO.read("#{project_path}/config/secrets.yml")
46
50
 
47
- expect(secrets_file).to match(/secret_key_base: <%= ENV\["SECRET_KEY_BASE"\] %>/)
51
+ expect(secrets_file).
52
+ to match(/secret_key_base: <%= ENV\["SECRET_KEY_BASE"\] %>/)
48
53
  end
49
54
 
50
55
  it "adds bin/setup file" do
@@ -110,22 +115,17 @@ RSpec.describe "Suspend a new project with default configuration" do
110
115
  it "adds explicit quiet_assets configuration" do
111
116
  result = IO.read("#{project_path}/config/application.rb")
112
117
 
113
- expect(result).to match(
114
- /^ +config.quiet_assets = true$/
115
- )
118
+ expect(result).to match(/^ +config.assets.quiet = true$/)
116
119
  end
117
120
 
118
- it "configures static_cache_control in production" do
119
- prod_env_file = IO.read("#{project_path}/config/environments/production.rb")
120
- expect(prod_env_file).to match(
121
- /config.static_cache_control = "public, max-age=.+"/,
121
+ it "configures public_file_server.headers in production" do
122
+ expect(production_config).to match(
123
+ /^ +config.public_file_server.headers = {\n +"Cache-Control" => "public,/,
122
124
  )
123
125
  end
124
126
 
125
127
  it "raises on missing translations in development and test" do
126
- %w[development test].each do |environment|
127
- environment_file =
128
- IO.read("#{project_path}/config/environments/#{environment}.rb")
128
+ [development_config, test_config].each do |environment_file|
129
129
  expect(environment_file).to match(
130
130
  /^ +config.action_view.raise_on_missing_translations = true$/
131
131
  )
@@ -143,15 +143,13 @@ RSpec.describe "Suspend a new project with default configuration" do
143
143
  end
144
144
 
145
145
  it "configs :test email delivery method for development" do
146
- dev_env_file = IO.read("#{project_path}/config/environments/development.rb")
147
- expect(dev_env_file).
146
+ expect(development_config).
148
147
  to match(/^ +config.action_mailer.delivery_method = :file$/)
149
148
  end
150
149
 
151
150
  it "uses APPLICATION_HOST, not HOST in the production config" do
152
- prod_env_file = IO.read("#{project_path}/config/environments/production.rb")
153
- expect(prod_env_file).to match(/"APPLICATION_HOST"/)
154
- expect(prod_env_file).not_to match(/"HOST"/)
151
+ expect(production_config).to match(/"APPLICATION_HOST"/)
152
+ expect(production_config).not_to match(/"HOST"/)
155
153
  end
156
154
 
157
155
  it "configures email interceptor in smtp config" do
@@ -168,7 +166,6 @@ RSpec.describe "Suspend a new project with default configuration" do
168
166
 
169
167
  it "configs active job queue adapter" do
170
168
  application_config = IO.read("#{project_path}/config/application.rb")
171
- test_config = IO.read("#{project_path}/config/environments/test.rb")
172
169
 
173
170
  expect(application_config).to match(
174
171
  /^ +config.active_job.queue_adapter = :delayed_job$/
@@ -179,16 +176,12 @@ RSpec.describe "Suspend a new project with default configuration" do
179
176
  end
180
177
 
181
178
  it "configs bullet gem in development" do
182
- test_config = IO.read("#{project_path}/config/environments/development.rb")
183
-
184
- expect(test_config).to match /^ +Bullet.enable = true$/
185
- expect(test_config).to match /^ +Bullet.bullet_logger = true$/
186
- expect(test_config).to match /^ +Bullet.rails_logger = true$/
179
+ expect(development_config).to match /^ +Bullet.enable = true$/
180
+ expect(development_config).to match /^ +Bullet.bullet_logger = true$/
181
+ expect(development_config).to match /^ +Bullet.rails_logger = true$/
187
182
  end
188
183
 
189
184
  it "configs missing assets to raise in test" do
190
- test_config = IO.read("#{project_path}/config/environments/test.rb")
191
-
192
185
  expect(test_config).to match(
193
186
  /^ +config.assets.raise_runtime_errors = true$/,
194
187
  )
@@ -207,9 +200,9 @@ RSpec.describe "Suspend a new project with default configuration" do
207
200
  config_files = [
208
201
  IO.read("#{project_path}/config/application.rb"),
209
202
  IO.read("#{project_path}/config/environment.rb"),
210
- IO.read("#{project_path}/config/environments/development.rb"),
211
- IO.read("#{project_path}/config/environments/production.rb"),
212
- IO.read("#{project_path}/config/environments/test.rb"),
203
+ development_config,
204
+ test_config,
205
+ production_config,
213
206
  ]
214
207
 
215
208
  config_files.each do |file|
@@ -226,12 +219,12 @@ RSpec.describe "Suspend a new project with default configuration" do
226
219
  bin_setup_path = "#{project_path}/bin/setup_review_app"
227
220
  bin_setup = IO.read(bin_setup_path)
228
221
 
229
- expect(bin_setup).to include("heroku run rake db:migrate --exit-code "\
230
- "--app #{app_name.dasherize}-staging-pr-$1")
231
- expect(bin_setup).to include("heroku ps:scale worker=1 "\
232
- "--app #{app_name.dasherize}-staging-pr-$1")
233
- expect(bin_setup).to include("heroku restart "\
234
- "--app #{app_name.dasherize}-staging-pr-$1")
222
+ expect(bin_setup).to include("PARENT_APP_NAME=#{app_name.dasherize}-staging")
223
+ expect(bin_setup).to include("APP_NAME=#{app_name.dasherize}-staging-pr-$1")
224
+ expect(bin_setup).to include("heroku run rake db:migrate --exit-code --app $APP_NAME")
225
+ expect(bin_setup).to include("heroku ps:scale worker=1 --app $APP_NAME")
226
+ expect(bin_setup).to include("heroku restart --app $APP_NAME")
227
+
235
228
  expect(File.stat(bin_setup_path)).to be_executable
236
229
  end
237
230
 
@@ -249,12 +242,6 @@ RSpec.describe "Suspend a new project with default configuration" do
249
242
  expect(app_json_file).to match(/"name":"#{app_name.dasherize}"/)
250
243
  end
251
244
 
252
- it "sets up heroku specific gems" do
253
- gemfile_file = IO.read("#{project_path}/Gemfile")
254
-
255
- expect(gemfile_file).to include %{gem "rails_stdout_logging"}
256
- end
257
-
258
245
  def app_name
259
246
  SuspendersTestHelpers::APP_NAME
260
247
  end
@@ -264,7 +251,46 @@ RSpec.describe "Suspend a new project with default configuration" do
264
251
  expect(gemfile).to match(/high_voltage/)
265
252
  end
266
253
 
254
+ it "adds and configures bourbon, neat, and refills" do
255
+ gemfile = read_project_file("Gemfile")
256
+
257
+ expect(gemfile).to match(/bourbon/)
258
+ expect(gemfile).to match(/neat/)
259
+ expect(gemfile).to match(/refills/)
260
+ end
261
+
262
+ it "configures bourbon, neat, and refills" do
263
+ flashes_path = %w(app assets stylesheets refills _flashes.scss)
264
+ expect(read_project_file(flashes_path)).to match(/\$flashes/m)
265
+
266
+ app_css = read_project_file(%w(app assets stylesheets application.scss))
267
+ expect(app_css).to match(/normalize-rails.*bourbon.*neat.*base.*refills/m)
268
+ end
269
+
270
+ it "doesn't use turbolinks" do
271
+ app_js = read_project_file(%w(app assets javascripts application.js))
272
+ expect(app_js).not_to match(/turbolinks/)
273
+ end
274
+
275
+ def development_config
276
+ @_development_config ||=
277
+ read_project_file %w(config environments development.rb)
278
+ end
279
+
280
+ def test_config
281
+ @_test_config ||= read_project_file %w(config environments test.rb)
282
+ end
283
+
284
+ def production_config
285
+ @_production_config ||=
286
+ read_project_file %w(config environments production.rb)
287
+ end
288
+
267
289
  def analytics_partial
268
290
  IO.read("#{project_path}/app/views/application/_analytics.html.erb")
269
291
  end
292
+
293
+ def read_project_file(path)
294
+ IO.read(File.join(project_path, *path))
295
+ end
270
296
  end
@@ -6,8 +6,8 @@ class FakeHeroku
6
6
  end
7
7
 
8
8
  def run!
9
- if @args.first == "plugins"
10
- puts "heroku-pipelines@0.29.0"
9
+ if @args.first == "help"
10
+ puts "pipelines # manage collections of apps in pipelines"
11
11
  end
12
12
  File.open(RECORDER, 'a') do |file|
13
13
  file.puts @args.join(' ')
data/suspenders.gemspec CHANGED
@@ -26,7 +26,7 @@ is used by headway to get a jump start on a working app.
26
26
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
27
27
  s.version = Voyage::VERSION
28
28
 
29
- s.add_dependency 'bitters', '~> 1.3'
29
+ s.add_dependency 'bitters', '~> 1.5'
30
30
  s.add_dependency 'bundler', '~> 1.3'
31
31
  s.add_dependency 'rails', Voyage::RAILS_VERSION
32
32
 
@@ -3,12 +3,10 @@ source "https://rubygems.org"
3
3
  ruby "<%= Suspenders::RUBY_VERSION %>"
4
4
 
5
5
  gem "autoprefixer-rails"
6
- gem "bourbon", "5.0.0.beta.5"
7
6
  gem "delayed_job_active_record"
8
7
  gem "flutie"
9
8
  gem "honeybadger"
10
9
  gem "jquery-rails"
11
- gem "neat", "~> 1.7.0"
12
10
  gem "normalize-rails", "~> 3.0.0"
13
11
  gem "pg"
14
12
  gem "puma"
@@ -19,13 +17,12 @@ gem "sass-rails", "~> 5.0"
19
17
  gem "simple_form"
20
18
  gem "skylight"
21
19
  gem "sprockets", ">= 3.0.0"
22
- gem "sprockets-es6"
23
20
  gem "suspenders"
24
21
  gem "title"
25
22
  gem "uglifier"
26
23
 
27
24
  group :development do
28
- gem "quiet_assets"
25
+ gem "listen"
29
26
  gem "spring"
30
27
  gem "spring-commands-rspec"
31
28
  gem "web-console"
@@ -39,8 +36,7 @@ group :development, :test do
39
36
  gem "factory_girl_rails"
40
37
  gem "pry-byebug"
41
38
  gem "pry-rails"
42
- gem "refills"
43
- gem "rspec-rails", "~> 3.4.0"
39
+ gem "rspec-rails", "~> 3.5"
44
40
  end
45
41
 
46
42
  group :development, :staging do
@@ -60,5 +56,4 @@ end
60
56
 
61
57
  group :staging, :production do
62
58
  gem "rack-timeout"
63
- gem "rails_stdout_logging"
64
59
  end
@@ -31,9 +31,6 @@
31
31
  },
32
32
  "SMTP_USERNAME":{
33
33
  "required":true
34
- },
35
- "WEB_CONCURRENCY":{
36
- "required":true
37
34
  }
38
35
  },
39
36
  "addons":[
@@ -9,11 +9,11 @@ if [ -z "$1" ]; then
9
9
  exit 64
10
10
  fi
11
11
 
12
- heroku pg:backups restore \
13
- `heroku pg:backups public-url -a <%= app_name.dasherize %>-staging` \
14
- DATABASE_URL \
15
- --confirm <%= app_name.dasherize %>-staging-pr-$1 \
16
- --app <%= app_name.dasherize %>-staging-pr-$1
17
- heroku run rake db:migrate --exit-code --app <%= app_name.dasherize %>-staging-pr-$1
18
- heroku ps:scale worker=1 --app <%= app_name.dasherize %>-staging-pr-$1
19
- heroku restart --app <%= app_name.dasherize %>-staging-pr-$1
12
+ PARENT_APP_NAME=<%= app_name.dasherize %>-staging
13
+ APP_NAME=<%= app_name.dasherize %>-staging-pr-$1
14
+ URL=`heroku pg:backups public-url -a $PARENT_APP_NAME`
15
+
16
+ heroku pg:backups restore $URL DATABASE_URL --confirm $APP_NAME --app $APP_NAME
17
+ heroku run rake db:migrate --exit-code --app $APP_NAME
18
+ heroku ps:scale worker=1 --app $APP_NAME
19
+ heroku restart --app $APP_NAME
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voyage
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.44.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot, headway
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-15 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitters
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: '1.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '4.2'
47
+ version: 5.0.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '4.2'
54
+ version: 5.0.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -99,8 +99,10 @@ files:
99
99
  - lib/suspenders/app_builder.rb
100
100
  - lib/suspenders/generators/app_generator.rb
101
101
  - lib/suspenders/generators/static_generator.rb
102
+ - lib/suspenders/generators/stylesheet_base_generator.rb
102
103
  - lib/suspenders/version.rb
103
104
  - lib/voyage.rb
105
+ - lib/voyage/README.md
104
106
  - lib/voyage/app_builder.rb
105
107
  - lib/voyage/generators/app_generator.rb
106
108
  - lib/voyage/templates/Gemfile.erb
@@ -181,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
183
  requirements:
182
184
  - - ">="
183
185
  - !ruby/object:Gem::Version
184
- version: 2.3.1
186
+ version: 2.4.0
185
187
  required_rubygems_version: !ruby/object:Gem::Requirement
186
188
  requirements:
187
189
  - - ">="
@@ -189,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
191
  version: '0'
190
192
  requirements: []
191
193
  rubyforge_project:
192
- rubygems_version: 2.5.1
194
+ rubygems_version: 2.6.10
193
195
  signing_key:
194
196
  specification_version: 4
195
197
  summary: Generate a Rails app using headway's best practices.