rubysmith 0.4.0 → 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: 3f26a8d32fbd2172d174fa4faa42e3bc0b9b9db4cd2a1bede0a21fb17ed739d8
4
- data.tar.gz: 8facf0b55bbb1d1ad2dca6dace2f6215cc6542c8d5607b53c22cd2033fbe97c8
3
+ metadata.gz: dbfa61773bde7189ba8d0dec9afe63668e816f133fca51c30ca842e385725374
4
+ data.tar.gz: cdc26262659c4d509445a4b0bda9354ff7de9ba5b444efdb6ddc218b44302cb3
5
5
  SHA512:
6
- metadata.gz: 85df43159567c5a73f4327e93c2827d91af240c7f2e49d00bd9d7dd456ccde62123b43a1fd8000e28b678174fdc5896f19f10e11b9cda687e5bebf79763d3d4a
7
- data.tar.gz: 3db01bff2d7363005812753d3bdda181ca2a44ba47d889aaef6dc75135d45b1f09584f1396d648c69788980fa8ee87518844eba5b0c419d99334a32943f278ea
6
+ metadata.gz: 6b3eabb2cb6dfc9e05f255b0258638a5e299911c8250d2f36f97d33748c1e021050a26295b473d35c7d2bbef7aed3b010423b606f4e4c1821c6e14f326f97c7d
7
+ data.tar.gz: '028679978997133b526267f6835a5cad6ef76c6a87e8976d3a0012f843fb3ae8565751fcbff35ee4b2f1dbb81c6b216bec95807cd9fecb00fa4cb088ccc3a72a'
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
@@ -16,7 +16,7 @@ module Rubysmith
16
16
  def call
17
17
  return unless realm.build_documentation
18
18
 
19
- private_methods.grep(/render_/).each(&method(:__send__))
19
+ private_methods.grep(/render_/).each { |method| __send__ method }
20
20
  end
21
21
 
22
22
  private
@@ -9,6 +9,7 @@
9
9
  :license: "mit"
10
10
  :build:
11
11
  :bundler_audit: true
12
+ :bundler_leak: true
12
13
  :console: true
13
14
  :documentation: true
14
15
  :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(&method(:__send__))
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
- private_methods.grep(/add_/).each(&method(:__send__))
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",
@@ -35,7 +35,7 @@ module Rubysmith
35
35
  end
36
36
 
37
37
  def call options
38
- Realm[**options].then(&method(:process))
38
+ Realm[**options].then { |realm| process realm }
39
39
  end
40
40
 
41
41
  private
@@ -4,7 +4,7 @@ module Rubysmith
4
4
  module Identity
5
5
  NAME = "rubysmith"
6
6
  LABEL = "Rubysmith"
7
- VERSION = "0.4.0"
7
+ VERSION = "0.5.0"
8
8
  VERSION_LABEL = "#{LABEL} #{VERSION}"
9
9
  SUMMARY = "A command line interface for smithing Ruby projects."
10
10
  end
@@ -18,6 +18,7 @@ module Rubysmith
18
18
  documentation_license
19
19
  build_minimum
20
20
  build_bundler_audit
21
+ build_bundler_leak
21
22
  build_console
22
23
  build_documentation
23
24
  build_git
@@ -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(&method(:require))
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.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-15 00:00:00.000000000 Z
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.14'
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.14'
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
- ^WBƃ��I���J�\5HH!�(ZXYH`Htk��*��4܀�ra��6���Z]��2U7z�0��6!x��`���}�'���L��(�|����a@fY(��ep��,qvӢ�2de4g`�k N"��>���O�������,���v���@�3� j)���@#;YFW
1
+ 33��p��6RC&��gm5 !uϜ�� ���IG����ɢ��+~�������G�wiżN;e Tp\����+���MК�����Sp�[��c�C��oK��c* ~��FZq�fiA���Yp�^Ǣ��n%l����pwVLHdO_ѵoC S������B�`��Ք�}��cKk�<��L�E�?�����?�O�T)��v�شȋ�i{Ev�չ�{�[�1�k�R��n!�����xAz��v