dekorator 1.0.0.pre.1 → 1.2.1

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +4 -0
  3. data/.github/workflows/test.yml +40 -0
  4. data/CHANGELOG.md +44 -4
  5. data/CODE_OF_CONDUCT.md +1 -1
  6. data/README.md +107 -40
  7. data/benchmarks/README.md +7 -0
  8. data/benchmarks/benchmark.rb +135 -0
  9. data/dekorator.gemspec +29 -15
  10. data/lib/dekorator/rails/controller.rb +17 -0
  11. data/lib/dekorator/rails/tasks/dekorator.rake +11 -0
  12. data/lib/dekorator/railtie.rb +9 -5
  13. data/lib/dekorator/version.rb +1 -1
  14. data/lib/dekorator.rb +79 -53
  15. data/lib/generators/decorator_generator.rb +7 -0
  16. data/lib/generators/{decorator → dekorator/decorator}/USAGE +1 -1
  17. data/lib/generators/dekorator/decorator/decorator_generator.rb +17 -0
  18. data/lib/generators/{decorator → dekorator/decorator}/templates/decorator.rb +0 -0
  19. data/lib/generators/dekorator/{install_generator.rb → install/install_generator.rb} +8 -6
  20. data/lib/generators/rspec/decorator_generator.rb +2 -0
  21. data/lib/generators/test_unit/decorator_generator.rb +2 -0
  22. metadata +60 -52
  23. data/.editorconfig +0 -14
  24. data/.gitignore +0 -11
  25. data/.rspec +0 -3
  26. data/.rubocop.yml +0 -114
  27. data/.simplecov +0 -5
  28. data/.travis.yml +0 -37
  29. data/Appraisals +0 -17
  30. data/Gemfile +0 -22
  31. data/Gemfile.lock +0 -157
  32. data/bin/console +0 -16
  33. data/bin/setup +0 -8
  34. data/gemfiles/.bundle/config +0 -2
  35. data/gemfiles/rails_5.0.x.gemfile +0 -21
  36. data/gemfiles/rails_5.0.x.gemfile.lock +0 -207
  37. data/gemfiles/rails_5.1.x.gemfile +0 -21
  38. data/gemfiles/rails_5.1.x.gemfile.lock +0 -207
  39. data/gemfiles/rails_5.2.x.gemfile +0 -21
  40. data/gemfiles/rails_5.2.x.gemfile.lock +0 -207
  41. data/gemfiles/rails_6.0.x.gemfile +0 -21
  42. data/gemfiles/rails_6.0.x.gemfile.lock +0 -220
  43. data/lib/dekorator/decorators_helper.rb +0 -5
  44. data/lib/dekorator/rspec.rb +0 -0
  45. data/lib/generators/decorator/decorator_generator.rb +0 -11
  46. data/lib/generators/decorator/templates/decorator_test.rb +0 -1
data/lib/dekorator.rb CHANGED
@@ -1,10 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "dekorator/version"
4
- require "active_support/core_ext/object/blank"
5
- require "active_support/core_ext/module/delegation"
4
+ require "delegate"
6
5
 
6
+ # :nodoc
7
7
  module Dekorator
8
+ # @api private
9
+ module Generators; end
10
+
11
+ # :nodoc:
8
12
  class DecoratorNotFound < ArgumentError; end
9
13
 
10
14
  # Base decorator.
@@ -12,110 +16,132 @@ module Dekorator
12
16
  class << self
13
17
  # Decorate an object with a decorator.
14
18
  #
15
- # @param object_or_collection [Object, Enumerable] the object or collection to decorate.
16
- # @option opts [Class] :with the decorator class to use. If empty a decorator will be guessed.
19
+ # @param object_or_enumerable [Object, Enumerable] the object or Enumerable to decorate.
20
+ # @param with [Class] the decorator class to use. If empty a decorator will be guessed.
17
21
  #
18
- # @return [Dekorator::Base, ActiveRecord::Relation, Enumerable] the obect or collection decorated.
22
+ # @return [Dekorator::Base] if object given.
23
+ # @return [Enumerable] if Enumerable given.
19
24
  #
