suspenders 1.39.0 → 1.40.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97fa9283f4c4c9b3af17953372b07bce23918a61
4
- data.tar.gz: 44a7c216b659711cc01faf8d3db39187d8e92c25
3
+ metadata.gz: f4bba79d54a04b9f85c062cf024f685e99826b40
4
+ data.tar.gz: e506439a76fcd20aa5f9dc010317efc20611f654
5
5
  SHA512:
6
- metadata.gz: 81d78836d28a922cf77072c974de05fa6756ce219bfb6a4dceebd1b89431b407127e765f170ee5b50247614d30884167b33b7e0075f5349098c92807a1ed0080
7
- data.tar.gz: d0c526b0a77295e7839f1c951f189cd759cee325b26c96ae549181fc3315b29bc0ba5d7a68c006d8bbcd17511659a42fd0628a592deeb5f6d0e2e6eb302eec79
6
+ metadata.gz: 1ea9a3b8f9fabdfda4f14b92f221c9f21715f6f97909dbd78b310fdd3da0bd12cf9cc909806adc6290bca5dd4e196ccc386d5998412524af76268b902c086287
7
+ data.tar.gz: 8f57f5ef1b22a882e620274638cf04b89f7115880a84405e54efc1dd1a0da0157aec23d1f87e0f95f0668dc5e26e19402b7b07a3d84b1df55d92169027466e6b
data/NEWS.md CHANGED
@@ -1,5 +1,16 @@
1
1
  master
2
2
 
3
+ 1.40.0 (June 25, 2016)
4
+
5
+ * Upgrade bourbon to 5.0.0.beta.6
6
+ * Update Neat to 1.8.0
7
+ * `APPLICATION_HOST` bug fix in production environment (was used before it was
8
+ defined)
9
+ * Update comment around Pipelines: it is now a Heroku core plugin
10
+ * Drop unneeded `WEB_CONCURRENCY` from `app.json` file
11
+ * Introduce a `suspenders:stylesheet_base` generator. The `application.scss`
12
+ must list the imports in a specific order. This removes the `application.css`.
13
+
3
14
  1.39.0 (May 25, 2016)
4
15
 
5
16
  * Update to Ruby 2.3.1
data/README.md CHANGED
@@ -80,7 +80,7 @@ And development gems like:
80
80
  And testing gems like:
81
81
 
