rubocop-thread_safety 0.3.3 → 0.3.4

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: 13776da27788c6433f309cf3d0be0ffb09381a84
4
- data.tar.gz: 38012b9b51d40c2a56d424ec92ea7d42d61af9a3
3
+ metadata.gz: 8a02cd99185995c9ca8f553177ed0036e4dc8c4c
4
+ data.tar.gz: 2008714ed96b7a96406062af5e11d89842eb2e1d
5
5
  SHA512:
6
- metadata.gz: e14293fa18d9a313becc63dd6b54f245c2b28a84dee116184b4a120e4c0790203af031d0b642494c368975e16fb668af437038fc79d66d947fc873959824eabf
7
- data.tar.gz: af2cd90701fb180d691824dc2014e709ce4e1fb145fd6eb478bd2107b295074726baf1809ddaec8b9f7c8a3b809c5a1f9f4900e5fb2ec1f9ea4267481dca5284
6
+ metadata.gz: '0982b0a820e6d58d183c01f42ff8da9d5071bb02ee0c2fc16bf81c9efa52d16b8a928ca265bcf00397ca1f49fe99132949fb8e7c43907f7441644ad25c3a7f31'
7
+ data.tar.gz: 16d36ef00a8eb2010431f968521702f934d4163c97c33a68fd236f2025e41c05a6ef70c1ae80f7e2202a53356539d5cfdf7e37085d6c12d360922dd577a40193
@@ -10,7 +10,7 @@ Metrics/BlockLength:
10
10
  Exclude:
11
11
  - "spec/**/*"
12
12
 
13
- Style/FileName:
13
+ Naming/FileName:
14
14
  Exclude:
15
15
  - lib/rubocop-thread_safety.rb
16
16
  - rubocop-thread_safety.gemspec
@@ -2,18 +2,13 @@ sudo: false
2
2
  cache: bundler
3
3
  language: ruby
4
4
  rvm:
5
- - 2.0.0
5
+ - jruby-9.1.14.0
6
6
  - 2.1
7
7
  - 2.2
8
8
  - 2.3.0
9
- - ruby-head
10
- - jruby-9.0.1.0
11
- - rbx-3
9
+ - 2.4
12
10
 
13
11
  matrix:
14
- allow_failures:
15
- - rvm: ruby-head
16
- - rvm: rbx-3
17
12
  fast_finish: true
18
13
 
19
14
  before_install: gem install --remote bundler
@@ -0,0 +1,7 @@
1
+ Copyright 2016-2017 CoverMyMeds
2
+
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
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -32,7 +32,7 @@ Install the gem:
32
32
 
33
33
  Scan the application for just thread-safety issues:
34
34
 
35
- $ rubocop -r rubocop-thread_safety --only Threadsafety,Style/GlobalVars,Style/ClassVars,Style/MutableConstant
35
+ $ rubocop -r rubocop-thread_safety --only ThreadSafety,Style/GlobalVars,Style/ClassVars,Style/MutableConstant
36
36
 
37
37
  ## Development
38
38
 
@@ -44,3 +44,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
44
44
 
45
45
  Bug reports and pull requests are welcome on GitHub at https://github.com/covermymeds/rubocop-thread_safety.
46
46
 
47
+ ## Copyright
48
+
49
+ Copyright (c) 2016-2017 CoverMyMeds.
50
+ See [LICENSE.txt](LICENSE.txt) for further details.
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  # frozen_string_literal: true
3
2
 
4
3
  module RuboCop
@@ -16,21 +15,21 @@ module RuboCop
16
15
  class ClassAndModuleAttributes < Cop
17
16
  MSG = 'Avoid mutating class and module attributes.'.freeze
18
17
 
