rubocop-extension-generator 0.2.3 → 0.5.0

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: 493a33fb15b6f6a243d2341c7e2a481c13a5c0e2d52e9b565a5b395747cc8906
4
- data.tar.gz: 941e29fef38cd1ef2dd9a088e1decadeb80517afbb0b48007bb96c254c976bc1
3
+ metadata.gz: 22dc9c349f7159ec86a9a0dfd23518e2ee021ef11ed1c131d4059104874e98cb
4
+ data.tar.gz: c7b743785f75beb3300319e556332dcd80daff60951cbbe4542c0932fb156df7
5
5
  SHA512:
6
- metadata.gz: c58446442375acabe73542045e9a85340802261cfd4cfce0326c628c195b9be7df7b5c940e9ad129f1f888f3e94911dccf64ca2dfb7364245305158f70153860
7
- data.tar.gz: ebbcdab4a7048d35d17072c39f2d2ed05046c1cf36e17f5d48271074585a4447177e8097c3cc4a84df64430fd24e077c0e4ab2d79aa43c6a38178ef3e0fb1aec
6
+ metadata.gz: 181566fe35ac83b94a044c154b75c2759624c7adc3c3fce7e8d9c52b8826afc23f61a7924b90e3b693085de6dc2ad97ed7f9ca59ed179b7e6855a47ffbc4f1c4
7
+ data.tar.gz: 9f253b5f7c85fb4674ce13a035741e27ee1b5111a395bd4c811a164d44d3fbd967e56d862dea9586ad65b9109a8c14bcfbfc4071e8886cd3b340b5538fcb8262
data/CHANGELOG.md CHANGED
@@ -1,30 +1,42 @@
1
1
  # master (unreleased)
2
2
 
3
- # v0.2.3
3
+ ## v0.5.0
4
4
 