82
82
  * [Capybara](https://github.com/jnicklas/capybara) and
83
- [Capybara Webkit](https://github.com/thoughtbot/capybara-webkit) for
83
+ [Capybara WebKit](https://github.com/thoughtbot/capybara-webkit) for
84
84
  integration testing
85
85
  * [Factory Girl](https://github.com/thoughtbot/factory_girl) for test data
86
86
  * [Formulaic](https://github.com/thoughtbot/formulaic) for integration testing
@@ -187,10 +187,10 @@ installed on your machine before generating an app with Suspenders.
187
187
  Use [OS X GCC Installer](https://github.com/kennethreitz/osx-gcc-installer/) for
188
188
  Snow Leopard (OS X 10.6).
189
189
 
190
- Use [Command Line Tools for XCode](https://developer.apple.com/downloads/index.action)
190
+ Use [Command Line Tools for Xcode](https://developer.apple.com/downloads/index.action)
191
191
  for Lion (OS X 10.7) or Mountain Lion (OS X 10.8).
192
192
 
193
- We use [Capybara Webkit](https://github.com/thoughtbot/capybara-webkit) for
193
+ We use [Capybara WebKit](https://github.com/thoughtbot/capybara-webkit) for
194
194
  full-stack JavaScript integration testing. It requires QT. Instructions for
195
195
  installing QT are
196
196
  [here](https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit).
data/lib/suspenders.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'suspenders/version'
2
2
  require 'suspenders/generators/app_generator'
3
3
  require 'suspenders/generators/static_generator'
4
+ require 'suspenders/generators/stylesheet_base_generator'
4
5
  require 'suspenders/actions'
5
6
  require "suspenders/adapters/heroku"
6
7
  require 'suspenders/app_builder'
@@ -51,9 +51,9 @@ module Suspenders
51
51
  end
52
52
 
53
53
  def create_heroku_pipeline
54
- pipelines_plugin = `heroku plugins | grep pipelines`
54
+ pipelines_plugin = `heroku help | grep pipelines`
55
55
  if pipelines_plugin.empty?
56
- puts "You need heroku pipelines plugin. Run: heroku plugins:install heroku-pipelines"
56
+ puts "You need heroku pipelines plugin. Run: brew upgrade heroku-toolbelt"
57
57
  exit 1
58
58
  end
59
59
 
@@ -142,14 +142,19 @@ module Suspenders
142
142
 
143
143
  def enable_rack_canonical_host
144
144
  config = <<-RUBY
145
- if ENV.fetch("HEROKU_APP_NAME", "").include?("staging-pr-")
145
+
146
+ if ENV.fetch("HEROKU_APP_NAME", "").include?("staging-pr-")
146
147
  ENV["APPLICATION_HOST"] = ENV["HEROKU_APP_NAME"] + ".herokuapp.com"
147
148
  end
148
149
 
149
150
  config.middleware.use Rack::CanonicalHost, ENV.fetch("APPLICATION_HOST")
150
151
  RUBY
151
152
 
152
- configure_environment "production", config
153
+ inject_into_file(
154
+ "config/environments/production.rb",
155
+ config,
156
+ after: "Rails.application.configure do",
157
+ )
153
158
  end
154
159
 
155
160
  def enable_rack_deflater
@@ -318,12 +323,6 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
318
323
  copy_file "Procfile", "Procfile"
319
324
  end
320
325
 
321
- def setup_stylesheets
322
- remove_file "app/assets/stylesheets/application.css"
323
- copy_file "application.scss",
324
- "app/assets/stylesheets/application.scss"
325
- end
326
-
327
326
  def install_refills
328
327
  generate "refills:import", "flashes"
329
328
  remove_dir "app/views/refills"
@@ -249,6 +249,7 @@ module Suspenders
249
249
  run("spring stop")
250
250
 
251
251
  generate("suspenders:static")
252
+ generate("suspenders:stylesheet_base")
252
253
 
253
254
  bundle_command "install"
254
255
  end
@@ -0,0 +1,27 @@
1
+ require "rails/generators"
2
+
3
+ module Suspenders
4
+ class StylesheetBaseGenerator < Rails::Generators::Base
5
+ source_root File.expand_path(
6
+ File.join("..", "..", "..", "templates"),
7
+ File.dirname(__FILE__))
8
+
9
+ def add_stylesheet_gems
10
+ gem "bourbon", "5.0.0.beta.6"
11
+ gem "neat", "~> 1.8.0"
12
+ gem "refills", group: [:development, :test]
13
+ end
14
+
15
+ def add_css_config
16
+ copy_file(
17
+ "application.scss",
18
+ "app/assets/stylesheets/application.scss",
19
+ force: true,
20
+ )
21
+ end
22
+
23
+ def remove_prior_config
24
+ remove_file "app/assets/stylesheets/application.css"
25
+ end
26
+ end
27
+ end
@@ -4,5 +4,5 @@ module Suspenders
4
4
  read("#{File.dirname(__FILE__)}/../../.ruby-version").
5
5
  strip.
6
6
  freeze
7
- VERSION = "1.39.0".freeze
7
+ VERSION = "1.40.0".freeze
8
8
  end
@@ -264,7 +264,24 @@ RSpec.describe "Suspend a new project with default configuration" do
264
264
  expect(gemfile).to match(/high_voltage/)
265
265
  end
266
266
 
267
+ it "adds and configures bourbon, neat, and refills" do
268
+ gemfile = read_project_file("Gemfile")
269
+
270
+ expect(gemfile).to match(/bourbon/)
271
+ expect(gemfile).to match(/neat/)
272
+ expect(gemfile).to match(/refills/)
273
+ end
274
+
275
+ it "configures bourbon, neat, and refills" do
276
+ app_css = read_project_file(%w(app assets stylesheets application.scss))
277
+ expect(app_css).to match(/normalize-rails.*bourbon.*neat.*base.*refills/m)
278
+ end
279
+
267
280
  def analytics_partial
268
281
  IO.read("#{project_path}/app/views/application/_analytics.html.erb")
269
282
  end
283
+
284
+ def read_project_file(path)
285
+ IO.read(File.join(project_path, *path))
286
+ end
270
287
  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(' ')
@@ -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"
@@ -39,7 +37,6 @@ group :development, :test do
39
37
  gem "factory_girl_rails"
40
38
  gem "pry-byebug"
41
39
  gem "pry-rails"
42
- gem "refills"
43
40
  gem "rspec-rails", "~> 3.4.0"
44
41
  end
45
42
 
@@ -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":[
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.39.0
4
+ version: 1.40.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-06-15 00:00:00.000000000 Z
11
+ date: 2016-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitters
@@ -99,6 +99,7 @@ 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
  - spec/adapters/heroku_spec.rb
104
105
  - spec/fakes/bin/heroku