celluloid-extras 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.rspec +5 -0
- data/.rubocop.yml +412 -0
- data/.travis.yml +20 -0
- data/CHANGES.md +4 -0
- data/Gemfile +28 -0
- data/LICENSE.txt +22 -0
- data/README.md +8 -0
- data/Rakefile +8 -0
- data/celluloid-extras.gemspec +23 -0
- data/lib/celluloid/extras/hash.rb +89 -0
- data/lib/celluloid/extras/rehasher.rb +15 -0
- data/lib/celluloid/extras/version.rb +5 -0
- metadata +73 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d53bc4891dd1ee7f22497ea71d173d34aca54152
|
4
|
+
data.tar.gz: 7120780a2c2dd01bf32b6fde37ee38c88c640795
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8b560da3f93f8444fb2b5fd981ed16a1d1aef8048a5d8cca6821bcb272616be70f2e13989cc4e2d95c607ffc82b9c6d233d5adad1e0bca37b10f8f6d1ba72004
|
7
|
+
data.tar.gz: 034deb2ac0aa371ee4f6b5b251ef124488c0d17ee473f23f8251083c93c7cd4470bbc49c4b12e84c883030ef4e8f34ca2c2988814209b4175b9ddcc6fa5c9d97
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,412 @@
|
|
1
|
+
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
+
# on 2014-05-17 14:03:40 -0700 using RuboCop version 0.21.0.
|
3
|
+
# The point is for the user to remove these configuration records
|
4
|
+
# one by one as the offenses are removed from the code base.
|
5
|
+
# Note that changes in the inspected code, or installation of new
|
6
|
+
# versions of RuboCop, may require this file to be generated again.
|
7
|
+
|
8
|
+
# Offense count: 1
|
9
|
+
# Cop supports --auto-correct.
|
10
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
11
|
+
AccessModifierIndentation:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
# Offense count: 1
|
15
|
+
AccessorMethodName:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
# Offense count: 2
|
19
|
+
# Cop supports --auto-correct.
|
20
|
+
Alias:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
# Offense count: 1
|
24
|
+
# Cop supports --auto-correct.
|
25
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
26
|
+
AlignParameters:
|
27
|
+
Enabled: false
|
28
|
+
|
29
|
+
# Offense count: 8
|
30
|
+
# Cop supports --auto-correct.
|
31
|
+
AndOr:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
# Offense count: 10
|
35
|
+
# Configuration parameters: AllowSafeAssignment.
|
36
|
+
AssignmentInCondition:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
# Offense count: 1
|
40
|
+
BlockNesting:
|
41
|
+
Max: 4
|
42
|
+
|
43
|
+
# Offense count: 3
|
44
|
+
# Cop supports --auto-correct.
|
45
|
+
Blocks:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
# Offense count: 4
|
49
|
+
CaseEquality:
|
50
|
+
Enabled: false
|
51
|
+
|
52
|
+
# Offense count: 2
|
53
|
+
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
|
54
|
+
CaseIndentation:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
# Offense count: 1
|
58
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
59
|
+
ClassAndModuleChildren:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
# Offense count: 3
|
63
|
+
# Configuration parameters: CountComments.
|
64
|
+
ClassLength:
|
65
|
+
Max: 257
|
66
|
+
|
67
|
+
# Offense count: 6
|
68
|
+
# Cop supports --auto-correct.
|
69
|
+
# Configuration parameters: PreferredMethods.
|
70
|
+
CollectionMethods:
|
71
|
+
Enabled: false
|
72
|
+
|
73
|
+
# Offense count: 3
|
74
|
+
# Cop supports --auto-correct.
|
75
|
+
ColonMethodCall:
|
76
|
+
Enabled: false
|
77
|
+
|
78
|
+
# Offense count: 1
|
79
|
+
# Configuration parameters: Keywords.
|
80
|
+
CommentAnnotation:
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
# Offense count: 9
|
84
|
+
CyclomaticComplexity:
|
85
|
+
Max: 8
|
86
|
+
|
87
|
+
# Offense count: 1
|
88
|
+
# Cop supports --auto-correct.
|
89
|
+
DefWithParentheses:
|
90
|
+
Enabled: false
|
91
|
+
|
92
|
+
# Offense count: 1
|
93
|
+
# Cop supports --auto-correct.
|
94
|
+
DeprecatedHashMethods:
|
95
|
+
Enabled: false
|
96
|
+
|
97
|
+
# Offense count: 75
|
98
|
+
Documentation:
|
99
|
+
Enabled: false
|
100
|
+
|
101
|
+
# Offense count: 4
|
102
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
103
|
+
DotPosition:
|
104
|
+
Enabled: false
|
105
|
+
|
106
|
+
# Offense count: 3
|
107
|
+
DoubleNegation:
|
108
|
+
Enabled: false
|
109
|
+
|
110
|
+
# Offense count: 10
|
111
|
+
# Cop supports --auto-correct.
|
112
|
+
# Configuration parameters: AllowAdjacentOneLineDefs.
|
113
|
+
EmptyLineBetweenDefs:
|
114
|
+
Enabled: false
|
115
|
+
|
116
|
+
# Offense count: 1
|
117
|
+
# Cop supports --auto-correct.
|
118
|
+
EmptyLines:
|
119
|
+
Enabled: false
|
120
|
+
|
121
|
+
Encoding:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
# Offense count: 1
|
125
|
+
# Configuration parameters: AlignWith, SupportedStyles.
|
126
|
+
EndAlignment:
|
127
|
+
Enabled: false
|
128
|
+
|
129
|
+
# Offense count: 2
|
130
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
131
|
+
For:
|
132
|
+
Enabled: false
|
133
|
+
|
134
|
+
# Offense count: 1
|
135
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
136
|
+
FormatString:
|
137
|
+
Enabled: false
|
138
|
+
|
139
|
+
# Offense count: 27
|
140
|
+
# Configuration parameters: AllowedVariables.
|
141
|
+
GlobalVars:
|
142
|
+
Enabled: false
|
143
|
+
|
144
|
+
# Offense count: 10
|
145
|
+
HandleExceptions:
|
146
|
+
Enabled: false
|
147
|
+
|
148
|
+
# Offense count: 42
|
149
|
+
# Cop supports --auto-correct.
|
150
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
151
|
+
HashSyntax:
|
152
|
+
Enabled: false
|
153
|
+
|
154
|
+
# Offense count: 6
|
155
|
+
# Configuration parameters: MaxLineLength.
|
156
|
+
IfUnlessModifier:
|
157
|
+
Enabled: false
|
158
|
+
|
159
|
+
# Offense count: 1
|
160
|
+
# Cop supports --auto-correct.
|
161
|
+
IndentationWidth:
|
162
|
+
Enabled: false
|
163
|
+
|
164
|
+
# Offense count: 4
|
165
|
+
Lambda:
|
166
|
+
Enabled: false
|
167
|
+
|
168
|
+
# Offense count: 2
|
169
|
+
# Cop supports --auto-correct.
|
170
|
+
LeadingCommentSpace:
|
171
|
+
Enabled: false
|
172
|
+
|
173
|
+
# Offense count: 149
|
174
|
+
LineLength:
|
175
|
+
Max: 176
|
176
|
+
|
177
|
+
# Offense count: 1
|
178
|
+
LiteralInCondition:
|
179
|
+
Enabled: false
|
180
|
+
|
181
|
+
# Offense count: 3
|
182
|
+
Loop:
|
183
|
+
Enabled: false
|
184
|
+
|
185
|
+
# Offense count: 1
|
186
|
+
# Cop supports --auto-correct.
|
187
|
+
MethodCallParentheses:
|
188
|
+
Enabled: false
|
189
|
+
|
190
|
+
# Offense count: 2
|
191
|
+
# Cop supports --auto-correct.
|
192
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
193
|
+
MethodDefParentheses:
|
194
|
+
Enabled: false
|
195
|
+
|
196
|
+
# Offense count: 42
|
197
|
+
# Configuration parameters: CountComments.
|
198
|
+
MethodLength:
|
199
|
+
Max: 82
|
200
|
+
|
201
|
+
# Offense count: 1
|
202
|
+
ModuleFunction:
|
203
|
+
Enabled: false
|
204
|
+
|
205
|
+
# Offense count: 1
|
206
|
+
# Cop supports --auto-correct.
|
207
|
+
NegatedWhile:
|
208
|
+
Enabled: false
|
209
|
+
|
210
|
+
# Offense count: 6
|
211
|
+
# Cop supports --auto-correct.
|
212
|
+
NilComparison:
|
213
|
+
Enabled: false
|
214
|
+
|
215
|
+
# Offense count: 2
|
216
|
+
# Cop supports --auto-correct.
|
217
|
+
NonNilCheck:
|
218
|
+
Enabled: false
|
219
|
+
|
220
|
+
# Offense count: 1
|
221
|
+
# Cop supports --auto-correct.
|
222
|
+
Not:
|
223
|
+
Enabled: false
|
224
|
+
|
225
|
+
# Offense count: 1
|
226
|
+
# Cop supports --auto-correct.
|
227
|
+
NumericLiterals:
|
228
|
+
MinDigits: 7
|
229
|
+
|
230
|
+
# Offense count: 1
|
231
|
+
# Configuration parameters: CountKeywordArgs.
|
232
|
+
ParameterLists:
|
233
|
+
Max: 6
|
234
|
+
|
235
|
+
# Offense count: 1
|
236
|
+
# Configuration parameters: NamePrefixBlacklist.
|
237
|
+
PredicateName:
|
238
|
+
Enabled: false
|
239
|
+
|
240
|
+
# Offense count: 2
|
241
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
242
|
+
RaiseArgs:
|
243
|
+
Enabled: false
|
244
|
+
|
245
|
+
# Offense count: 1
|
246
|
+
RedundantException:
|
247
|
+
Enabled: false
|
248
|
+
|
249
|
+
# Offense count: 1
|
250
|
+
# Cop supports --auto-correct.
|
251
|
+
# Configuration parameters: AllowMultipleReturnValues.
|
252
|
+
RedundantReturn:
|
253
|
+
Enabled: false
|
254
|
+
|
255
|
+
# Offense count: 2
|
256
|
+
# Cop supports --auto-correct.
|
257
|
+
RedundantSelf:
|
258
|
+
Enabled: false
|
259
|
+
|
260
|
+
# Offense count: 4
|
261
|
+
# Cop supports --auto-correct.
|
262
|
+
RescueException:
|
263
|
+
Enabled: false
|
264
|
+
|
265
|
+
# Offense count: 8
|
266
|
+
RescueModifier:
|
267
|
+
Enabled: false
|
268
|
+
|
269
|
+
# Offense count: 4
|
270
|
+
# Cop supports --auto-correct.
|
271
|
+
# Configuration parameters: AllowAsExpressionSeparator.
|
272
|
+
Semicolon:
|
273
|
+
Enabled: false
|
274
|
+
|
275
|
+
# Offense count: 70
|
276
|
+
# Cop supports --auto-correct.
|
277
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
278
|
+
SignalException:
|
279
|
+
Enabled: false
|
280
|
+
|
281
|
+
# Offense count: 2
|
282
|
+
# Configuration parameters: Methods.
|
283
|
+
SingleLineBlockParams:
|
284
|
+
Enabled: false
|
285
|
+
|
286
|
+
# Offense count: 28
|
287
|
+
# Cop supports --auto-correct.
|
288
|
+
# Configuration parameters: AllowIfMethodIsEmpty.
|
289
|
+
SingleLineMethods:
|
290
|
+
Enabled: false
|
291
|
+
|
292
|
+
# Offense count: 11
|
293
|
+
# Cop supports --auto-correct.
|
294
|
+
SingleSpaceBeforeFirstArg:
|
295
|
+
Enabled: false
|
296
|
+
|
297
|
+
# Offense count: 5
|
298
|
+
# Cop supports --auto-correct.
|
299
|
+
SpaceAfterComma:
|
300
|
+
Enabled: false
|
301
|
+
|
302
|
+
# Offense count: 7
|
303
|
+
# Cop supports --auto-correct.
|
304
|
+
SpaceAfterMethodName:
|
305
|
+
Enabled: false
|
306
|
+
|
307
|
+
# Offense count: 15
|
308
|
+
# Cop supports --auto-correct.
|
309
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
310
|
+
SpaceAroundEqualsInParameterDefault:
|
311
|
+
Enabled: false
|
312
|
+
|
313
|
+
# Offense count: 3
|
314
|
+
# Cop supports --auto-correct.
|
315
|
+
SpaceAroundOperators:
|
316
|
+
Enabled: false
|
317
|
+
|
318
|
+
# Offense count: 4
|
319
|
+
# Cop supports --auto-correct.
|
320
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
321
|
+
SpaceBeforeBlockBraces:
|
322
|
+
Enabled: false
|
323
|
+
|
324
|
+
# Offense count: 6
|
325
|
+
# Cop supports --auto-correct.
|
326
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
|
327
|
+
SpaceInsideBlockBraces:
|
328
|
+
Enabled: false
|
329
|
+
|
330
|
+
# Offense count: 2
|
331
|
+
# Cop supports --auto-correct.
|
332
|
+
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
|
333
|
+
SpaceInsideHashLiteralBraces:
|
334
|
+
Enabled: false
|
335
|
+
|
336
|
+
# Offense count: 1
|
337
|
+
# Cop supports --auto-correct.
|
338
|
+
SpaceInsideParens:
|
339
|
+
Enabled: false
|
340
|
+
|
341
|
+
# Offense count: 13
|
342
|
+
# Cop supports --auto-correct.
|
343
|
+
SpecialGlobalVars:
|
344
|
+
Enabled: false
|
345
|
+
|
346
|
+
# Offense count: 2
|
347
|
+
# Cop supports --auto-correct.
|
348
|
+
StringConversionInInterpolation:
|
349
|
+
Enabled: false
|
350
|
+
|
351
|
+
# Offense count: 423
|
352
|
+
# Cop supports --auto-correct.
|
353
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
354
|
+
StringLiterals:
|
355
|
+
Enabled: false
|
356
|
+
|
357
|
+
# Offense count: 3
|
358
|
+
# Cop supports --auto-correct.
|
359
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
360
|
+
TrailingBlankLines:
|
361
|
+
Enabled: false
|
362
|
+
|
363
|
+
# Offense count: 3
|
364
|
+
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
|
365
|
+
TrailingComma:
|
366
|
+
Enabled: false
|
367
|
+
|
368
|
+
# Offense count: 2
|
369
|
+
# Cop supports --auto-correct.
|
370
|
+
TrailingWhitespace:
|
371
|
+
Enabled: false
|
372
|
+
|
373
|
+
# Offense count: 17
|
374
|
+
# Cop supports --auto-correct.
|
375
|
+
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, Whitelist.
|
376
|
+
TrivialAccessors:
|
377
|
+
Enabled: false
|
378
|
+
|
379
|
+
# Offense count: 4
|
380
|
+
UnderscorePrefixedVariableName:
|
381
|
+
Enabled: false
|
382
|
+
|
383
|
+
# Offense count: 3
|
384
|
+
UnusedBlockArgument:
|
385
|
+
Enabled: false
|
386
|
+
|
387
|
+
# Offense count: 9
|
388
|
+
UnusedMethodArgument:
|
389
|
+
Enabled: false
|
390
|
+
|
391
|
+
# Offense count: 7
|
392
|
+
UselessAssignment:
|
393
|
+
Enabled: false
|
394
|
+
|
395
|
+
# Offense count: 1
|
396
|
+
# Cop supports --auto-correct.
|
397
|
+
VariableInterpolation:
|
398
|
+
Enabled: false
|
399
|
+
|
400
|
+
# Offense count: 4
|
401
|
+
Void:
|
402
|
+
Enabled: false
|
403
|
+
|
404
|
+
# Offense count: 2
|
405
|
+
# Configuration parameters: MaxLineLength.
|
406
|
+
WhileUntilModifier:
|
407
|
+
Enabled: false
|
408
|
+
|
409
|
+
# Offense count: 1
|
410
|
+
# Cop supports --auto-correct.
|
411
|
+
WordArray:
|
412
|
+
MinSize: 2
|
data/.travis.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
script: rake ci
|
2
|
+
language: ruby
|
3
|
+
rvm:
|
4
|
+
- 2.2.0
|
5
|
+
- jruby
|
6
|
+
- ruby-head
|
7
|
+
- jruby-head
|
8
|
+
- rbx-2
|
9
|
+
|
10
|
+
matrix:
|
11
|
+
allow_failures:
|
12
|
+
- rvm: rbx-2
|
13
|
+
- rvm: ruby-head
|
14
|
+
- rvm: jruby-head
|
15
|
+
|
16
|
+
notifications:
|
17
|
+
irc: "irc.freenode.org#celluloid"
|
18
|
+
|
19
|
+
sudo: false
|
20
|
+
install: bundle install --retry=3 --without=development
|
data/CHANGES.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'coveralls', require: false
|
4
|
+
|
5
|
+
gemspec development_group: :gem_build_tools
|
6
|
+
|
7
|
+
group :development do
|
8
|
+
gem 'pry'
|
9
|
+
#de gem 'guard'
|
10
|
+
#de gem 'guard-rspec'
|
11
|
+
#de gem 'rb-fsevent', '~> 0.9.1' if RUBY_PLATFORM =~ /darwin/
|
12
|
+
gem 'rubocop'
|
13
|
+
end
|
14
|
+
|
15
|
+
group :test do
|
16
|
+
gem 'dotenv', '~> 2.0'
|
17
|
+
gem 'nenv'
|
18
|
+
gem 'benchmark_suite'
|
19
|
+
gem 'rspec', '~> 3.2'
|
20
|
+
gem 'rspec-retry'
|
21
|
+
gem 'rspec-log_split', github: 'abstractive/rspec-log_split', branch: 'master'
|
22
|
+
end
|
23
|
+
|
24
|
+
group :gem_build_tools do
|
25
|
+
gem 'rake'
|
26
|
+
end
|
27
|
+
|
28
|
+
gem 'celluloid', github: 'celluloid/celluloid', branch: '0.17.0-prerelease'
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Celluloid
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/celluloid/extras/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.name = 'celluloid-extras'
|
6
|
+
gem.version = Celluloid::Extras::VERSION
|
7
|
+
gem.platform = Gem::Platform::RUBY
|
8
|
+
gem.summary = 'Celluloid expansion, testing, and example classes.'
|
9
|
+
gem.description = 'Classes to support examples, benchmarks, or add special functionality.'
|
10
|
+
gem.licenses = ['MIT']
|
11
|
+
|
12
|
+
gem.authors = ["digitalextremist //", "Tony Arcieri"]
|
13
|
+
gem.email = ['code@extremist.digital','tony.arcieri@gmail.com']
|
14
|
+
gem.homepage = 'https://github.com/celluloid/celluloid-extras'
|
15
|
+
|
16
|
+
gem.required_ruby_version = '>= 1.9.2'
|
17
|
+
gem.required_rubygems_version = '>= 1.3.6'
|
18
|
+
|
19
|
+
gem.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|examples|spec|features)/}) }
|
20
|
+
gem.require_path = 'lib'
|
21
|
+
|
22
|
+
gem.add_dependency 'celluloid'
|
23
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'celluloid'
|
2
|
+
|
3
|
+
module Celluloid
|
4
|
+
module Extras
|
5
|
+
|
6
|
+
# Concurrent Hash mirroring the existing Hash API as an Actor.
|
7
|
+
class Hash
|
8
|
+
include Celluloid
|
9
|
+
|
10
|
+
def initialize starter={}
|
11
|
+
@outer = starter
|
12
|
+
end
|
13
|
+
|
14
|
+
def [](k)
|
15
|
+
@outer[k]
|
16
|
+
end
|
17
|
+
|
18
|
+
def []=(k,v)
|
19
|
+
@outer.store(k, v)
|
20
|
+
return v
|
21
|
+
end
|
22
|
+
|
23
|
+
def has_key?(k)
|
24
|
+
@outer.has_key?(k)
|
25
|
+
end
|
26
|
+
|
27
|
+
def inspect
|
28
|
+
@outer.inspect
|
29
|
+
end
|
30
|
+
|
31
|
+
def insert(k,v)
|
32
|
+
@outer[k] = v
|
33
|
+
end
|
34
|
+
|
35
|
+
def merge(h)
|
36
|
+
@outer.merge(h)
|
37
|
+
end
|
38
|
+
|
39
|
+
def merge!(h)
|
40
|
+
@outer.merge!(h)
|
41
|
+
end
|
42
|
+
|
43
|
+
def delete(k)
|
44
|
+
@outer.delete(k)
|
45
|
+
end
|
46
|
+
|
47
|
+
def each(&b)
|
48
|
+
@outer.each(&b)
|
49
|
+
end
|
50
|
+
|
51
|
+
def sort_by(&b)
|
52
|
+
@outer.sort_by(&b)
|
53
|
+
end
|
54
|
+
|
55
|
+
def inject(s=nil, &b)
|
56
|
+
@outer.inject(s, &b)
|
57
|
+
end
|
58
|
+
|
59
|
+
def select!(&b)
|
60
|
+
@outer.select!(&b)
|
61
|
+
end
|
62
|
+
|
63
|
+
def select(&b)
|
64
|
+
@outer.select(&b)
|
65
|
+
end
|
66
|
+
|
67
|
+
def replace(h)
|
68
|
+
@outer.replace(h)
|
69
|
+
end
|
70
|
+
|
71
|
+
def empty?
|
72
|
+
@outer.count == 0
|
73
|
+
end
|
74
|
+
|
75
|
+
def any?
|
76
|
+
@outer.any?
|
77
|
+
end
|
78
|
+
|
79
|
+
def count
|
80
|
+
@outer.count
|
81
|
+
end
|
82
|
+
|
83
|
+
def keys
|
84
|
+
@outer.keys
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'celluloid'
|
2
|
+
|
3
|
+
module Celluloid
|
4
|
+
module Extras
|
5
|
+
class Rehasher
|
6
|
+
include Celluloid
|
7
|
+
|
8
|
+
def rehash(string, rounds)
|
9
|
+
raise ArgumentError, "hurr" unless rounds > 1
|
10
|
+
penultimate = (rounds - 1).times.inject(string) { |s| Digest::SHA512.digest(s) }
|
11
|
+
Digest::SHA512.hexdigest(penultimate)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: celluloid-extras
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- digitalextremist //
|
8
|
+
- Tony Arcieri
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-04-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: celluloid
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
description: Classes to support examples, benchmarks, or add special functionality.
|
29
|
+
email:
|
30
|
+
- code@extremist.digital
|
31
|
+
- tony.arcieri@gmail.com
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- ".gitignore"
|
37
|
+
- ".rspec"
|
38
|
+
- ".rubocop.yml"
|
39
|
+
- ".travis.yml"
|
40
|
+
- CHANGES.md
|
41
|
+
- Gemfile
|
42
|
+
- LICENSE.txt
|
43
|
+
- README.md
|
44
|
+
- Rakefile
|
45
|
+
- celluloid-extras.gemspec
|
46
|
+
- lib/celluloid/extras/hash.rb
|
47
|
+
- lib/celluloid/extras/rehasher.rb
|
48
|
+
- lib/celluloid/extras/version.rb
|
49
|
+
homepage: https://github.com/celluloid/celluloid-extras
|
50
|
+
licenses:
|
51
|
+
- MIT
|
52
|
+
metadata: {}
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.9.2
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.3.6
|
67
|
+
requirements: []
|
68
|
+
rubyforge_project:
|
69
|
+
rubygems_version: 2.2.2
|
70
|
+
signing_key:
|
71
|
+
specification_version: 4
|
72
|
+
summary: Celluloid expansion, testing, and example classes.
|
73
|
+
test_files: []
|