redis-script_manager 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 971772a9f0906a9df2c012d8ad100a71941ad577
4
- data.tar.gz: 3a3c6fddacff400288171761caf7a8ee6361edf4
3
+ metadata.gz: bcb4f488030ddb0990d3d5c7449bf1b152e0a915
4
+ data.tar.gz: 208803ff63e302ee1537246c86a6533689c16d69
5
5
  SHA512:
6
- metadata.gz: a54825b7aeb87346e64ff33124164ce193f389ae95418d714a3ae8d0f27b8e17cd14a3f45d17a38bb567ede84b5a9af43fa19fe45f3e9bd086f13604340eac40
7
- data.tar.gz: 9de8a278b7842a879cfdf58614f174eda0e4c816b6b160187d5cc06e17281392005b2c65ce034a859c938f9030bfb6e4d7d3e4252fcdbd6dac4c54d94f504f7f
6
+ metadata.gz: 760b48c52577e93071bf2ee8abe06f0fb95fb2d4127d8fe08e1187f79dc00caf15baf23d9a2367a15af0264539d90903538d0e8d4b6d37bc9a3cf740a0c87fd4
7
+ data.tar.gz: 1d66db895f3386f0ce52cea92594c1130abbe7e5c00a9bda9257ff455b524656d2d9240e959ce7597c0d36fed9cb739f142d6fe1f4c20f67d6fc7866c039ebf8
data/.rubocop.yml CHANGED
@@ -5,17 +5,6 @@ AllCops:
5
5
  - Gemfile
6
6
  - '*.gemspec'
7
7
 
8
- # I like this Metric in principle, but I don't like the default max of
9
- # 15.
10
- #
11
- # Also, as per Metrics/ClassLength IMO this kind of limit should not
12
- # apply to test code (I get up to 318 over there).
13
- #
14
- Metrics/AbcSize:
15
- Max: 100
16
- Exclude:
17
- - 'test/**/*.rb'
18
-
19
8
  # Broadly speaking, test code gets a pass for most of the Metrics family.
20
9
  #
21
10
  # IMO test code is not the place get pedantic about class length,
@@ -26,9 +15,6 @@ Metrics/AbcSize:
26
15
  Metrics/BlockLength:
27
16
  Exclude:
28
17
  - 'test/**/*.rb'
29
-
30
- # Ditto I believe in more permissive rules in test code.
31
- #
32
18
  Metrics/ClassLength:
33
19
  Max: 400
34
20
  Exclude:
@@ -37,20 +23,33 @@ Metrics/ClassLength:
37
23
  # Redis::ScriptManager#eval_gently is indeed overly complex but I am
38
24
  # happy with it until the next time something goes wrong.
39
25
  #
26
+ # I like Metrics/CyclomaticComplexity in principle, but I don't like
27
+ # the default max of 15.
28
+ #
40
29
  # Also ditto I believe in more permissive rules in test code.
41
30
  #
31
+ # Also, as per Metrics/ClassLength IMO this kind of limit should not
32
+ # apply to test code (I get up to 318 over there).
33
+ #
42
34
  Metrics/CyclomaticComplexity:
43
35
  Max: 30
36
+ Metrics/PerceivedComplexity:
37
+ Max: 30
38
+ Metrics/AbcSize:
39
+ Max: 100
44
40
  Exclude:
45
41
  - 'test/**/*.rb'
42
+
43
+ # I like this Metric in principle, but I don't like the default max of
44
+ # 10.
45
+ #
46
+ # Also, as per Metrics/ClassLength IMO this kind of limit should not
47
+ # apply to test code.
48
+ #
46
49
  Metrics/MethodLength:
47
50
  Max: 100
48
51
  Exclude:
49
52
  - 'test/**/*.rb'
50
- Metrics/PerceivedComplexity:
51
- Max: 21
52
- Exclude:
53
- - 'test/**/*.rb'
54
53
 
55
54
  # I put extra spaces in a lot of expressions for a lot of different
56
55
  # reasons, including especially readability.
@@ -60,140 +59,16 @@ Metrics/PerceivedComplexity:
60
59
  Layout:
61
60
  Enabled: false
62
61
 
63
- # I like a lot of the Lint tests, but not these.
64
- #
65
- Lint/AmbiguousBlockAssociation: # obnoxiously rejects idiomatic Ruby
66
- Enabled: false
67
-
68
- # This does no more than insist I type "format" instead of "sprintf",
69
- # where the two are aliases.
62
+ # As a group, the Style cops are bewilderingly opiniated.
70
63
  #
71
- Style/FormatString:
72
- Enabled: false
73
-
74
- # This complains that:
64
+ # In some cases IMO they are harmful e.g. Style/TernaryParentheses.
75
65
  #
