trailblazer-rails 2.1.6 → 2.4.0

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.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trailblazer-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.6
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-04 00:00:00.000000000 Z
11
+ date: 2022-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -16,21 +16,21 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.0
19
+ version: 5.2.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: 4.0.0
26
+ version: 5.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: trailblazer
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.1.0.beta1
33
+ version: 2.1.0
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.2.0
@@ -40,40 +40,12 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 2.1.0.beta1
43
+ version: 2.1.0
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.2.0
47
- - !ruby/object:Gem::Dependency
48
- name: trailblazer-loader
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: 0.1.0
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 0.1.0
61
47
  - !ruby/object:Gem::Dependency
62
48
  name: bundler
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "~>"
66
- - !ruby/object:Gem::Version
67
- version: '1.10'
68
- type: :development
69
- prerelease: false
70
- version_requirements: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - "~>"
73
- - !ruby/object:Gem::Version
74
- version: '1.10'
75
- - !ruby/object:Gem::Dependency
76
- name: minitest
77
49
  requirement: !ruby/object:Gem::Requirement
78
50
  requirements:
79
51
  - - ">="
@@ -87,7 +59,7 @@ dependencies:
87
59
  - !ruby/object:Gem::Version
88
60
  version: '0'
89
61
  - !ruby/object:Gem::Dependency
90
- name: rake
62
+ name: minitest
91
63
  requirement: !ruby/object:Gem::Requirement
92
64
  requirements:
93
65
  - - ">="
@@ -101,7 +73,7 @@ dependencies:
101
73
  - !ruby/object:Gem::Version
102
74
  version: '0'
103
75
  - !ruby/object:Gem::Dependency
104
- name: rubocop
76
+ name: rake
105
77
  requirement: !ruby/object:Gem::Requirement
106
78
  requirements:
107
79
  - - ">="
@@ -114,40 +86,42 @@ dependencies:
114
86
  - - ">="
115
87
  - !ruby/object:Gem::Version
116
88
  version: '0'
117
- description:
89
+ description:
118
90
  email:
119
91
  - apotonick@gmail.com
120
92
  executables: []
121
93
  extensions: []
122
94
  extra_rdoc_files: []
123
95
  files:
96
+ - ".github/workflows/ci.yml"
124
97
  - ".gitignore"
125
- - ".rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml"
126
- - ".rubocop.yml"
127
- - ".ruby-version"
128
- - ".travis.yml"
98
+ - Appraisals
129
99
  - CHANGES.md
130
100
  - Gemfile
131
101
  - LICENSE.txt
132
102
  - README.md
133
103
  - Rakefile
104
+ - gemfiles/rails_5.2.gemfile
105
+ - gemfiles/rails_5.2.gemfile.lock
106
+ - gemfiles/rails_6.0.gemfile
107
+ - gemfiles/rails_6.0.gemfile.lock
108
+ - gemfiles/rails_6.1.gemfile
109
+ - gemfiles/rails_6.1.gemfile.lock
110
+ - gemfiles/rails_7.0.gemfile
111
+ - gemfiles/rails_7.0.gemfile.lock
134
112
  - lib/trailblazer-rails.rb
135
- - lib/trailblazer/operation/responder.rb
136
113
  - lib/trailblazer/rails.rb
137
114
  - lib/trailblazer/rails/cell.rb
138
115
  - lib/trailblazer/rails/controller.rb
139
116
  - lib/trailblazer/rails/form.rb
140
117
  - lib/trailblazer/rails/railtie.rb
141
- - lib/trailblazer/rails/railtie/extend_application_controller.rb
142
- - lib/trailblazer/rails/railtie/loader.rb
143
- - lib/trailblazer/rails/test/integration.rb
144
118
  - lib/trailblazer/rails/version.rb
145
119
  - trailblazer-rails.gemspec
146
- homepage: http://trailblazer.to/gems/trailblazer/2.0/rails.html
120
+ homepage: https://trailblazer.to/2.1/docs/trailblazer.html#trailblazer-rails
147
121
  licenses:
148
122
  - MIT
149
123
  metadata: {}
150
- post_install_message:
124
+ post_install_message:
151
125
  rdoc_options: []
152
126
  require_paths:
153
127
  - lib
@@ -162,9 +136,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
136
  - !ruby/object:Gem::Version
163
137
  version: '0'
164
138
  requirements: []
165
- rubyforge_project:
166
- rubygems_version: 2.6.14.1
167
- signing_key:
139
+ rubygems_version: 3.2.3
140
+ signing_key:
168
141
  specification_version: 4
169
142
  summary: Convenient Rails support for Trailblazer.
170
143
  test_files: []
