rubocop-thread_safety 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -5
- data/Gemfile +0 -4
- data/bin/setup +0 -3
- data/lib/rubocop/cop/thread_safety/instance_variable_in_class_method.rb +8 -0
- data/lib/rubocop/thread_safety/version.rb +1 -1
- data/rubocop-thread_safety.gemspec +1 -2
- metadata +21 -35
- data/.gitmodules +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88d48cd3238f82a82b8fb0a8a29543e111ff34f5
|
4
|
+
data.tar.gz: 2a150df94ee24d94dc9173fa13837bcd82044590
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13c4f7b7cb97c02a1cd0e7cb33bb87453ee3b3e5e9bb826c936f2f266c7536ce3ce4234e6c6dd50bc742089604efbe8c7fcc77a21cb9bcda712fb78533e24fb3
|
7
|
+
data.tar.gz: bdb1ec4b1c42ec44f29c272a0cfaf27226d2b961822eeb64eb2462be22d537b9fb8329dd6045ec7619414a4da7bc012cdd81afdb3f398e58f7a78359d5ac601e
|
data/.travis.yml
CHANGED
@@ -1,16 +1,13 @@
|
|
1
1
|
sudo: false
|
2
2
|
cache: bundler
|
3
3
|
language: ruby
|
4
|
-
|
5
4
|
rvm:
|
6
|
-
- 1.9.3
|
7
5
|
- 2.0.0
|
8
6
|
- 2.1
|
9
7
|
- 2.2
|
10
8
|
- 2.3.0
|
11
9
|
- ruby-head
|
12
|
-
- jruby-
|
13
|
-
- jruby-9.0.5.0
|
10
|
+
- jruby-9.0.1.0
|
14
11
|
- rbx-3
|
15
12
|
|
16
13
|
matrix:
|
@@ -19,7 +16,9 @@ matrix:
|
|
19
16
|
- rvm: rbx-3
|
20
17
|
fast_finish: true
|
21
18
|
|
22
|
-
before_install: gem install bundler
|
19
|
+
before_install: gem install --remote bundler
|
20
|
+
install:
|
21
|
+
- bundle install --retry=3
|
23
22
|
script:
|
24
23
|
- bundle exec rspec
|
25
24
|
- bundle exec rubocop
|
data/Gemfile
CHANGED
data/bin/setup
CHANGED
@@ -19,6 +19,7 @@ module RuboCop
|
|
19
19
|
|
20
20
|
def on_ivar(node)
|
21
21
|
return unless class_method_definition?(node)
|
22
|
+
return if synchronized?(node)
|
22
23
|
|
23
24
|
add_offense(node, :name, MSG)
|
24
25
|
end
|
@@ -54,6 +55,13 @@ module RuboCop
|
|
54
55
|
ancestor.children.first.command? :define_singleton_method
|
55
56
|
end
|
56
57
|
end
|
58
|
+
|
59
|
+
def synchronized?(node)
|
60
|
+
p = node.parent
|
61
|
+
return false unless p.block_type?
|
62
|
+
s = p.children.first
|
63
|
+
s.send_type? && s.children.last == :synchronize
|
64
|
+
end
|
57
65
|
end
|
58
66
|
end
|
59
67
|
end
|
@@ -21,11 +21,10 @@ 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_runtime_dependency 'rubocop'
|
24
|
+
spec.add_runtime_dependency 'rubocop', '>= 0.41.1'
|
25
25
|
|
26
26
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
27
27
|
spec.add_development_dependency 'rake', '~> 10.0'
|
28
28
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
29
|
-
spec.add_development_dependency 'simplecov'
|
30
29
|
spec.add_development_dependency 'pry' unless ENV['CI']
|
31
30
|
end
|
metadata
CHANGED
@@ -1,97 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-thread_safety
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Gee
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.41.1
|
20
20
|
type: :runtime
|
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:
|
26
|
+
version: 0.41.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.10'
|
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
40
|
version: '1.10'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '10.0'
|
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
54
|
version: '10.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.0'
|
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
68
|
version: '3.0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: simplecov
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '>='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - '>='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: pry
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
|
-
- -
|
73
|
+
- - ">="
|
88
74
|
- !ruby/object:Gem::Version
|
89
75
|
version: '0'
|
90
76
|
type: :development
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
79
|
requirements:
|
94
|
-
- -
|
80
|
+
- - ">="
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '0'
|
97
83
|
description: |2
|
@@ -103,11 +89,10 @@ executables: []
|
|
103
89
|
extensions: []
|
104
90
|
extra_rdoc_files: []
|
105
91
|
files:
|
106
|
-
- .gitignore
|
107
|
-
- .
|
108
|
-
- .
|
109
|
-
- .
|
110
|
-
- .travis.yml
|
92
|
+
- ".gitignore"
|
93
|
+
- ".rspec"
|
94
|
+
- ".rubocop.yml"
|
95
|
+
- ".travis.yml"
|
111
96
|
- Gemfile
|
112
97
|
- README.md
|
113
98
|
- Rakefile
|
@@ -128,12 +113,12 @@ require_paths:
|
|
128
113
|
- lib
|
129
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
115
|
requirements:
|
131
|
-
- -
|
116
|
+
- - ">="
|
132
117
|
- !ruby/object:Gem::Version
|
133
118
|
version: '0'
|
134
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
120
|
requirements:
|
136
|
-
- -
|
121
|
+
- - ">="
|
137
122
|
- !ruby/object:Gem::Version
|
138
123
|
version: '0'
|
139
124
|
requirements: []
|
@@ -143,3 +128,4 @@ signing_key:
|
|
143
128
|
specification_version: 4
|
144
129
|
summary: Thread-safety checks via static analysis
|
145
130
|
test_files: []
|
131
|
+
has_rdoc:
|
data/.gitmodules
DELETED