welaika-suspenders 2.7.0 → 2.7.1

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: 1ecf4d405edda55de70fd1f180c267d59dfa9006
4
- data.tar.gz: 645f248b78993bd9edaf7a0727769b8ad3377994
3
+ metadata.gz: 2ba7c8b0136a167dcc9ae6ce048ef674a079a52d
4
+ data.tar.gz: 13597374a2fdab6082ac299ec8b7a4b608e02423
5
5
  SHA512:
6
- metadata.gz: 2a78896ad5dbcdb5dd16cf2ecf75dbf5e7aa9a0cb398c434fc4cca68fdf2f434cf71c74713666bf9100b98bc62eb71a90627835b973da0962646f4d7b737342b
7
- data.tar.gz: 29f40fa844f103f2c0a2c0d49826049a23f5a405f0310df35656c26a3da7c1d9f160ed39ee8a6e3b6f7144c245df1bd99e2780f6c19d29724b2ac1537364fa76
6
+ metadata.gz: aa56cc61ca09d0f4eda510c4a31173ec1567f78fac9c8f07c44c024e7f7ab966a9ba13e181ff23cd463435d2dad0dadd50b4e72453be640bca1e2852a4a31641
7
+ data.tar.gz: b784d2453f86f09038e6eaec9ab675dc7251a0b9353e96db02a62cd93242648b52d119b1d0d24a40b78fdbf576583de4c48d9af74861ed10604b45a4d7f7372c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- welaika-suspenders (2.7.0)
4
+ welaika-suspenders (2.7.1)
5
5
  bitters (~> 0.10.0)
6
6
  bundler (~> 1.3)
7
7
  rails (= 4.2.0)
@@ -45,10 +45,6 @@ GEM
45
45
  thread_safe (~> 0.3, >= 0.3.4)
46
46
  tzinfo (~> 1.1)
47
47
  arel (6.0.0)
48
- aruba (0.5.4)
49
- childprocess (>= 0.3.6)
50
- cucumber (>= 1.1.1)
51
- rspec-expectations (>= 2.7.0)
52
48
  bitters (0.10.1)
53
49
  bourbon (>= 3.2)
54
50
  sass (>= 3.2)
@@ -63,20 +59,9 @@ GEM
63
59
  rack (>= 1.0.0)
64
60
  rack-test (>= 0.5.4)
65
61
  xpath (~> 2.0)
66
- childprocess (0.5.3)
67
- ffi (~> 1.0, >= 1.0.11)
68
- cucumber (1.3.15)
69
- builder (>= 2.1.2)
70
- diff-lcs (>= 1.1.3)
71
- gherkin (~> 2.12)
72
- multi_json (>= 1.7.5, < 2.0)
73
- multi_test (>= 0.1.1)
74
62
  diff-lcs (1.2.5)
75
63
  erubis (2.7.0)
76
- ffi (1.9.3)
77
- gherkin (2.12.2)
78
- multi_json (~> 1.3)
79
- globalid (0.3.0)
64
+ globalid (0.3.3)
80
65
  activesupport (>= 4.1.0)
81
66
  hike (1.2.3)
82
67
  i18n (0.7.0)
@@ -89,7 +74,6 @@ GEM
89
74
  mini_portile (0.6.0)
90
75
  minitest (5.5.1)
91
76
  multi_json (1.10.1)
92
- multi_test (0.1.1)
93
77
  nokogiri (1.6.2.1)
94
78
  mini_portile (= 0.6.0)
95
79
  rack (1.6.0)
@@ -128,7 +112,7 @@ GEM
128
112
  rspec-expectations (2.99.0)
129
113
  diff-lcs (>= 1.1.3, < 2.0)
130
114
  rspec-mocks (2.99.0)
131
- sass (3.4.11)
115
+ sass (3.4.13)
132
116
  sprockets (2.12.3)
133
117
  hike (~> 1.2)
134
118
  multi_json (~> 1.0)
@@ -150,8 +134,6 @@ PLATFORMS
150
134
  ruby
151
135
 
152
136
  DEPENDENCIES
153
- aruba (~> 0.5)
154
137
  capybara (~> 2.2, >= 2.2.0)
