welaika-suspenders 2.23.0 → 2.24.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: bbe829c6d51e19782944b5685839aab374a0beb6
4
- data.tar.gz: 9a9b41d93bb39c3e8a0b84b5613e570bdd5574c2
3
+ metadata.gz: e2f82e071962fef84f1eb7ca1deecc5c8acd3d4c
4
+ data.tar.gz: 7d6b86a5f22994f77f71fe00cce6d5f5268ac3a0
5
5
  SHA512:
6
- metadata.gz: de6b9bf1f9c87a2b6032549f94acfe44614e5bbfa1e8f29915f5943e007134f3a0f7c70daf0abffe84bec1ee80d24901152c1f30a0b35217281011825ab6d414
7
- data.tar.gz: f83d2baacdc8076c9b7afacb675c258ad6ec658317c21a275e929007edb8b7139ca6965cb022584b46277d6f066eb71a0bcee42d740ade120324381b01b86766
6
+ metadata.gz: fa13059af0f52dd92a341eb1c3c2f42590fde2ea4d1637c6af67b6605474b963486d2d1e01e22e50df6d2f93e75028596dbbdb43838ad82f242b71b52671524a
7
+ data.tar.gz: 8959f5757c6d5324c5fe8e797933ab92be1bed480de98577e9c8547200e3faf39377a3975221b5eda921018cbb29aac4dea1e4c04079afaf9401326e9c9577d4
data/CONTRIBUTING.md CHANGED
@@ -13,6 +13,9 @@ Set up your machine:
13
13
 
14
14
  ./bin/setup
15
15
 
16
+ If you're having trouble installing `capybara-webkit` check their [installation
17
+ instructions](https://github.com/thoughtbot/capybara-webkit#qt-dependency-and-installation-issues).
18
+
16
19
  Make sure the tests pass:
17
20
 
18
21
  rake
data/NEWS.md CHANGED
@@ -1,8 +1,30 @@
1
- master (unreleased)
1
+ 1.38.0 (April 15, 2016)
2
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
+
7
+ 1.37.0 (March 13, 2016)
8
+
9
+ * Remove `RAILS_ENV` definitions
10
+ * Set development `action_mailer.delivery_method` to `:file`
11
+ so that mails are copied to `./tmp/mails/` directory for easy development
12
+ access.
13
+ * Update Bourbon to v5.0.0.beta.3
14
+ * Update Bitters to v1.3
15
+ * Update Autoprefixer config, drop support for IE 9, IE 10 and iOS 7
16
+ * Better db support in linux environments
17
+ * Replaces coffeescript with babel
18
+ * Update CSS tests to ignore transitions
19
+
20
+ 1.36.0 (February 26, 2016)
21
+
22
+ * Update Bitters to v1.2
23
+ * Remove deprecated `fix_i18n_deprecation_warning` method
3
24
  * Switch from Airbrake to Honeybadger
4
25
  * Generate applications with `rack_mini_profiler` (disabled by default, enabled
5
26
  by setting `RACK_MINI_PROFILER=1`)
27
+ * Heroku Pipelines bug fixes
6
28
 
7
29
  1.35.0 (December 30, 2015)
8
30
 
data/README.md CHANGED
@@ -87,3 +87,4 @@ List of changes we made since [this is commit](https://github.com/thoughtbot/sus
87
87
  - lint factory girl's factories
88
88
  - remove automatic deployment
89
89
  - use airbrake instead of honeybadger
90
+ - use coffeescript instead of es6
@@ -6,7 +6,12 @@ $LOAD_PATH << source_path
6
6
 
7
7
  require 'suspenders'
8
8
 
9
- if ['-v', '--version'].include? ARGV[0]
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 RAILS_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)
@@ -193,20 +193,6 @@ module Suspenders
193
193
  )
194
194
  end
195
195
 
196
- def setup_staging_environment
197
- staging_file = 'config/environments/staging.rb'
198
- copy_file 'staging.rb', staging_file
199
-
200
- config = <<-RUBY
201
-
202
- Rails.application.configure do
203
- # ...
204
- end
205
- RUBY
206
-
207
- append_file staging_file, config
208
- end
209
-
210
196
  def setup_secret_token
211
197
  template 'secrets.yml', 'config/secrets.yml', force: true
212
198
  end
@@ -228,6 +214,13 @@ end
228
214
  copy_file '_javascript.html.slim', 'app/views/application/_javascript.html.slim'
229
215
  end
230
216
 
217
+ def create_shared_css_overrides
218
+ copy_file(
219
+ "_css_overrides.html.erb",
220
+ "app/views/application/_css_overrides.html.erb",
221
+ )
222
+ end
223
+
231
224
  def create_application_layout
232
225
  remove_file 'app/views/layouts/application.html.erb'
233
226
  template 'suspenders_layout.html.slim',
@@ -442,7 +435,6 @@ you can deploy to staging and production with:
442
435
  def create_binstubs
443
436
  bundle_command "binstubs brakeman"
444
437
  bundle_command "binstubs rubocop"
445
- bundle_command "binstubs i18n-tasks"
446
438
  end
447
439
 
