suspenders 1.30.0 → 1.31.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: d05003d3e1588c15c4291ed296d2c9c936ccb959
4
- data.tar.gz: 4f3a7b17134b11d774f02b827cceb9b07f214e07
3
+ metadata.gz: bc097cf89da27e8006356a8716c702f400b76631
4
+ data.tar.gz: 474d6fe3b9dd0b81dfa4be406e30fc7a2f38b991
5
5
  SHA512:
6
- metadata.gz: 5743803276b70bf047a8481b5bbdc34bb1b1143e352624309ca941d1aded2f139a284990a4f517f50abc35408eb89b17d5b15f799e7327e7919b815829a09748
7
- data.tar.gz: 9f5980411e60b3646b54d4424918df79592519beb010541f3878c9eb8d421f3c55e81c53a9cf0ffdd4cbb05c984b22c93b965bd1f22e9350e9420c2731ece04a
6
+ metadata.gz: 48f0762028d843e9a95d3e1c8c718ed557d0cf3cf38f8f54983f7e6b89c2799947007fa5a52840e6d975a52d1a405e333b4e827d597c235324305ea54dbf5a83
7
+ data.tar.gz: 9359e82fa9095de86f5c8940699f13cee98096d2c51bf80871c4609f0dd7223f8ac4e61ef35451df14e0780b98353f0efc3cab403e3d82697da098c6f5f1df0c
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  *.gem
2
2
  *.swp
3
+ Gemfile.lock
3
4
  /.bundle
4
5
  /tmp
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.2.3
data/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
- rvm: 2.2.2
2
+ rvm: 2.2.3
3
3
  cache: bundler
4
4
  sudo: false
5
5
  before_install:
data/NEWS.md CHANGED
@@ -1,3 +1,12 @@
1
+ 1.31.0 (September 3, 2015)
2
+
3
+ * Update to Ruby 2.2.3
4
+ * Add ctags configuration dotfile
5
+ * Rename `$HOST` to `$APPLICATION_HOST` for zsh compatibility
6
+ * Update Bitters to 1.1
7
+ * Remove comments and newlines in config files
8
+ * Abort tests run if `DATABASE_URL` env variable is set
9
+
1
10
  1.30.0 (July 30, 2015)
2
11
 
3
12
  * Update to RSpec 3.3
@@ -79,7 +79,7 @@ module Suspenders
79
79
  RUBY
80
80
 
81
81
  inject_into_file 'config/environments/production.rb', config,
82
- :after => 'config.action_mailer.raise_delivery_errors = false'
82
+ after: "config.action_mailer.raise_delivery_errors = false"
83
83
  end
84
84
 
85
85
  def enable_rack_canonical_host
@@ -113,7 +113,7 @@ module Suspenders
113
113
  def setup_asset_host
114
114
  replace_in_file 'config/environments/production.rb',
115
115
  "# config.action_controller.asset_host = 'http://assets.example.com'",
116
- 'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("HOST"))'
116
+ 'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST"))'
117
117
 
118
118
  replace_in_file 'config/initializers/assets.rb',
119
119
  "config.assets.version = '1.0'",
@@ -320,6 +320,10 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
320
320
  end
321
321
  end
322
322
 
323
+ def copy_dotfiles
324
+ directory("dotfiles", ".")
325
+ end
326
+
323
327
  def init_git
324
328
  run 'git init'
325
329
  end
@@ -429,11 +433,33 @@ you can deploy to staging and production with:
429
433
  EOS
430
434
 
431
435
  %w(500 404 422).each do |page|
432
- inject_into_file "public/#{page}.html", meta_tags, :after => "<head>\n"
436
+ inject_into_file "public/#{page}.html", meta_tags, after: "<head>\n"
433
437
  replace_in_file "public/#{page}.html", /<!--.+-->\n/, ''
434
438
  end
435
439
  end
436
440
 
