roqua-support 0.1.22 → 0.1.23

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f36e6f001b52313927d2d638351d0b1f866de9a5
4
- data.tar.gz: 72f97499903a15087ae6c1a503fcafb5c378de5f
3
+ metadata.gz: 2fb464998141d4c9bb13d54f8f903ea3dade2033
4
+ data.tar.gz: f45098dde3b0074ed78f7fa6ef645994cf43fa4b
5
5
  SHA512:
6
- metadata.gz: 031b4f77a3cc0b9299e91b756bc601fdb873f1c2219e4f6e44ddd226bfe2db24264234c8a4420bce7f9de9af9d196081baa318e687e1a04959bb87cb87289260
7
- data.tar.gz: a0f94165908da53045baf2c24707f3e9a06efb187a4fec939d64bc2f824e9b3da69d2aa0bd696a7a866f36ef16bebc1d14942b4f9424d1ec9de1f5d13753d532
6
+ metadata.gz: d16e482e6b371dd978c1dc590fa68fccb4dba5cbee9feff21c14fa2243d1cbfe3086cbf79df19c7addbad1d8f91b450055d6ccfbe9edb29f870cb3089cc3a8c3
7
+ data.tar.gz: 2d2b82cc4ff8e703c883b14bb1ec1c1429a8ba498d8713ff306c31e8009483f8200063fc04b3b8ec17a0806c54b0aa565c16cf6549845fbdfaea4cefa723d9a8
data/.gitlab-ci.yml ADDED
@@ -0,0 +1,21 @@
1
+ image: "roqua/roqua-build-images:ruby-2.3.3-phantomjs-2.1.1-bundler-gemnasium"
2
+
3
+ variables:
4
+ RAILS_ENV: "test"
5
+
6
+ before_script:
7
+ - bundle install
8
+ - gem install appraisal
9
+ - bundle exec appraisal
10
+
11
+ rails_41:
12
+ script:
13
+ - bundle exec appraisal rails41 bundle exec rspec
14
+
15
+ rails_42:
16
+ script:
17
+ - bundle exec appraisal rails42 bundle exec rspec
18
+
19
+ rails_50:
20
+ script:
21
+ - bundle exec appraisal rails50 bundle exec rspec
data/Gemfile.lock CHANGED
@@ -1,10 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- roqua-support (0.1.22)
4
+ roqua-support (0.1.23)
5
5
  active_interaction (~> 3.0)
6
6
  activesupport (>= 3.2, < 6)
7
7
  naught (~> 1.0)
8
+ rubocop (~> 0.49.1)
8
9
 
9
10
  GEM
10
11
  remote: https://rubygems.org/
@@ -35,6 +36,7 @@ GEM
35
36
  bundler
36
37
  rake
37
38
  thor (>= 0.14.0)
39
+ ast (2.3.0)
38
40
  builder (3.2.3)
39
41
  coderay (1.1.1)
40
42
  combustion (0.5.5)
@@ -76,6 +78,10 @@ GEM
76
78
  notiffany (0.1.1)
77
79
  nenv (~> 0.1)
78
80
  shellany (~> 0.0)
81
+ parallel (1.11.2)
82
+ parser (2.4.0.0)
83
+ ast (~> 2.2)
84
+ powerpack (0.1.1)
79
85
  pry (0.10.4)
80
86
  coderay (~> 1.1.0)
81
87
  method_source (~> 0.8.1)
@@ -94,6 +100,8 @@ GEM
94
100
  method_source
95
101
  rake (>= 0.8.7)
96
102
  thor (>= 0.18.1, < 2.0)
103
+ rainbow (2.2.2)
104
+ rake
97
105
  rake (12.0.0)
98
106
  rb-fsevent (0.9.8)
99
107
  rb-inotify (0.9.7)
@@ -124,6 +132,14 @@ GEM
124
132
  rspec-mocks (~> 3.5.0)
125
133
  rspec-support (~> 3.5.0)
126
134
  rspec-support (3.5.0)
135
+ rubocop (0.49.1)
136
+ parallel (~> 1.10)
137
+ parser (>= 2.3.3.1, < 3.0)
138
+ powerpack (~> 0.1)
139
+ rainbow (>= 1.99.1, < 3.0)
140
+ ruby-progressbar (~> 1.7)
141
+ unicode-display_width (~> 1.0, >= 1.0.1)
142
+ ruby-progressbar (1.8.1)
127
143
  ruby_dep (1.5.0)
