rubysmith 4.4.0 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +26 -33
- data/lib/rubysmith/builder.rb +2 -2
- data/lib/rubysmith/builders/git/commit.rb +2 -3
- data/lib/rubysmith/builders/git_hub_ci.rb +1 -1
- data/lib/rubysmith/cli/actions/build.rb +2 -2
- data/lib/rubysmith/cli/actions/config.rb +2 -2
- data/lib/rubysmith/cli/parser.rb +2 -2
- data/lib/rubysmith/cli/parsers/build.rb +2 -4
- data/lib/rubysmith/cli/parsers/core.rb +2 -4
- data/lib/rubysmith/cli/shell.rb +4 -4
- data/lib/rubysmith/templates/%project_name%/.github/workflows/ci.yml.erb +8 -0
- data/lib/rubysmith/templates/%project_name%/Gemfile.erb +2 -2
- data/lib/rubysmith/templates/%project_name%/README.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/README.md.erb +1 -1
- data/rubysmith.gemspec +3 -3
- data.tar.gz.sig +0 -0
- metadata +5 -5
- 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: 52f3ea6bddbe214f6edc3e7046a1f92ffa0070b53501f3d4cd3aefb614a869b4
|
4
|
+
data.tar.gz: 83952342c372d2da1442ca7d1993318be8269421c92821ffd650beb380b0107f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e54fb5df14d2ff4d7ba7d61b25b638d7091454a66037e44bf156dc080c7260c1f3e1bb9cf3638cbc2fbf80367b63330270bd498c59fcd77e1854b46cc30e8853
|
7
|
+
data.tar.gz: ec274eb2cc469a5e5c5a0ed3f806252a9b63d1c394af46cba720fe969a20c0bc20508f6bf5eb27c0a68c3770ae1bf879c87317667a383803cedacd8a8e3ddfe6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
:gemsmith_link: link:https://
|
1
|
+
:gemsmith_link: link:https://alchemists.io/projects/gemsmith[Gemsmith]
|
2
|
+
:bundler_inline_link: link:https://alchemists.io/articles/ruby_bundler_inline[Bundler Inline]
|
2
3
|
|
3
4
|
:toc: macro
|
4
5
|
:toclevels: 5
|
@@ -9,32 +10,28 @@
|
|
9
10
|
Rubysmith is a command line interface for smithing Ruby projects.
|
10
11
|
|
11
12
|
This gem is useful in situations in which you need something more sophisticated than a
|
12
|
-
|
13
|
-
less than a {gemsmith_link} gem. Rubysmith is the foundation of Gemsmith and provides much of the
|
14
|
-
same functionality as Gemsmith but is solely tailored for pure Ruby projects. Again, this is a great
|
15
|
-
tool for spiking quick Ruby implementations, sharing code snippets with others, or building full
|
16
|
-
blown Ruby projects for collaboration with others.
|
13
|
+
{bundler_inline_link} script but less than a {gemsmith_link} gem. Rubysmith is the foundation of Gemsmith and provides much of the same functionality as Gemsmith but is solely tailored for pure Ruby projects. Again, this is a great tool for spiking quick Ruby implementations, sharing code snippets with others, or building full blown Ruby projects for collaboration with others.
|
17
14
|
|
18
15
|
toc::[]
|
19
16
|
|
20
17
|
== Features
|
21
18
|
|
22
19
|
* Builds a Ruby project skeleton for custom design and development.
|
23
|
-
* Uses link:https://
|
24
|
-
* Uses link:https://
|
20
|
+
* Uses link:https://alchemists.io/projects/runcom[Runcom] for resource configuration management.
|
21
|
+
* Uses link:https://alchemists.io/projects/pragmater[Pragmater] for Ruby source pragma directives.
|
25
22
|
* Supports link:https://github.com/amazing-print/amazing_print[Amazing Print].
|
26
|
-
* Supports link:https://
|
23
|
+
* Supports link:https://alchemists.io/projects/caliber[Caliber].
|
27
24
|
* Supports link:https://circleci.com[Circle CI].
|
28
25
|
* Supports link:https://orcid.org[Citations (ORCID)].
|
29
26
|
* Supports console script for local development.
|
30
27
|
* Supports link:https://github.com/ruby/debug[Debug].
|
31
28
|
* Supports link:https://git-scm.com[Git].
|
32
29
|
* Supports link:https://github.com[GitHub].
|
33
|
-
* Supports link:https://
|
30
|
+
* Supports link:https://alchemists.io/projects/git-lint[Git Lint].
|
34
31
|
* Supports link:https://github.com/guard/guard[Guard].
|
35
32
|
* Supports link:https://github.com/ruby/rake[Rake].
|
36
33
|
* Supports link:https://github.com/troessner/reek[Reek].
|
37
|
-
* Supports link:https://
|
34
|
+
* Supports link:https://alchemists.io/projects/refinements[Refinements].
|
38
35
|
* Supports link:https://rspec.info[RSpec].
|
39
36
|
* Supports setup script for project setup.
|
40
37
|
* Supports link:https://github.com/simplecov-ruby/simplecov[SimpleCov].
|
@@ -138,9 +135,7 @@ project with bare minimum of options. Example:
|
|
138
135
|
rubysmith --build demo --min
|
139
136
|
----
|
140
137
|
|
141
|
-
The above is essentially the same as building with _all_ options disabled. This is handy in
|
142
|
-
situations where you need to quickly script something up for sharing with others yet still want to
|
143
|
-
avoid using a Bundler Inline script so gem dependencies are not installed each time the code is run.
|
138
|
+
The above is essentially the same as building with _all_ options disabled. This is handy in situations where you need to quickly script something up for sharing with others yet still want to avoid using a {bundler_inline_link} script so gem dependencies are not installed each time the code is run.
|
144
139
|
|
145
140
|
As shown earlier, you can combine options but be aware that order matters. Take the following, for
|
146
141
|
example, where both minimum and maximum options are used in conjunction with other options:
|
@@ -171,7 +166,7 @@ format.
|
|
171
166
|
===== Caliber
|
172
167
|
|
173
168
|
The `--caliber` option allows you to build your project with the
|
174
|
-
link:https://
|
169
|
+
link:https://alchemists.io/projects/caliber[Caliber] gem so you have an immediate working -- and
|
175
170
|
high quality -- link:https://docs.rubocop.org/rubocop[RuboCop] configuration. Read the Caliber
|
176
171
|
documentation for further customization.
|
177
172
|
|
@@ -222,7 +217,7 @@ doesn't require use of the `--git_hub` option but is encouraged.
|
|
222
217
|
|
223
218
|
===== Git
|
224
219
|
|
225
|
-
The `--git` option allows you add link:https://git-scm.com[Git] repository support. Includes link:https://
|
220
|
+
The `--git` option allows you add link:https://git-scm.com[Git] repository support. Includes link:https://alchemists.io/screencasts/git_safe[Git Safe] functionality so you don't have to prefix commands with the `bin/` path prefix. Instead, you can call the command directly (assuming you have configured your link:https://alchemists.io/projects/dotfiles[Dotfiles] accordingly).
|
226
221
|
|
227
222
|
===== GitHub
|
228
223
|
|
@@ -235,7 +230,7 @@ The `--git_hub_ci` option allows you to build your project with link:https://doc
|
|
235
230
|
|
236
231
|
===== Git Lint
|
237
232
|
|
238
|
-
The `--git-lint` option allows you to add the link:https://
|
233
|
+
The `--git-lint` option allows you to add the link:https://alchemists.io/projects/git-lint[Git
|
239
234
|
Lint] gem to your project to ensure you are crafting your Git commits in a consistent and readable
|
240
235
|
manner.
|
241
236
|
|
@@ -255,9 +250,7 @@ to build a new project with all options enabled without having to pick and choos
|
|
255
250
|
|
256
251
|
===== Minimum
|
257
252
|
|
258
|
-
The `--min` option allows you to build your project with _all_ options _disabled_. This is a quick
|
259
|
-
way to build a new project with the bare minimum of support which is a one step above reaching for a
|
260
|
-
Bundler Inline script.
|
253
|
+
The `--min` option allows you to build your project with _all_ options _disabled_. This is a quick way to build a new project with the bare minimum of support which is a one step above reaching for a {bundler_inline_link} script.
|
261
254
|
|
262
255
|
===== Rake
|
263
256
|
|
@@ -276,7 +269,7 @@ project for code smell and code quality support.
|
|
276
269
|
===== Refinements
|
277
270
|
|
278
271
|
The `--refinements` option allows you to add the
|
279
|
-
link:https://
|
272
|
+
link:https://alchemists.io/projects/refinements[Refinements] gem to your project which enhances
|
280
273
|
Ruby core objects without monkey patching your code.
|
281
274
|
|
282
275
|
===== RSpec
|
@@ -325,7 +318,7 @@ rubysmith --publish 0.1.0
|
|
325
318
|
----
|
326
319
|
|
327
320
|
This will publish (tag) your `demo` project as `0.1.0` both locally and on your remote Git repository.
|
328
|
-
Rubysmith uses link:https://
|
321
|
+
Rubysmith uses link:https://alchemists.io/projects/milestoner[Milestoner] to handle publishing
|
329
322
|
of your project for you. You can use either but the convenience is built in for you.
|
330
323
|
|
331
324
|
=== Configuration
|
@@ -336,7 +329,7 @@ This gem can be configured via a global configuration:
|
|
336
329
|
$HOME/.config/rubysmith/configuration.yml
|
337
330
|
....
|
338
331
|
|
339
|
-
It can also be configured via link:https://
|
332
|
+
It can also be configured via link:https://alchemists.io/projects/xdg[XDG] environment
|
340
333
|
variables. The default configuration is as follows:
|
341
334
|
|
342
335
|
[source,yaml]
|
@@ -485,9 +478,9 @@ Extensions are additional tooling which can be configured specifically for Rubys
|
|
485
478
|
extensions are currently supported and will override each extensions global configuration should you
|
486
479
|
be using them individually for other purposes:
|
487
480
|
|
488
|
-
* link:https://
|
489
|
-
* link:https://
|
490
|
-
* link:https://
|
481
|
+
* link:https://alchemists.io/projects/milestoner[Milestoner]
|
482
|
+
* link:https://alchemists.io/projects/pragmater[Pragmater]
|
483
|
+
* link:https://alchemists.io/projects/tocer[Tocer]
|
491
484
|
|
492
485
|
Follow the above links to learn more about each extension's gem configuration.
|
493
486
|
|
@@ -559,19 +552,19 @@ To test, run:
|
|
559
552
|
bin/rake
|
560
553
|
----
|
561
554
|
|
562
|
-
== link:https://
|
555
|
+
== link:https://alchemists.io/policies/license[License]
|
563
556
|
|
564
|
-
== link:https://
|
557
|
+
== link:https://alchemists.io/policies/security[Security]
|
565
558
|
|
566
|
-
== link:https://
|
559
|
+
== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
|
567
560
|
|
568
|
-
== link:https://
|
561
|
+
== link:https://alchemists.io/policies/contributions[Contributions]
|
569
562
|
|
570
|
-
== link:https://
|
563
|
+
== link:https://alchemists.io/projects/rubysmith/versions[Versions]
|
571
564
|
|
572
|
-
== link:https://
|
565
|
+
== link:https://alchemists.io/community[Community]
|
573
566
|
|
574
567
|
== Credits
|
575
568
|
|
576
569
|
* Built with {gemsmith_link}.
|
577
|
-
* Engineered by link:https://
|
570
|
+
* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
data/lib/rubysmith/builder.rb
CHANGED
@@ -15,8 +15,8 @@ module Rubysmith
|
|
15
15
|
|
16
16
|
def self.call(...) = new(...)
|
17
17
|
|
18
|
-
def initialize
|
19
|
-
super(**
|
18
|
+
def initialize(configuration, helpers: HELPERS, **)
|
19
|
+
super(**)
|
20
20
|
@configuration = configuration
|
21
21
|
@helpers = helpers
|
22
22
|
end
|
@@ -9,9 +9,8 @@ module Rubysmith
|
|
9
9
|
|
10
10
|
def self.call(...) = new(...).call
|
11
11
|
|
12
|
-
def initialize
|
13
|
-
super(**
|
14
|
-
|
12
|
+
def initialize(configuration, builder: Builder, **)
|
13
|
+
super(**)
|
15
14
|
@configuration = configuration
|
16
15
|
@builder = builder
|
17
16
|
end
|
@@ -7,8 +7,8 @@ module Rubysmith
|
|
7
7
|
class Config
|
8
8
|
include Rubysmith::Import[:kernel, :logger]
|
9
9
|
|
10
|
-
def initialize
|
11
|
-
super(**
|
10
|
+
def initialize(client: Configuration::Loader::CLIENT, **)
|
11
|
+
super(**)
|
12
12
|
@client = client
|
13
13
|
end
|
14
14
|
|
data/lib/rubysmith/cli/parser.rb
CHANGED
@@ -12,8 +12,8 @@ module Rubysmith
|
|
12
12
|
CLIENT = OptionParser.new nil, 40, " "
|
13
13
|
SECTIONS = [Parsers::Core, Parsers::Build].freeze # Order is important.
|
14
14
|
|
15
|
-
def initialize
|
16
|
-
super(**
|
15
|
+
def initialize(sections: SECTIONS, client: CLIENT, **)
|
16
|
+
super(**)
|
17
17
|
@sections = sections
|
18
18
|
@client = client
|
19
19
|
@configuration_duplicate = configuration.dup
|
@@ -14,10 +14,8 @@ module Rubysmith
|
|
14
14
|
|
15
15
|
def self.call(...) = new(...).call
|
16
16
|
|
17
|
-
def initialize
|
18
|
-
|
19
|
-
**dependencies
|
20
|
-
super(**dependencies)
|
17
|
+
def initialize(configuration = Container[:configuration], client: Parser::CLIENT, **)
|
18
|
+
super(**)
|
21
19
|
@configuration = configuration
|
22
20
|
@client = client
|
23
21
|
end
|
@@ -14,10 +14,8 @@ module Rubysmith
|
|
14
14
|
|
15
15
|
def self.call(...) = new(...).call
|
16
16
|
|
17
|
-
def initialize
|
18
|
-
|
19
|
-
**dependencies
|
20
|
-
super(**dependencies)
|
17
|
+
def initialize(configuration = Container[:configuration], client: Parser::CLIENT, **)
|
18
|
+
super(**)
|
21
19
|
@configuration = configuration
|
22
20
|
@client = client
|
23
21
|
end
|
data/lib/rubysmith/cli/shell.rb
CHANGED
@@ -9,13 +9,13 @@ module Rubysmith
|
|
9
9
|
class Shell
|
10
10
|
include Actions::Import[:config, :build, :publish, :specification, :logger]
|
11
11
|
|
12
|
-
def initialize
|
13
|
-
super(**
|
12
|
+
def initialize(parser: Parser.new, **)
|
13
|
+
super(**)
|
14
14
|
@parser = parser
|
15
15
|
end
|
16
16
|
|
17
17
|
def call arguments = Core::EMPTY_ARRAY
|
18
|
-
|
18
|
+
act_on parser.call(arguments)
|
19
19
|
rescue OptionParser::ParseError, Milestoner::Error => error
|
20
20
|
logger.error { error.message }
|
21
21
|
end
|
@@ -24,7 +24,7 @@ module Rubysmith
|
|
24
24
|
|
25
25
|
attr_reader :parser
|
26
26
|
|
27
|
-
def
|
27
|
+
def act_on configuration
|
28
28
|
case configuration
|
29
29
|
in action_config: Symbol => action then config.call action
|
30
30
|
in action_build: true then build.call configuration
|
@@ -11,13 +11,13 @@ source "https://rubygems.org"
|
|
11
11
|
|
12
12
|
group :code_quality do
|
13
13
|
<% if configuration.build_caliber %>
|
14
|
-
gem "caliber", "~> 0.
|
14
|
+
gem "caliber", "~> 0.25"
|
15
15
|
<% end %>
|
16
16
|
<% if configuration.build_git && configuration.build_git_lint %>
|
17
17
|
gem "git-lint", "~> 5.0"
|
18
18
|
<% end %>
|
19
19
|
<% if configuration.build_reek %>
|
20
|
-
gem "reek", "~> 6.1"
|
20
|
+
gem "reek", "~> 6.1", require: false
|
21
21
|
<% end %>
|
22
22
|
<% if configuration.build_simple_cov %>
|
23
23
|
gem "simplecov", "~> 0.22", require: false
|
@@ -85,5 +85,5 @@ bin/rake
|
|
85
85
|
|
86
86
|
== Credits
|
87
87
|
|
88
|
-
* Built with link:https://
|
88
|
+
* Built with link:https://alchemists.io/projects/rubysmith[Rubysmith].
|
89
89
|
* Engineered by link:<%= configuration.author_url %>[<%= configuration.author_name %>].
|
@@ -72,5 +72,5 @@ To test, run:
|
|
72
72
|
|
73
73
|
## Credits
|
74
74
|
|
75
|
-
- Built with [Rubysmith](https://
|
75
|
+
- Built with [Rubysmith](https://alchemists.io/projects/rubysmith).
|
76
76
|
- Engineered by [<%= configuration.author_name %>](<%= configuration.author_url %>).
|
data/rubysmith.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "rubysmith"
|
5
|
-
spec.version = "4.
|
5
|
+
spec.version = "4.6.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://github.com/bkuhlmann/rubysmith"
|
@@ -11,8 +11,8 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.metadata = {
|
13
13
|
"bug_tracker_uri" => "https://github.com/bkuhlmann/rubysmith/issues",
|
14
|
-
"changelog_uri" => "https://
|
15
|
-
"documentation_uri" => "https://
|
14
|
+
"changelog_uri" => "https://alchemists.io/projects/rubysmith/versions",
|
15
|
+
"documentation_uri" => "https://alchemists.io/projects/rubysmith",
|
16
16
|
"funding_uri" => "https://github.com/sponsors/bkuhlmann",
|
17
17
|
"label" => "Rubysmith",
|
18
18
|
"rubygems_mfa_required" => "true",
|
data.tar.gz.sig
CHANGED
Binary file
|
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: 4.
|
4
|
+
version: 4.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
|
29
29
|
RFE=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2023-
|
31
|
+
date: 2023-02-19 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: cogger
|
@@ -331,8 +331,8 @@ licenses:
|
|
331
331
|
- Hippocratic-2.1
|
332
332
|
metadata:
|
333
333
|
bug_tracker_uri: https://github.com/bkuhlmann/rubysmith/issues
|
334
|
-
changelog_uri: https://
|
335
|
-
documentation_uri: https://
|
334
|
+
changelog_uri: https://alchemists.io/projects/rubysmith/versions
|
335
|
+
documentation_uri: https://alchemists.io/projects/rubysmith
|
336
336
|
funding_uri: https://github.com/sponsors/bkuhlmann
|
337
337
|
label: Rubysmith
|
338
338
|
rubygems_mfa_required: 'true'
|
@@ -352,7 +352,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
352
352
|
- !ruby/object:Gem::Version
|
353
353
|
version: '0'
|
354
354
|
requirements: []
|
355
|
-
rubygems_version: 3.4.
|
355
|
+
rubygems_version: 3.4.7
|
356
356
|
signing_key:
|
357
357
|
specification_version: 4
|
358
358
|
summary: A command line interface for smithing Ruby projects.
|
metadata.gz.sig
CHANGED
Binary file
|