441
+ def remove_config_comment_lines
442
+ config_files = [
443
+ "application.rb",
444
+ "environment.rb",
445
+ "environments/development.rb",
446
+ "environments/production.rb",
447
+ "environments/test.rb",
448
+ ]
449
+
450
+ config_files.each do |config_file|
451
+ path = File.join(destination_root, "config/#{config_file}")
452
+
453
+ accepted_content = File.readlines(path).reject do |line|
454
+ line =~ /^.*#.*$/ || line =~ /^$\n/
455
+ end
456
+
457
+ File.open(path, "w") do |file|
458
+ accepted_content.each { |line| file.puts line }
459
+ end
460
+ end
461
+ end
462
+
437
463
  def remove_routes_comment_lines
438
464
  replace_in_file 'config/routes.rb',
439
465
  /Rails\.application\.routes\.draw do.*end/m,
@@ -43,7 +43,9 @@ module Suspenders
43
43
  invoke :install_refills
44
44
  invoke :copy_miscellaneous_files
45
45
  invoke :customize_error_pages
46
+ invoke :remove_config_comment_lines
46
47
  invoke :remove_routes_comment_lines
48
+ invoke :setup_dotfiles
47
49
  invoke :setup_git
48
50
  invoke :setup_database
49
51
  invoke :create_heroku_apps
@@ -188,6 +190,10 @@ module Suspenders
188
190
  build :setup_segment
189
191
  end
190
192
 
193
+ def setup_dotfiles
194
+ build :copy_dotfiles
195
+ end
196
+
191
197
  def setup_gitignore
192
198
  build :gitignore_files
193
199
  end
@@ -216,6 +222,10 @@ module Suspenders
216
222
  build :customize_error_pages
217
223
  end
218
224
 
225
+ def remove_config_comment_lines
226
+ build :remove_config_comment_lines
227
+ end
228
+
219
229
  def remove_routes_comment_lines
220
230
  build :remove_routes_comment_lines
221
231
  end
@@ -1,5 +1,5 @@
1
1
  module Suspenders
2
2
  RAILS_VERSION = "~> 4.2.0"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "1.30.0"
4
+ VERSION = "1.31.0"
5
5
  end
@@ -29,6 +29,10 @@ RSpec.describe "Suspend a new project with default configuration" do
29
29
  expect(ruby_version_file).to eq "#{RUBY_VERSION}\n"
30
30
  end
31
31
 
32
+ it "copies dotfiles" do
33
+ expect(File).to exist("#{project_path}/.ctags")
34
+ end
35
+
32
36
  it "loads secret_key_base from env" do
33
37
  secrets_file = IO.read("#{project_path}/config/secrets.yml")
34
38
 
@@ -129,6 +133,21 @@ RSpec.describe "Suspend a new project with default configuration" do
129
133
  end
130
134
  end
131
135
 