20
25
  # @raise [DecoratorNotFound] if decorator is not found.
21
- def decorate(object_or_collection, with: nil)
22
- return object_or_collection if object_or_collection.blank?
23
-
24
- with = _guess_decorator(object_or_collection) if with.nil? && object_or_collection.present?
26
+ def decorate(object_or_enumerable, with: nil)
27
+ return object_or_enumerable unless decorable?(object_or_enumerable)
25
28
 
26
- raise DecoratorNotFound, "Can't guess decorator for #{object_or_collection.class.name} object" if with.nil?
29
+ with ||= _decorator_class
27
30
 
28
- object_or_collection = _decorate(object_or_collection, with: with)
31
+ object_or_enumerable = _decorate(object_or_enumerable, with: with)
29
32
 
30
33
  if block_given?
31
- yield object_or_collection
34
+ yield object_or_enumerable
32
35
  else
33
- object_or_collection
36
+ object_or_enumerable
34
37
  end
35
38
  end
36
39
 
37
40
  # Define that an association must be decorated.
38
41
  #
39
42
  # @param relation_name [String, Symbol] the association name to decorate.
40
- # @option opts [Class] :with the decorator class to use. If empty a decorator will be guessed.
43
+ # @param with [Class] the decorator class to use. If empty a decorator will be guessed.
41
44
  #
42
45
  # @example Define an association to decorate
43
- # class UserDecorator < ApplicationDecorator
46
+ # class UserDecorator < Dekorator::Base
44
47
  # decorates_association :posts
45
48
  # end
46
49
  #
47
50
  # # A decorator could be precise
48
- # class UserDecorator < ApplicationDecorator
51
+ # class UserDecorator < Dekorator::Base
49
52
  # decorates_association :posts, PostDecorator
50
53
  # end
51
- def decorates_association(relation_name, with: nil)
54
+ def decorates_association(relation_name, with: :__guess__)
52
55
  relation_name = relation_name.to_sym
53
56
 
54
57
  define_method(relation_name) do
55
- association = __getobj__.public_send(relation_name)
56
-
57
- @decorated_associations[relation_name] ||= decorate(association, with: with)
58
+ @_decorated_associations[relation_name] ||= decorate(__getobj__.public_send(relation_name), with: with)
58
59
  end
59
60
  end
60
61
 
62
+ # Guess and returns the decorated object class.
63
+ #
64
+ # @return [Class] the decorated object class.
61
65
  def base_class
62
- name.gsub("Decorator", "").safe_constantize
66
+ _safe_constantize(name.sub("Decorator", ""))
63
67
  end
64
68
 
65
69
  private
66
70
 
71
+ # @api private
67
72
  def _decorate(object_or_enumerable, with: nil)
68
- if defined?(ActiveRecord::Relation) && object_or_enumerable.is_a?(ActiveRecord::Relation)
69
- DecoratedEnumerableProxy.new(object_or_enumerable, with)
70
- elsif object_or_enumerable.is_a? Enumerable
71
- object_or_enumerable.map { |object| with.new(object) }
73
+ with = _guess_decorator(object_or_enumerable) if with.nil? || with == :__guess__
74
+
75
+ if object_or_enumerable.is_a? Enumerable
76
+ object_or_enumerable.map { |object| _decorate(object, with: with) }
72
77
  else
73
78
  with.new(object_or_enumerable)
74
79
  end
75
80
  end
76
81
 
82
+ # @api private
77
83
  def _guess_decorator(object_or_enumerable)
78
84
  object_or_enumerable = object_or_enumerable.first if object_or_enumerable.is_a? Enumerable
79
85
 
80
- "#{object_or_enumerable.class}Decorator".safe_constantize if object_or_enumerable.present?
86
+ _safe_constantize("#{object_or_enumerable.class}Decorator") \
87
+ || raise(DecoratorNotFound, "Can't guess decorator for #{object_or_enumerable.class} object")
81
88
  end
82
- end
83
89
 
