rubysmith 0.1.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 +68 -33
- data/lib/rubysmith/builders/bundler.rb +4 -1
- data/lib/rubysmith/builders/core.rb +0 -2
- data/lib/rubysmith/builders/documentation.rb +4 -2
- data/lib/rubysmith/builders/rubocop.rb +4 -5
- data/lib/rubysmith/cli/defaults.yml +2 -0
- data/lib/rubysmith/cli/parsers/build.rb +17 -4
- data/lib/rubysmith/cli/parsers/core.rb +6 -2
- data/lib/rubysmith/cli/processors/build.rb +27 -20
- data/lib/rubysmith/cli/shell.rb +8 -4
- data/lib/rubysmith/identity.rb +1 -1
- data/lib/rubysmith/realm.rb +2 -0
- data/lib/rubysmith/templates/%project_name%/Gemfile.erb +36 -31
- data/lib/rubysmith/templates/%project_name%/README.adoc.erb +8 -3
- data/lib/rubysmith/templates/%project_name%/README.md.erb +7 -3
- data/lib/rubysmith/templates/%project_name%/Rakefile.erb +7 -1
- data/lib/rubysmith/templates/%project_name%/lib/%project_name%.rb.erb +0 -1
- data/lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb +2 -1
- metadata +33 -20
- metadata.gz.sig +0 -0
- data/lib/rubysmith/templates/%project_name%/lib/%project_name%/identity.rb.erb +0 -8
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
@@ -6,10 +6,17 @@
|
|
6
6
|
|
7
7
|
[link=http://badge.fury.io/rb/rubysmith]
|
8
8
|
image::https://badge.fury.io/rb/rubysmith.svg[Gem Version]
|
9
|
+
[link=https://www.alchemists.io/projects/code_quality]
|
10
|
+
image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
|
9
11
|
[link=https://circleci.com/gh/bkuhlmann/rubysmith]
|
10
12
|
image::https://circleci.com/gh/bkuhlmann/rubysmith.svg?style=svg[Circle CI Status]
|
11
13
|
|
12
|
-
|
14
|
+
Rubysmith is a command line interface for smithing Ruby projects.
|
15
|
+
|
16
|
+
This gem is useful in situations in which you need something more sophisticated than a
|
17
|
+
link:https://bundler.io/guides/bundler_in_a_single_file_ruby_script.html[Bundler Inline] script but
|
18
|
+
less complicated than a Ruby Gem as provided by
|
19
|
+
link:https://www.alchemists.io/projects/gemsmith[Gemsmith].
|
13
20
|
|
14
21
|
toc::[]
|
15
22
|
|
@@ -20,7 +27,8 @@ toc::[]
|
|
20
27
|
* Uses link:https://www.alchemists.io/projects/runcom[Runcom] for resource configuration management.
|
21
28
|
* Uses link:https://www.alchemists.io/projects/pragmater[Pragmater] for Ruby source pragma directives.
|
22
29
|
* Supports link:https://github.com/rubysec/bundler-audit[Bundler Audit].
|
23
|
-
* Supports link:https://
|
30
|
+
* Supports link:https://github.com/rubymem/bundler-leak[Bundler Leak].
|
31
|
+
* Supports link:https://git-scm.com[Git].
|
24
32
|
* Supports link:https://www.alchemists.io/projects/git-lint[Git Lint].
|
25
33
|
* Supports link:https://github.com/guard/guard[Guard].
|
26
34
|
* Supports link:http://pryrepl.org[Pry].
|
@@ -37,10 +45,10 @@ toc::[]
|
|
37
45
|
** CODE OF CONDUCT
|
38
46
|
** LICENSE
|
39
47
|
|
40
|
-
== Screencasts
|
48
|
+
// == Screencasts
|
41
49
|
|
42
|
-
[link=https://www.alchemists.io/screencasts/rubysmith]
|
43
|
-
image::https://www.alchemists.io/images/screencasts/rubysmith/cover.svg[Screencast,600,240,role=focal_point]
|
50
|
+
// [link=https://www.alchemists.io/screencasts/rubysmith]
|
51
|
+
// image::https://www.alchemists.io/images/screencasts/rubysmith/cover.svg[Screencast,600,240,role=focal_point]
|
44
52
|
|
45
53
|
== Requirements
|
46
54
|
|
@@ -51,8 +59,6 @@ image::https://www.alchemists.io/images/screencasts/rubysmith/cover.svg[Screenca
|
|
51
59
|
|
52
60
|
== Setup
|
53
61
|
|
54
|
-
=== Production
|
55
|
-
|
56
62
|
To install, run:
|
57
63
|
|
58
64
|
[source,bash]
|
@@ -60,24 +66,6 @@ To install, run:
|
|
60
66
|
gem install rubysmith
|
61
67
|
----
|
62
68
|
|
63
|
-
=== Development
|
64
|
-
|
65
|
-
To contribute, run:
|
66
|
-
|
67
|
-
[source,bash]
|
68
|
-
----
|
69
|
-
git clone https://github.com/bkuhlmann/rubysmith.git
|
70
|
-
cd rubysmith
|
71
|
-
bin/setup
|
72
|
-
----
|
73
|
-
|
74
|
-
You can also use the IRB console for direct access to all objects:
|
75
|
-
|
76
|
-
[source,bash]
|
77
|
-
----
|
78
|
-
bin/console
|
79
|
-
----
|
80
|
-
|
81
69
|
== Usage
|
82
70
|
|
83
71
|
=== Command Line Interface (CLI)
|
@@ -86,26 +74,62 @@ From the command line, type: `rubysmith --help`
|
|
86
74
|
|
87
75
|
....
|
88
76
|
USAGE:
|
77
|
+
-b, --build NAME [options] Build new project.
|
89
78
|
-v, --version Show gem version.
|
90
79
|
-h, --help Show this message.
|
91
80
|
-c, --config ACTION Manage gem configuration: edit or view.
|
92
|
-
-b, --build NAME [options] Build new gem.
|
93
81
|
|
94
82
|
BUILD OPTIONS:
|
95
83
|
--[no-]bundler-audit Add Bundler Audit.
|
96
|
-
--[no-]
|
97
|
-
--[no-]
|
84
|
+
--[no-]bundler-leak Add Bundler Leak.
|
85
|
+
--[no-]console Add console script.
|
86
|
+
--[no-]documentation Add documentation.
|
98
87
|
--[no-]git Add Git.
|
99
88
|
--[no-]git-lint Add Git Lint.
|
100
89
|
--[no-]guard Add Guard.
|
101
|
-
--[no-]reek Add Reek.
|
102
90
|
--[no-]pry Add Pry.
|
103
|
-
--[no-]
|
91
|
+
--[no-]reek Add Reek.
|
104
92
|
--[no-]rspec Add RSpec.
|
93
|
+
--[no-]rubocop Add Rubocop.
|
94
|
+
--[no-]setup Add setup script.
|
105
95
|
--[no-]simple_cov Add SimpleCov.
|
106
|
-
--
|
96
|
+
--min Use minimum/no options.
|
107
97
|
....
|
108
98
|
|
99
|
+
=== Building
|
100
|
+
|
101
|
+
The core functionality of this gem centers around the `--build` command with optional customization
|
102
|
+
provided via build options. By default, all build options are enabled. Example:
|
103
|
+
|
104
|
+
[source,bash]
|
105
|
+
----
|
106
|
+
rubysmith --build demo
|
107
|
+
----
|
108
|
+
|
109
|
+
Running the above will generate a new `demo` Ruby project with all options enabled. Should you wish
|
110
|
+
to disable specific options, you can use the `--no-*` prefix. Example:
|
111
|
+
|
112
|
+
[source,bash]
|
113
|
+
----
|
114
|
+
rubysmith --build demo --no-pry --no-guard
|
115
|
+
----
|
116
|
+
|
117
|
+
With the above example, both Pry and Guard support would have been disabled when building the `demo`
|
118
|
+
project. Taking this a step further, you can also use the `--min` option to generate a project with
|
119
|
+
bare minimum of options. Example:
|
120
|
+
|
121
|
+
[source,bash]
|
122
|
+
----
|
123
|
+
rubysmith --build demo --min
|
124
|
+
----
|
125
|
+
|
126
|
+
The above is essentially the same as building with _all_ options disabled. This is handy in
|
127
|
+
situations where you need to quickly script something up for sharing with others yet still want to
|
128
|
+
avoid using a Bundler Inline script so gem dependencies are not installed each time the code is run.
|
129
|
+
|
130
|
+
To have specific options enabled/disabled _every time_ you build a new Ruby project, you can edit
|
131
|
+
your global configuration for making these settings permanent (see below for details).
|
132
|
+
|
109
133
|
=== Configuration
|
110
134
|
|
111
135
|
This gem can be configured via a global configuration:
|
@@ -130,11 +154,13 @@ The default configuration is as follows:
|
|
130
154
|
:license: "mit"
|
131
155
|
:build:
|
132
156
|
:bundler_audit: true
|
157
|
+
:bundler_leak: true
|
133
158
|
:console: true
|
134
159
|
:documentation: true
|
135
160
|
:git: true
|
136
161
|
:git_lint: true
|
137
162
|
:guard: true
|
163
|
+
:minimum: false
|
138
164
|
:pry: true
|
139
165
|
:reek: true
|
140
166
|
:rspec: true
|
@@ -158,9 +184,18 @@ The default configuration is as follows:
|
|
158
184
|
Feel free to take this default configuration, modify, and save as your own custom
|
159
185
|
`configuration.yml`.
|
160
186
|
|
161
|
-
|
187
|
+
== Development
|
188
|
+
|
189
|
+
To contribute, run:
|
190
|
+
|
191
|
+
[source,bash]
|
192
|
+
----
|
193
|
+
git clone https://github.com/bkuhlmann/rubysmith.git
|
194
|
+
cd rubysmith
|
195
|
+
bin/setup
|
196
|
+
----
|
162
197
|
|
163
|
-
|
198
|
+
You can also use the IRB console for direct access to all objects:
|
164
199
|
|
165
200
|
[source,bash]
|
166
201
|
----
|
@@ -20,8 +20,11 @@ module Rubysmith
|
|
20
20
|
def call
|
21
21
|
builder.call(realm.with(template_path: "%project_name%/Gemfile.erb"))
|
22
22
|
.render
|
23
|
-
.replace(
|
23
|
+
.replace(/\n\s*group/, "\n\ngroup")
|
24
24
|
.replace(/\n\s*gem/, "\n gem")
|
25
|
+
.replace(/\s{4}\n/, "")
|
26
|
+
.replace(" end", "end")
|
27
|
+
.replace(/\n{1,}\Z/, "\n")
|
25
28
|
Dir.chdir(realm.project_root) { runner.start %w[install --quiet] }
|
26
29
|
nil
|
27
30
|
end
|
@@ -14,8 +14,6 @@ module Rubysmith
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def call
|
17
|
-
builder.call(realm.with(template_path: "%project_name%/lib/%project_name%/identity.rb.erb"))
|
18
|
-
.render
|
19
17
|
builder.call(realm.with(template_path: "%project_name%/lib/%project_name%.rb.erb")).render
|
20
18
|
builder.call(realm.with(template_path: "%project_name%/.ruby-version.erb")).render
|
21
19
|
nil
|
@@ -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
|
19
|
+
private_methods.grep(/render_/).each { |method| __send__ method }
|
20
20
|
end
|
21
21
|
|
22
22
|
private
|
@@ -45,7 +45,9 @@ module Rubysmith
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def render_readme
|
48
|
-
builder.call(realm.with(template_path: "%project_name%/README.#{kind}.erb"))
|
48
|
+
builder.call(realm.with(template_path: "%project_name%/README.#{kind}.erb"))
|
49
|
+
.render
|
50
|
+
.replace("\n\n\n", "\n\n")
|
49
51
|
end
|
50
52
|
|
51
53
|
def kind
|
@@ -1,12 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "rubocop"
|
4
|
-
require "
|
4
|
+
require "refinements/ios"
|
5
5
|
|
6
6
|
module Rubysmith
|
7
7
|
module Builders
|
8
8
|
# Builds project skeleton Rubocop code quality support.
|
9
9
|
class Rubocop
|
10
|
+
using Refinements::IOs
|
11
|
+
|
10
12
|
def self.call realm, builder: Builder
|
11
13
|
new(realm, builder: builder).call
|
12
14
|
end
|
@@ -33,10 +35,7 @@ module Rubysmith
|
|
33
35
|
attr_reader :realm, :builder, :runner
|
34
36
|
|
35
37
|
def auto_correct
|
36
|
-
|
37
|
-
$stdout = StringIO.new
|
38
|
-
runner.run ["--auto-correct", "--format", "quiet", realm.project_root.to_s]
|
39
|
-
$stdout = backup
|
38
|
+
STDOUT.squelch { runner.run ["--auto-correct", realm.project_root.to_s] }
|
40
39
|
end
|
41
40
|
end
|
42
41
|
end
|
@@ -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
|
|
@@ -24,20 +25,32 @@ module Rubysmith
|
|
24
25
|
|
25
26
|
attr_reader :client, :options
|
26
27
|
|
28
|
+
def add_minimum
|
29
|
+
client.on "--min", "Use minimum/no options." do |value|
|
30
|
+
options[:build_minimum] = value
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
27
34
|
def add_bundler_audit
|
28
35
|
client.on "--[no-]bundler-audit", "Add Bundler Audit." do |value|
|
29
36
|
options[:build_bundler_audit] = value
|
30
37
|
end
|
31
38
|
end
|
32
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
|
+
|
33
46
|
def add_console
|
34
|
-
client.on "--[no-]console", "Add console
|
47
|
+
client.on "--[no-]console", "Add console script." do |value|
|
35
48
|
options[:build_console] = value
|
36
49
|
end
|
37
50
|
end
|
38
51
|
|
39
52
|
def add_documentation
|
40
|
-
client.on "--[no-]documentation", "Add
|
53
|
+
client.on "--[no-]documentation", "Add documentation." do |value|
|
41
54
|
options[:build_documentation] = value
|
42
55
|
end
|
43
56
|
end
|
@@ -85,7 +98,7 @@ module Rubysmith
|
|
85
98
|
end
|
86
99
|
|
87
100
|
def add_setup
|
88
|
-
client.on "--[no-]setup", "Add setup
|
101
|
+
client.on "--[no-]setup", "Add setup script." do |value|
|
89
102
|
options[:build_setup] = value
|
90
103
|
end
|
91
104
|
end
|
@@ -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",
|
@@ -37,7 +41,7 @@ module Rubysmith
|
|
37
41
|
end
|
38
42
|
|
39
43
|
def add_build
|
40
|
-
client.on "-b", "--build NAME [options]", "Build new
|
44
|
+
client.on "-b", "--build NAME [options]", "Build new project." do |value|
|
41
45
|
options[:build] = value
|
42
46
|
end
|
43
47
|
end
|
@@ -3,32 +3,39 @@
|
|
3
3
|
module Rubysmith
|
4
4
|
module CLI
|
5
5
|
module Processors
|
6
|
-
# Order is important.
|
7
|
-
BUILDERS = [
|
8
|
-
Builders::Core,
|
9
|
-
Builders::Documentation,
|
10
|
-
Builders::Git::Setup,
|
11
|
-
Builders::Bundler,
|
12
|
-
Builders::Rake,
|
13
|
-
Builders::Console,
|
14
|
-
Builders::Setup,
|
15
|
-
Builders::Guard,
|
16
|
-
Builders::Reek,
|
17
|
-
Builders::RSpec::Context,
|
18
|
-
Builders::RSpec::Helper,
|
19
|
-
Builders::Pragma,
|
20
|
-
Builders::Rubocop,
|
21
|
-
Builders::Git::Commit
|
22
|
-
].freeze
|
23
|
-
|
24
6
|
# Handles the Command Line Interface (CLI) for building of a project skeleton.
|
25
7
|
class Build
|
26
|
-
|
8
|
+
# Order is important.
|
9
|
+
MINIMUM = [
|
10
|
+
Builders::Core,
|
11
|
+
Builders::Bundler,
|
12
|
+
Builders::Pragma
|
13
|
+
].freeze
|
14
|
+
|
15
|
+
# Order is important.
|
16
|
+
MAXIMUM = [
|
17
|
+
Builders::Core,
|
18
|
+
Builders::Documentation,
|
19
|
+
Builders::Git::Setup,
|
20
|
+
Builders::Bundler,
|
21
|
+
Builders::Rake,
|
22
|
+
Builders::Console,
|
23
|
+
Builders::Setup,
|
24
|
+
Builders::Guard,
|
25
|
+
Builders::Reek,
|
26
|
+
Builders::RSpec::Context,
|
27
|
+
Builders::RSpec::Helper,
|
28
|
+
Builders::Pragma,
|
29
|
+
Builders::Rubocop,
|
30
|
+
Builders::Git::Commit
|
31
|
+
].freeze
|
32
|
+
|
33
|
+
def initialize builders: MAXIMUM
|
27
34
|
@builders = builders
|
28
35
|
end
|
29
36
|
|
30
37
|
def call options
|
31
|
-
Realm[**options].then
|
38
|
+
Realm[**options].then { |realm| process realm }
|
32
39
|
end
|
33
40
|
|
34
41
|
private
|
data/lib/rubysmith/cli/shell.rb
CHANGED
@@ -11,7 +11,8 @@ module Rubysmith
|
|
11
11
|
|
12
12
|
PROCESSORS = {
|
13
13
|
config: Processors::Config.new,
|
14
|
-
|
14
|
+
build_minimum: Processors::Build.new(builders: Processors::Build::MINIMUM),
|
15
|
+
build_maximum: Processors::Build.new
|
15
16
|
}.freeze
|
16
17
|
|
17
18
|
def initialize parser: Parsers::Assembler.new, processors: PROCESSORS
|
@@ -22,13 +23,16 @@ module Rubysmith
|
|
22
23
|
def call arguments = []
|
23
24
|
parse arguments
|
24
25
|
|
26
|
+
# rubocop:disable Style/MethodCallWithArgsParentheses
|
25
27
|
case options
|
26
28
|
in config: action, **remainder then config action
|
27
|
-
in
|
29
|
+
in build_minimum: true, **remainder then build(:build_minimum, options)
|
30
|
+
in build:, **remainder then build(:build_maximum, options)
|
28
31
|
in version:, **remainder then puts version
|
29
32
|
in help:, **remainder then usage
|
30
33
|
else usage
|
31
34
|
end
|
35
|
+
# rubocop:enable Style/MethodCallWithArgsParentheses
|
32
36
|
end
|
33
37
|
|
34
38
|
private
|
@@ -45,8 +49,8 @@ module Rubysmith
|
|
45
49
|
processors.fetch(__method__).call action
|
46
50
|
end
|
47
51
|
|
48
|
-
def build settings
|
49
|
-
processors.fetch(
|
52
|
+
def build kind, settings
|
53
|
+
processors.fetch(kind).call settings.rekey(build: :project_name).merge(now: Time.now)
|
50
54
|
end
|
51
55
|
|
52
56
|
def options
|
data/lib/rubysmith/identity.rb
CHANGED
data/lib/rubysmith/realm.rb
CHANGED
@@ -1,33 +1,38 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
3
|
+
<% unless realm.build_minimum %>
|
4
|
+
group :development do
|
5
|
+
<% if realm.build_bundler_audit %>
|
6
|
+
gem "bundler-audit", "~> 0.7"
|
7
|
+
<% end %>
|
8
|
+
<% if realm.build_bundler_leak %>
|
9
|
+
gem "bundler-leak", "~> 0.2"
|
10
|
+
<% end %>
|
11
|
+
<% if realm.build_git && realm.build_git_lint %>
|
12
|
+
gem "git-lint", "~> 1.3"
|
13
|
+
<% end %>
|
14
|
+
<% if realm.build_guard %>
|
15
|
+
gem "guard-rspec", "~> 4.7"
|
16
|
+
<% end %>
|
17
|
+
<% if realm.build_pry %>
|
18
|
+
gem "pry", "~> 0.13"
|
19
|
+
gem "pry-byebug", "~> 3.9"
|
20
|
+
<% end %>
|
21
|
+
gem "rake", "~> 13.0"
|
22
|
+
<% if realm.build_reek %>
|
23
|
+
gem "reek", "~> 6.0"
|
24
|
+
<% end %>
|
25
|
+
<% if realm.build_rspec %>
|
26
|
+
gem "rspec", "~> 3.10"
|
27
|
+
<% end %>
|
28
|
+
<% if realm.build_rubocop %>
|
29
|
+
gem "rubocop", "~> 1.3"
|
30
|
+
gem "rubocop-performance", "~> 1.8"
|
31
|
+
gem "rubocop-rake", "~> 0.5"
|
32
|
+
gem "rubocop-rspec", "~> 2.0"
|
33
|
+
<% end %>
|
34
|
+
<% if realm.build_simple_cov %>
|
35
|
+
gem "simplecov", "~> 0.19"
|
36
|
+
<% end %>
|
37
|
+
end
|
38
|
+
<% end %>
|
@@ -4,6 +4,11 @@
|
|
4
4
|
|
5
5
|
= <%= realm.project_label %>
|
6
6
|
|
7
|
+
<% if realm.build_rubocop %>
|
8
|
+
[link=https://www.alchemists.io/projects/code_quality]
|
9
|
+
image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
|
10
|
+
<% end %>
|
11
|
+
|
7
12
|
toc::[]
|
8
13
|
|
9
14
|
== Features
|
@@ -26,11 +31,11 @@ bin/setup
|
|
26
31
|
<% end %>
|
27
32
|
|
28
33
|
== Usage
|
29
|
-
<% if realm.build_console %>
|
30
34
|
|
31
|
-
|
35
|
+
== Development
|
36
|
+
<% if realm.build_console %>
|
32
37
|
|
33
|
-
|
38
|
+
You can also use the IRB console for direct access to all objects:
|
34
39
|
|
35
40
|
[source,bash]
|
36
41
|
----
|
@@ -1,5 +1,9 @@
|
|
1
1
|
# <%= realm.project_label %>
|
2
2
|
|
3
|
+
<% if realm.build_rubocop %>
|
4
|
+
[](https://www.alchemists.io/projects/code_quality)
|
5
|
+
<% end %>
|
6
|
+
|
3
7
|
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
4
8
|
<!-- Tocer[finish]: Auto-generated, don't remove. -->
|
5
9
|
|
@@ -20,11 +24,11 @@ To set up the project, run:
|
|
20
24
|
<% end %>
|
21
25
|
|
22
26
|
## Usage
|
23
|
-
<% if realm.build_console %>
|
24
27
|
|
25
|
-
|
28
|
+
## Development
|
29
|
+
<% if realm.build_console %>
|
26
30
|
|
27
|
-
|
31
|
+
You can also use the IRB console for direct access to all objects:
|
28
32
|
|
29
33
|
bin/console
|
30
34
|
<% 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 %>]
|
@@ -1 +0,0 @@
|
|
1
|
-
require "<%= realm.project_name %>/identity"
|
@@ -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-
|
31
|
+
date: 2020-11-21 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: pragmater
|
@@ -36,56 +36,56 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '8.
|
39
|
+
version: '8.1'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '8.
|
46
|
+
version: '8.1'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: refinements
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
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
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '1.3'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '1.3'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: runcom
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '6.
|
81
|
+
version: '6.4'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '6.
|
88
|
+
version: '6.4'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: bundler-audit
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,34 +100,48 @@ dependencies:
|
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '0.7'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: bundler-leak
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0.2'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0.2'
|
103
117
|
- !ruby/object:Gem::Dependency
|
104
118
|
name: gemsmith
|
105
119
|
requirement: !ruby/object:Gem::Requirement
|
106
120
|
requirements:
|
107
121
|
- - "~>"
|
108
122
|
- !ruby/object:Gem::Version
|
109
|
-
version: '14.
|
123
|
+
version: '14.8'
|
110
124
|
type: :development
|
111
125
|
prerelease: false
|
112
126
|
version_requirements: !ruby/object:Gem::Requirement
|
113
127
|
requirements:
|
114
128
|
- - "~>"
|
115
129
|
- !ruby/object:Gem::Version
|
116
|
-
version: '14.
|
130
|
+
version: '14.8'
|
117
131
|
- !ruby/object:Gem::Dependency
|
118
132
|
name: git-lint
|
119
133
|
requirement: !ruby/object:Gem::Requirement
|
120
134
|
requirements:
|
121
135
|
- - "~>"
|
122
136
|
- !ruby/object:Gem::Version
|
123
|
-
version: '1.
|
137
|
+
version: '1.3'
|
124
138
|
type: :development
|
125
139
|
prerelease: false
|
126
140
|
version_requirements: !ruby/object:Gem::Requirement
|
127
141
|
requirements:
|
128
142
|
- - "~>"
|
129
143
|
- !ruby/object:Gem::Version
|
130
|
-
version: '1.
|
144
|
+
version: '1.3'
|
131
145
|
- !ruby/object:Gem::Dependency
|
132
146
|
name: guard-rspec
|
133
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,14 +218,14 @@ dependencies:
|
|
204
218
|
requirements:
|
205
219
|
- - "~>"
|
206
220
|
- !ruby/object:Gem::Version
|
207
|
-
version: '3.
|
221
|
+
version: '3.10'
|
208
222
|
type: :development
|
209
223
|
prerelease: false
|
210
224
|
version_requirements: !ruby/object:Gem::Requirement
|
211
225
|
requirements:
|
212
226
|
- - "~>"
|
213
227
|
- !ruby/object:Gem::Version
|
214
|
-
version: '3.
|
228
|
+
version: '3.10'
|
215
229
|
- !ruby/object:Gem::Dependency
|
216
230
|
name: rubocop-performance
|
217
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -246,14 +260,14 @@ dependencies:
|
|
246
260
|
requirements:
|
247
261
|
- - "~>"
|
248
262
|
- !ruby/object:Gem::Version
|
249
|
-
version: '
|
263
|
+
version: '2.0'
|
250
264
|
type: :development
|
251
265
|
prerelease: false
|
252
266
|
version_requirements: !ruby/object:Gem::Requirement
|
253
267
|
requirements:
|
254
268
|
- - "~>"
|
255
269
|
- !ruby/object:Gem::Version
|
256
|
-
version: '
|
270
|
+
version: '2.0'
|
257
271
|
- !ruby/object:Gem::Dependency
|
258
272
|
name: simplecov
|
259
273
|
requirement: !ruby/object:Gem::Requirement
|
@@ -333,13 +347,12 @@ files:
|
|
333
347
|
- lib/rubysmith/templates/%project_name%/bin/rubocop.erb
|
334
348
|
- lib/rubysmith/templates/%project_name%/bin/setup.erb
|
335
349
|
- lib/rubysmith/templates/%project_name%/lib/%project_name%.rb.erb
|
336
|
-
- lib/rubysmith/templates/%project_name%/lib/%project_name%/identity.rb.erb
|
337
350
|
- lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb
|
338
351
|
- lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb
|
339
352
|
- lib/rubysmith/text/inserter.rb
|
340
353
|
homepage: https://github.com/bkuhlmann/rubysmith
|
341
354
|
licenses:
|
342
|
-
-
|
355
|
+
- Apache-2.0
|
343
356
|
metadata:
|
344
357
|
bug_tracker_uri: https://github.com/bkuhlmann/rubysmith/issues
|
345
358
|
changelog_uri: https://www.alchemists.io/projects/rubysmith/changes.html
|
metadata.gz.sig
CHANGED
Binary file
|