@@ -1,101 +0,0 @@
1
- AllCops:
2
- DisplayCopNames: true
3
- Layout/CaseIndentation:
4
- IndentOneStep: true
5
- Layout/FirstArrayElementLineBreak:
6
- Enabled: true
7
- Layout/FirstHashElementLineBreak:
8
- Enabled: true
9
- Layout/FirstMethodArgumentLineBreak:
10
- Enabled: true
11
- Layout/FirstMethodParameterLineBreak:
12
- Enabled: true
13
- Layout/MultilineAssignmentLayout:
14
- Enabled: true
15
- EnforcedStyle: same_line
16
- Layout/SpaceInsideHashLiteralBraces:
17
- EnforcedStyle: no_space
18
- Metrics/LineLength:
19
- Max: 130
20
- Metrics/ParameterLists:
21
- Max: 5
22
- Naming/VariableNumber:
23
- EnforcedStyle: snake_case
24
- Style/AndOr:
25
- EnforcedStyle: conditionals
26
- Style/AutoResourceCleanup:
27
- Enabled: true
28
- Style/CollectionMethods:
29
- Enabled: true
30
- Style/Documentation:
31
- Enabled: false
32
- Style/EmptyLiteral:
33
- Enabled: false
34
- Style/EmptyMethod:
35
- EnforcedStyle: expanded
36
- Style/FormatStringToken:
37
- EnforcedStyle: template
38
- Style/ImplicitRuntimeError:
39
- Enabled: true
40
- Style/MethodCalledOnDoEndBlock:
41
- Enabled: true
42
- Style/MethodDefParentheses:
43
- EnforcedStyle: require_parentheses
44
- Style/MissingElse:
45
- Enabled: true
46
- EnforcedStyle: case
47
- Style/NumericLiterals:
48
- Enabled: false
49
- Style/OptionHash:
50
- Enabled: true
51
- Style/PercentLiteralDelimiters:
52
- PreferredDelimiters:
53
- "%w": "[]"
54
- "%W": "[]"
55
- "%i": "[]"
56
- "%I": "[]"
57
- "%r": "()"
58
- Style/ReturnNil:
59
- Enabled: true
60
- Style/SafeNavigation:
61
- Enabled: false
62
- Style/Send:
63
- Enabled: true
64
- Style/SignalException:
65
- EnforcedStyle: semantic
66
- Style/StringLiterals:
67
- EnforcedStyle: double_quotes
68
- Style/StringLiteralsInInterpolation:
69
- EnforcedStyle: double_quotes
70
- Style/StringMethods:
71
- Enabled: true
72
- Style/SymbolArray:
73
- Enabled: true
74
- # this allows in rspec to have expect { } with multiple lines
75
- Style/BlockDelimiters:
76
- EnforcedStyle: braces_for_chaining
77
- Layout/EndOfLine:
78
- Enabled: false
79
- # don't need these checks in test folders
80
- Metrics/ModuleLength:
81
- Exclude:
82
- - "spec/**/*"
83
- - "test/**/*"
84
- Metrics/BlockLength:
85
- Exclude:
86
- - "spec/**/*"
87
- - "test/**/*"
88
- - "*.gemspec" # definitely not in the gemspec
89
- Metrics/MethodLength:
90
- Max: 20
91
- Lint/UnreachableCode:
92
- Description: 'Unreachable code.'
93
- Enabled: false
94
- Lint/Void:
95
- Enabled: false
96
- Layout/AlignHash:
97
- EnforcedLastArgumentHashStyle: ignore_implicit
98
- Metrics/AbcSize:
99
- Max: 25
100
- Style/LambdaCall:
101
- Enabled: false
data/.rubocop.yml DELETED
@@ -1,30 +0,0 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/trailblazer/meta/master/rubocop.yml
3
-
4
- Style/ClassCheck:
5
- Exclude:
6
- - 'lib/trailblazer/rails/cell.rb'
7
-
8
- Metrics/AbcSize:
9
- Exclude:
10
- - 'lib/trailblazer/rails/controller.rb'
11
-
12
- Bundler/DuplicatedGem:
13
- Enabled: false
14
-
15
- Style/Send:
16
- Enabled: false
17
-
18
- Style/StringLiterals:
19
- Enabled: false
20
-
21
- Style/FrozenStringLiteralComment:
22
- Enabled: false
23
-
24
- Style/ClassAndModuleChildren:
25
- Enabled: false
26
-
27
- # required when rubocop is run via travis
28
- AllCops:
29
- Exclude:
30
- - 'test/**/vendor/**/*'
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.4.4
data/.travis.yml DELETED
@@ -1,22 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- cache: bundler
4
- matrix:
5
- include:
6
- - rvm: 2.4.1
7
- env: TEST_SUITE=rails4.2
8
- gemfile: test/rails4.2/Gemfile
9
- - rvm: 2.4.1
10
- env: TEST_SUITE=rails5.0
11
- gemfile: test/rails5.0/Gemfile
12
-
13
- - rvm: 2.4.1
14
- env: TEST_SUITE=rails5.1
15
- gemfile: test/rails5.1/Gemfile
16
-
17
- - rvm: 2.5.1
18
- env: TEST_SUITE=rails5.2
19
- gemfile: test/rails5.2/Gemfile
20
-
21
- script: cd test/$TEST_SUITE && bundle install && bundle exec rake test && cd ../.. && bundle install && bundle exec rake rubocop
22
-
@@ -1,18 +0,0 @@
1
- module Trailblazer::Operation::Responder
2
- def self.included(base)
3
- base.extend ClassMethods
4
- end
5
-
6
- module ClassMethods
7
- def model_name
8
- model_class.model_name
9
- end
10
- end
11
-
12
- extend Forwardable
13
- def_delegators :@model, :to_param, :destroyed?, :persisted?
14
-
15
- def to_model
16
- @model
17
- end
18
- end
@@ -1,28 +0,0 @@
1
- require "active_support/concern"
2
-
3
- module Trailblazer
4
- class Railtie < ::Rails::Railtie
5
- module ExtendApplicationController
6
- extend ActiveSupport::Concern
7
-
8
- included do
9
- initializer "trailblazer.application_controller", before: "finisher_hook" do
10
- reloader_class.to_prepare do
11
- ActiveSupport.on_load(:action_controller) do |app|
12
- Trailblazer::Railtie.extend_application_controller!(app)
13
- end
14
- end
15
- end
16
-
17
- def extend_application_controller!(app)
18
- controllers = Array(::Rails.application.config.trailblazer.application_controller).map(&:to_s)
19
- if controllers.include? app.to_s
20
- app.send :include, Trailblazer::Rails::Controller
21
- app.send :include, Trailblazer::Rails::Controller::Cell if defined?(::Cell)
22
- end
23
- app
24
- end
25
- end
26
- end
27
- end
28
- end
@@ -1,58 +0,0 @@
1
- require "active_support/concern"
2
-
3
- module Trailblazer
4
- class Railtie < ::Rails::Railtie
5
- module Loader
6
- extend ActiveSupport::Concern
7
-
8
- included do # rubocop:disable Metrics/BlockLength
9
- def self.load_concepts(app)
10
- load_for(app)
11
-
12
- engines.each { |engine| load_for(engine) }
13
- end
14
-
15
- def self.engines
16
- ::Rails.application.railties.select { |tie| tie.is_a?(::Rails::Engine) }
17
- end
18
-
19
- def self.load_for(app)
20
- Trailblazer::Loader.new.(prepend: AllModelFiles, root: app.root) { |file| require_dependency(file) }
21
- end
22
-
23
- # Prepend model file, before the concept files like operation.rb get loaded.
24
- ModelFile = lambda do |input, options|
25
- model = "app/models/#{options[:name]}.rb"
26
- File.exist?(model) ? [model] + input : input
27
- end
28
-
29
- # Load all model files before any TRB files.
30
- AllModelFiles = lambda do |input, options|
31
- Dir.glob("#{options[:root]}/app/models/**/*.rb").sort + input
32
- end
33
-
34
- # This is to autoload Operation::Dispatch, etc. I'm simply assuming people find this helpful in Rails.
35
- initializer "trailblazer.library_autoloading" do
36
- end
37
-
38
- # thank you, http://stackoverflow.com/a/17573888/465070
39
- initializer "trailblazer.install", after: "reform.form_extensions" do |app|
40
- # the trb autoloading has to be run after initializers have been loaded, so we can tweak inclusion of features in
41
- # initializers.
42
-
43
- # TODO: remove me in the next version!
44
- if config.trailblazer.use_loader.to_s.present?
45
- warn "DEPRECATION WARNING [trailblazer-rails]: please use config.trailblazer.enable_loader" \
46
- " to enable/disable the loader. config.trailblazer.use_loader will be removed from version > 2.1.6"
47
- end
48
-
49
- if config.trailblazer.enable_loader || config.trailblazer.use_loader
50
- reloader_class.to_prepare do
51
- Trailblazer::Railtie.load_concepts(app)
52
- end
53
- end
54
- end
55
- end
56
- end
57
- end
58
- end
@@ -1,6 +0,0 @@
1
- require "minitest/rails/capybara" # loads Capybara, etc.
2
-
3
- module Trailblazer::Test
4
- class Integration < Capybara::Rails::TestCase
5
- end
6
- end