gemsmith 14.2.0 → 14.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.adoc +4 -4
- data/lib/gemsmith/gem/specification.rb +2 -2
- data/lib/gemsmith/generators/bundler_audit.rb +3 -3
- data/lib/gemsmith/generators/git_lint.rb +2 -2
- data/lib/gemsmith/generators/reek.rb +6 -5
- data/lib/gemsmith/generators/rspec.rb +8 -7
- data/lib/gemsmith/generators/rubocop.rb +7 -6
- data/lib/gemsmith/identity.rb +1 -1
- data/lib/gemsmith/templates/%gem_name%/.rubocop.yml.tt +5 -5
- data/lib/gemsmith/templates/%gem_name%/README.md.tt +3 -3
- data/lib/gemsmith/templates/%gem_name%/Rakefile.tt +10 -14
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63a99c876b27c76be06e5e76071e06d2a1a27674b7c2fd421bf18b3696bcf828
|
4
|
+
data.tar.gz: 15ed85ed55c1b14a00605f3dd784bfe772dc96326f9542de4fb14e649ff974bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e495f24f288d108a189ae8c324a2cfcfa9c1f7af6a980fcb62cea275c00939659e52d7cdb0ddcab5aa376689c265b5f3574f5b863c48027c01459d5b4888f7f
|
7
|
+
data.tar.gz: 85f06a3fccbc33c6e55024bae11dfa70ce0738ea6d729efd737c5a71a1c1f01b0d775447d9f6a1032a81b2f03431f89983615e8b9095cc7ae5d973abf0d1b78a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -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:
|
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
|
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
|
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
|
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
|
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
|
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
|
8
|
+
return if configuration.dig :generate, :bundler_audit
|
9
9
|
|
10
|
-
cli.
|
11
|
-
cli.
|
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
|
8
|
+
return if configuration.dig :generate, :git_lint
|
9
9
|
|
10
|
-
cli.
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
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
|
17
|
-
cli.
|
18
|
-
cli.
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
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
|
data/lib/gemsmith/identity.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
inherit_from:
|
2
|
-
- https://raw.githubusercontent.com/bkuhlmann/code_quality/4.
|
3
|
-
- https://raw.githubusercontent.com/bkuhlmann/code_quality/4.
|
4
|
-
- https://raw.githubusercontent.com/bkuhlmann/code_quality/4.
|
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.
|
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.
|
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
|
21
|
+
1. [Ruby](https://www.ruby-lang.org)
|
22
22
|
<%- if config.dig(:generate, :engine) -%>
|
23
|
-
1. [Ruby on Rails](
|
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://
|
87
|
+
Built with [Gemsmith](https://www.alchemists.io/projects/gemsmith).
|
88
88
|
|
89
89
|
## Credits
|
90
90
|
|
@@ -1,15 +1,11 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
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.
|
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-
|
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
|