448
440
  def copy_miscellaneous_files
@@ -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
@@ -119,11 +118,6 @@ module Suspenders
119
118
  build :setup_asset_host
120
119
  end
121
120
 
122
- def setup_staging_environment
123
- say 'Setting up the staging environment'
124
- build :setup_staging_environment
125
- end
126
-
127
121
  def setup_secret_token
128
122
  say 'Moving secret token out of version control'
129
123
  build :setup_secret_token
@@ -134,6 +128,7 @@ module Suspenders
134
128
  build :create_partials_directory
135
129
  build :create_shared_flashes
136
130
  build :create_shared_javascripts
131
+ build :create_shared_css_overrides
137
132
  build :create_application_layout
138
133
  end
139
134
 
@@ -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 = "2.23.0"
4
+ VERSION = "2.24.0"
5
5
  end
@@ -9,6 +9,7 @@ RSpec.describe "GitHub" do
9
9
  it "suspends a project with --github option" do
10
10
  repo_name = 'test'
11
11
  run_suspenders("--github=#{repo_name}")
12
+ setup_app_dependencies
12
13
 
13
14
  expect(FakeGithub).to have_created_repo(repo_name)
14
15
  end
@@ -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")
@@ -66,6 +67,7 @@ RSpec.describe "Heroku" do
66
67
  before(:all) do
67
68
  clean_up
68
69
  run_suspenders(%{--heroku=true --heroku-flags="--region eu"})
70
+ setup_app_dependencies
69
71
  end
70
72
 
71
73
  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
 
@@ -173,6 +166,12 @@ RSpec.describe "Suspend a new project with default configuration" do
173
166
  expect(prod_env_file).not_to match(/"HOST"/)
174
167
  end
175
168
 
169
+ it "configures email interceptor in smtp config" do
170
+ smtp_file = IO.read("#{project_path}/config/smtp.rb")
171
+ expect(smtp_file).
172
+ to match(/RecipientInterceptor.new\(ENV\["EMAIL_RECIPIENTS"\]\)/)
173
+ end
174
+
176
175
  it "configures language in html element" do
177
176
  layout_path = "/app/views/layouts/application.html.slim"
178
177
  layout_file = IO.read("#{project_path}#{layout_path}")
@@ -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
@@ -29,5 +29,9 @@ weLaika's fork of the famous thoughbot suspenders gem.
29
29
  s.add_dependency 'rails', Suspenders::RAILS_VERSION
30
30
 
31
31
  s.add_development_dependency 'rspec', '~> 3.4'
32
+ s.add_development_dependency 'simple_form', '~> 3.2'
33
+ s.add_development_dependency 'title', '~> 0.0'
34
+ s.add_development_dependency 'quiet_assets', '~> 1.1'
35
+ s.add_development_dependency 'capybara-webkit', '~> 1.8'
32
36
  s.add_development_dependency 'pry-byebug'
33
37
  end
@@ -4,7 +4,7 @@ ruby "<%= Suspenders::RUBY_VERSION %>"
4
4
 
5
5
  gem "airbrake"
6
6
  gem "autoprefixer-rails"
7
- gem "bourbon", "~> 4.2.0"
7
+ gem "bourbon", "5.0.0.beta.5"
8
8
  gem "coffee-rails", "~> 4.1.0"
9
9
  gem "delayed_job_active_record"
10
10
  gem "draper"
@@ -37,7 +37,7 @@ group :development, :test do
37
37
  gem "awesome_print"
38
38
  gem "brakeman", require: false
39
39
  gem "bullet"
40
- gem "bundler-audit", require: false
40
+ gem "bundler-audit", ">= 0.5.0", require: false
41
41
  gem "dotenv-rails"
42
42
  gem "factory_girl_rails"
43
43
  gem "faker"
@@ -7,7 +7,33 @@ with the necessary dependencies to run and test this app:
7
7
 
8
8
  % ./bin/setup
9
9
 
