gemsmith 14.2.0 → 14.3.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: fec266e5af75d5e73a8406e702430fcbe4e9d007b4206a7f66822801edb6a0ef
4
- data.tar.gz: 7f96466a64fe9ea9c0dd29e9ac54e277ff2abd4a08f8c44e186934304285b277
3
+ metadata.gz: 63a99c876b27c76be06e5e76071e06d2a1a27674b7c2fd421bf18b3696bcf828
4
+ data.tar.gz: 15ed85ed55c1b14a00605f3dd784bfe772dc96326f9542de4fb14e649ff974bb
5
5
  SHA512:
6
- metadata.gz: 5c79e2e4f66f4f6f9c52d6e6ab142a56dbd70871324e5bb1fda2ac96ea36904863021e2ea0800aa90ec4a37ff44e507777c0394837741f671502750325dd2c9a
7
- data.tar.gz: 759ec8bd5cd230f47b564ae0b2cafe7e81d345c1d26353614ac4d38ddf3df4995a3cf8b19e28577a7a334b63eb475b3b0cf7ebdca8e831ebf544ac865853d2e4
6
+ metadata.gz: 5e495f24f288d108a189ae8c324a2cfcfa9c1f7af6a980fcb62cea275c00939659e52d7cdb0ddcab5aa376689c265b5f3574f5b863c48027c01459d5b4888f7f
7
+ data.tar.gz: 85f06a3fccbc33c6e55024bae11dfa70ce0738ea6d729efd737c5a71a1c1f01b0d775447d9f6a1032a81b2f03431f89983615e8b9095cc7ae5d973abf0d1b78a
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -32,7 +32,7 @@ toc::[]
32
32
  * Supports link:https://rspec.info[RSpec].
33
33
  * Supports link:https://github.com/rubocop-hq/rubocop[Rubocop].
34
34
  * Supports link:https://github.com/rubocop-hq/rubocop-rspec[Rubocop RSpec].
35
- * Supports link:http://rubyonrails.org[Ruby on Rails].
35
+ * Supports link:https://rubyonrails.org[Ruby on Rails].
36
36
  * Supports link:https://guides.rubygems.org/security[RubyGems Security].
37
37
  * Supports link:https://github.com/colszowka/simplecov[SimpleCov].
38
38
  * Supports link:https://github.com/erikhuda/thor[Thor].
@@ -55,7 +55,7 @@ image::https://www.alchemists.io/images/screencasts/gemsmith/cover-original.png[
55
55
  == Requirements
56
56
 
57
57
  . A UNIX-based system.
58
- . link:https://www.ruby-lang.org[Ruby 2.7.x].
58
+ . link:https://www.ruby-lang.org[Ruby].
59
59
  . link:https://rubygems.org[RubyGems].
60
60
  . link:https://github.com/bundler/bundler[Bundler].
61
61
 
@@ -140,14 +140,14 @@ rake build # Build example-0.1.0.gem package
140
140
  rake bundle:audit # Updates the ruby-advisory-db then runs bundle-audit
141
141
  rake clean # Clean gem artifacts
142
142
  rake code_quality # Run code quality checks
143
- rake git_cop # Run Git Cop
143
+ rake git_lint # Run Git Lint
144
144
  rake install # Install example-0.1.0.gem package
145
145
  rake publish # Build, tag as 0.1.0 (unsigned), and push example-0.1.0.gem to RubyGems
146
146
  rake reek # Check for code smells
147
147
  rake rubocop # Run RuboCop
148
148
  rake rubocop:auto_correct # Auto-correct RuboCop offenses
149
149
  rake spec # Run RSpec code examples
150
- rake toc # Update Table of Contents (README)
150
+ rake toc[label,includes] # Add/Update Table of Contents (README)
151
151
  ....
152
152
 
153
153
  _NOTE: Some tasks might differ depending on what options you enabled/disabled during gem
@@ -44,11 +44,11 @@ module Gemsmith
44
44
  end
45
45
 
46
46
  def allowed_push_key
47
- spec.metadata.fetch("allowed_push_key") { "rubygems_api_key" }
47
+ spec.metadata.fetch "allowed_push_key", "rubygems_api_key"
48
48
  end
