voyage 1.44.0.3 → 1.44.0.4
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.
- checksums.yaml +4 -4
- data/lib/voyage/app_builder.rb +8 -13
- data/lib/voyage/generators/app_generator.rb +5 -0
- data/lib/voyage/templates/Gemfile.erb +1 -1
- data/lib/voyage/templates/rubocop.yml +60 -0
- data/lib/voyage/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cb3e8bad0a9367df50559e0cca52b41498543b3
|
4
|
+
data.tar.gz: 566fcf34298cc07bb9c190aa706ca67ba79e5071
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c32afbce475a7abfb769b4f0820604d4dfe5337d2ec25e295f20373dea38aa798a8ff73462ee8d1ca9930a9592c7639c8f54ae626f924a347d5d2e42150d4995
|
7
|
+
data.tar.gz: 887d5adfc95ace7511265fd8096bebb2b5bbd554a6358380627048d86a38659d494ddbde1de50073c71419f774f0b64e921267186e170fd03b80ec2b83257be0
|
data/lib/voyage/app_builder.rb
CHANGED
@@ -218,23 +218,14 @@ module Suspenders
|
|
218
218
|
end
|
219
219
|
|
220
220
|
def authorize_devise_resource_for_index_action
|
221
|
-
generate
|
222
|
-
generate
|
221
|
+
generate 'canard:ability user can:manage:user cannot:destroy:user'
|
222
|
+
generate 'canard:ability admin can:destroy:user'
|
223
223
|
|
224
224
|
%w(admins users).each do |resource_name|
|
225
|
-
replace_in_file "spec/abilities/#{resource_name}_spec.rb", '
|
226
|
-
replace_in_file "spec/abilities/#{resource_name}_spec.rb", "require_relative '../spec_helper'", "require 'rails_helper'"
|
227
|
-
replace_in_file "spec/abilities/#{resource_name}_spec.rb", 'require "cancan/matchers"', "require_relative '../support/matchers/custom_cancan'"
|
228
|
-
# NOTE: (2016-02-09) jonk => this replaces both should and should_not and results in is_expected.to_not in the latter case
|
229
|
-
replace_in_file "spec/abilities/#{resource_name}_spec.rb", 'should', "is_expected.to"
|
225
|
+
replace_in_file "spec/abilities/#{resource_name}_spec.rb", "require 'cancan/matchers'", "require_relative '../support/matchers/custom_cancan'"
|
230
226
|
end
|
231
227
|
|
232
|
-
|
233
|
-
replace_in_file 'spec/abilities/admins_spec.rb', ':admin_user', ':user, :admin'
|
234
|
-
replace_in_file 'spec/abilities/admins_spec.rb', '@user = build_stubbed(:user, :admin)', '@admin = build_stubbed(:user, :admin)'
|
235
|
-
replace_in_file 'spec/abilities/admins_spec.rb', 'subject { Ability.new(@user) }', 'subject { Ability.new(@admin) }'
|
236
|
-
|
237
|
-
generate "migration add_roles_mask_to_users roles_mask:integer"
|
228
|
+
generate 'migration add_roles_mask_to_users roles_mask:integer'
|
238
229
|
template '../templates/custom_cancan_matchers.rb', 'spec/support/matchers/custom_cancan.rb'
|
239
230
|
end
|
240
231
|
|
@@ -424,6 +415,10 @@ module Suspenders
|
|
424
415
|
template "../templates/rails_helper.rb.erb", "spec/rails_helper.rb", force: true
|
425
416
|
end
|
426
417
|
|
418
|
+
def add_rubocop_config
|
419
|
+
template '../templates/rubocop.yml', '.rubocop.yml', force: true
|
420
|
+
end
|
421
|
+
|
427
422
|
# Do this last
|
428
423
|
def rake_db_setup
|
429
424
|
rake 'db:migrate'
|
@@ -35,6 +35,7 @@ module Suspenders
|
|
35
35
|
invoke :generate_refills
|
36
36
|
invoke :generate_test_environment
|
37
37
|
invoke :update_test_environment
|
38
|
+
invoke :add_rubocop_config
|
38
39
|
|
39
40
|
|
40
41
|
# Do these last
|
@@ -93,6 +94,10 @@ module Suspenders
|
|
93
94
|
build :update_test_environment
|
94
95
|
end
|
95
96
|
|
97
|
+
def add_rubocop_config
|
98
|
+
build :add_rubocop_config
|
99
|
+
end
|
100
|
+
|
96
101
|
def rake_db_setup
|
97
102
|
build :rake_db_setup
|
98
103
|
end
|
@@ -38,7 +38,7 @@ gem 'nprogress-rails' # Show request progress when a link is clicked
|
|
38
38
|
gem 'gon' # pass variables betwween rails and javascript. Several examples in the application_controller.rb
|
39
39
|
|
40
40
|
gem 'cancancan' # authorization library
|
41
|
-
gem 'canard', git: 'https://github.com/
|
41
|
+
gem 'canard', git: 'https://github.com/jondkinney/canard.git', branch: 'feature/fixed-generators-and-rails-5' # ties into cancancan, adds roles for the user
|
42
42
|
|
43
43
|
gem 'friendly_id' # slugs in the url auto-generated
|
44
44
|
gem 'paper_trail'
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require: rubocop-rspec
|
2
|
+
|
3
|
+
RSpec/NotToNot:
|
4
|
+
Description: 'Enforces the usage of the same method on all negative message expectations.'
|
5
|
+
EnforcedStyle: to_not
|
6
|
+
SupportedStyles:
|
7
|
+
- not_to
|
8
|
+
- to_not
|
9
|
+
Enabled: true
|
10
|
+
|
11
|
+
RSpec/FilePath:
|
12
|
+
Exclude:
|
13
|
+
- spec/abilities/*_spec.rb
|
14
|
+
|
15
|
+
RSpec/LeadingSubject:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Rails:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
AllCops:
|
22
|
+
TargetRubyVersion: 2.4
|
23
|
+
DisplayCopNames: true
|
24
|
+
DisplayStyleGuide: true
|
25
|
+
RSpec:
|
26
|
+
Patterns:
|
27
|
+
- '.+'
|
28
|
+
Exclude:
|
29
|
+
- 'db/**/*'
|
30
|
+
- 'config/**/*'
|
31
|
+
- 'bin/**/*'
|
32
|
+
Include:
|
33
|
+
- '**/*.pryrc'
|
34
|
+
- '.simplecov'
|
35
|
+
- 'config/initializers/*'
|
36
|
+
|
37
|
+
Style/Documentation:
|
38
|
+
Description: 'Document classes and non-namespace modules.'
|
39
|
+
Enabled: false
|
40
|
+
|
41
|
+
Style/DotPosition:
|
42
|
+
Description: 'Checks the position of the dot in multi-line method calls.'
|
43
|
+
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains'
|
44
|
+
EnforcedStyle: leading
|
45
|
+
Enabled: true
|
46
|
+
|
47
|
+
Style/TrailingCommaInLiteral:
|
48
|
+
EnforcedStyleForMultiline: comma
|
49
|
+
|
50
|
+
Style/TrailingCommaInArguments:
|
51
|
+
EnforcedStyleForMultiline: comma
|
52
|
+
|
53
|
+
Style/FrozenStringLiteralComment:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Metrics/MethodLength:
|
57
|
+
Max: 15
|
58
|
+
|
59
|
+
Metrics/AbcSize:
|
60
|
+
Enabled: false
|
data/lib/voyage/version.rb
CHANGED
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.44.0.
|
4
|
+
version: 1.44.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot, headway
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitters
|
@@ -113,6 +113,7 @@ files:
|
|
113
113
|
- lib/voyage/templates/controller_helpers.rb
|
114
114
|
- lib/voyage/templates/custom_cancan_matchers.rb
|
115
115
|
- lib/voyage/templates/rails_helper.rb.erb
|
116
|
+
- lib/voyage/templates/rubocop.yml
|
116
117
|
- lib/voyage/templates/seeder.rb.erb
|
117
118
|
- lib/voyage/templates/seeds.rb.erb
|
118
119
|
- lib/voyage/templates/simplecov.rb
|