84
- delegate :decorate, to: :class
90
+ # @api private
91
+ def decorable?(object_or_enumerable)
92
+ return false if defined?(ActiveRecord::Relation) \
93
+ && object_or_enumerable.is_a?(ActiveRecord::Relation) \
94
+ && object_or_enumerable.blank?
85
95
 
86
- def initialize(object)
87
- @decorated_associations = {}
96
+ return false if object_or_enumerable.respond_to?(:empty?) && object_or_enumerable.empty?
97
+ return false if !object_or_enumerable
98
+ return false if object_or_enumerable.is_a?(Dekorator::Base)
88
99
 
89
- super(object)
90
- end
100
+ true
101
+ end
91
102
 
92
- def object
93
- __getobj__
94
- end
103
+ # @api private
104
+ def _safe_constantize(class_name)
105
+ Object.const_get(class_name)
106
+ rescue NameError => _
107
+ nil
108
+ end
95
109
 
96
- if defined?(ActiveRecord::Relation)
97
- class DecoratedEnumerableProxy < DelegateClass(ActiveRecord::Relation)
98
- include Enumerable
110
+ # @api private
111
+ def _decorator_class
112
+ return nil if self == Dekorator::Base
99
113
 
100
- delegate :as_json, :collect, :map, :each, :[], :all?, :include?,
101
- :first, :last, :shift, to: :decorated_collection
102
- delegate :each, to: :to_ary
114
+ self
115
+ end
116
+ end
103
117
 
104
- def initialize(collection, decorator_class)
105
- super(collection)
118
+ # Decorate an object
119
+ #
120
+ # @param object [Object] object to decorate.
121
+ def initialize(object)
122
+ @_decorated_associations = {}
106
123
 
107
- @decorator_class = decorator_class
108
- end
124
+ super(object)
125
+ end
109
126
 
110
- def wrapped_collection
111
- __getobj__
112
- end
127
+ # Decorate an object with a decorator.
128
+ #
129
+ # @param object_or_enumerable [Object, Enumerable] the object or Enumerable to decorate.
130
+ # @param with [Class] the decorator class to use. If empty a decorator will be guessed.
131
+ #
132
+ # @return [Dekorator::Base] if object given.
133
+ # @return [Enumerable] if Enumerable given.
134
+ #
135
+ # @raise [DecoratorNotFound] if decorator is not found.c
136
+ def decorate(object_or_enumerable, with: :__guess__)
137
+ self.class.decorate(object_or_enumerable, with: with)
138
+ end
113
139
 
114
- def decorated_collection
115
- @decorated_collection ||= wrapped_collection.collect { |member| @decorator_class.decorate(member) }
116
- end
117
- alias to_ary decorated_collection
118
- end
140
+ # Returns the decorated object.
141
+ #
142
+ # @return [Object] the decorated object.
143
+ def object
144
+ __getobj__
119
145
  end
120
146
  end
121
147
  end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators"
4
+
5
+ class DecoratorGenerator < ::Rails::Generators::NamedBase
6
+ invoke "dekorator:decorator"
7
+ end
@@ -2,7 +2,7 @@ Description:
2
2
  Generate a fresh new decorator
3
3
 
4
4
  Example:
5
- `rails generate decorator User`
5
+ `rails generate dekorator:decorator User`
6
6
 
7
7
  User decorator.
8
8
  Decorator: app/decorators/user_decorator.rb
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rails/generators"
4
+
5
+ module Dekorator
6
+ module Generators
7
+ class DecoratorGenerator < ::Rails::Generators::NamedBase
8
+ source_root File.expand_path("templates", __dir__)
9
+
10
+ def create_decorator
11
+ template "decorator.rb", File.join("app/decorators", class_path, "#{file_name}_decorator.rb")
12
+ end
13
+
14
+ hook_for :test_framework
15
+ end
16
+ end
17
+ end
@@ -1,18 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rails/generators"
4
+
3
5
  module Dekorator
4
6
  module Generators
5
- class InstallGenerator < Rails::Generators::Base
7
+ class InstallGenerator < ::Rails::Generators::Base
6
8
 
7
9
  def create_root_directory