155
- cucumber (~> 1.2)
156
138
  rspec (~> 2.0)
157
139
  welaika-suspenders!
data/README.md CHANGED
@@ -65,3 +65,5 @@ List of changes we made since [this is commit](https://github.com/thoughtbot/sus
65
65
  - use `application.css.sass` instead of `application.css.scss`
66
66
  - do not import refills/flashes
67
67
  - add `quiet_assets` gem
68
+ - add `brakeman` gem
69
+ - change `i18n_tasks` configuration: set `it` as base locale
@@ -12,15 +12,11 @@ module Suspenders
12
12
  end
13
13
 
14
14
  def configure_letter_opener
15
- config = <<-RUBY
16
-
17
- config.action_mailer.delivery_method = :letter_opener
18
- RUBY
19
-
20
- # this method must be called after `raise_on_delivery_errors`
21
- # because the `after` clause search for `raise_delivery_errors = true`
22
- inject_into_file 'config/environments/development.rb', config,
23
- :after => 'config.action_mailer.raise_delivery_errors = true'
15
+ inject_into_file(
16
+ "config/environments/development.rb",
17
+ "\n config.action_mailer.delivery_method = :letter_opener",
18
+ after: "config.action_mailer.raise_delivery_errors = true",
19
+ )
24
20
  end
25
21
 
26
22
  def raise_on_unpermitted_parameters
@@ -99,7 +95,7 @@ module Suspenders
99
95
  def setup_asset_host
100
96
  replace_in_file 'config/environments/production.rb',
101
97
  "# config.action_controller.asset_host = 'http://assets.example.com'",
102
- 'config.action_controller.asset_host = ENV.fetch("ASSET_HOST")'
98
+ 'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("HOST"))'
103
99
 
104
100
  replace_in_file 'config/initializers/assets.rb',
105
101
  "config.assets.version = '1.0'",
@@ -226,6 +222,11 @@ end
226
222
  copy_file 'action_mailer.rb', 'spec/support/action_mailer.rb'
227
223
  end
228
224
 
225
+ def configure_locales
226
+ remove_file "config/locales/en.yml"
227
+ template "config_locales_it.yml.erb", "config/locales/it.yml"
228
+ end
229
+
229
230
  def configure_rack_timeout
230
231
  copy_file 'rack_timeout.rb', 'config/initializers/rack_timeout.rb'
231
232
  end
@@ -373,6 +374,7 @@ you can deploy to staging and production with:
373
374
  MARKDOWN
374
375
 
375
376
  append_file "README.md", instructions
377
+ run "chmod a+x bin/deploy"
376
378
  end
377
379
 
378
380
  def create_github_repo(repo_name)
@@ -21,6 +21,9 @@ module Suspenders
21
21
  class_option :skip_turbolinks, type: :boolean, default: true,
22
22
  desc: "Skip turbolinks gem"
23
23
 
24
+ class_option :skip_bundle, type: :boolean, aliases: "-B", default: true,
25
+ desc: "Don't run bundle install"
26
+
24
27
  def finish_template
25
28
  invoke :suspenders_customization
26
29
  super
@@ -124,6 +127,7 @@ module Suspenders
124
127
  def configure_app
125
128
  say 'Configuring app'
126
129
  build :configure_action_mailer
130
+ build :configure_locales
127
131
  build :configure_rack_timeout
128
132
  build :configure_simple_form
129
133
  build :configure_slim
@@ -203,10 +207,6 @@ module Suspenders
203
207
  say "Remember to run 'bin/setup' and configure errbit"
204
208
  end
205
209
 
206
- def run_bundle
207
- # Let's not: We'll bundle manually at the right spot
208
- end
209
-
210
210
  protected
211
211
 
212
212
  def get_builder_class
@@ -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.7.0"
4
+ VERSION = "2.7.1"
5
5
  end
@@ -11,15 +11,19 @@ feature "Heroku" do
11
11
  expect(FakeHeroku).to have_configured_vars("staging", "SECRET_KEY_BASE")
12
12
  expect(FakeHeroku).to have_configured_vars("production", "SECRET_KEY_BASE")
13
13
 
14
- bin_setup = IO.read("#{project_path}/bin/setup")
14
+ bin_setup_path = "#{project_path}/bin/setup"
15
+ bin_setup = IO.read(bin_setup_path)
15
16
  app_name = SuspendersTestHelpers::APP_NAME
16
17
 
17
18
  expect(bin_setup).to include("heroku join --app #{app_name}-staging")
18
19
  expect(bin_setup).to include("heroku join --app #{app_name}-production")
20
+ expect(File.stat(bin_setup_path)).to be_executable
19
21
 
20
- bin_deploy = IO.read("#{project_path}/bin/deploy")
22
+ bin_deploy_path = "#{project_path}/bin/deploy"
23
+ bin_deploy = IO.read(bin_deploy_path)
21
24
 
22
25
  expect(bin_deploy).to include("heroku run rake db:migrate")
26
+ expect(File.stat(bin_deploy_path)).to be_executable
23
27
 
24
28
  readme = IO.read("#{project_path}/README.md")
25
29
 
@@ -114,10 +114,12 @@ feature 'Suspend a new project with default configuration' do
114
114
  scenario "generated en.yml is evaluated" do
115
115
  run_suspenders
116
116
 
117
- locales_en_file = IO.read("#{project_path}/config/locales/en.yml")
117
+ locales_en_file = "#{project_path}/config/locales/en.yml"
118
+ locales_it_file = "#{project_path}/config/locales/it.yml"
118
119
  app_name = SuspendersTestHelpers::APP_NAME
119
120
 
120
- expect(locales_en_file).to match(/application: #{app_name.humanize}/)
121
+ expect(File.exist?(locales_en_file)).to eq(false)
122
+ expect(IO.read(locales_it_file)).to match(/application: #{app_name.humanize}/)
121
123
  end
122
124
 
123
125
  scenario "config simple_form" do
@@ -126,4 +128,15 @@ feature 'Suspend a new project with default configuration' do
126
128
  expect(File).to exist("#{project_path}/config/initializers/simple_form.rb")
127
129
  end
128
130
 
131
+ scenario "config :letter_opener as email delivery method for development" do
132
+ run_suspenders
133
+
134
+ dev_env_file = IO.read("#{project_path}/config/environments/development.rb")
135
+ expect(dev_env_file).
136
+ to match(/^ +config.action_mailer.delivery_method = :letter_opener$/)
137
+ end
138
+
139
+ def analytics_partial
140
+ IO.read("#{project_path}/app/views/application/_analytics.html.erb")
141
+ end
129
142
  end
data/suspenders.gemspec CHANGED
@@ -29,8 +29,6 @@ weLaika's fork of the famous thoughbot suspenders gem.
29
29
  s.add_dependency 'bundler', '~> 1.3'
30
30
  s.add_dependency 'rails', Suspenders::RAILS_VERSION
31
31
 
32
- s.add_development_dependency 'aruba', '~> 0.5'
33
- s.add_development_dependency 'cucumber', '~> 1.2'
34
32
  s.add_development_dependency 'rspec', '~> 2.0'
35
33
  s.add_development_dependency 'capybara', '~> 2.2', '>= 2.2.0'
36
34
  end
@@ -36,6 +36,7 @@ end
36
36
 
37
37
  group :development, :test do
38
38
  gem "awesome_print"
39
+ gem "brakeman", require:false
39
40
  gem "bundler-audit", require: false
40
41
  gem "dotenv-rails"
41
42
  gem "faker"
@@ -44,7 +45,7 @@ group :development, :test do
44
45
  gem "pry-bloodline"
45
46
  gem "pry-byebug"
46
47
  gem "pry-rails"
47
- gem "rspec-rails", "~> 3.1.0"
48
+ gem "rspec-rails", "~> 3.2.1"
48
49
  end
49
50
 
50
51
  group :test do
@@ -1,13 +1,79 @@
1
+ base_locale: it
2
+ locales: [it]
3
+
4
+ # Read and write locale data
5
+ data:
6
+ # Locale files to read from
7
+ read:
8
+ - config/locales/%{locale}.yml
9
+ - config/locales/*.%{locale}.yml
10
+ - config/locales/**/*.%{locale}.yml
11
+
12
+ # key => file routes, matched top to bottom
13
+ write:
14
+ ## E.g., write devise and simple form keys to their respective files
15
+ - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
16
+ # Catch-all
17
+ - config/locales/%{locale}.yml
18
+ # `i18n-tasks normalize -p` will force move the keys according to these rules
19
+
20
+ # YAML / JSON serializer options, passed to load / dump / parse / serialize
21
+ yaml:
22
+ write:
23
+ # do not wrap lines at 80 characters
24
+ line_width: -1
25
+ json:
26
+ write:
27
+ # pretty print JSON
28
+ indent: ' '
29
+ space: ' '
30
+ object_nl: "\n"
31
+ array_nl: "\n"
32
+
33
+ # Find translate calls
1
34
  search:
35
+ ## Default scanner finds t() and I18n.t() calls
36
+ # scanner: I18n::Tasks::Scanners::PatternWithScopeScanner
37
+
38
+ ## Paths to search in, passed to File.find
2
39
  paths:
3
- - "app/controllers"
4
- - "app/helpers"
5
- - "app/presenters"
6
- - "app/views"
40
+ - app/
41
+
42
+ ## Root for resolving relative keys (default)
43
+ # relative_roots:
44
+ # - app/views
7
45
 
46
+ ## File.fnmatch patterns to exclude from search (default)
47
+ # exclude: ["*.jpg", "*.png", "*.gif", "*.svg", "*.ico", "*.eot", "*.ttf", "*.woff", "*.pdf"]
48
+
49
+ ## Or, File.fnmatch patterns to include
50
+ # include: ["*.rb", "*.html.slim"]
51
+
52
+ ## Google Translate
53
+ # translation:
54
+ # # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
55
+ # api_key: "AbC-dEf5"
56
+
57
+ ## Consider these keys not missing
58
+ # ignore_missing:
59
+ # - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
60
+ # - '{devise,simple_form}.*'
61
+
62
+ ## Consider these keys used
8
63
  ignore_unused:
9
- - activerecord.*
10
- - date.*
11
- - simple_form.*
12
- - time.*
13
- - titles.*
64
+ - 'activerecord.*'
65
+ - '{devise,kaminari,will_paginate,simple_form}.*'
66
+ - 'date.*'
67
+ - 'time.*'
68
+ - 'titles.*'
69
+
70
+ ## Exclude these keys from `i18n-tasks eq-base' report
71
+ # ignore_eq_base:
72
+ # all:
73
+ # - common.ok
74
+ # fr,es:
75
+ # - common.brand
76
+
77
+ ## Exclude these keys from all of the reports
78
+ # ignore:
79
+ # - kaminari.*
@@ -0,0 +1,3 @@
1
+ it:
2
+ titles:
3
+ application: <%= app_name.humanize %>
data/templates/sample.env CHANGED
@@ -1,3 +1,5 @@
1
1
  # http://ddollar.github.com/foreman/
2
+ ASSET_HOST=localhost:3000
3
+ HOST=localhost:3000
2
4
  RACK_ENV=development
3
5
  SECRET_KEY_BASE=development_secret
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.7.0
4
+ version: 2.7.1
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: 2015-02-07 00:00:00.000000000 Z
12
+ date: 2015-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bitters
@@ -53,34 +53,6 @@ dependencies:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
55
  version: 4.2.0
56
- - !ruby/object:Gem::Dependency
57
- name: aruba
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '0.5'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '0.5'
70
- - !ruby/object:Gem::Dependency
71
- name: cucumber
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: '1.2'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '1.2'
84
56
  - !ruby/object:Gem::Dependency
85
57
  name: rspec
86
58
  requirement: !ruby/object:Gem::Requirement
@@ -166,6 +138,7 @@ files:
166
138
  - templates/bin_setup.erb
167
139
  - templates/bundler_audit.rake
168
140
  - templates/config_i18n_tasks.yml
141
+ - templates/config_locales_it.yml.erb
169
142
  - templates/database_cleaner_rspec.rb
170
143
  - templates/development_seeds.rb
171
144
  - templates/disable_xml_params.rb