19
- def_node_matcher :mattr?, <<-END
20
- (send nil
18
+ def_node_matcher :mattr?, <<-MATCHER
19
+ (send nil?
21
20
  {:mattr_writer :mattr_accessor :cattr_writer :cattr_accessor}
22
21
  ...)
23
- END
22
+ MATCHER
24
23
 
25
- def_node_matcher :attr?, <<-END
26
- (send nil
24
+ def_node_matcher :attr?, <<-MATCHER
25
+ (send nil?
27
26
  {:attr :attr_accessor :attr_writer}
28
27
  ...)
29
- END
28
+ MATCHER
30
29
 
31
30
  def on_send(node)
32
31
  return unless mattr?(node) || singleton_attr?(node)
33
- add_offense(node, :expression, format(MSG, node.source))
32
+ add_offense(node, message: MSG)
34
33
  end
35
34
 
36
35
  private
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  # frozen_string_literal: true
3
2
 
4
3
  module RuboCop
@@ -21,7 +20,7 @@ module RuboCop
21
20
  return unless class_method_definition?(node)
22
21
  return if synchronized?(node)
23
22
 
24
- add_offense(node, :name, MSG)
23
+ add_offense(node, location: :name, message: MSG)
25
24
  end
26
25
  alias on_ivasgn on_ivar
27
26
 
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  # frozen_string_literal: true
3
2
 
4
3
  module RuboCop
@@ -14,13 +13,13 @@ module RuboCop
14
13
  class NewThread < Cop
15
14
  MSG = 'Avoid starting new threads.'.freeze
16
15
 
17
- def_node_matcher :new_thread?, <<-END
18
- (send (const nil :Thread) :new)
19
- END
16
+ def_node_matcher :new_thread?, <<-MATCHER
17
+ (send (const nil? :Thread) :new)
18
+ MATCHER
20
19
 
21
20
  def on_send(node)
22
21
  return unless new_thread?(node)
23
- add_offense(node, :expression, format(MSG, node.source))
22
+ add_offense(node, message: MSG)
24
23
  end
25
24
  end
26
25
  end
@@ -1,5 +1,5 @@
1
1
  module RuboCop
2
2
  module ThreadSafety
3
- VERSION = '0.3.3'.freeze
3
+ VERSION = '0.3.4'.freeze
4
4
  end
5
5
  end
@@ -1,5 +1,3 @@
1
- # coding: utf-8
2
-
3
1
  lib = File.expand_path('../lib', __FILE__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
  require 'rubocop/thread_safety/version'
@@ -11,11 +9,12 @@ Gem::Specification.new do |spec|
11
9
  spec.email = ['michaelpgee@gmail.com']
12
10
 
13
11
  spec.summary = 'Thread-safety checks via static analysis'
14
- spec.description = <<-end_description
12
+ spec.description = <<-DESCRIPTION
15
13
  Thread-safety checks via static analysis.
16
14
  A plugin for the RuboCop code style enforcing & linting tool.
17
- end_description
15
+ DESCRIPTION
18
16
  spec.homepage = 'https://github.com/covermymeds/rubocop-thread_safety'
17
+ spec.licenses = ['MIT']
19
18
 
20
19
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
21
20
  f.match(%r{^(test|spec|features)/})
@@ -25,10 +24,10 @@ Gem::Specification.new do |spec|
25
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
25
  spec.require_paths = ['lib']
27
26
 
28
- spec.add_runtime_dependency 'rubocop', '>= 0.48.0'
27
+ spec.add_runtime_dependency 'rubocop', '>= 0.51.0'
29
28
 
30
29
  spec.add_development_dependency 'bundler', '~> 1.10'
30
+ spec.add_development_dependency 'pry' unless ENV['CI']
31
31
  spec.add_development_dependency 'rake', '~> 10.0'
32
32
  spec.add_development_dependency 'rspec', '~> 3.0'
33
- spec.add_development_dependency 'pry' unless ENV['CI']
34
33
  end
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.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Gee
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-27 00:00:00.000000000 Z
11
+ date: 2017-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.48.0
19
+ version: 0.51.0
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: 0.48.0
26
+ version: 0.51.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,47 +39,47 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.10'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '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
- version: '10.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: '10.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
- version: '3.0'
68
+ version: '10.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: '3.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: '0'
82
+ version: '3.0'
83
83
  description: |2
84
84
  Thread-safety checks via static analysis.
85
85
  A plugin for the RuboCop code style enforcing & linting tool.
@@ -94,6 +94,7 @@ files:
94
94
  - ".rubocop.yml"
95
95
  - ".travis.yml"
96
96
  - Gemfile
97
+ - LICENSE.txt
97
98
  - README.md
98
99
  - Rakefile
99
100
  - bin/console
@@ -105,7 +106,8 @@ files:
105
106
  - lib/rubocop/thread_safety/version.rb
106
107
  - rubocop-thread_safety.gemspec
107
108
  homepage: https://github.com/covermymeds/rubocop-thread_safety
108
- licenses: []
109
+ licenses:
110
+ - MIT
109
111
  metadata: {}
110
112
  post_install_message:
111
113
  rdoc_options: []