128
144
  shellany (0.0.1)
129
145
  slop (3.6.0)
@@ -131,6 +147,7 @@ GEM
131
147
  thread_safe (0.3.5)
132
148
  tzinfo (1.2.2)
133
149
  thread_safe (~> 0.1)
150
+ unicode-display_width (1.3.0)
134
151
 
135
152
  PLATFORMS
136
153
  ruby
@@ -142,7 +159,7 @@ DEPENDENCIES
142
159
  bundler (~> 1.0)
143
160
  combustion (~> 0.5.2)
144
161
  guard-rspec (~> 4.2.6)
145
- rake
162
+ rake (~> 12)
146
163
  responders
147
164
  roqua-support!
148
165
  rspec (>= 2.12.0, < 4.0)
@@ -150,4 +167,4 @@ DEPENDENCIES
150
167
  rspec-rails
151
168
 
152
169
  BUNDLED WITH
153
- 1.13.7
170
+ 1.15.3
@@ -1,5 +1,5 @@
1
1
  module Roqua
2
2
  module Support
3
- VERSION = '0.1.22'.freeze
3
+ VERSION = '0.1.23'.freeze
4
4
  end
5
5
  end
@@ -22,7 +22,12 @@ Gem::Specification.new do |gem|
22
22
  gem.add_dependency 'naught', '~> 1.0'
23
23
  gem.add_dependency 'active_interaction', '~> 3.0'
24
24
 
25
+ # We can't start the shared Rubocop file with .rubocop because of a bug related to inherit_gem.
26
+ # For more details:
27
+ # https://github.com/bbatsov/rubocop/issues/4154
28
+ gem.add_dependency 'rubocop', '~> 0.49.1'
29
+
25
30
  gem.add_development_dependency 'bundler', '~> 1.0'
26
- gem.add_development_dependency 'rake'
31
+ gem.add_development_dependency 'rake', '~> 12'
27
32
  gem.add_development_dependency 'rspec', '>= 2.12.0', '< 4.0'
28
33
  end