76
- # if foo
77
- # foo.bar
78
- # end
79
- #
80
- # could instead be:
81
- #
82
- # foo.bar if foo
83
- #
84
- # ...which I reject, not least because the former is a lot easier to
85
- # fit into an 80 character line.
86
- #
87
- Style/GuardClause:
88
- Enabled: false
89
-
90
- # There is nothing wrong with Ruby 1.9 Hash syntax.
91
- #
92
- Style/HashSyntax:
93
- Enabled: false
94
-
95
- # No. Indeed, postfix if can often drive a line over 80 columns wide.
96
- #
97
- Style/IfUnlessModifier:
98
- Enabled: false
99
-
100
- # No. There is nothing wrong with "if !foo".
101
- #
102
- # As far as I'm concerned, "unless" is in poor taste because it means
103
- # I have to think in English in two different logical senses - and
104
- # English is a poor language for logical senses.
105
- #
106
- Style/NegatedIf:
107
- Enabled: false
108
-
109
- # No.
110
- #
111
- # I can catenate strings with + if I want to. Indeed, it looks better
112
- # in my editor.
113
- #
114
- Style/LineEndConcatenation:
115
- Enabled: false
116
-
117
- # Too pedantic.
118
- #
119
- Style/NumericLiterals:
120
- Enabled: false
121
-
122
- # This complains that:
123
- #
124
- # raise RuntimeError, "foo"
125
- #
126
- # Does not need the RuntimeError because it is redundant.
127
- #
128
- # I do not accept a requirement not to be explicit.
129
- #
130
- Style/RedundantException:
131
- Enabled: false
132
-
133
- # "Do not use semicolons to terminate expressions."
134
- #
135
- # That's great when I terminate a single-line expression with a
136
- # redundant semicolo because I forget I'm not using C.
137
- #
138
- # But when I'm using a semicolon to separate two expressions there is
139
- # no other choice. So this really ought to be Style/OneExprPerLine,
140
- # which I reject.
141
- #
142
- Style/Semicolon:
143
- Enabled: false
144
-
145
- # No.
146
- #
147
- # Some lines must have '\"'. It is ugly to use a mix of '"' and '\''
148
- # in LoCs which are close to one another. Therefore, banning '"' if
149
- # '"' is not strictly necessary drives visual inconsistency.
150
- #
151
- Style/StringLiterals:
152
- Enabled: false
153
-
154
- # This is the same kind of obnoxious pedantry which drove Hungarian
155
- # Notation.
156
- #
157
- # The [] literal syntax is perfectly servicable and there is no point
158
- # _tightly_ coupling it to the content of the array. That's why we
159
- # have context-free grammers!
160
- #
161
- Style/SymbolArray:
162
- Enabled: false
163
-
164
- # Shockingly, this cop requires us to *OMIT*, not *INCLUDE* parens in
165
- # ternery conditons.
166
- #
167
- # IMO this one is actively harmful in that it discourages attention to
168
- # clarity and avoiding some nasty precedence surprises.
169
- #
170
- Style/TernaryParentheses:
171
- Enabled: false
172
-
173
- # I am a huge fan of using trailing commas when I break an argument
174
- # list down one-per line.
175
- #
176
- # As such, I reject this test.
177
- #
178
- Style/TrailingCommaInLiteral:
179
- Enabled: false
180
-
181
- # No. attr_writer, attr_reader, etc. are strictly optional.
182
- #
183
- # If I want to use the longer, less sugary form that is my business.
66
+ # I reject these cops.
184
67
  #
185
- # I especially believe this where, for instance, I have a trivial
186
- # reader but a non-trivial writer. I want consistency between them -
187
- # which would be prohibited by this requirement.
188
- Style/TrivialAccessors:
68
+ Style:
189
69
  Enabled: false
190
70
 
191
- # Too pedantic. I am starting to think I should switch from "opt out"
192
- # to "opt in" on the Style family.
71
+ # I like a lot of the Lint tests, but not these.
193
72
  #
194
- Style/WordArray:
195
- Enabled: false
196
- Style/YodaCondition:
197
- Enabled: false
198
- Style/ZeroLengthPredicate:
73
+ Lint/AmbiguousBlockAssociation: # obnoxiously rejects idiomatic Ruby
199
74
  Enabled: false
data/.travis.yml CHANGED
@@ -1,12 +1,15 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  before_install:
4
- - gem install bundler -v 1.14.6
4
+ - gem install bundler -v 1.16.1
5
5
  - gem install rubocop
6
6
  services:
7
7
  - redis-server
8
8
  rvm:
9
9
  - 2.1.6
