trailblazer-rails 2.1.5 → 2.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml +101 -0
- data/.rubocop.yml +22 -1
- data/.travis.yml +5 -1
- data/CHANGES.md +6 -1
- data/Gemfile +23 -23
- data/README.md +1 -1
- data/Rakefile +16 -1
- data/lib/trailblazer-rails.rb +1 -1
- data/lib/trailblazer/rails.rb +0 -2
- data/lib/trailblazer/rails/cell.rb +4 -3
- data/lib/trailblazer/rails/controller.rb +13 -4
- data/lib/trailblazer/rails/railtie.rb +2 -1
- data/lib/trailblazer/rails/railtie/extend_application_controller.rb +2 -2
- data/lib/trailblazer/rails/railtie/loader.rb +11 -4
- data/lib/trailblazer/rails/version.rb +1 -1
- data/trailblazer-rails.gemspec +4 -6
- metadata +20 -40
- data/.rubocop_todo.yml +0 -294
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9e1891b66e4c2f50c71a3c65cec7b4dff7f4040
|
4
|
+
data.tar.gz: 23787f269aa73d368c78a238f866f38289bfb061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34fb697f432010c8a1e5d44b6e15bec35778637d72e888b7add5ce3bf11dc3373863324db0ca1f9a32bb383e5cf02c3707bebeae3a458c474eca6b4046d8dfbe
|
7
|
+
data.tar.gz: a864ca3525562e60080f472b08395949a88fd6fb571ef1a8705dfc417cf0458c1a3cdb494c37a34df887b9a3363f6a51c1300392c4eb1e3c017723178a54152c
|
@@ -0,0 +1,101 @@
|
|
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
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
inherit_from:
|
1
|
+
inherit_from:
|
2
|
+
- https://raw.githubusercontent.com/trailblazer/meta/master/rubocop.yml
|
2
3
|
|
3
4
|
Style/ClassCheck:
|
4
5
|
Exclude:
|
@@ -7,3 +8,23 @@ Style/ClassCheck:
|
|
7
8
|
Metrics/AbcSize:
|
8
9
|
Exclude:
|
9
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/.travis.yml
CHANGED
@@ -3,6 +3,9 @@ language: ruby
|
|
3
3
|
cache: bundler
|
4
4
|
matrix:
|
5
5
|
include:
|
6
|
+
- rvm: 2.4.1
|
7
|
+
env: TEST_SUITE=rails4.2
|
8
|
+
gemfile: test/rails4.2/Gemfile
|
6
9
|
- rvm: 2.4.1
|
7
10
|
env: TEST_SUITE=rails5.0
|
8
11
|
gemfile: test/rails5.0/Gemfile
|
@@ -15,4 +18,5 @@ matrix:
|
|
15
18
|
env: TEST_SUITE=rails5.2
|
16
19
|
gemfile: test/rails5.2/Gemfile
|
17
20
|
|
18
|
-
script: cd test/$TEST_SUITE && bundle install && bundle exec rake test
|
21
|
+
script: cd test/$TEST_SUITE && bundle install && bundle exec rake test && cd ../.. && bundle install && bundle exec rake rubocop
|
22
|
+
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
# 2.1.6
|
2
|
+
|
3
|
+
* Dependency for `railties` >= 4.0.0
|
4
|
+
* Config flag use_loader renamed with enable_loader
|
5
|
+
|
1
6
|
# 2.1.5
|
2
7
|
|
3
|
-
* Add dependency `
|
8
|
+
* Add dependency `railties` >= 5.0.7
|
4
9
|
* rename `run` to `run_v21` and alias it to `run` only if it not already defined
|
5
10
|
|
6
11
|
# 2.1.4
|
data/Gemfile
CHANGED
@@ -4,27 +4,27 @@ source 'https://rubygems.org'
|
|
4
4
|
gemspec
|
5
5
|
|
6
6
|
case ENV['GEMS_SOURCE']
|
7
|
-
when 'local'
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
when 'github'
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
when 'custom'
|
22
|
-
|
23
|
-
else # use rubygems releases
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
7
|
+
when 'local'
|
8
|
+
gem "cells-erb", path: "../cells-erb"
|
9
|
+
gem "cells-rails", path: "../cells-rails"
|
10
|
+
gem "reform-rails", path: "../reform-rails"
|
11
|
+
gem "trailblazer", path: "../trailblazer"
|
12
|
+
gem "trailblazer-cells", path: "../trailblazer-cells"
|
13
|
+
gem "trailblazer-loader", path: "../trailblazer-loader"
|
14
|
+
when 'github'
|
15
|
+
gem "cells-erb", github: "trailblazer/cells-erb"
|
16
|
+
gem "cells-rails", github: "trailblazer/cells-rails"
|
17
|
+
gem "reform-rails", github: "trailblazer/reform-rails"
|
18
|
+
gem "trailblazer", github: "trailblazer/trailblazer"
|
19
|
+
gem "trailblazer-cells", github: "trailblazer/trailblazer-cells"
|
20
|
+
gem "trailblazer-loader", github: "trailblazer/trailblazer-loader"
|
21
|
+
when 'custom'
|
22
|
+
eval_gemfile('GemfileCustom')
|
23
|
+
else # use rubygems releases
|
24
|
+
gem "cells-erb"
|
25
|
+
gem "cells-rails"
|
26
|
+
gem "reform-rails"
|
27
|
+
gem "trailblazer"
|
28
|
+
gem "trailblazer-cells"
|
29
|
+
gem "trailblazer-loader"
|
30
30
|
end
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ Note that the 2.x version only runs with TRB >= 2.1.0.
|
|
30
30
|
|
31
31
|
## Setting flags
|
32
32
|
|
33
|
-
* `config.trailblazer.
|
33
|
+
* `config.trailblazer.enable_loader = false` to disable Trailblazer loader (default TRUE)
|
34
34
|
* `config.trailblazer.enable_tracing = true` to enable tracing when using `run` (default FALSE)
|
35
35
|
|
36
36
|
## License
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/testtask"
|
3
|
+
require "rubocop/rake_task"
|
3
4
|
|
4
5
|
Rake::TestTask.new(:test) do |t|
|
5
6
|
t.libs << "test"
|
@@ -7,4 +8,18 @@ Rake::TestTask.new(:test) do |t|
|
|
7
8
|
t.test_files = FileList['test/**/*_test.rb']
|
8
9
|
end
|
9
10
|
|
10
|
-
|
11
|
+
RuboCop::RakeTask.new(:rubocop)
|
12
|
+
|
13
|
+
desc 'Remove temporary files'
|
14
|
+
task :clean do
|
15
|
+
`rm -rf *.gem doc pkg coverage test-reports`
|
16
|
+
%x(rm -f `find . -name '*.rbc'`)
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "Build the gem"
|
20
|
+
task :gem do
|
21
|
+
`gem build trailblazer-rails.gemspec`
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'Running Tests'
|
25
|
+
task default: %i[clean test]
|
data/lib/trailblazer-rails.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require "trailblazer/rails"
|
1
|
+
require "trailblazer/rails" # rubocop:disable Naming/FileName
|
data/lib/trailblazer/rails.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
module Trailblazer::Rails::Controller::Cell
|
2
|
-
private
|
2
|
+
private # rubocop:disable Lint/UselessAccessModifier
|
3
3
|
|
4
4
|
module Render
|
5
5
|
def render(cell = nil, options = {}, *, &block)
|
6
6
|
return super unless cell.kind_of?(::Cell::ViewModel)
|
7
|
+
|
7
8
|
render_cell(cell, options)
|
8
9
|
end
|
9
10
|
|
@@ -13,9 +14,9 @@ module Trailblazer::Rails::Controller::Cell
|
|
13
14
|
# render the cell.
|
14
15
|
content = cell.()
|
15
16
|
|
16
|
-
render({
|
17
|
+
render({html: content}.merge(options))
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
20
|
-
include Render
|
21
|
+
include Render unless method_defined?(:render_cell)
|
21
22
|
end
|
@@ -7,8 +7,7 @@ module Trailblazer::Rails
|
|
7
7
|
_run_operation_v21(operation, :call, *dependencies)
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
@form = Trailblazer::Rails::Form.new(result["contract.default"], @model.class)
|
10
|
+
_assign_trb_ivars(result)
|
12
11
|
|
13
12
|
yield(result) if result.success? && block_given?
|
14
13
|
|
@@ -17,7 +16,8 @@ module Trailblazer::Rails
|
|
17
16
|
|
18
17
|
alias run run_v21 unless method_defined?(:run)
|
19
18
|
|
20
|
-
|
19
|
+
private
|
20
|
+
|
21
21
|
# Override to tweak params. Not recommended.
|
22
22
|
# Use a deserializer instead.
|
23
23
|
def _run_params(params)
|
@@ -38,7 +38,7 @@ module Trailblazer::Rails
|
|
38
38
|
def _run_operation_v21(operation, call_method, *dependencies)
|
39
39
|
operation.send(
|
40
40
|
call_method,
|
41
|
-
{
|
41
|
+
{params: _run_params(self.params)}.merge(*_run_runtime_options(*dependencies)) # rubocop:disable Style/RedundantSelf
|
42
42
|
)
|
43
43
|
end
|
44
44
|
|
@@ -46,6 +46,15 @@ module Trailblazer::Rails
|
|
46
46
|
puts result.wtf?
|
47
47
|
end
|
48
48
|
|
49
|
+
def _assign_trb_ivars(result)
|
50
|
+
@model = result[:model]
|
51
|
+
@form = _wrap_with_trb_form(result["contract.default"], @model.class)
|
52
|
+
end
|
53
|
+
|
54
|
+
def _wrap_with_trb_form(form, model)
|
55
|
+
Trailblazer::Rails::Form.new(form, model)
|
56
|
+
end
|
57
|
+
|
49
58
|
module Result
|
50
59
|
def result
|
51
60
|
@_result
|
@@ -8,7 +8,8 @@ module Trailblazer
|
|
8
8
|
config.trailblazer = ActiveSupport::OrderedOptions.new
|
9
9
|
## Accept also an Array of controllers
|
10
10
|
config.trailblazer.application_controller ||= 'ActionController::Base'
|
11
|
-
config.trailblazer.
|
11
|
+
config.trailblazer.enable_loader ||= true
|
12
|
+
config.trailblazer.use_loader ||= true # TODO: remove with next release
|
12
13
|
config.trailblazer.enable_tracing ||= false
|
13
14
|
|
14
15
|
include Loader
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "active_support/concern"
|
2
2
|
|
3
3
|
module Trailblazer
|
4
4
|
class Railtie < ::Rails::Railtie
|
@@ -15,7 +15,7 @@ module Trailblazer
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def extend_application_controller!(app)
|
18
|
-
controllers = Array(::Rails.application.config.trailblazer.application_controller).map
|
18
|
+
controllers = Array(::Rails.application.config.trailblazer.application_controller).map(&:to_s)
|
19
19
|
if controllers.include? app.to_s
|
20
20
|
app.send :include, Trailblazer::Rails::Controller
|
21
21
|
app.send :include, Trailblazer::Rails::Controller::Cell if defined?(::Cell)
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require
|
1
|
+
require "active_support/concern"
|
2
2
|
|
3
3
|
module Trailblazer
|
4
4
|
class Railtie < ::Rails::Railtie
|
5
5
|
module Loader
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
|
-
included do
|
8
|
+
included do # rubocop:disable Metrics/BlockLength
|
9
9
|
def self.load_concepts(app)
|
10
10
|
load_for(app)
|
11
11
|
|
@@ -36,10 +36,17 @@ module Trailblazer
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# thank you, http://stackoverflow.com/a/17573888/465070
|
39
|
-
initializer
|
39
|
+
initializer "trailblazer.install", after: "reform.form_extensions" do |app|
|
40
40
|
# the trb autoloading has to be run after initializers have been loaded, so we can tweak inclusion of features in
|
41
41
|
# initializers.
|
42
|
-
|
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
|
43
50
|
reloader_class.to_prepare do
|
44
51
|
Trailblazer::Railtie.load_concepts(app)
|
45
52
|
end
|
data/trailblazer-rails.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
lib = File.expand_path('
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
require 'trailblazer/rails/version'
|
4
4
|
|
@@ -8,21 +8,19 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Nick Sutterer"]
|
9
9
|
spec.email = ["apotonick@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary =
|
11
|
+
spec.summary = "Convenient Rails support for Trailblazer."
|
12
12
|
spec.homepage = "http://trailblazer.to/gems/trailblazer/2.0/rails.html"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test)/}) }
|
16
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
16
|
spec.require_paths = ["lib"]
|
18
17
|
|
18
|
+
spec.add_dependency "railties", ">= 4.0.0"
|
19
19
|
spec.add_dependency "trailblazer", ">= 2.1.0.beta1", "< 2.2.0"
|
20
20
|
spec.add_dependency "trailblazer-loader", ">= 0.1.0"
|
21
|
-
spec.add_dependency "reform-rails", ">= 0.1.4", "< 0.2.0"
|
22
|
-
spec.add_dependency "activesupport", ">= 5.0.0"
|
23
21
|
|
24
22
|
spec.add_development_dependency "bundler", "~> 1.10"
|
25
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
26
23
|
spec.add_development_dependency "minitest"
|
24
|
+
spec.add_development_dependency "rake"
|
27
25
|
spec.add_development_dependency "rubocop"
|
28
26
|
end
|
metadata
CHANGED
@@ -1,83 +1,63 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 2.2.0
|
19
|
+
version: 4.0.0
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 2.2.0
|
26
|
+
version: 4.0.0
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name: trailblazer
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: 0.1.0
|
40
|
-
type: :runtime
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 0.1.0
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: reform-rails
|
28
|
+
name: trailblazer
|
49
29
|
requirement: !ruby/object:Gem::Requirement
|
50
30
|
requirements:
|
51
31
|
- - ">="
|
52
32
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
33
|
+
version: 2.1.0.beta1
|
54
34
|
- - "<"
|
55
35
|
- !ruby/object:Gem::Version
|
56
|
-
version:
|
36
|
+
version: 2.2.0
|
57
37
|
type: :runtime
|
58
38
|
prerelease: false
|
59
39
|
version_requirements: !ruby/object:Gem::Requirement
|
60
40
|
requirements:
|
61
41
|
- - ">="
|
62
42
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
43
|
+
version: 2.1.0.beta1
|
64
44
|
- - "<"
|
65
45
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
46
|
+
version: 2.2.0
|
67
47
|
- !ruby/object:Gem::Dependency
|
68
|
-
name:
|
48
|
+
name: trailblazer-loader
|
69
49
|
requirement: !ruby/object:Gem::Requirement
|
70
50
|
requirements:
|
71
51
|
- - ">="
|
72
52
|
- !ruby/object:Gem::Version
|
73
|
-
version:
|
53
|
+
version: 0.1.0
|
74
54
|
type: :runtime
|
75
55
|
prerelease: false
|
76
56
|
version_requirements: !ruby/object:Gem::Requirement
|
77
57
|
requirements:
|
78
58
|
- - ">="
|
79
59
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
60
|
+
version: 0.1.0
|
81
61
|
- !ruby/object:Gem::Dependency
|
82
62
|
name: bundler
|
83
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,21 +73,21 @@ dependencies:
|
|
93
73
|
- !ruby/object:Gem::Version
|
94
74
|
version: '1.10'
|
95
75
|
- !ruby/object:Gem::Dependency
|
96
|
-
name:
|
76
|
+
name: minitest
|
97
77
|
requirement: !ruby/object:Gem::Requirement
|
98
78
|
requirements:
|
99
|
-
- - "
|
79
|
+
- - ">="
|
100
80
|
- !ruby/object:Gem::Version
|
101
|
-
version: '
|
81
|
+
version: '0'
|
102
82
|
type: :development
|
103
83
|
prerelease: false
|
104
84
|
version_requirements: !ruby/object:Gem::Requirement
|
105
85
|
requirements:
|
106
|
-
- - "
|
86
|
+
- - ">="
|
107
87
|
- !ruby/object:Gem::Version
|
108
|
-
version: '
|
88
|
+
version: '0'
|
109
89
|
- !ruby/object:Gem::Dependency
|
110
|
-
name:
|
90
|
+
name: rake
|
111
91
|
requirement: !ruby/object:Gem::Requirement
|
112
92
|
requirements:
|
113
93
|
- - ">="
|
@@ -142,8 +122,8 @@ extensions: []
|
|
142
122
|
extra_rdoc_files: []
|
143
123
|
files:
|
144
124
|
- ".gitignore"
|
125
|
+
- ".rubocop-https---raw-githubusercontent-com-trailblazer-meta-master-rubocop-yml"
|
145
126
|
- ".rubocop.yml"
|
146
|
-
- ".rubocop_todo.yml"
|
147
127
|
- ".ruby-version"
|
148
128
|
- ".travis.yml"
|
149
129
|
- CHANGES.md
|
data/.rubocop_todo.yml
DELETED
@@ -1,294 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2018-04-05 15:17:59 +0800 using RuboCop version 0.52.0.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 9
|
10
|
-
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
12
|
-
# Include: **/Gemfile, **/gems.rb
|
13
|
-
Bundler/OrderedGems:
|
14
|
-
Exclude:
|
15
|
-
- 'test/rails5.0/Gemfile'
|
16
|
-
- 'test/rails5.1/Gemfile'
|
17
|
-
- 'test/rails5.2/Gemfile'
|
18
|
-
|
19
|
-
# Offense count: 2
|
20
|
-
# Cop supports --auto-correct.
|
21
|
-
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
|
22
|
-
# Include: **/*.gemspec
|
23
|
-
Gemspec/OrderedDependencies:
|
24
|
-
Exclude:
|
25
|
-
- 'trailblazer-rails.gemspec'
|
26
|
-
|
27
|
-
# Offense count: 2
|
28
|
-
# Cop supports --auto-correct.
|
29
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
30
|
-
# SupportedStyles: outdent, indent
|
31
|
-
Layout/AccessModifierIndentation:
|
32
|
-
Exclude:
|
33
|
-
- 'lib/trailblazer/rails/controller.rb'
|
34
|
-
- 'test/rails5.0/app/controllers/params_controller.rb'
|
35
|
-
|
36
|
-
# Offense count: 5
|
37
|
-
# Cop supports --auto-correct.
|
38
|
-
Layout/EmptyLines:
|
39
|
-
Exclude:
|
40
|
-
- 'test/rails5.2/Gemfile'
|
41
|
-
- 'test/test_helper.rb'
|
42
|
-
|
43
|
-
# Offense count: 4
|
44
|
-
# Cop supports --auto-correct.
|
45
|
-
Layout/EmptyLinesAroundAccessModifier:
|
46
|
-
Exclude:
|
47
|
-
- 'lib/trailblazer/rails/controller.rb'
|
48
|
-
- 'test/rails5.0/app/controllers/params_controller.rb'
|
49
|
-
- 'test/rails5.1/app/controllers/params_controller.rb'
|
50
|
-
- 'test/rails5.2/app/controllers/params_controller.rb'
|
51
|
-
|
52
|
-
# Offense count: 9
|
53
|
-
# Cop supports --auto-correct.
|
54
|
-
# Configuration parameters: EnforcedStyle.
|
55
|
-
# SupportedStyles: empty_lines, no_empty_lines
|
56
|
-
Layout/EmptyLinesAroundBlockBody:
|
57
|
-
Exclude:
|
58
|
-
- 'test/rails5.0/config/routes.rb'
|
59
|
-
- 'test/rails5.0/db/schema.rb'
|
60
|
-
- 'test/rails5.1/config/routes.rb'
|
61
|
-
- 'test/rails5.1/db/schema.rb'
|
62
|
-
- 'test/rails5.2/config/routes.rb'
|
63
|
-
- 'test/rails5.2/db/schema.rb'
|
64
|
-
|
65
|
-
# Offense count: 3
|
66
|
-
# Cop supports --auto-correct.
|
67
|
-
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
68
|
-
Layout/ExtraSpacing:
|
69
|
-
Exclude:
|
70
|
-
- 'test/rails5.0/bin/setup'
|
71
|
-
- 'test/rails5.1/bin/setup'
|
72
|
-
- 'test/rails5.2/bin/setup'
|
73
|
-
|
74
|
-
# Offense count: 2
|
75
|
-
# Cop supports --auto-correct.
|
76
|
-
# Configuration parameters: EnforcedStyle.
|
77
|
-
# SupportedStyles: normal, rails
|
78
|
-
Layout/IndentationConsistency:
|
79
|
-
Exclude:
|
80
|
-
- 'test/rails5.1/app/controllers/params_controller.rb'
|
81
|
-
- 'test/rails5.2/app/controllers/params_controller.rb'
|
82
|
-
|
83
|
-
# Offense count: 3
|
84
|
-
# Cop supports --auto-correct.
|
85
|
-
Layout/LeadingCommentSpace:
|
86
|
-
Exclude:
|
87
|
-
- 'test/rails5.0/Gemfile'
|
88
|
-
- 'test/rails5.1/Gemfile'
|
89
|
-
- 'test/rails5.2/Gemfile'
|
90
|
-
|
91
|
-
# Offense count: 2
|
92
|
-
# Cop supports --auto-correct.
|
93
|
-
Layout/SpaceAfterColon:
|
94
|
-
Exclude:
|
95
|
-
- 'test/rails5.1/app/controllers/args_controller.rb'
|
96
|
-
- 'test/rails5.2/app/controllers/args_controller.rb'
|
97
|
-
|
98
|
-
# Offense count: 3
|
99
|
-
# Cop supports --auto-correct.
|
100
|
-
Layout/SpaceBeforeComment:
|
101
|
-
Exclude:
|
102
|
-
- 'test/rails5.0/Gemfile'
|
103
|
-
- 'test/rails5.1/Gemfile'
|
104
|
-
- 'test/rails5.2/Gemfile'
|
105
|
-
|
106
|
-
# Offense count: 6
|
107
|
-
# Cop supports --auto-correct.
|
108
|
-
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
109
|
-
# SupportedStyles: space, no_space
|
110
|
-
# SupportedStylesForEmptyBraces: space, no_space
|
111
|
-
Layout/SpaceInsideBlockBraces:
|
112
|
-
Exclude:
|
113
|
-
- 'test/rails5.0/app/concepts/params/operation/with_args.rb'
|
114
|
-
- 'test/rails5.1/app/concepts/params/operation/with_args.rb'
|
115
|
-
- 'test/rails5.2/app/concepts/params/operation/with_args.rb'
|
116
|
-
|
117
|
-
# Offense count: 51
|
118
|
-
# Cop supports --auto-correct.
|
119
|
-
Layout/SpaceInsideParens:
|
120
|
-
Exclude:
|
121
|
-
- 'test/rails5.0/app/concepts/song/operation/create.rb'
|
122
|
-
- 'test/rails5.0/app/concepts/song/operation/show.rb'
|
123
|
-
- 'test/rails5.0/app/controllers/artists_controller.rb'
|
124
|
-
- 'test/rails5.0/app/controllers/params_controller.rb'
|
125
|
-
- 'test/rails5.1/app/concepts/song/operation/create.rb'
|
126
|
-
- 'test/rails5.1/app/concepts/song/operation/show.rb'
|
127
|
-
- 'test/rails5.1/app/controllers/artists_controller.rb'
|
128
|
-
- 'test/rails5.1/app/controllers/params_controller.rb'
|
129
|
-
- 'test/rails5.2/app/concepts/song/operation/create.rb'
|
130
|
-
- 'test/rails5.2/app/concepts/song/operation/show.rb'
|
131
|
-
- 'test/rails5.2/app/controllers/artists_controller.rb'
|
132
|
-
- 'test/rails5.2/app/controllers/params_controller.rb'
|
133
|
-
|
134
|
-
# Offense count: 3
|
135
|
-
# Cop supports --auto-correct.
|
136
|
-
# Configuration parameters: EnforcedStyle.
|
137
|
-
# SupportedStyles: space, no_space
|
138
|
-
Layout/SpaceInsideStringInterpolation:
|
139
|
-
Exclude:
|
140
|
-
- 'test/rails5.0/app/concepts/params/operation/with_args.rb'
|
141
|
-
- 'test/rails5.1/app/concepts/params/operation/with_args.rb'
|
142
|
-
- 'test/rails5.2/app/concepts/params/operation/with_args.rb'
|
143
|
-
|
144
|
-
# Offense count: 1
|
145
|
-
# Cop supports --auto-correct.
|
146
|
-
Lint/DeprecatedClassMethods:
|
147
|
-
Exclude:
|
148
|
-
- 'test/test_helper.rb'
|
149
|
-
|
150
|
-
# Offense count: 1
|
151
|
-
Lint/ParenthesesAsGroupedExpression:
|
152
|
-
Exclude:
|
153
|
-
- 'test/test_helper.rb'
|
154
|
-
|
155
|
-
# Offense count: 1
|
156
|
-
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
157
|
-
Lint/UselessAccessModifier:
|
158
|
-
Exclude:
|
159
|
-
- 'lib/trailblazer/rails/cell.rb'
|
160
|
-
|
161
|
-
# Offense count: 1
|
162
|
-
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
163
|
-
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
164
|
-
Naming/FileName:
|
165
|
-
Exclude:
|
166
|
-
- 'lib/trailblazer-rails.rb'
|
167
|
-
|
168
|
-
# Offense count: 3
|
169
|
-
# Cop supports --auto-correct.
|
170
|
-
# Configuration parameters: EnforcedStyle.
|
171
|
-
# SupportedStyles: braces, no_braces, context_dependent
|
172
|
-
Style/BracesAroundHashParameters:
|
173
|
-
Exclude:
|
174
|
-
- 'test/rails5.0/app/controllers/args_controller.rb'
|
175
|
-
- 'test/rails5.1/app/controllers/args_controller.rb'
|
176
|
-
- 'test/rails5.2/app/controllers/args_controller.rb'
|
177
|
-
|
178
|
-
# Offense count: 23
|
179
|
-
# Configuration parameters: EnforcedStyle.
|
180
|
-
# SupportedStyles: nested, compact
|
181
|
-
Style/ClassAndModuleChildren:
|
182
|
-
Enabled: false
|
183
|
-
|
184
|
-
# Offense count: 1
|
185
|
-
# Cop supports --auto-correct.
|
186
|
-
Style/ColonMethodCall:
|
187
|
-
Exclude:
|
188
|
-
- 'test/test_helper.rb'
|
189
|
-
|
190
|
-
# Offense count: 10
|
191
|
-
Style/Documentation:
|
192
|
-
Exclude:
|
193
|
-
- 'spec/**/*'
|
194
|
-
- 'test/**/*'
|
195
|
-
- 'lib/trailblazer/operation/responder.rb'
|
196
|
-
- 'lib/trailblazer/rails.rb'
|
197
|
-
- 'lib/trailblazer/rails/cell.rb'
|
198
|
-
- 'lib/trailblazer/rails/controller.rb'
|
199
|
-
- 'lib/trailblazer/rails/form.rb'
|
200
|
-
- 'lib/trailblazer/rails/railtie.rb'
|
201
|
-
|
202
|
-
# Offense count: 134
|
203
|
-
# Cop supports --auto-correct.
|
204
|
-
# Configuration parameters: EnforcedStyle.
|
205
|
-
# SupportedStyles: when_needed, always, never
|
206
|
-
Style/FrozenStringLiteralComment:
|
207
|
-
Enabled: false
|
208
|
-
|
209
|
-
# Offense count: 7
|
210
|
-
# Cop supports --auto-correct.
|
211
|
-
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
212
|
-
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
213
|
-
Style/HashSyntax:
|
214
|
-
Exclude:
|
215
|
-
- 'Rakefile'
|
216
|
-
- 'test/rails5.0/app/controllers/args_controller.rb'
|
217
|
-
- 'test/rails5.0/app/controllers/params_controller.rb'
|
218
|
-
- 'test/rails5.1/app/controllers/args_controller.rb'
|
219
|
-
- 'test/rails5.1/app/controllers/params_controller.rb'
|
220
|
-
- 'test/rails5.2/app/controllers/args_controller.rb'
|
221
|
-
- 'test/rails5.2/app/controllers/params_controller.rb'
|
222
|
-
|
223
|
-
# Offense count: 2
|
224
|
-
# Cop supports --auto-correct.
|
225
|
-
# Configuration parameters: EnforcedStyle.
|
226
|
-
# SupportedStyles: line_count_dependent, lambda, literal
|
227
|
-
Style/Lambda:
|
228
|
-
Exclude:
|
229
|
-
- 'lib/trailblazer/rails/railtie.rb'
|
230
|
-
|
231
|
-
# Offense count: 6
|
232
|
-
# Cop supports --auto-correct.
|
233
|
-
# Configuration parameters: .
|
234
|
-
# SupportedStyles: call, braces
|
235
|
-
Style/LambdaCall:
|
236
|
-
EnforcedStyle: braces
|
237
|
-
|
238
|
-
# Offense count: 1
|
239
|
-
# Cop supports --auto-correct.
|
240
|
-
Style/MutableConstant:
|
241
|
-
Exclude:
|
242
|
-
- 'lib/trailblazer/rails/version.rb'
|
243
|
-
|
244
|
-
# Offense count: 3
|
245
|
-
# Cop supports --auto-correct.
|
246
|
-
# Configuration parameters: Strict.
|
247
|
-
Style/NumericLiterals:
|
248
|
-
MinDigits: 15
|
249
|
-
|
250
|
-
# Offense count: 10
|
251
|
-
# Cop supports --auto-correct.
|
252
|
-
# Configuration parameters: PreferredDelimiters.
|
253
|
-
Style/PercentLiteralDelimiters:
|
254
|
-
Exclude:
|
255
|
-
- 'test/rails5.0/app/concepts/params/operation/with_args.rb'
|
256
|
-
- 'test/rails5.0/test/integration/artists_controller_test.rb'
|
257
|
-
- 'test/rails5.1/app/concepts/params/operation/with_args.rb'
|
258
|
-
- 'test/rails5.1/test/integration/artists_controller_test.rb'
|
259
|
-
- 'test/rails5.2/app/concepts/params/operation/with_args.rb'
|
260
|
-
- 'test/rails5.2/test/integration/artists_controller_test.rb'
|
261
|
-
- 'trailblazer-rails.gemspec'
|
262
|
-
|
263
|
-
# Offense count: 2
|
264
|
-
# Cop supports --auto-correct.
|
265
|
-
Style/RedundantSelf:
|
266
|
-
Exclude:
|
267
|
-
- 'lib/trailblazer/rails/controller.rb'
|
268
|
-
|
269
|
-
# Offense count: 279
|
270
|
-
# Cop supports --auto-correct.
|
271
|
-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
272
|
-
# SupportedStyles: single_quotes, double_quotes
|
273
|
-
Style/StringLiterals:
|
274
|
-
Enabled: false
|
275
|
-
|
276
|
-
# Offense count: 1
|
277
|
-
# Cop supports --auto-correct.
|
278
|
-
# Configuration parameters: IgnoredMethods.
|
279
|
-
# IgnoredMethods: respond_to, define_method
|
280
|
-
Style/SymbolProc:
|
281
|
-
Exclude:
|
282
|
-
- 'lib/trailblazer/rails/railtie.rb'
|
283
|
-
|
284
|
-
# Offense count: 1
|
285
|
-
# Cop supports --auto-correct.
|
286
|
-
Style/UnneededPercentQ:
|
287
|
-
Exclude:
|
288
|
-
- 'trailblazer-rails.gemspec'
|
289
|
-
|
290
|
-
# Offense count: 66
|
291
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
292
|
-
# URISchemes: http, https
|
293
|
-
Metrics/LineLength:
|
294
|
-
Max: 127
|