49
49
 
50
50
  def allowed_push_host
51
- spec.metadata.fetch("allowed_push_host") { self.class.default_gem_host }
51
+ spec.metadata.fetch "allowed_push_host", self.class.default_gem_host
52
52
  end
53
53
 
54
54
  def package_file_name
@@ -5,10 +5,10 @@ module Gemsmith
5
5
  # Generates Bundler Audit support.
6
6
  class BundlerAudit < Base
7
7
  def run
8
- return unless configuration.dig :generate, :bundler_audit
8
+ return if configuration.dig :generate, :bundler_audit
9
9
 
10
- cli.uncomment_lines "#{gem_name}/Rakefile", %r(require.+bundler/audit.+)
11
- cli.uncomment_lines "#{gem_name}/Rakefile", /Bundler::Audit.+/
10
+ cli.gsub_file "#{gem_name}/Rakefile", %r(require.+bundler/audit.+\n), ""
11
+ cli.gsub_file "#{gem_name}/Rakefile", /Bundler::Audit.+\n/, ""
12
12
  end
13
13
  end
14
14
  end
@@ -5,9 +5,9 @@ module Gemsmith
5
5
  # Generates Git Lint support.
6
6
  class GitLint < Base
7
7
  def run
8
- return unless configuration.dig :generate, :git_lint
8
+ return if configuration.dig :generate, :git_lint
9
9
 
10
- cli.uncomment_lines "#{gem_name}/Rakefile", %r(require.+git/lint.+)
10
+ cli.gsub_file "#{gem_name}/Rakefile", %r(require.+git/lint.+\n), ""
11
11
  end
12
12
  end
13
13
  end
@@ -5,11 +5,12 @@ module Gemsmith
5
5
  # Generates Reek support.
6
6
  class Reek < Base
7
7
  def run
8
- return unless configuration.dig :generate, :reek
9
-
10
- cli.uncomment_lines "#{gem_name}/Rakefile", /require.+reek.+/
11
- cli.uncomment_lines "#{gem_name}/Rakefile", /Reek.+/
12
- template "%gem_name%/.reek.yml.tt"
8
+ if configuration.dig :generate, :reek
9
+ template "%gem_name%/.reek.yml.tt"
10
+ else
11
+ cli.gsub_file "#{gem_name}/Rakefile", /require.+reek.+\n/, ""
12
+ cli.gsub_file "#{gem_name}/Rakefile", /Reek.+\n/, ""
13
+ end
13
14
  end
14
15
  end
15
16
  end
@@ -5,17 +5,18 @@ module Gemsmith
5
5
  # Generates RSpec support.
6
6
  class Rspec < Base
7
7
  def run
8
- return unless configuration.dig :generate, :rspec
9
-
10
- uncomment_lines
11
- install_templates
8
+ if configuration.dig :generate, :rspec
9
+ install_templates
10
+ else
11
+ remove_rake_lines
12
+ end
12
13
  end
13
14
 
14
15
  private
15
16
 
16
- def uncomment_lines
17
- cli.uncomment_lines "#{gem_name}/Rakefile", /require.+rspec.+/
18
- cli.uncomment_lines "#{gem_name}/Rakefile", /RSpec.+/
17
+ def remove_rake_lines
18
+ cli.gsub_file "#{gem_name}/Rakefile", /require.+rspec.+\n/, ""
19
+ cli.gsub_file "#{gem_name}/Rakefile", /RSpec.+\n/, ""
19
20
  end
20
21
 
21
22
  def install_templates
@@ -5,12 +5,13 @@ module Gemsmith
5
5
  # Generates Rubocop support.
6
6
  class Rubocop < Base
7
7
  def run
8
- return unless configuration.dig :generate, :rubocop
9
-
10
- cli.uncomment_lines "#{gem_name}/Rakefile", /require.+rubocop.+/
11
- cli.uncomment_lines "#{gem_name}/Rakefile", /RuboCop.+/
12
- template "%gem_name%/.rubocop.yml.tt"
13
- cli.run "cd #{gem_name} && bundle exec rubocop --auto-correct > /dev/null"
8
+ if configuration.dig :generate, :rubocop
9
+ template "%gem_name%/.rubocop.yml.tt"
10
+ cli.run "cd #{gem_name} && bundle exec rubocop --auto-correct > /dev/null"
11
+ else
12
+ cli.gsub_file "#{gem_name}/Rakefile", /require.+rubocop.+\n/, ""
13
+ cli.gsub_file "#{gem_name}/Rakefile", /RuboCop.+\n/, ""
14
+ end
14
15
  end