136
+ it "removes comments and extra newlines from config files" do
137
+ config_files = [
138
+ IO.read("#{project_path}/config/application.rb"),
139
+ IO.read("#{project_path}/config/environment.rb"),
140
+ IO.read("#{project_path}/config/environments/development.rb"),
141
+ IO.read("#{project_path}/config/environments/production.rb"),
142
+ IO.read("#{project_path}/config/environments/test.rb"),
143
+ ]
144
+
145
+ config_files.each do |file|
146
+ expect(file).not_to match(/.*#.*/)
147
+ expect(file).not_to match(/^$\n/)
148
+ end
149
+ end
150
+
132
151
  def analytics_partial
133
152
  IO.read("#{project_path}/app/views/application/_analytics.html.erb")
134
153
  end
data/suspenders.gemspec CHANGED
@@ -27,7 +27,7 @@ rush to build something amazing; don't use it if you like missing deadlines.
27
27
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
28
  s.version = Suspenders::VERSION
29
29
 
30
- s.add_dependency 'bitters', '~> 1.0.0'
30
+ s.add_dependency 'bitters', '~> 1.1.0'
31
31
  s.add_dependency 'bundler', '~> 1.3'
32
32
  s.add_dependency 'rails', Suspenders::RAILS_VERSION
33
33
 
@@ -16,8 +16,8 @@ gem "neat", "~> 1.7.0"
16
16
  gem "newrelic_rpm", ">= 3.9.8"
17
17
  gem "normalize-rails", "~> 3.0.0"
18
18
  gem "pg"
19
- gem "rack-canonical-host"
20
19
  gem "puma"
20
+ gem "rack-canonical-host"
21
21
  gem "rails", "<%= Suspenders::RAILS_VERSION %>"
22
22
  gem "recipient_interceptor"
23
23
  gem "refills"
@@ -1,8 +1,9 @@
1
+ checkout:
2
+ post:
3
+ - cp .sample.env .env
4
+ database:
5
+ override:
6
+ - bin/setup
1
7
  test:
2
8
  override:
3
9
  - bundle exec rake
4
- deployment:
5
- staging:
6
- branch: master
7
- commands:
8
- - bin/deploy staging
@@ -1,3 +1 @@
1
- # Protect against injection attacks
2
- # http://www.kb.cert.org/vuls/id/380039
3
1
  ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
@@ -0,0 +1,2 @@
1
+ --recurse=yes
2
+ --exclude=vendor
@@ -1,6 +1,7 @@
1
1
  ENV["RAILS_ENV"] = "test"
2
2
 
3
3
  require File.expand_path("../../config/environment", __FILE__)
4
+ abort("DATABASE_URL environment variable is set") if ENV["DATABASE_URL"]
4
5
 
5
6
  require "rspec/rails"
6
7
  require "shoulda/matchers"
data/templates/sample.env CHANGED
@@ -1,6 +1,6 @@
1
1
  # http://ddollar.github.com/foreman/
2
2
  ASSET_HOST=localhost:3000
3
- HOST=localhost:3000
3
+ APPLICATION_HOST=localhost:3000
4
4
  RACK_ENV=development
5
5
  SECRET_KEY_BASE=development_secret
6
6
  EXECJS_RUNTIME=Node
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.30.0
4
+ version: 1.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-30 00:00:00.000000000 Z
11
+ date: 2015-09-03 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.0.0
19
+ version: 1.1.0
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.0.0
26
+ version: 1.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -83,7 +83,6 @@ files:
83
83
  - ".travis.yml"
84
84
  - CONTRIBUTING.md
85
85
  - Gemfile
86
- - Gemfile.lock
87
86
  - LICENSE
88
87
  - NEWS.md
89
88
  - README.md
@@ -125,6 +124,7 @@ files:
125
124
  - templates/database_cleaner_rspec.rb
126
125
  - templates/dev.rake
127
126
  - templates/disable_xml_params.rb
127
+ - templates/dotfiles/.ctags
128
128
  - templates/errors.rb
129
129
  - templates/factory_girl_rspec.rb
130
130
  - templates/flashes_helper.rb
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
- version: 2.2.2
158
+ version: 2.2.3
159
159
  required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  requirements:
161
161
  - - ">="
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  requirements: []
165
165
  rubyforge_project:
166
- rubygems_version: 2.4.5
166
+ rubygems_version: 2.4.5.1
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: Generate a Rails app using thoughtbot's best practices.
@@ -177,4 +177,3 @@ test_files:
177
177
  - spec/support/fake_github.rb
178
178
  - spec/support/fake_heroku.rb
179
179
  - spec/support/suspenders.rb
180
- has_rdoc:
data/Gemfile.lock DELETED
@@ -1,132 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- suspenders (1.29.0)
5
- bitters (~> 1.0.0)
6
- bundler (~> 1.3)
7
- rails (~> 4.2.0)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- actionmailer (4.2.2)
13
- actionpack (= 4.2.2)
14
- actionview (= 4.2.2)
15
- activejob (= 4.2.2)
16
- mail (~> 2.5, >= 2.5.4)
17
- rails-dom-testing (~> 1.0, >= 1.0.5)
18
- actionpack (4.2.2)
19
- actionview (= 4.2.2)
20
- activesupport (= 4.2.2)
21
- rack (~> 1.6)
22
- rack-test (~> 0.6.2)
23
- rails-dom-testing (~> 1.0, >= 1.0.5)
24
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
25
- actionview (4.2.2)
26
- activesupport (= 4.2.2)
27
- builder (~> 3.1)
28
- erubis (~> 2.7.0)
29
- rails-dom-testing (~> 1.0, >= 1.0.5)
30
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
31
- activejob (4.2.2)
32
- activesupport (= 4.2.2)
33
- globalid (>= 0.3.0)
34
- activemodel (4.2.2)
35
- activesupport (= 4.2.2)
36
- builder (~> 3.1)
37
- activerecord (4.2.2)
38
- activemodel (= 4.2.2)
39
- activesupport (= 4.2.2)
40
- arel (~> 6.0)
41
- activesupport (4.2.2)
42
- i18n (~> 0.7)
43
- json (~> 1.7, >= 1.7.7)
44
- minitest (~> 5.1)
45
- thread_safe (~> 0.3, >= 0.3.4)
46
- tzinfo (~> 1.1)
47
- arel (6.0.0)
48
- bitters (1.0.0)
49
- bourbon (>= 3.2)
50
- sass (>= 3.2)
51
- thor
52
- bourbon (4.2.3)
53
- sass (~> 3.4)
54
- thor
55
- builder (3.2.2)
56
- diff-lcs (1.2.5)
57
- erubis (2.7.0)
58
- globalid (0.3.5)
59
- activesupport (>= 4.1.0)
60
- i18n (0.7.0)
61
- json (1.8.3)
62
- loofah (2.0.2)
63
- nokogiri (>= 1.5.9)
64
- mail (2.6.3)
65
- mime-types (>= 1.16, < 3)
66
- mime-types (2.6.1)
67
- mini_portile (0.6.2)
68
- minitest (5.7.0)
69
- nokogiri (1.6.6.2)
70
- mini_portile (~> 0.6.0)
71
- rack (1.6.2)
72
- rack-test (0.6.3)
73
- rack (>= 1.0)
74
- rails (4.2.2)
75
- actionmailer (= 4.2.2)
76
- actionpack (= 4.2.2)
77
- actionview (= 4.2.2)
78
- activejob (= 4.2.2)
79
- activemodel (= 4.2.2)
80
- activerecord (= 4.2.2)
81
- activesupport (= 4.2.2)
82
- bundler (>= 1.3.0, < 2.0)
83
- railties (= 4.2.2)
84
- sprockets-rails
85
- rails-deprecated_sanitizer (1.0.3)
86
- activesupport (>= 4.2.0.alpha)
87
- rails-dom-testing (1.0.6)
88
- activesupport (>= 4.2.0.beta, < 5.0)
89
- nokogiri (~> 1.6.0)
90
- rails-deprecated_sanitizer (>= 1.0.1)
91
- rails-html-sanitizer (1.0.2)
92
- loofah (~> 2.0)
93
- railties (4.2.2)
94
- actionpack (= 4.2.2)
95
- activesupport (= 4.2.2)
96
- rake (>= 0.8.7)
97
- thor (>= 0.18.1, < 2.0)
98
- rake (10.4.2)
99
- rspec (3.2.0)
100
- rspec-core (~> 3.2.0)
101
- rspec-expectations (~> 3.2.0)
102
- rspec-mocks (~> 3.2.0)
103
- rspec-core (3.2.3)
104
- rspec-support (~> 3.2.0)
105
- rspec-expectations (3.2.1)
106
- diff-lcs (>= 1.2.0, < 2.0)
107
- rspec-support (~> 3.2.0)
108
- rspec-mocks (3.2.1)
109
- diff-lcs (>= 1.2.0, < 2.0)
110
- rspec-support (~> 3.2.0)
111
- rspec-support (3.2.2)
112
- sass (3.4.14)
113
- sprockets (3.2.0)
114
- rack (~> 1.0)
115
- sprockets-rails (2.3.1)
116
- actionpack (>= 3.0)
117
- activesupport (>= 3.0)
118
- sprockets (>= 2.8, < 4.0)
119
- thor (0.19.1)
120
- thread_safe (0.3.5)
121
- tzinfo (1.2.2)
122
- thread_safe (~> 0.1)
123
-
124
- PLATFORMS
125
- ruby
126
-
127
- DEPENDENCIES
128
- rspec (~> 3.2)
129
- suspenders!
130
-
131
- BUNDLED WITH
132
- 1.10.4