10
- It assumes you have a machine equipped with Ruby, Postgres, etc.
10
+ It assumes you have a machine equipped with Ruby, Postgres or MySQL, Node, Qt and ImageMagick.
11
+
12
+ To install Ruby, read the [rbenv guide](https://github.com/rbenv/rbenv#installation)
13
+ or the [rvm guide](https://rvm.io/rvm/install).
14
+
15
+ To install Postgres:
16
+
17
+ $ brew install postgresql
18
+
19
+ To install MySQL:
20
+
21
+ $ brew tap homebrew/versions
22
+ $ brew install mysql55
23
+ $ brew link --force mysql55
24
+
25
+ To install Node:
26
+
27
+ $ brew install node
28
+
29
+ To install Qt:
30
+
31
+ $ brew install qt5
32
+ $ brew link --force qt5
33
+
34
+ To install ImageMagick:
35
+
36
+ $ brew install imagemagick
11
37
 
12
38
  After setting up, you can run the application using [Heroku Local]:
13
39
 
@@ -0,0 +1,7 @@
1
+ <% if Rails.env.test? %>
2
+ <style type="text/css">
3
+ * {
4
+ transition-property: none !important;
5
+ }
6
+ </style>
7
+ <% end %>
@@ -2,16 +2,19 @@
2
2
  "name":"<%= app_name.dasherize %>",
3
3
  "scripts":{},
4
4
  "env":{
5
- "AIRBRAKE_API_KEY":{
5
+ "APPLICATION_HOST":{
6
6
  "required":true
7
7
  },
8
8
  "EMAIL_RECIPIENTS":{
9
9
  "required":true
10
10
  },
11
- "RACK_ENV":{
11
+ "HEROKU_APP_NAME": {
12
+ "required":true
13
+ },
14
+ "HEROKU_PARENT_APP_NAME": {
12
15
  "required":true
13
16
  },
14
- "RAILS_ENV":{
17
+ "RACK_ENV":{
15
18
  "required":true
16
19
  },
17
20
  "SECRET_KEY_BASE":{
data/templates/bin_deploy CHANGED
@@ -8,5 +8,5 @@ branch="$(git symbolic-ref HEAD --short)"
8
8
  target="${1:-staging}"
9
9
 
10
10
  git push "$target" "$branch:master"
11
- heroku run rake db:migrate --remote "$target"
11
+ heroku run rake db:migrate --exit-code --remote "$target"
12
12
  heroku restart --remote "$target"
@@ -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
@@ -1,4 +1,3 @@
1
1
  Last 2 versions
2
- Explorer >= 10
3
- iOS >= 7.1
2
+ Explorer >= 11
4
3
  Android >= 4.4
@@ -1,4 +1,4 @@
1
- ENV["RAILS_ENV"] = "test"
1
+ ENV["RACK_ENV"] = "test"
2
2
 
3
3
  require File.expand_path("../../config/environment", __FILE__)
4
4
  abort("DATABASE_URL environment variable is set") if ENV["DATABASE_URL"]
data/templates/smtp.rb CHANGED
@@ -7,3 +7,7 @@ SMTP_SETTINGS = {
7
7
  port: "587",
8
8
  user_name: ENV.fetch("SMTP_USERNAME")
9
9
  }
10
+
11
+ if ENV["EMAIL_RECIPIENTS"].present?
12
+ Mail.register_interceptor RecipientInterceptor.new(ENV["EMAIL_RECIPIENTS"])
13
+ end
@@ -17,3 +17,4 @@ html lang="it"
17
17
  = render "flashes"
18
18
  = yield
19
19
  = render "javascript"
20
+ = render "css_overrides"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: welaika-suspenders
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.0
4
+ version: 2.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-12 00:00:00.000000000 Z
12
+ date: 2016-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -53,6 +53,62 @@ dependencies:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.4'
56
+ - !ruby/object:Gem::Dependency
57
+ name: simple_form
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: '3.2'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '3.2'
70
+ - !ruby/object:Gem::Dependency
71
+ name: title
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: '0.0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '0.0'
84
+ - !ruby/object:Gem::Dependency
85
+ name: quiet_assets
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - "~>"
89
+ - !ruby/object:Gem::Version
90
+ version: '1.1'
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '1.1'
98
+ - !ruby/object:Gem::Dependency
99
+ name: capybara-webkit
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: '1.8'
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: '1.8'
56
112
  - !ruby/object:Gem::Dependency
57
113
  name: pry-byebug
58
114
  requirement: !ruby/object:Gem::Requirement
@@ -114,6 +170,7 @@ files:
114
170
  - templates/Gemfile.erb
115
171
  - templates/Procfile
116
172
  - templates/README.md.erb
173
+ - templates/_css_overrides.html.erb
117
174
  - templates/_flashes.html.slim
118
175
  - templates/_javascript.html.slim
119
176
  - templates/action_mailer.rb
@@ -126,7 +183,6 @@ files:
126
183
  - templates/browserslist
127
184
  - templates/bundler_audit.rake
128
185
  - templates/capybara_webkit.rb
129
- - templates/circle.yml.erb
130
186
  - templates/config_locales_it.yml.erb
131
187
  - templates/database_cleaner_rspec.rb
132
188
  - templates/dev.rake
@@ -153,7 +209,6 @@ files:
153
209
  - templates/slim.rb
154
210
  - templates/smtp.rb
155
211
  - templates/spec_helper.rb
156
- - templates/staging.rb
157
212
  - templates/suspenders_gitignore
158
213
  - templates/suspenders_layout.html.slim
159
214
  homepage: http://github.com/welaika/welaika-suspenders
@@ -177,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
232
  version: '0'
178
233
  requirements: []
179
234
  rubyforge_project:
180
- rubygems_version: 2.5.1
235
+ rubygems_version: 2.6.1
181
236
  signing_key:
182
237
  specification_version: 4
183
238
  summary: Generate a Rails app using thoughtbot's best practices.
@@ -1,6 +0,0 @@
1
- database:
2
- override:
3
- - bin/setup
4
- test:
5
- override:
6
- - bin/rake
data/templates/staging.rb DELETED
@@ -1,5 +0,0 @@
1
- require_relative "production"
2
-
3
- Mail.register_interceptor(
4
- RecipientInterceptor.new(ENV.fetch("EMAIL_RECIPIENTS"))
5
- )