rubocop-thread_safety 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -0
- data/Appraisals +7 -0
- data/LICENSE.txt +1 -1
- data/README.md +2 -1
- data/gemfiles/rubocop_1.20.gemfile +7 -0
- data/lib/rubocop/cop/thread_safety/mutable_class_instance_variable.rb +0 -5
- data/lib/rubocop/thread_safety/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 660c4521fd4055a7a13af1cebe1d9e53131dcdc668ff8f76e121337fda376aec
|
4
|
+
data.tar.gz: 8d1e6713ce9d79d70ec461b547018b29b651cbbf25d5176741d21841c9b6eee0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 715c83c5a8b65e8ea4ff968c106f4e067457e88a4e8d2fe3849b6d8361c2007f7dfcc1c1b0f5bbb0051c6311519ade6f3b7bddc1598348dd31fee58e7d3ea4d6
|
7
|
+
data.tar.gz: 33f0bd084a199b296baf3b03ba2cc8224eab161ebc821dd7052242eb62d649a084209fe73e2b26f08dddd7dfd907d6e69a73f153453b32618a4f8ad1f30df412
|
data/.travis.yml
CHANGED
@@ -7,11 +7,13 @@ rvm:
|
|
7
7
|
- 2.5
|
8
8
|
- 2.6
|
9
9
|
- 2.7
|
10
|
+
- 3.0
|
10
11
|
|
11
12
|
gemfile:
|
12
13
|
- gemfiles/rubocop_0.53.gemfile
|
13
14
|
- gemfiles/rubocop_0.81.gemfile
|
14
15
|
- gemfiles/rubocop_0.86.gemfile
|
16
|
+
- gemfiles/rubocop_1.20.gemfile
|
15
17
|
|
16
18
|
script_rubocop: &script_rubocop
|
17
19
|
- bundle exec rspec
|
@@ -22,12 +24,16 @@ jobs:
|
|
22
24
|
exclude:
|
23
25
|
- rvm: 2.3.0
|
24
26
|
gemfile: gemfiles/rubocop_0.86.gemfile
|
27
|
+
- rvm: 2.3.0
|
28
|
+
gemfile: gemfiles/rubocop_1.20.gemfile
|
25
29
|
- rvm: 2.5
|
26
30
|
gemfile: gemfiles/rubocop_0.53.gemfile
|
27
31
|
- rvm: 2.6
|
28
32
|
gemfile: gemfiles/rubocop_0.53.gemfile
|
29
33
|
- rvm: 2.7
|
30
34
|
gemfile: gemfiles/rubocop_0.53.gemfile
|
35
|
+
- rvm: 3.0
|
36
|
+
gemfile: gemfiles/rubocop_0.53.gemfile
|
31
37
|
include:
|
32
38
|
- rvm: jruby-9.2.9.0
|
33
39
|
gemfile: gemfiles/rubocop_0.81.gemfile
|
@@ -47,6 +53,9 @@ jobs:
|
|
47
53
|
- rvm: 2.7
|
48
54
|
gemfile: gemfiles/rubocop_0.81.gemfile
|
49
55
|
script: *script_rubocop
|
56
|
+
- rvm: 3.0
|
57
|
+
gemfile: gemfiles/rubocop_0.81.gemfile
|
58
|
+
script: *script_rubocop
|
50
59
|
|
51
60
|
before_install: gem install --remote bundler
|
52
61
|
install:
|
data/Appraisals
CHANGED
data/LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright 2016-
|
1
|
+
Copyright 2016-2021 CoverMyMeds
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
4
|
|
data/README.md
CHANGED
@@ -56,6 +56,7 @@ Improvements that would make shared state thread-safe include:
|
|
56
56
|
* `freeze` objects to protect against mutation. Note: `freeze` is shallow, i.e. freezing an array will not also freeze its elements.
|
57
57
|
* Use data structures or concurrency abstractions from [concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby), e.g. `Concurrent::Map`
|
58
58
|
* Use a `Mutex` or similar to `synchronize` access.
|
59
|
+
* Use [`ActiveSupport::CurrentAttributes`](https://api.rubyonrails.org/classes/ActiveSupport/CurrentAttributes.html)
|
59
60
|
* Use [`RequestStore`](https://github.com/steveklabnik/request_store)
|
60
61
|
* Use `Thread.current[:name]`
|
61
62
|
|
@@ -71,5 +72,5 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/coverm
|
|
71
72
|
|
72
73
|
## Copyright
|
73
74
|
|
74
|
-
Copyright (c) 2016-
|
75
|
+
Copyright (c) 2016-2021 CoverMyMeds.
|
75
76
|
See [LICENSE.txt](LICENSE.txt) for further details.
|
@@ -177,11 +177,6 @@ module RuboCop
|
|
177
177
|
node.nil? || node.immutable_literal?
|
178
178
|
end
|
179
179
|
|
180
|
-
def frozen_string_literal?(node)
|
181
|
-
FROZEN_STRING_LITERAL_TYPES.include?(node.type) &&
|
182
|
-
frozen_string_literals_enabled?
|
183
|
-
end
|
184
|
-
|
185
180
|
def requires_parentheses?(node)
|
186
181
|
range_type?(node) ||
|
187
182
|
(node.send_type? && node.loc.dot.nil?)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-thread_safety
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Gee
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -124,6 +124,7 @@ files:
|
|
124
124
|
- gemfiles/rubocop_0.53.gemfile
|
125
125
|
- gemfiles/rubocop_0.81.gemfile
|
126
126
|
- gemfiles/rubocop_0.86.gemfile
|
127
|
+
- gemfiles/rubocop_1.20.gemfile
|
127
128
|
- lib/rubocop-thread_safety.rb
|
128
129
|
- lib/rubocop/cop/thread_safety/class_and_module_attributes.rb
|
129
130
|
- lib/rubocop/cop/thread_safety/instance_variable_in_class_method.rb
|
@@ -137,7 +138,7 @@ homepage: https://github.com/covermymeds/rubocop-thread_safety
|
|
137
138
|
licenses:
|
138
139
|
- MIT
|
139
140
|
metadata: {}
|
140
|
-
post_install_message:
|
141
|
+
post_install_message:
|
141
142
|
rdoc_options: []
|
142
143
|
require_paths:
|
143
144
|
- lib
|
@@ -152,8 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
153
|
- !ruby/object:Gem::Version
|
153
154
|
version: '0'
|
154
155
|
requirements: []
|
155
|
-
rubygems_version: 3.0.3
|
156
|
-
signing_key:
|
156
|
+
rubygems_version: 3.0.3.1
|
157
|
+
signing_key:
|
157
158
|
specification_version: 4
|
158
159
|
summary: Thread-safety checks via static analysis
|
159
160
|
test_files: []
|