8
- return if File.directory?(dekorator_root_directory)
9
-
10
10
  empty_directory(dekorator_root_directory)
11
+
12
+ concerns_directory = dekorator_root_directory.join("concerns")
13
+ empty_directory(concerns_directory)
14
+ create_file("#{concerns_directory}/.keep")
11
15
  end
12
16
 
13
17
  def create_application_decorator
14
- return if File.exist?(application_decorator_path)
15
-
16
18
  create_file application_decorator_path, <<-RUBY
17
19
  # frozen_string_literal: true
18
20
 
@@ -24,7 +26,7 @@ end
24
26
  protected
25
27
 
26
28
  def dekorator_root_directory
27
- Rails.root.join("app", "decorators")
29
+ Rails.root.join("app/decorators")
28
30
  end
29
31
 
30
32
  def application_decorator_path
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rails/generators"
4
+
3
5
  module Rspec
4
6
  module Generators
5
7
  class DecoratorGenerator < ::Rails::Generators::NamedBase
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "rails/generators"
4
+
3
5
  module TestUnit
4
6
  module Generators
5
7
  class DecoratorGenerator < ::Rails::Generators::NamedBase
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dekorator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
- - Nicolas Brousse
7
+ - Pantographe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-30 00:00:00.000000000 Z
11
+ date: 2021-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -16,60 +16,80 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '5.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '6.1'
22
+ version: '7.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '5.0'
29
+ version: '5.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '6.1'
32
+ version: '7.1'
33
+ - !ruby/object:Gem::Dependency
34
+ name: activerecord
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '5.2'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '7.1'
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '5.2'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '7.1'
33
53
  - !ruby/object:Gem::Dependency
34
54
  name: activesupport
35
55
  requirement: !ruby/object:Gem::Requirement
36
56
  requirements:
37
57
  - - ">="
38
58
  - !ruby/object:Gem::Version
39
- version: '5.0'
59
+ version: '5.2'
40
60
  - - "<"
41
61
  - !ruby/object:Gem::Version
42
- version: '6.1'
62
+ version: '7.1'
43
63
  type: :runtime
44
64
  prerelease: false
45
65
  version_requirements: !ruby/object:Gem::Requirement
46
66
  requirements:
47
67
  - - ">="
48
68
  - !ruby/object:Gem::Version
49
- version: '5.0'
69
+ version: '5.2'
50
70
  - - "<"
51
71
  - !ruby/object:Gem::Version
52
- version: '6.1'
72
+ version: '7.1'
53
73
  - !ruby/object:Gem::Dependency
54
74
  name: railties
55
75
  requirement: !ruby/object:Gem::Requirement
56
76
  requirements:
57
77
  - - ">="
58
78
  - !ruby/object:Gem::Version
59
- version: '5.0'
79
+ version: '5.2'
60
80
  - - "<"
61
81
  - !ruby/object:Gem::Version
62
- version: '6.1'
82
+ version: '7.1'
63
83
  type: :runtime
64
84
  prerelease: false
65
85
  version_requirements: !ruby/object:Gem::Requirement
66
86
  requirements:
67
87
  - - ">="
68
88
  - !ruby/object:Gem::Version
69
- version: '5.0'
89
+ version: '5.2'
70
90
  - - "<"
71
91
  - !ruby/object:Gem::Version
72
- version: '6.1'
92
+ version: '7.1'
73
93
  - !ruby/object:Gem::Dependency
74
94
  name: bundler
75
95
  requirement: !ruby/object:Gem::Requirement
@@ -88,16 +108,16 @@ dependencies:
88
108
  name: rake
89
109
  requirement: !ruby/object:Gem::Requirement
90
110
  requirements:
91
- - - "~>"
111
+ - - ">="
92
112
  - !ruby/object:Gem::Version
93
- version: '10.0'
113
+ version: 12.3.3
94
114
  type: :development
95
115
  prerelease: false
96
116
  version_requirements: !ruby/object:Gem::Requirement
97
117
  requirements:
98
- - - "~>"
118
+ - - ">="
99
119
  - !ruby/object:Gem::Version