10
+ - 2.2.9
11
+ - 2.4.3
12
+ - 2.5.0
10
13
  script:
11
- - rubocop
14
+ - bundle exec rubocop --display-cop-names --display-style-guide
12
15
  - bundle exec env REDIS_URL=redis://localhost:6379 rake test
data/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # 0.0.5 (2018-03-26)
2
+ - Expanded .travis.yml to cover more rvm versions.
3
+ - Shrink Rubocop coverage to exclude `Style/*`.
4
+ - Moves version history out into CHANGELOG.md.
5
+
6
+ # 0.0.4 (2017-09-18)
7
+ - Rubocop polish and defiance.
8
+
9
+ # 0.0.3 (2017-08-29)
10
+ - Got .travis.yml working with a live redis-server.
11
+ - Initial Rubocop integration.
12
+ - Misc cleanup.
13
+
14
+ # 0.0.2 (2017-08-29)
15
+
16
+ - Broke out into Prosperworks/redis-script_manager, make public.
17
+
18
+ # 0.0.1 (prehistory)
19
+
20
+ - Still in Prosperworks/ALI/vendor/gems/redis-script_manager.
@@ -247,6 +247,15 @@ class Redis
247
247
  #
248
248
  class Configuration
249
249
 
250
+ def initialize
251
+ @do_preload = nil
252
+ @max_tiny_lua = nil
253
+ @preload_cache_size = nil
254
+ @do_minify_lua = nil
255
+ @stats_prefix = nil
256
+ @statsd = nil
257
+ end
258
+
250
259
  # Defaults to nil. If non-nil, lots of stats will be tracked via
251
260
  # statsd.increment and statsd.timing.
252
261
  #
@@ -3,23 +3,8 @@ class Redis
3
3
  #
4
4
  # Version plan/history:
5
5
  #
6
- # 0.0.1 - Still in Prosperworks/ALI/vendor/gems/redis-script_manager.
7
6
  #
8
- # 0.0.2 - Broke out into Prosperworks/redis-script_manager, make public.
9
7
  #
10
- # 0.0.3 - Got .travis.yml working with a live redis-server.
11
- #
12
- # Initial Rubocop integration.
13
- #
14
- # Misc cleanup.
15
- #
16
- # 0.0.4 - Rubocop polish and defiance.
17
- #
18
- # 0.1.0 - (future) Big README.md and Rdoc update, solicit feedback
19
- # from select external beta users.
20
- #
21
- # 0.2.0 - (future) Incorporate feedback, announce.
22
- #
23
- VERSION = '0.0.4'.freeze
8
+ VERSION = '0.0.5'.freeze
24
9
  end
25
10
  end
@@ -21,10 +21,12 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
23
 
24
- spec.add_development_dependency 'bundler', '~> 1.14'
25
- spec.add_development_dependency 'rake', '~> 10.0'
26
- spec.add_development_dependency 'minitest', '~> 5.0'
27
- spec.add_development_dependency 'redis', '~> 3.2'
24
+ spec.add_development_dependency 'bundler', '~> 1.16.1'
25
+ spec.add_development_dependency 'minitest', '~> 5.11.3'
26
+ spec.add_development_dependency 'rake', '~> 12.3.1'
28
27
  spec.add_development_dependency 'redis-namespace', '~> 1.5'
28
+ spec.add_development_dependency 'rubocop', '~> 0.54.0'
29
+
30
+ spec.add_runtime_dependency 'redis', '~> 3.2'
29
31
 
30
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-script_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - jhwillett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-18 00:00:00.000000000 Z
11
+ date: 2018-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,70 +16,84 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.14'
19
+ version: 1.16.1
20
20
  type: :development
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: '1.14'
26
+ version: 1.16.1
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 5.11.3
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 5.11.3
41
41
  - !ruby/object:Gem::Dependency
42
- name: minitest
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: 12.3.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.0'
54
+ version: 12.3.1
55
55
  - !ruby/object:Gem::Dependency
56
- name: redis
56
+ name: redis-namespace
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.2'
61
+ version: '1.5'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.2'
68
+ version: '1.5'
69
69
  - !ruby/object:Gem::Dependency
70
- name: redis-namespace
70
+ name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.5'
75
+ version: 0.54.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.5'
82
+ version: 0.54.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: redis
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.2'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.2'
83
97
  description:
84
98
  email:
85
99
  - jhw@prosperworks.com
@@ -90,6 +104,7 @@ files:
90
104
  - ".gitignore"
91
105
  - ".rubocop.yml"
92
106
  - ".travis.yml"
107
+ - CHANGELOG.md
93
108
  - Gemfile
94
109
  - LICENSE
95
110
  - README.md