@@ -0,0 +1,8 @@
1
+ inherit_from:
2
+ - rubocop.yml
3
+
4
+ Rails:
5
+ Enabled: true
6
+
7
+ Rails/ApplicationRecord:
8
+ Enabled: false
@@ -0,0 +1,5 @@
1
+ inherit_from:
2
+ - rubocop.yml
3
+
4
+ Rails:
5
+ Enabled: true
data/rubocop.yml ADDED
@@ -0,0 +1,218 @@
1
+ # We can't start the shared Rubocop file with .rubocop because of a bug in combination with inherit_gem.
2
+ # For more details:
3
+ # https://github.com/bbatsov/rubocop/issues/4154
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.3
7
+ Exclude:
8
+ - 'bin/**/*'
9
+ - 'config/**/*'
10
+ - 'db/schema.rb'
11
+ - 'db/seeds/**/*'
12
+ - 'local/*'
13
+ - 'script/**/*'
14
+ - 'tmp/**/*'
15
+ - 'vendor/**/*'
16
+
17
+ # ==================================== SECURITY ===========================================================================
18
+
19
+ # Never ever use `Kernel#eval`. This however is handy in Guardfile.
20
+ Security/Eval:
21
+ Enabled: true
22
+ Exclude:
23
+ - '**/Guardfile'
24
+
25
+ # ==================================== LINT ===========================================================================
26
+
27
+ # Explicit block alignment
28
+ Lint/BlockAlignment:
29
+ Enabled: true
30
+ Exclude:
31
+ - 'spec/**/*'
32
+
33
+ # Useless assignments are just useless. In specs however they lead to a better
34
+ # understanding of what is being stubbed/factoried.
35
+ Lint/UselessAssignment:
36
+ Enabled: true
37
+ Exclude:
38
+ - 'spec/**/*'
39
+
40
+ Lint/AmbiguousBlockAssociation:
41
+ Enabled: true
42
+ Exclude:
43
+ - 'spec/**/*'
44
+
45
+ # ==================================== METRICS ========================================================================
46
+
47
+ # Set this to 10, forcing future methods to be not that complex. Skipping some
48
+ # existing helper methods that are better off to be not refactored.
49
+ # Note: used comments like
50
+ # # rubocop:disable CyclomaticComplexity
51
+ # [code]
52
+ # # rubocop:enable CyclomaticComplexity
53
+ # to skip this check
54
+ Metrics/CyclomaticComplexity:
55
+ Max: 10
56
+
57
+ # Limit lines to 120 characters.
58
+ Metrics/LineLength:
59
+ Max: 120
60
+
61
+ Metrics/ClassLength:
62
+ Max: 300 # As long as they're simple.
63
+
64
+ Metrics/ModuleLength:
65
+ Exclude:
66
+ - 'spec/**/*'
67
+
68
+ Metrics/BlockLength:
69
+ Exclude:
70
+ - 'spec/**/*'
71
+
72
+ # ==================================== STYLE ==========================================================================
73
+
74
+ Style/PercentLiteralDelimiters:
75
+ PreferredDelimiters:
76
+ '%i': ()
77
+ '%I': ()
78
+
79
+ # Use do-end for multiline blocks and {} for single lines
80
+ # Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
81
+ Style/BlockDelimiters:
82
+ Exclude:
83
+ - 'spec/**/*'
84
+
85
+ Style/WordArray:
86
+ MinSize: 5
87
+ Exclude:
88
+ - 'spec/**/*'
89
+
90
+ # ==================================== LAYOUT ==============================================
91
+
92
+ # defs stick to each other is just unpretty. Turning this on for general code,
93
+ # but still allowing testing/mocking one-line exceptions
94
+ Layout/EmptyLineBetweenDefs:
95
+ Enabled: true
96
+ AllowAdjacentOneLineDefs: true
97
+
98
+ # Intenting hash properly will provide a better code readablity. However there
99
+ # some exceptions. For example defining validations in Rails models or stubbing
100
+ # in a new rspec way with allows and expects.
101
+ Layout/IndentHash:
102
+ Enabled: true
103
+ Exclude:
104
+ # Cause models can have very long validation definitions which we'd rather
105
+ # format in a readable to us manner.
106
+ - 'app/models/**/*'
107
+ # Also skipping spec files as the new allow/expect syntax of rspec can
108
+ # become bulky.
109
+ - 'spec/**/*'
110
+
111
+ Layout/SpaceInsideHashLiteralBraces:
112
+ EnforcedStyle: no_space
113
+ Enabled: true
114
+
115
+ # ================================ DISABLED COPS ======================================================================
116
+
117
+ # These cops are disabled because we think they are a Bad Idea. If you add one
118
+ # here, make sure to add a comment describing what the cop does, and why this
119
+ # is a bad idea.
120
+
121
+ Style/PercentLiteralDelimiters:
122
+ Enabled: false
123
+
124
+ Style/SymbolArray:
125
+ Enabled: false
126
+
127
+ # Max 4 of parameters per method seems fair. Don't count keyword arguments though.
128
+ Metrics/ParameterLists:
129
+ Max: 4
130
+ CountKeywordArgs: false
131
+
132
+ # Use UTF-8 as the source file encoding.
133
+ Style/Encoding:
134
+ Enabled: false
135
+
136
+ # Avoid methods longer than 16 lines of code
137
+ Metrics/MethodLength:
138
+ CountComments: false # count full line comments?
139
+ Max: 16
140
+
141
+ # When using \ for string concatenation line indents cause undesired whitespace in the string
142
+ Style/LineEndConcatenation:
143
+ Enabled: false
144
+
145
+ # Forces the argument names of the block given to #reduce to be `a, e`. Only
146
+ # applies on single-line blocks, but why would we want to force people to use
147
+ # less descriptive names?
148
+ Style/SingleLineBlockParams:
149
+ Enabled: false
150
+
151
+ # Complains than multiline ternary expressions should be if/else statements
152
+ # Ternary are still often more readable.
153
+ Style/MultilineTernaryOperator:
154
+ Enabled: false
155
+
156
+ # disallows `class Quby::Items::Text` style definitions.
157
+ # Why waste all that indentation?
158
+ Style/ClassAndModuleChildren:
159
+ Enabled: false
160
+
161
+ # This is not universally a better idea, it depends greatly on whether the
162
+ # condition is to handle an edge-case or not. We prefer leaving this up to
163
+ # code review instead of Rubocop.
164
+ Style/IfUnlessModifier:
165
+ Enabled: false
166
+
167
+ # Use single quotes for strings that don't do string interpolation. Makes it
168
+ # harder to later add an interpolated value.
169
+ Style/StringLiterals:
170
+ Enabled: false
171
+
172
+ # This forces the use of the English library instead of $: etc. We think that some
173
+ # of these Perl-vars are quite succinct.
174
+ Style/SpecialGlobalVars:
175
+ Enabled: false
176
+
177
+ # This forces the use of %r{.. } when a regexp contains more than one slash.
178
+ # If a regex is unreadable, code review will catch it, otherwise it's not
179
+ # a function of how many slashes are in it.
180
+ Style/RegexpLiteral:
181
+ Enabled: false
182
+
183
+ # Do not agree on this one as Block Chains can be used to query/narrow/scope
184
+ # the results. As we chain them, the query is easier to read and understand.
185
+ Style/MultilineBlockChain:
186
+ Enabled: false
187
+
188
+ # We do not want to force adding underscores between every 3 digits
189
+ Style/NumericLiterals:
190
+ Enabled: false
191
+
192
+ # Ruby provides a beautiful way to set and get the values. By setting
193
+ # `attr_accessor :foo` provides us with `def foo=(foo)` and `def foo` which can
194
+ # be used to set and get the value of `foo`. Using get_ and set_ `works around`
195
+ # this idiom.
196
+ #
197
+ # Argumentation: We do not want Rubocop to enforce this style. Sometimes methods
198
+ # starting with `get_` or `set_` provide better readability and understanding of code
199
+ Style/AccessorMethodName:
200
+ Enabled: false
201
+
202
+ # This forces comments to align with the code.
203
+ # But like to indent stories to the right and indent multiline comments with the itself.
204
+ Layout/CommentIndentation:
205
+ Enabled: false
206
+
207
+ # This requires having multiline assignment values start on the same indentation level,
208
+ # which is inconsistent with out standard for params methods, i.e.:
209
+ # params.require(:foo)
210
+ # .permit(:bar)
211
+ # disabled until https://github.com/bbatsov/rubocop/issues/1633 https://github.com/bbatsov/rubocop/pull/2493 has been fixed
212
+ Layout/MultilineOperationIndentation:
213
+ Enabled: false
214
+
215
+ # There is no good alternative for when you want to explicitly cast
216
+ # a value to an actual boolean, which for JSON APIs is desirable.
217
+ DoubleNegation:
218
+ Enabled: false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roqua-support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.22
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Veldthuis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-26 00:00:00.000000000 Z
11
+ date: 2017-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '3.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: rubocop
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 0.49.1
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 0.49.1
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: bundler
63
77
  requirement: !ruby/object:Gem::Requirement