100
- version: '10.0'
120
+ version: 12.3.3
101
121
  - !ruby/object:Gem::Dependency
102
122
  name: rspec
103
123
  requirement: !ruby/object:Gem::Requirement
@@ -115,55 +135,43 @@ dependencies:
115
135
  description: An opinionated way of organizing model-view code in Ruby on Rails, based
116
136
  on decorators
117
137
  email:
118
- - nicolas@pantographe.studio
138
+ - oss@pantographe.studio
119
139
  executables: []
120
140
  extensions: []
121
141
  extra_rdoc_files: []
122
142
  files:
123
- - ".editorconfig"
124
- - ".gitignore"
125
- - ".rspec"
126
- - ".rubocop.yml"
127
- - ".simplecov"
128
- - ".travis.yml"
129
- - Appraisals
143
+ - ".codeclimate.yml"
144
+ - ".github/workflows/test.yml"
130
145
  - CHANGELOG.md
131
146
  - CODE_OF_CONDUCT.md
132
- - Gemfile
133
- - Gemfile.lock
134
147
  - LICENSE.txt
135
148
  - README.md
136
149
  - Rakefile
137
- - bin/console
138
- - bin/setup
150
+ - benchmarks/README.md
151
+ - benchmarks/benchmark.rb
139
152
  - dekorator.gemspec
140
- - gemfiles/.bundle/config
141
- - gemfiles/rails_5.0.x.gemfile
142
- - gemfiles/rails_5.0.x.gemfile.lock
143
- - gemfiles/rails_5.1.x.gemfile
144
- - gemfiles/rails_5.1.x.gemfile.lock
145
- - gemfiles/rails_5.2.x.gemfile
146
- - gemfiles/rails_5.2.x.gemfile.lock
147
- - gemfiles/rails_6.0.x.gemfile
148
- - gemfiles/rails_6.0.x.gemfile.lock
149
153
  - lib/dekorator.rb
150
- - lib/dekorator/decorators_helper.rb
154
+ - lib/dekorator/rails/controller.rb
155
+ - lib/dekorator/rails/tasks/dekorator.rake
151
156
  - lib/dekorator/railtie.rb
152
- - lib/dekorator/rspec.rb
153
157
  - lib/dekorator/version.rb
154
- - lib/generators/decorator/USAGE
155
- - lib/generators/decorator/decorator_generator.rb
156
- - lib/generators/decorator/templates/decorator.rb
157
- - lib/generators/decorator/templates/decorator_test.rb
158
- - lib/generators/dekorator/install_generator.rb
158
+ - lib/generators/decorator_generator.rb
159
+ - lib/generators/dekorator/decorator/USAGE
160
+ - lib/generators/dekorator/decorator/decorator_generator.rb
161
+ - lib/generators/dekorator/decorator/templates/decorator.rb
162
+ - lib/generators/dekorator/install/install_generator.rb
159
163
  - lib/generators/rspec/decorator_generator.rb
160
164
  - lib/generators/rspec/templates/decorator_spec.rb
161
165
  - lib/generators/test_unit/decorator_generator.rb
162
166
  - lib/generators/test_unit/templates/decorator_test.rb
163
- homepage:
167
+ homepage: http://komponent.io
164
168
  licenses:
165
169
  - MIT
166
- metadata: {}
170
+ metadata:
171
+ homepage_uri: https://github.com/komposable/dekorator
172
+ changelog_uri: https://github.com/komposable/dekorator/blob/master/CHANGELOG.md
173
+ source_code_uri: https://github.com/komposable/dekorator
174
+ bug_tracker_uri: https://github.com/komposable/dekorator/issues
167
175
  post_install_message:
168
176
  rdoc_options: []
169
177
  require_paths:
@@ -175,11 +183,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
175
183
  version: '2.3'
176
184
  required_rubygems_version: !ruby/object:Gem::Requirement
177
185
  requirements:
178
- - - ">"
186
+ - - ">="
179
187
  - !ruby/object:Gem::Version
180
- version: 1.3.1
188
+ version: '0'
181
189
  requirements: []
