attr_memoized 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +21 -20
- data/Rakefile +21 -0
- data/attr_memoized.gemspec +1 -0
- data/lib/attr_memoized/version.rb +1 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f93ef6582b9c7abda1e82b49fdf384302d32fec07c166425ce6ee4689e982340
|
4
|
+
data.tar.gz: ed3f2243a6f1aa324a7cc4eccae7ad00403384774a994526681bdc2bfec0a95e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4731e116cae0f13f3af6f40fdbe55e91aacaf88649d97474b864a30de96a9bd78e346977f1302aaaef582e5d309ae10e4e5f5faa3766abc356297f8323075169
|
7
|
+
data.tar.gz: bf9ffcb4e15eddad645f5c59cffa0958fc9f5a1b52b60b435857aac9d30bbfd2034ff9168a6664e0e1acdaa2567f90645f8e6e249c3b06893c891c47eafb138b
|
data/.rubocop_todo.yml
CHANGED
@@ -1,11 +1,18 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-
|
3
|
+
# on 2020-09-09 21:53:30 UTC using RuboCop version 0.90.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: Include.
|
11
|
+
# Include: **/*.gemspec
|
12
|
+
Gemspec/RequiredRubyVersion:
|
13
|
+
Exclude:
|
14
|
+
- 'attr_memoized.gemspec'
|
15
|
+
|
9
16
|
# Offense count: 14
|
10
17
|
# Cop supports --auto-correct.
|
11
18
|
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
@@ -25,23 +32,28 @@ Layout/MultilineBlockLayout:
|
|
25
32
|
# Offense count: 1
|
26
33
|
# Configuration parameters: IgnoredMethods.
|
27
34
|
Metrics/AbcSize:
|
28
|
-
Max:
|
35
|
+
Max: 41
|
29
36
|
|
30
37
|
# Offense count: 3
|
31
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
38
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
32
39
|
# ExcludedMethods: refine
|
33
40
|
Metrics/BlockLength:
|
34
41
|
Max: 65
|
35
42
|
|
43
|
+
# Offense count: 1
|
44
|
+
# Configuration parameters: IgnoredMethods.
|
45
|
+
Metrics/CyclomaticComplexity:
|
46
|
+
Max: 11
|
47
|
+
|
36
48
|
# Offense count: 2
|
37
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
49
|
+
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
|
38
50
|
Metrics/MethodLength:
|
39
51
|
Max: 48
|
40
52
|
|
41
53
|
# Offense count: 1
|
42
|
-
|
43
|
-
|
44
|
-
|
54
|
+
# Configuration parameters: IgnoredMethods.
|
55
|
+
Metrics/PerceivedComplexity:
|
56
|
+
Max: 11
|
45
57
|
|
46
58
|
# Offense count: 1
|
47
59
|
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
@@ -50,12 +62,6 @@ Naming/MemoizedInstanceVariableName:
|
|
50
62
|
Exclude:
|
51
63
|
- 'lib/attr_memoized.rb'
|
52
64
|
|
53
|
-
# Offense count: 1
|
54
|
-
# Configuration parameters: IgnoredPatterns.
|
55
|
-
# SupportedStyles: snake_case, camelCase
|
56
|
-
Naming/MethodName:
|
57
|
-
EnforcedStyle: snake_case
|
58
|
-
|
59
65
|
# Offense count: 2
|
60
66
|
# Configuration parameters: AllowedChars.
|
61
67
|
Style/AsciiComments:
|
@@ -86,7 +92,7 @@ Style/PercentLiteralDelimiters:
|
|
86
92
|
Exclude:
|
87
93
|
- 'spec/support/pet_store.rb'
|
88
94
|
|
89
|
-
# Offense count:
|
95
|
+
# Offense count: 10
|
90
96
|
# Cop supports --auto-correct.
|
91
97
|
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
92
98
|
# SupportedStyles: single_quotes, double_quotes
|
@@ -97,12 +103,7 @@ Style/StringLiterals:
|
|
97
103
|
- 'bin/console'
|
98
104
|
- 'spec/multi_attribute_spec.rb'
|
99
105
|
|
100
|
-
# Offense count:
|
101
|
-
Style/StructInheritance:
|
102
|
-
Exclude:
|
103
|
-
- 'spec/support/pet_store.rb'
|
104
|
-
|
105
|
-
# Offense count: 24
|
106
|
+
# Offense count: 4
|
106
107
|
# Cop supports --auto-correct.
|
107
108
|
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
108
109
|
# URISchemes: http, https
|
data/Rakefile
CHANGED
@@ -3,6 +3,27 @@
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "rspec/core/rake_task"
|
5
5
|
|
6
|
+
def shell(*args)
|
7
|
+
puts "running: #{args.join(' ')}"
|
8
|
+
system(args.join(' '))
|
9
|
+
end
|
10
|
+
|
11
|
+
task :permissions do
|
12
|
+
shell('rm -rf pkg/ tmp/')
|
13
|
+
shell("chmod -v o+r,g+r * */* */*/* */*/*/* */*/*/*/* */*/*/*/*/*")
|
14
|
+
shell("find . -type d -exec chmod o+x,g+x {} \\;")
|
15
|
+
end
|
16
|
+
|
17
|
+
task build: :permissions
|
18
|
+
|
6
19
|
RSpec::Core::RakeTask.new(:spec)
|
7
20
|
|
8
21
|
task default: :spec
|
22
|
+
|
23
|
+
task gem: :install do
|
24
|
+
gem = `ls -1 *.gemspec | sed 's/\.gemspec//g'`.chomp
|
25
|
+
puts "gem is #{gem}"
|
26
|
+
puts `gem uninstall -ax #{gem}`.chomp
|
27
|
+
file = `ls -1 pkg`.chomp
|
28
|
+
puts `gem install pkg/#{file}`
|
29
|
+
end
|
data/attr_memoized.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_memoized
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Gredeskoul
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: yard
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
description: Memoize attributes in a thread-safe way. This ruby gem adds a `#attr_memoized`
|
154
168
|
class method, that provides a lazy-loading mechanism for initializing "heavy" attributes,
|
155
169
|
but in a thread-safe way. Instances thus created can be shared among threads.
|
@@ -179,7 +193,7 @@ homepage: https://github.com/kigster/attr_memoized
|
|
179
193
|
licenses:
|
180
194
|
- MIT
|
181
195
|
metadata: {}
|
182
|
-
post_install_message:
|
196
|
+
post_install_message:
|
183
197
|
rdoc_options: []
|
184
198
|
require_paths:
|
185
199
|
- lib
|
@@ -194,8 +208,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
208
|
- !ruby/object:Gem::Version
|
195
209
|
version: '0'
|
196
210
|
requirements: []
|
197
|
-
rubygems_version: 3.1.
|
198
|
-
signing_key:
|
211
|
+
rubygems_version: 3.1.4
|
212
|
+
signing_key:
|
199
213
|
specification_version: 4
|
200
214
|
summary: Memoize attributes in a thread-safe way. This ruby gem adds a `#attr_memoized`
|
201
215
|
class method, that provides a lazy-loading mechanism for initializing "heavy" attributes,
|