coconductor 0.10.0 → 0.10.1

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
  SHA256:
3
- metadata.gz: 03e268467a41069c7e787e1ea18aa23a58f3cf8d438b79defb9d95e416095f8b
4
- data.tar.gz: a3730a78e0c79cc1e8b4d2d4bb7b6b636c7d77153e0dfc9d7658d384bddd77b1
3
+ metadata.gz: f2f164d3139954a092f0e47c1a7d3ed25988927d1dc6c789c0c87906a370500c
4
+ data.tar.gz: ee301805000f620f4def3f84aea18302154aefb2bad3a43d162adf159b4832ac
5
5
  SHA512:
6
- metadata.gz: 80ece2e69625918a459678cf3fc27df8695a33039b68a5bc077e03570ab5ec85501cf8f2b840659d913356aa38fdb56565446a7dedef5df4e2709c46c5ef6876
7
- data.tar.gz: ce605883c10f7179ad46f52f34b359d8f3b1d106a4016faf56ec56b5455ea911ce9c60b542bd660b4e7cbff5d53122dd09908eecc6054221d65070b1964d2767
6
+ metadata.gz: 94d375ee6d990acd446063a34e93d28cbd93843e76d30b571f435af1eb8e2925bf9c0e7f6fe554499200eed3fba2425b505842f343afc5c99bea9983a071afb7
7
+ data.tar.gz: caebc5d1f2743c2c08710a2c5d88bf7798c1307ee51144ba6b08add09adf0f806c9fbabaf15d1e6c1c68630926808b02e3045f1d082efe70b8a89a87276d2ec1
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2020-09-01 14:38:06 UTC using RuboCop version 0.90.0.
3
+ # on 2021-03-02 20:51:18 UTC using RuboCop version 1.11.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
@@ -14,10 +14,38 @@ Gemspec/RequiredRubyVersion:
14
14
  - 'coconductor.gemspec'
15
15
 
16
16
  # Offense count: 1
17
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
17
+ Lint/NoReturnInBeginEndBlocks:
18
+ Exclude:
19
+ - 'lib/coconductor/field.rb'
20
+
21
+ # Offense count: 1
22
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
18
23
  Metrics/MethodLength:
19
24
  Max: 11
20
25
 
26
+ # Offense count: 7
27
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
28
+ # SupportedStyles: snake_case, normalcase, non_integer
29
+ # AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
30
+ Naming/VariableNumber:
31
+ Exclude:
32
+ - 'spec/coconductor/matchers/dice_spec.rb'
33
+ - 'spec/coconductor/matchers/exact_spec.rb'
34
+ - 'spec/coconductor/project_files/code_of_conduct_file_spec.rb'
35
+ - 'spec/coconductor/project_files/project_file_spec.rb'
36
+ - 'spec/coconductor/project_spec.rb'
37
+ - 'spec/coconductor_spec.rb'
38
+ - 'spec/integration_spec.rb'
39
+
40
+ # Offense count: 4
41
+ # Configuration parameters: MinSize.
42
+ Performance/CollectionLiteralInLoop:
43
+ Exclude:
44
+ - 'spec/coconductor/code_of_conduct_spec.rb'
45
+ - 'spec/coconductor/field_spec.rb'
46
+ - 'spec/coconductor/matchers/field_aware_spec.rb'
47
+ - 'spec/vendored_coc_spec.rb'
48
+
21
49
  # Offense count: 21
22
50
  # Configuration parameters: Prefixes.
23
51
  # Prefixes: when, with, without
@@ -34,6 +62,7 @@ RSpec/ContextWording:
34
62
  - 'spec/integration_spec.rb'
35
63
 
36
64
  # Offense count: 3
65
+ # Configuration parameters: IgnoredMetadata.
37
66
  RSpec/DescribeClass:
38
67
  Exclude:
39
68
  - 'spec/coconductor/bin_spec.rb'
@@ -89,3 +118,15 @@ RSpec/ScatteredSetup:
89
118
  RSpec/SubjectStub:
90
119
  Exclude:
91
120
  - 'spec/coconductor/project_files/project_file_spec.rb'
121
+
122
+ # Offense count: 1
123
+ Security/Open:
124
+ Exclude:
125
+ - 'lib/coconductor/vendorer.rb'
126
+
127
+ # Offense count: 1
128
+ # Cop supports --auto-correct.
129
+ # Configuration parameters: Methods.
130
+ Style/RedundantArgument:
131
+ Exclude:
132
+ - 'spec/coconductor/project_files/project_file_spec.rb'
data/coconductor.gemspec CHANGED
@@ -29,13 +29,13 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency 'thor', '>= 0.18', '< 2.0'
30
30
  spec.add_dependency 'toml', '~> 0.2'
31
31
 