5
- * [#7](https://github.com/rubocop-hq/rubocop-extension-generator/pull/7): Improve CLI
5
+ * [#16](https://github.com/rubocop/rubocop-extension-generator/pull/16): Fix CLI error caused by bundler newer than v2.3.9.
6
6
 
7
- # v0.2.2
7
+ ## v0.4.0
8
8
 
9
- * [#5](https://github.com/rubocop-hq/rubocop-extension-generator/pull/5): Add `require: false` to sample code in README
9
+ * [#13](https://github.com/rubocop/rubocop-extension-generator/pull/13): Fix an `ArgumentError` when RuboCop 1.22.0 or higher.
10
10
 
11
- # v0.2.1
11
+ ## v0.3.0
12
12
 
13
- * [#4](https://github.com/rubocop-hq/rubocop-extension-generator/pull/4): Exclude main lib file from Naming/FileName cop
13
+ * [#8](https://github.com/rubocop/rubocop-extension-generator/pull/8): Enable to work "Exclude" in AllCops section.
14
14
 
15
- # v0.2.0
15
+ ## v0.2.3
16
16
 
17
- * Rename `custom_cops_generator` to `rubocop-extension-generator`
17
+ * [#7](https://github.com/rubocop/rubocop-extension-generator/pull/7): Improve CLI.
18
18
 
19
- # v0.1.2
19
+ ## v0.2.2
20
20
 
21
- * Fix bugs
21
+ * [#5](https://github.com/rubocop/rubocop-extension-generator/pull/5): Add `require: false` to sample code in README.
22
+
23
+ ## v0.2.1
24
+
25
+ * [#4](https://github.com/rubocop/rubocop-extension-generator/pull/4): Exclude main lib file from Naming/FileName cop.
26
+
27
+ ## v0.2.0
28
+
29
+ * Rename `custom_cops_generator` to `rubocop-extension-generator`.
30
+
31
+ ## v0.1.2
32
+
33
+ * Fix bugs.
22
34
  * This release is the first release that works actually.
23
35
 
24
- # v0.1.1
36
+ ## v0.1.1
25
37
 
26
38
  * Specify MIT License in gemspec.
27
39
 
28
- # v0.1.0
40
+ ## v0.1.0
29
41
 
30
42
  * The initial release.
data/README.md CHANGED
@@ -66,5 +66,5 @@ You can execute a smoke test with `ruby smoke/smoke.rb`. Check it is success bef
66
66
 
67
67
  ## Contributing
68
68
 
69
- Bug reports and pull requests are welcome on GitHub at https://github.com/rubocop-hq/rubocop-extension-generator.
69
+ Bug reports and pull requests are welcome on GitHub at https://github.com/rubocop/rubocop-extension-generator.
70
70
 
@@ -26,8 +26,8 @@ module RuboCop
26
26
  put "lib/#{dirname}/inject.rb", <<~RUBY
27
27
  # frozen_string_literal: true
28
28
 
29
- # The original code is from https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
30
- # See https://github.com/rubocop-hq/rubocop-rspec/blob/master/MIT-LICENSE.md
29
+ # The original code is from https://github.com/rubocop/rubocop-rspec/blob/master/lib/rubocop/rspec/inject.rb
30
+ # See https://github.com/rubocop/rubocop-rspec/blob/master/MIT-LICENSE.md
31
31
  module RuboCop
32
32
  module #{classname}
33
33
  # Because RuboCop doesn't yet support plugins, we have to monkey patch in a
@@ -36,7 +36,7 @@ module RuboCop
36
36
  def self.defaults!
37
37
  path = CONFIG_DEFAULT.to_s
38
38
  hash = ConfigLoader.send(:load_yaml_configuration, path)
39
- config = Config.new(hash, path)
39
+ config = Config.new(hash, path).tap(&:make_excludes_absolute)
40
40
  puts "configuration from \#{path}" if ConfigLoader.debug?
41
41
  config = ConfigLoader.merge_with_default(config, path)
42
42
  ConfigLoader.instance_variable_set(:@default_configuration, config)
@@ -122,10 +122,7 @@ module RuboCop
122
122
  exit!
123
123
  end
124
124
 
125
- github_user = `git config github.user`.chop
126
- github_user = 'your_id' if github_user.empty?
127
-
128
- generator = RuboCop::Cop::Generator.new(cop_name, github_user)
125
+ generator = RuboCop::Cop::Generator.new(cop_name)
129
126
 
130
127
  generator.write_source
131
128
  generator.write_spec
@@ -140,7 +137,11 @@ module RuboCop
140
137
  gem 'rspec'
141
138
  RUBY
142
139
 
143
- patch 'README.md', /^gem '#{name}'$/, "gem '#{name}', require: false"
140
+ if Gem::Version.new(Bundler::VERSION) >= Gem::Version.new('2.3.9')
141
+ patch 'README.md', /\$ bundle add #{name}$/, "\$ bundle add #{name} --require=false"
142
+ else
143
+ patch 'README.md', /^gem '#{name}'$/, "gem '#{name}', require: false"
144
+ end
144
145
 
145
146
  puts
146
147
  puts <<~MESSAGE
@@ -1,7 +1,7 @@
1
1
  module RuboCop
2
2
  module Extension
3
3
  module Generator
4
- VERSION = "0.2.3"
4
+ VERSION = "0.5.0"
5
5
  end
6
6
  end
7
7
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
 
9
9
  spec.summary = %q{A generator of RuboCop's custom cops gem}
10
10
  spec.description = %q{A generator of RuboCop's custom cops gem}
11
- spec.homepage = "https://github.com/rubocop-hq/rubocop-extension-generator"
11
+ spec.homepage = "https://github.com/rubocop/rubocop-extension-generator"
12
12
  spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
13
13
  spec.licenses = ['MIT']
14
14
 
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
+ spec.add_runtime_dependency 'rubocop', '>= 1.22.0'
30
31
  spec.add_runtime_dependency 'bundler'
31
32
  spec.add_runtime_dependency 'activesupport'
32
33
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-extension-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masataka Pocke Kuwabara
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-23 00:00:00.000000000 Z
11
+ date: 2022-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rubocop
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.22.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.22.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -61,14 +75,14 @@ files:
61
75
  - lib/rubocop/extension/generator/version.rb
62
76
  - rubocop-extension-generator.gemspec
63
77
  - smoke/smoke.rb
64
- homepage: https://github.com/rubocop-hq/rubocop-extension-generator
78
+ homepage: https://github.com/rubocop/rubocop-extension-generator
65
79
  licenses:
66
80
  - MIT
67
81
  metadata:
68
82
  allowed_push_host: https://rubygems.org
69
- homepage_uri: https://github.com/rubocop-hq/rubocop-extension-generator
70
- source_code_uri: https://github.com/rubocop-hq/rubocop-extension-generator
71
- post_install_message:
83
+ homepage_uri: https://github.com/rubocop/rubocop-extension-generator
84
+ source_code_uri: https://github.com/rubocop/rubocop-extension-generator
85
+ post_install_message:
72
86
  rdoc_options: []
73
87
  require_paths:
74
88
  - lib
@@ -83,8 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
97
  - !ruby/object:Gem::Version
84
98
  version: '0'
85
99
  requirements: []
86
- rubygems_version: 3.1.2
87
- signing_key:
100
+ rubygems_version: 3.2.13
101
+ signing_key:
88
102
  specification_version: 4
89
103
  summary: A generator of RuboCop's custom cops gem
90
104
  test_files: []