15
16
  end
16
17
  end
@@ -5,7 +5,7 @@ module Gemsmith
5
5
  module Identity
6
6
  NAME = "gemsmith"
7
7
  LABEL = "Gemsmith"
8
- VERSION = "14.2.0"
8
+ VERSION = "14.3.0"
9
9
  VERSION_LABEL = "#{LABEL} #{VERSION}"
10
10
  URL = "https://www.alchemists.io/projects/gemsmith"
11
11
  end
@@ -1,12 +1,12 @@
1
1
  inherit_from:
2
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.8.0/configurations/rubocop/ruby.yml
3
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.8.0/configurations/rubocop/rake.yml
4
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.8.0/configurations/rubocop/performance.yml
2
+ - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.9.0/configurations/rubocop/ruby.yml
3
+ - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.9.0/configurations/rubocop/rake.yml
4
+ - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.9.0/configurations/rubocop/performance.yml
5
5
  <%- if config.dig(:generate, :rspec) -%>
6
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.8.0/configurations/rubocop/rspec.yml
6
+ - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.9.0/configurations/rubocop/rspec.yml
7
7
  <%- end -%>
8
8
  <%- if config.dig(:generate, :engine) -%>
9
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.8.0/configurations/rubocop/rails.yml
9
+ - https://raw.githubusercontent.com/bkuhlmann/code_quality/4.9.0/configurations/rubocop/rails.yml
10
10
  <%- end -%>
11
11
 
12
12
  <%- if config.dig(:generate, :cli) -%>
@@ -18,9 +18,9 @@
18
18
 
19
19
  ## Requirements
20
20
 
21
- 1. [Ruby <%= config.dig(:versions, :ruby) %>](https://www.ruby-lang.org)
21
+ 1. [Ruby](https://www.ruby-lang.org)
22
22
  <%- if config.dig(:generate, :engine) -%>
23
- 1. [Ruby on Rails](http://rubyonrails.org)
23
+ 1. [Ruby on Rails](https://rubyonrails.org)
24
24
  <%- end -%>
25
25
 
26
26
  ## Setup
@@ -84,7 +84,7 @@ Read [LICENSE](LICENSE.md) for details.
84
84
  ## History
85
85
 
86
86
  Read [CHANGES](CHANGES.md) for details.
87
- Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
87
+ Built with [Gemsmith](https://www.alchemists.io/projects/gemsmith).
88
88
 
89
89
  ## Credits
90
90
 
@@ -1,15 +1,11 @@
1
- begin
2
- require "gemsmith/rake/setup"
3
- # require "bundler/audit/task"
4
- # require "git/lint/rake/setup"
5
- # require "rspec/core/rake_task"
6
- # require "reek/rake/task"
7
- # require "rubocop/rake_task"
1
+ require "gemsmith/rake/setup"
2
+ require "bundler/audit/task"
3
+ require "git/lint/rake/setup"
4
+ require "rspec/core/rake_task"
5
+ require "reek/rake/task"
6
+ require "rubocop/rake_task"
8
7
 
9
- # Bundler::Audit::Task.new
10
- # RSpec::Core::RakeTask.new :spec
11
- # Reek::Rake::Task.new
12
- # RuboCop::RakeTask.new
13
- rescue LoadError => error
14
- puts error.message
15
- end
8
+ Bundler::Audit::Task.new
9
+ RSpec::Core::RakeTask.new :spec
10
+ Reek::Rake::Task.new
11
+ RuboCop::RakeTask.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemsmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.2.0
4
+ version: 14.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
29
29
  QWc=
30
30
  -----END CERTIFICATE-----
31
- date: 2020-06-13 00:00:00.000000000 Z
31
+ date: 2020-06-28 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: milestoner
metadata.gz.sig CHANGED
Binary file