32
- spec.add_development_dependency 'bundler', '~> 1.16'
32
+ spec.add_development_dependency 'gem-release', '~> 2.0'
33
33
  spec.add_development_dependency 'pry', '~> 0.10'
34
34
  spec.add_development_dependency 'reverse_markdown', '~> 1.1'
35
35
  spec.add_development_dependency 'rspec', '~> 3.0'
36
- spec.add_development_dependency 'rubocop', '~> 0.50'
37
- spec.add_development_dependency('rubocop-performance', '~> 1.5')
38
- spec.add_development_dependency('rubocop-rspec', '~> 1.36')
36
+ spec.add_development_dependency 'rubocop', '~> 1.0'
37
+ spec.add_development_dependency 'rubocop-performance', '~> 1.5'
38
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.0'
39
39
  spec.add_development_dependency 'twitter-text', '< 2.0'
40
40
  spec.add_development_dependency 'webmock', '~> 3.1'
41
41
  spec.add_development_dependency 'wikicloth', '~> 0.8'
data/lib/coconductor.rb CHANGED
@@ -26,12 +26,12 @@ module Coconductor
26
26
 
27
27
  def project(path, **args)
28
28
  if %r{\Ahttps://github.com}.match?(path)
29
- Coconductor::Projects::GitHubProject.new(path, args)
29
+ Coconductor::Projects::GitHubProject.new(path, **args)
30
30
  else
31
- Coconductor::Projects::GitProject.new(path, args)
31
+ Coconductor::Projects::GitProject.new(path, **args)
32
32
  end
33
33
  rescue Coconductor::Projects::GitProject::InvalidRepository
34
- Coconductor::Projects::FSProject.new(path, args)
34
+ Coconductor::Projects::FSProject.new(path, **args)
35
35
  end
36
36
 
37
37
  def confidence_threshold
@@ -4,6 +4,7 @@ require 'toml'
4
4
 
5
5
  module Coconductor
6
6
  class InvalidCodeOfConduct < ArgumentError; end
7
+
7
8
  class CodeOfConduct
8
9
  class << self
9
10
  def all
@@ -13,7 +13,7 @@ module Coconductor
13
13
  FILENAME_REGEX = /#{BASENAME_REGEX}#{LANG_REGEX}#{EXT_REGEX}?/i.freeze
14
14
 
15
15
  def self.name_score(filename)
16
- /\A#{FILENAME_REGEX}/.match?(filename) ? 1.0 : 0.0
16
+ /\A#{FILENAME_REGEX}/o.match?(filename) ? 1.0 : 0.0
17
17
  end
18
18
 
19
19
  def possible_matchers
@@ -115,7 +115,7 @@ module Coconductor
115
115
  end
116
116
 
117
117
  def normalize_implicit_fields(content)
118
- content.gsub!(/#{UPPERCASE_WORD_REGEX} #{UPPERCASE_WORD_REGEX}/) do |m|
118
+ content.gsub!(/#{UPPERCASE_WORD_REGEX} #{UPPERCASE_WORD_REGEX}/o) do |m|
119
119
  m.tr(' ', '_')
120
120
  end
121
121
  content.gsub(UNMARKED_FIELD_REGEX) { |m| "[#{m}]" }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coconductor
4
- VERSION = '0.10.0'
4
+ VERSION = '0.10.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coconductor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-01 00:00:00.000000000 Z
11
+ date: 2021-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: licensee
@@ -65,19 +65,19 @@ dependencies:
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0.2'
67
67
  - !ruby/object:Gem::Dependency
68
- name: bundler
68
+ name: gem-release
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '1.16'
73
+ version: '2.0'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '1.16'
80
+ version: '2.0'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: pry
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -126,14 +126,14 @@ dependencies:
126
126
  requirements:
127
127
  - - "~>"
128
128
  - !ruby/object:Gem::Version
129
- version: '0.50'
129
+ version: '1.0'
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
134
  - - "~>"
135
135
  - !ruby/object:Gem::Version
136
- version: '0.50'
136
+ version: '1.0'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: rubocop-performance
139
139
  requirement: !ruby/object:Gem::Requirement
@@ -154,14 +154,14 @@ dependencies:
154
154
  requirements:
155
155
  - - "~>"
156
156
  - !ruby/object:Gem::Version
157
- version: '1.36'
157
+ version: '2.0'
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: '1.36'
164
+ version: '2.0'
165
165
  - !ruby/object:Gem::Dependency
166
166
  name: twitter-text
167
167
  requirement: !ruby/object:Gem::Requirement
@@ -345,7 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
345
  - !ruby/object:Gem::Version
346
346
  version: '0'
347
347
  requirements: []
348
- rubygems_version: 3.1.4
348
+ rubygems_version: 3.2.12
349
349
  signing_key:
350
350
  specification_version: 4
351
351
  summary: work-in-progress code of conduct detector based off Licensee