182
- rubygems_version: 3.0.1
190
+ rubygems_version: 3.2.9
183
191
  signing_key:
184
192
  specification_version: 4
185
193
  summary: An opinionated way of organizing model-view code in Ruby on Rails, based
data/.editorconfig DELETED
@@ -1,14 +0,0 @@
1
- ; top-most EditorConfig file
2
- root = true
3
-
4
- ; Unix-style newlines
5
- [*]
6
- end_of_line = LF
7
- indent_style = space
8
- indent_size = 2
9
- charset = utf-8
10
- trim_trailing_whitespace = true
11
- insert_final_newline = true
12
-
13
- [*.md]
14
- trim_trailing_whitespace = false
data/.gitignore DELETED
@@ -1,11 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,114 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.2
3
- DisabledByDefault: true
4
- Exclude:
5
- - lib/generators/**/templates/**/*
6
-
7
- Gemspec/OrderedDependencies:
8
- Enabled: true
9
-
10
- Style/BlockDelimiters:
11
- Enabled: true
12
-
13
- Style/BracesAroundHashParameters:
14
- Enabled: true
15
- EnforcedStyle: no_braces
16
-
17
- Style/Dir:
18
- Enabled: true
19
-
20
- Style/Encoding:
21
- Enabled: true
22
-
23
- Style/For:
24
- Enabled: true
25
- EnforcedStyle: each
26
-
27
- Style/MethodCallWithoutArgsParentheses:
28
- Enabled: true
29
-
30
- Style/MethodDefParentheses:
31
- Enabled: true
32
-
33
- Style/FrozenStringLiteralComment:
34
- Enabled: true
35
- EnforcedStyle: always
36
-
37
- Naming/ConstantName:
38
- Enabled: true
39
-
40
- Naming/FileName:
41
- Enabled: true
42
-
43
- Naming/MethodName:
44
- Enabled: true
45
-
46
- Naming/PredicateName:
47
- Enabled: true
48
-
49
- Naming/VariableName:
50
- Enabled: true
51
-
52
- Lint/DeprecatedClassMethods:
53
- Enabled: true
54
-
55
- Layout/AlignParameters:
56
- Enabled: true
57
-
58
- Layout/BlockAlignment:
59
- Enabled: true
60
- EnforcedStyleAlignWith: start_of_block
61
-
62
- Layout/BlockEndNewline:
63
- Enabled: true
64
-
65
- Layout/CaseIndentation:
66
- Enabled: true
67
-
68
- Layout/ClosingParenthesisIndentation:
69
- Enabled: true
70
-
71
- Layout/ConditionPosition:
72
- Enabled: true
73
-
74
- Layout/DefEndAlignment:
75
- Enabled: true
76
-
77
- Layout/DotPosition:
78
- Enabled: true
79
-
80
- Layout/ElseAlignment:
81
- Enabled: true
82
-
83
- Layout/EmptyLines:
84
- Enabled: true
85
-
86
- Layout/EmptyLinesAroundAccessModifier:
87
- Enabled: true
88
-
89
- Layout/SpaceAroundBlockParameters:
90
- Enabled: true
91
-
92
- Layout/SpaceAroundEqualsInParameterDefault:
93
- Enabled: true
94
-
95
- Layout/SpaceAroundOperators:
96
- Enabled: true
97
-
98
- Layout/SpaceBeforeBlockBraces:
99
- Enabled: true
100
-
101
- Layout/SpaceBeforeComma:
102
- Enabled: true
103
-
104
- Layout/SpaceInsideArrayLiteralBrackets:
105
- Enabled: true
106
-
107
- Layout/SpaceInsideHashLiteralBraces:
108
- Enabled: true
109
-
110
- Layout/SpaceInsideParens:
111
- Enabled: true
112
-
113
- Layout/TrailingWhitespace:
114
- Enabled: true
data/.simplecov DELETED
@@ -1,5 +0,0 @@
1
- SimpleCov.minimum_coverage 70 # TODO: should be 90
2
-
3
- SimpleCov.start do
4
- add_filter "/spec/"
5
- end