rubysmith 0.4.0 → 0.5.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 +7 -4
- data/lib/rubysmith/builders/documentation.rb +1 -1
- data/lib/rubysmith/cli/defaults.yml +1 -0
- data/lib/rubysmith/cli/parsers/build.rb +8 -1
- data/lib/rubysmith/cli/parsers/core.rb +5 -1
- data/lib/rubysmith/cli/processors/build.rb +1 -1
- data/lib/rubysmith/identity.rb +1 -1
- data/lib/rubysmith/realm.rb +1 -0
- data/lib/rubysmith/templates/%project_name%/Gemfile.erb +3 -0
- data/lib/rubysmith/templates/%project_name%/Rakefile.erb +7 -1
- data/lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb +2 -1
- metadata +4 -4
- metadata.gz.sig +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbfa61773bde7189ba8d0dec9afe63668e816f133fca51c30ca842e385725374
|
4
|
+
data.tar.gz: cdc26262659c4d509445a4b0bda9354ff7de9ba5b444efdb6ddc218b44302cb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b3eabb2cb6dfc9e05f255b0258638a5e299911c8250d2f36f97d33748c1e021050a26295b473d35c7d2bbef7aed3b010423b606f4e4c1821c6e14f326f97c7d
|
7
|
+
data.tar.gz: '028679978997133b526267f6835a5cad6ef76c6a87e8976d3a0012f843fb3ae8565751fcbff35ee4b2f1dbb81c6b216bec95807cd9fecb00fa4cb088ccc3a72a'
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -27,6 +27,7 @@ toc::[]
|
|
27
27
|
* Uses link:https://www.alchemists.io/projects/runcom[Runcom] for resource configuration management.
|
28
28
|
* Uses link:https://www.alchemists.io/projects/pragmater[Pragmater] for Ruby source pragma directives.
|
29
29
|
* Supports link:https://github.com/rubysec/bundler-audit[Bundler Audit].
|
30
|
+
* Supports link:https://github.com/rubymem/bundler-leak[Bundler Leak].
|
30
31
|
* Supports link:https://git-scm.com[Git].
|
31
32
|
* Supports link:https://www.alchemists.io/projects/git-lint[Git Lint].
|
32
33
|
* Supports link:https://github.com/guard/guard[Guard].
|
@@ -73,12 +74,16 @@ From the command line, type: `rubysmith --help`
|
|
73
74
|
|
74
75
|
....
|
75
76
|
USAGE:
|
77
|
+
-b, --build NAME [options] Build new project.
|
76
78
|
-v, --version Show gem version.
|
77
79
|
-h, --help Show this message.
|
78
80
|
-c, --config ACTION Manage gem configuration: edit or view.
|
79
|
-
-b, --build NAME [options] Build new project.
|
80
81
|
|
81
82
|
BUILD OPTIONS:
|
83
|
+
--[no-]bundler-audit Add Bundler Audit.
|
84
|
+
--[no-]bundler-leak Add Bundler Leak.
|
85
|
+
--[no-]console Add console script.
|
86
|
+
--[no-]documentation Add documentation.
|
82
87
|
--[no-]git Add Git.
|
83
88
|
--[no-]git-lint Add Git Lint.
|
84
89
|
--[no-]guard Add Guard.
|
@@ -89,9 +94,6 @@ BUILD OPTIONS:
|
|
89
94
|
--[no-]setup Add setup script.
|
90
95
|
--[no-]simple_cov Add SimpleCov.
|
91
96
|
--min Use minimum/no options.
|
92
|
-
--[no-]bundler-audit Add Bundler Audit.
|
93
|
-
--[no-]console Add console script.
|
94
|
-
--[no-]documentation Add documentation.
|
95
97
|
....
|
96
98
|
|
97
99
|
=== Building
|
@@ -152,6 +154,7 @@ The default configuration is as follows:
|
|
152
154
|
:license: "mit"
|
153
155
|
:build:
|
154
156
|
:bundler_audit: true
|
157
|
+
:bundler_leak: true
|
155
158
|
:console: true
|
156
159
|
:documentation: true
|
157
160
|
:git: true
|
@@ -4,6 +4,7 @@ module Rubysmith
|
|
4
4
|
module CLI
|
5
5
|
module Parsers
|
6
6
|
# Handles parsing of Command Line Interface (CLI) build options.
|
7
|
+
# :reek:TooManyMethods
|
7
8
|
class Build
|
8
9
|
def self.call client:, options:
|
9
10
|
new(client: client, options: options).call
|
@@ -16,7 +17,7 @@ module Rubysmith
|
|
16
17
|
|
17
18
|
def call arguments = []
|
18
19
|
client.separator "\nBUILD OPTIONS:\n"
|
19
|
-
private_methods.grep(/add_/).each
|
20
|
+
private_methods.grep(/add_/).each { |method| __send__ method }
|
20
21
|
arguments.empty? ? arguments : client.parse!(arguments)
|
21
22
|
end
|
22
23
|
|
@@ -36,6 +37,12 @@ module Rubysmith
|
|
36
37
|
end
|
37
38
|
end
|
38
39
|
|
40
|
+
def add_bundler_leak
|
41
|
+
client.on "--[no-]bundler-leak", "Add Bundler Leak." do |value|
|
42
|
+
options[:build_bundler_leak] = value
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
39
46
|
def add_console
|
40
47
|
client.on "--[no-]console", "Add console script." do |value|
|
41
48
|
options[:build_console] = value
|
@@ -19,7 +19,7 @@ module Rubysmith
|
|
19
19
|
def call arguments = []
|
20
20
|
client.banner = "#{Identity::LABEL} - #{Identity::SUMMARY}"
|
21
21
|
client.separator "\nUSAGE:\n"
|
22
|
-
|
22
|
+
collate
|
23
23
|
arguments.empty? ? arguments : client.parse!(arguments)
|
24
24
|
end
|
25
25
|
|
@@ -27,6 +27,10 @@ module Rubysmith
|
|
27
27
|
|
28
28
|
attr_reader :client, :options
|
29
29
|
|
30
|
+
def collate
|
31
|
+
private_methods.grep(/add_/).each { |method| __send__ method }
|
32
|
+
end
|
33
|
+
|
30
34
|
def add_config
|
31
35
|
client.on "-c",
|
32
36
|
"--config ACTION",
|
data/lib/rubysmith/identity.rb
CHANGED
data/lib/rubysmith/realm.rb
CHANGED
@@ -5,6 +5,9 @@ source "https://rubygems.org"
|
|
5
5
|
<% if realm.build_bundler_audit %>
|
6
6
|
gem "bundler-audit", "~> 0.7"
|
7
7
|
<% end %>
|
8
|
+
<% if realm.build_bundler_leak %>
|
9
|
+
gem "bundler-leak", "~> 0.2"
|
10
|
+
<% end %>
|
8
11
|
<% if realm.build_git && realm.build_git_lint %>
|
9
12
|
gem "git-lint", "~> 1.3"
|
10
13
|
<% end %>
|
@@ -1,6 +1,9 @@
|
|
1
1
|
<% if realm.build_bundler_audit %>
|
2
2
|
require "bundler/audit/task"
|
3
3
|
<% end %>
|
4
|
+
<% if realm.build_bundler_leak %>
|
5
|
+
require "bundler/plumber/task"
|
6
|
+
<% end %>
|
4
7
|
<% if realm.build_git && realm.build_git_lint %>
|
5
8
|
require "git/lint/rake/setup"
|
6
9
|
<% end %>
|
@@ -17,6 +20,9 @@
|
|
17
20
|
<% if realm.build_bundler_audit %>
|
18
21
|
Bundler::Audit::Task.new
|
19
22
|
<% end %>
|
23
|
+
<% if realm.build_bundler_leak %>
|
24
|
+
Bundler::Plumber::Task.new
|
25
|
+
<% end %>
|
20
26
|
<% if realm.build_reek %>
|
21
27
|
Reek::Rake::Task.new
|
22
28
|
<% end %>
|
@@ -28,6 +34,6 @@
|
|
28
34
|
<% end %>
|
29
35
|
|
30
36
|
desc "Run code quality checks"
|
31
|
-
task code_quality: %i[<% if realm.build_bundler_audit %>bundle:audit<% end %> <% if realm.build_git && realm.build_git_lint %>git_lint<% end %> <% if realm.build_reek %>reek<% end %> <% if realm.build_rubocop %>rubocop<% end %>]
|
37
|
+
task code_quality: %i[<% if realm.build_bundler_audit %>bundle:audit<% end %> <% if realm.build_bundler_leak %>bundle:leak<% end %> <% if realm.build_git && realm.build_git_lint %>git_lint<% end %> <% if realm.build_reek %>reek<% end %> <% if realm.build_rubocop %>rubocop<% end %>]
|
32
38
|
|
33
39
|
task default: %i[code_quality <% if realm.build_rspec %>spec<% end %>]
|
@@ -9,8 +9,9 @@ require "bundler/setup"
|
|
9
9
|
require "pry"
|
10
10
|
require "pry-byebug"
|
11
11
|
<% end %>
|
12
|
+
require "<%= realm.project_name %>"
|
12
13
|
|
13
|
-
Dir[File.join(__dir__, "support", "shared_contexts", "**/*.rb")].sort.each
|
14
|
+
Dir[File.join(__dir__, "support", "shared_contexts", "**/*.rb")].sort.each { |path| require path }
|
14
15
|
|
15
16
|
RSpec.configure do |config|
|
16
17
|
config.color = true
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.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-11-
|
31
|
+
date: 2020-11-21 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: pragmater
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '7.
|
53
|
+
version: '7.15'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '7.
|
60
|
+
version: '7.15'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rubocop
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
�33��p��6RC&��gm5!uϜ�� ���IG����ɢ��+~�������G�wiżN;e� T�p\����+���MК�����Sp�[��c�C��oK��c*~��FZq�fiA���Yp�^Ǣ��n%l����pwVLHd�O�_ѵoCS������B�`��Ք�}��cK�k�<��L�E�?�����?�O�T)��v�شȋ�i{�Ev�չ�{�[�1�k�R��n!�����xAz��v
|