@@ -76,16 +90,16 @@ dependencies:
76
90
  name: rake
77
91
  requirement: !ruby/object:Gem::Requirement
78
92
  requirements:
79
- - - ">="
93
+ - - "~>"
80
94
  - !ruby/object:Gem::Version
81
- version: '0'
95
+ version: '12'
82
96
  type: :development
83
97
  prerelease: false
84
98
  version_requirements: !ruby/object:Gem::Requirement
85
99
  requirements:
86
- - - ">="
100
+ - - "~>"
87
101
  - !ruby/object:Gem::Version
88
- version: '0'
102
+ version: '12'
89
103
  - !ruby/object:Gem::Dependency
90
104
  name: rspec
91
105
  requirement: !ruby/object:Gem::Requirement
@@ -113,6 +127,7 @@ extensions: []
113
127
  extra_rdoc_files: []
114
128
  files:
115
129
  - ".gitignore"
130
+ - ".gitlab-ci.yml"
116
131
  - ".rspec"
117
132
  - ".travis.yml"
118
133
  - Appraisals
@@ -149,6 +164,9 @@ files:
149
164
  - lib/roqua/support/stats/hosted_graphite_backend.rb
150
165
  - lib/roqua/validators/subset_validator.rb
151
166
  - roqua-support.gemspec
167
+ - rubocop-rails-4.yml
168
+ - rubocop-rails-5.yml
169
+ - rubocop.yml
152
170
  - spec/roqua/core_ext/active_interaction/date_time_as_unix_extension_spec.rb
153
171
  - spec/roqua/core_ext/active_interaction/duration_filter_spec.rb
154
172
  - spec/roqua/core_ext/active_interaction/rails_intrumentation_spec.rb