rubysmith 6.7.0 → 6.9.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 +18 -1
- data/lib/rubysmith/builders/abstract.rb +24 -0
- data/lib/rubysmith/builders/bundler.rb +1 -12
- data/lib/rubysmith/builders/caliber.rb +1 -12
- data/lib/rubysmith/builders/circle_ci.rb +1 -12
- data/lib/rubysmith/builders/console.rb +1 -12
- data/lib/rubysmith/builders/core.rb +1 -10
- data/lib/rubysmith/builders/documentation/citation.rb +1 -12
- data/lib/rubysmith/builders/documentation/license.rb +1 -10
- data/lib/rubysmith/builders/documentation/readme.rb +2 -11
- data/lib/rubysmith/builders/documentation/version.rb +1 -10
- data/lib/rubysmith/builders/git/commit.rb +2 -8
- data/lib/rubysmith/builders/git/ignore.rb +1 -12
- data/lib/rubysmith/builders/git/safe.rb +1 -12
- data/lib/rubysmith/builders/git/setup.rb +1 -12
- data/lib/rubysmith/builders/git_hub.rb +1 -10
- data/lib/rubysmith/builders/git_hub_ci.rb +1 -10
- data/lib/rubysmith/builders/guard.rb +1 -12
- data/lib/rubysmith/builders/init.rb +1 -12
- data/lib/rubysmith/builders/rake.rb +1 -10
- data/lib/rubysmith/builders/reek.rb +1 -12
- data/lib/rubysmith/builders/rspec/binstub.rb +1 -12
- data/lib/rubysmith/builders/rspec/context.rb +1 -12
- data/lib/rubysmith/builders/rspec/helper.rb +1 -12
- data/lib/rubysmith/builders/setup.rb +1 -12
- data/lib/rubysmith/builders/version.rb +1 -12
- data/lib/rubysmith/cli/actions/irb_kit.rb +22 -0
- data/lib/rubysmith/cli/actions/rtc.rb +22 -0
- data/lib/rubysmith/cli/commands/build.rb +2 -0
- data/lib/rubysmith/configuration/contract.rb +4 -1
- data/lib/rubysmith/configuration/defaults.yml +2 -0
- data/lib/rubysmith/configuration/model.rb +4 -1
- data/lib/rubysmith/container.rb +3 -3
- data/lib/rubysmith/templates/%project_name%/CITATION.cff.erb +2 -1
- data/lib/rubysmith/templates/%project_name%/Gemfile.erb +7 -2
- data/lib/rubysmith/templates/%project_name%/LICENSE-apache.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-apache.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-mit.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-mit.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/README.adoc.erb +5 -36
- data/lib/rubysmith/templates/%project_name%/README.md.erb +6 -25
- data/lib/rubysmith/templates/%project_name%/VERSIONS.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/VERSIONS.md.erb +1 -1
- data/lib/rubysmith.rb +3 -1
- data/rubysmith.gemspec +5 -5
- data.tar.gz.sig +0 -0
- metadata +14 -12
- metadata.gz.sig +0 -0
- data/lib/rubysmith/configuration/transformers/current_time.rb +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c3d8c892d8e92549e18603cc98ba23ea34e13664c7611e50739c16b30915088
|
4
|
+
data.tar.gz: 990bba1d1b4e4da90fc369d15ecf8a720cd0bdf58eb034cc419d52c0b3253276
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31e99b1d4d0942c8c00e4ffab29fc92aff2d2952e46ee745440d4184634b7cf487910faf73cf36284a222e91a2b48f9cea90558fd8c548c71bee7c6ee9c3a3d0
|
7
|
+
data.tar.gz: ca7f657c353ae46a4c9d664ab889af98ac2901e79fb17bd407c7451589a77881ab09614a490f33d46c09aac6cb18240cdff0cbaf9361ec84e2e09b9ab6130744
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -29,13 +29,14 @@ toc::[]
|
|
29
29
|
* Supports link:https://github.com[GitHub].
|
30
30
|
* Supports link:https://alchemists.io/projects/git-lint[Git Lint].
|
31
31
|
* Supports link:https://github.com/guard/guard[Guard].
|
32
|
+
* Supports link:https://alchemists.io/projects/irb-kit[IRB Kit].
|
32
33
|
* Supports link:https://github.com/ruby/rake[Rake].
|
33
34
|
* Supports link:https://github.com/troessner/reek[Reek].
|
34
35
|
* Supports link:https://alchemists.io/projects/refinements[Refinements].
|
35
36
|
* Supports link:https://rspec.info[RSpec].
|
37
|
+
* Supports link:https://github.com/ruby/repl_type_completor[ReplTypeCompletor].
|
36
38
|
* Supports setup script for project setup.
|
37
39
|
* Supports link:https://github.com/simplecov-ruby/simplecov[SimpleCov].
|
38
|
-
* Supports link:https://github.com/ruby/repl_type_completor[ReplTypeCompletor].
|
39
40
|
* Supports link:https://github.com/fxn/zeitwerk[Zeitwerk].
|
40
41
|
* Supports common settings and a structured layout for building projects.
|
41
42
|
* Provides common documentation:
|
@@ -210,6 +211,10 @@ manner.
|
|
210
211
|
The `--guard` option allows you add the link:https://github.com/guard/guard[Guard] gem to your
|
211
212
|
project for rapid red, green, refactor development cycles.
|
212
213
|
|
214
|
+
===== IRB Kit
|
215
|
+
|
216
|
+
The `--irb-kit` option allows you add the link:https://alchemists.io/projects/irb-kit[IRB Kit] gem to your project for additional extensions you can use within IRB to improve your workflow.
|
217
|
+
|
213
218
|
===== License
|
214
219
|
|
215
220
|
The `--license` option ensures you build your project with a license.
|
@@ -248,6 +253,10 @@ Ruby core objects without monkey patching your code.
|
|
248
253
|
The `--rspec` option allows you add the link:https://rspec.info[RSpec] gem to your project for
|
249
254
|
defining your project specifications and have a framework for testing your code.
|
250
255
|
|
256
|
+
===== Repl Type Completor (RTC)
|
257
|
+
|
258
|
+
The `--rtc` option allows you add the link:https://github.com/ruby/repl_type_completor[Repl Type Completor] gem to your project for improved type completion when using link:https://github.com/ruby/irb[IRB].
|
259
|
+
|
251
260
|
===== Setup
|
252
261
|
|
253
262
|
The `--setup` option allows you to configure you project with automated setup instructions so anyone
|
@@ -320,6 +329,7 @@ build:
|
|
320
329
|
git_hub_ci: false
|
321
330
|
git_lint: true
|
322
331
|
guard: true
|
332
|
+
irb_kit: false
|
323
333
|
license: true
|
324
334
|
maximum: false
|
325
335
|
minimum: false
|
@@ -328,6 +338,7 @@ build:
|
|
328
338
|
reek: true
|
329
339
|
refinements: true
|
330
340
|
rspec: true
|
341
|
+
rtc: true
|
331
342
|
security: true
|
332
343
|
setup: true
|
333
344
|
simple_cov: true
|
@@ -345,6 +356,8 @@ license:
|
|
345
356
|
label: Hippocratic
|
346
357
|
name: hippocratic
|
347
358
|
version: "2.1"
|
359
|
+
organization:
|
360
|
+
url:
|
348
361
|
project:
|
349
362
|
url:
|
350
363
|
community:
|
@@ -413,6 +426,10 @@ Use this section to define the license you want to use for your project. The fol
|
|
413
426
|
|
414
427
|
When picking a license, you can also supply the appropriate label and version in addition to the name.
|
415
428
|
|
429
|
+
==== Organization
|
430
|
+
|
431
|
+
Use this section to define URL information that points to your organization. This is useful for information that isn't project specific but related to all projects within your organization. You'll want to customize this URL especially for documentation purposes.
|
432
|
+
|
416
433
|
==== Project
|
417
434
|
|
418
435
|
There are two sub-categories within this section: URLs and version. The URLs allow you to link to
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rubysmith
|
4
|
+
module Builders
|
5
|
+
# Provides default implementation from which builders can inherit from.
|
6
|
+
class Abstract
|
7
|
+
def self.call(...) = new(...).call
|
8
|
+
|
9
|
+
def initialize configuration, builder: Builder
|
10
|
+
@configuration = configuration
|
11
|
+
@builder = builder
|
12
|
+
end
|
13
|
+
|
14
|
+
def call
|
15
|
+
fail NoMethodError,
|
16
|
+
"`#{self.class}##{__method__} #{method(__method__).parameters}` must be implemented."
|
17
|
+
end
|
18
|
+
|
19
|
+
protected
|
20
|
+
|
21
|
+
attr_reader :configuration, :builder
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds Bundler Gemfile configuration for project skeleton.
|
8
|
-
class Bundler
|
8
|
+
class Bundler < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
builder.call(configuration.merge(template_path: "%project_name%/Gemfile.erb"))
|
20
13
|
.render
|
@@ -27,10 +20,6 @@ module Rubysmith
|
|
27
20
|
|
28
21
|
configuration
|
29
22
|
end
|
30
|
-
|
31
|
-
private
|
32
|
-
|
33
|
-
attr_reader :configuration, :builder
|
34
23
|
end
|
35
24
|
end
|
36
25
|
end
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds project skeleton with Caliber style support.
|
8
|
-
class Caliber
|
8
|
+
class Caliber < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
return configuration unless configuration.build_caliber
|
20
13
|
|
@@ -26,10 +19,6 @@ module Rubysmith
|
|
26
19
|
builder.call(configuration.merge(template_path: path)).render
|
27
20
|
configuration
|
28
21
|
end
|
29
|
-
|
30
|
-
private
|
31
|
-
|
32
|
-
attr_reader :configuration, :builder
|
33
22
|
end
|
34
23
|
end
|
35
24
|
end
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds project skeleton Circle CI configuration.
|
8
|
-
class CircleCI
|
8
|
+
class CircleCI < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
return configuration unless configuration.build_circle_ci
|
20
13
|
|
@@ -24,10 +17,6 @@ module Rubysmith
|
|
24
17
|
|
25
18
|
configuration
|
26
19
|
end
|
27
|
-
|
28
|
-
private
|
29
|
-
|
30
|
-
attr_reader :configuration, :builder
|
31
20
|
end
|
32
21
|
end
|
33
22
|
end
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds project skeleton console for object inspection and exploration.
|
8
|
-
class Console
|
8
|
+
class Console < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
return configuration unless configuration.build_console
|
20
13
|
|
@@ -24,10 +17,6 @@ module Rubysmith
|
|
24
17
|
|
25
18
|
configuration
|
26
19
|
end
|
27
|
-
|
28
|
-
private
|
29
|
-
|
30
|
-
attr_reader :configuration, :builder
|
31
20
|
end
|
32
21
|
end
|
33
22
|
end
|
@@ -6,17 +6,10 @@ require "refinements/struct"
|
|
6
6
|
module Rubysmith
|
7
7
|
module Builders
|
8
8
|
# Builds project skeleton core structure and minimum file support.
|
9
|
-
class Core
|
9
|
+
class Core < Abstract
|
10
10
|
using Refinements::String
|
11
11
|
using Refinements::Struct
|
12
12
|
|
13
|
-
def self.call(...) = new(...).call
|
14
|
-
|
15
|
-
def initialize configuration, builder: Builder
|
16
|
-
@configuration = configuration
|
17
|
-
@builder = builder
|
18
|
-
end
|
19
|
-
|
20
13
|
def call
|
21
14
|
render_implementation
|
22
15
|
render_specification
|
@@ -44,8 +37,6 @@ module Rubysmith
|
|
44
37
|
def indentation = ::Core::EMPTY_STRING.indent configuration.project_levels
|
45
38
|
|
46
39
|
def module_name = configuration.project_class
|
47
|
-
|
48
|
-
attr_reader :configuration, :builder
|
49
40
|
end
|
50
41
|
end
|
51
42
|
end
|
@@ -6,26 +6,15 @@ module Rubysmith
|
|
6
6
|
module Builders
|
7
7
|
module Documentation
|
8
8
|
# Builds project skeleton citation documentation.
|
9
|
-
class Citation
|
9
|
+
class Citation < Abstract
|
10
10
|
using Refinements::Struct
|
11
11
|
|
12
|
-
def self.call(...) = new(...).call
|
13
|
-
|
14
|
-
def initialize configuration, builder: Builder
|
15
|
-
@configuration = configuration
|
16
|
-
@builder = builder
|
17
|
-
end
|
18
|
-
|
19
12
|
def call
|
20
13
|
return configuration unless configuration.build_citation
|
21
14
|
|
22
15
|
builder.call(configuration.merge(template_path: "%project_name%/CITATION.cff.erb")).render
|
23
16
|
configuration
|
24
17
|
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
attr_reader :configuration, :builder
|
29
18
|
end
|
30
19
|
end
|
31
20
|
end
|
@@ -7,16 +7,9 @@ module Rubysmith
|
|
7
7
|
module Builders
|
8
8
|
module Documentation
|
9
9
|
# Builds project skeleton LICENSE documentation.
|
10
|
-
class License
|
10
|
+
class License < Abstract
|
11
11
|
using Refinements::Struct
|
12
12
|
|
13
|
-
def self.call(...) = new(...).call
|
14
|
-
|
15
|
-
def initialize configuration, builder: Builder
|
16
|
-
@configuration = configuration
|
17
|
-
@builder = builder
|
18
|
-
end
|
19
|
-
|
20
13
|
def call
|
21
14
|
return configuration unless configuration.build_license
|
22
15
|
|
@@ -30,8 +23,6 @@ module Rubysmith
|
|
30
23
|
|
31
24
|
private
|
32
25
|
|
33
|
-
attr_reader :configuration, :builder
|
34
|
-
|
35
26
|
def kind = configuration.documentation_format
|
36
27
|
|
37
28
|
def license = configuration.license_name
|
@@ -6,16 +6,9 @@ module Rubysmith
|
|
6
6
|
module Builders
|
7
7
|
module Documentation
|
8
8
|
# Builds project skeleton README documentation.
|
9
|
-
class Readme
|
9
|
+
class Readme < Abstract
|
10
10
|
using Refinements::Struct
|
11
11
|
|
12
|
-
def self.call(...) = new(...).call
|
13
|
-
|
14
|
-
def initialize configuration, builder: Builder
|
15
|
-
@configuration = configuration
|
16
|
-
@builder = builder
|
17
|
-
end
|
18
|
-
|
19
12
|
def call
|
20
13
|
return configuration unless configuration.build_readme
|
21
14
|
|
@@ -27,9 +20,7 @@ module Rubysmith
|
|
27
20
|
configuration
|
28
21
|
end
|
29
22
|
|
30
|
-
|
31
|
-
|
32
|
-
attr_reader :configuration, :builder
|
23
|
+
protected
|
33
24
|
|
34
25
|
def kind = configuration.documentation_format
|
35
26
|
end
|
@@ -7,16 +7,9 @@ module Rubysmith
|
|
7
7
|
module Builders
|
8
8
|
module Documentation
|
9
9
|
# Builds project skeleton version history.
|
10
|
-
class Version
|
10
|
+
class Version < Abstract
|
11
11
|
using Refinements::Struct
|
12
12
|
|
13
|
-
def self.call(...) = new(...).call
|
14
|
-
|
15
|
-
def initialize configuration, builder: Builder
|
16
|
-
@configuration = configuration
|
17
|
-
@builder = builder
|
18
|
-
end
|
19
|
-
|
20
13
|
def call
|
21
14
|
return configuration unless configuration.build_versions
|
22
15
|
|
@@ -28,8 +21,6 @@ module Rubysmith
|
|
28
21
|
|
29
22
|
private
|
30
23
|
|
31
|
-
attr_reader :configuration, :builder
|
32
|
-
|
33
24
|
def kind = configuration.documentation_format
|
34
25
|
end
|
35
26
|
end
|
@@ -4,15 +4,11 @@ module Rubysmith
|
|
4
4
|
module Builders
|
5
5
|
module Git
|
6
6
|
# Builds project skeleton initial Git commit message.
|
7
|
-
class Commit
|
7
|
+
class Commit < Abstract
|
8
8
|
include Import[:specification]
|
9
9
|
|
10
|
-
def self.call(...) = new(...).call
|
11
|
-
|
12
10
|
def initialize(configuration, builder: Builder, **)
|
13
|
-
super
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
11
|
+
super
|
16
12
|
end
|
17
13
|
|
18
14
|
def call
|
@@ -30,8 +26,6 @@ module Rubysmith
|
|
30
26
|
|
31
27
|
private
|
32
28
|
|
33
|
-
attr_reader :configuration, :builder
|
34
|
-
|
35
29
|
def body
|
36
30
|
"Generated with link:#{specification.homepage_url}[#{specification.label}] " \
|
37
31
|
"#{specification.version}."
|
@@ -6,16 +6,9 @@ module Rubysmith
|
|
6
6
|
module Builders
|
7
7
|
module Git
|
8
8
|
# Builds Git repository directory and file ignore configuration.
|
9
|
-
class Ignore
|
9
|
+
class Ignore < Abstract
|
10
10
|
using Refinements::Struct
|
11
11
|
|
12
|
-
def self.call(...) = new(...).call
|
13
|
-
|
14
|
-
def initialize configuration, builder: Builder
|
15
|
-
@configuration = configuration
|
16
|
-
@builder = builder
|
17
|
-
end
|
18
|
-
|
19
12
|
def call
|
20
13
|
return configuration unless configuration.build_git
|
21
14
|
|
@@ -25,10 +18,6 @@ module Rubysmith
|
|
25
18
|
|
26
19
|
configuration
|
27
20
|
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
attr_reader :configuration, :builder
|
32
21
|
end
|
33
22
|
end
|
34
23
|
end
|
@@ -6,26 +6,15 @@ module Rubysmith
|
|
6
6
|
module Builders
|
7
7
|
module Git
|
8
8
|
# Initializes project skeleton with Git Safe support.
|
9
|
-
class Safe
|
9
|
+
class Safe < Abstract
|
10
10
|
using Refinements::Struct
|
11
11
|
|
12
|
-
def self.call(...) = new(...).call
|
13
|
-
|
14
|
-
def initialize configuration, builder: Builder
|
15
|
-
@configuration = configuration
|
16
|
-
@builder = builder
|
17
|
-
end
|
18
|
-
|
19
12
|
def call
|
20
13
|
return configuration unless configuration.build_git
|
21
14
|
|
22
15
|
builder.call(configuration.merge(template_path: "%project_name%/.git/safe")).make_path
|
23
16
|
configuration
|
24
17
|
end
|
25
|
-
|
26
|
-
private
|
27
|
-
|
28
|
-
attr_reader :configuration, :builder
|
29
18
|
end
|
30
19
|
end
|
31
20
|
end
|
@@ -4,24 +4,13 @@ module Rubysmith
|
|
4
4
|
module Builders
|
5
5
|
module Git
|
6
6
|
# Initializes project skeleton as a Git repository.
|
7
|
-
class Setup
|
8
|
-
def self.call(...) = new(...).call
|
9
|
-
|
10
|
-
def initialize configuration, builder: Builder
|
11
|
-
@configuration = configuration
|
12
|
-
@builder = builder
|
13
|
-
end
|
14
|
-
|
7
|
+
class Setup < Abstract
|
15
8
|
def call
|
16
9
|
return configuration unless configuration.build_git
|
17
10
|
|
18
11
|
builder.call(configuration).run("git init", chdir: configuration.project_name)
|
19
12
|
configuration
|
20
13
|
end
|
21
|
-
|
22
|
-
private
|
23
|
-
|
24
|
-
attr_reader :configuration, :builder
|
25
14
|
end
|
26
15
|
end
|
27
16
|
end
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds project skeleton GitHub templates.
|
8
|
-
class GitHub
|
8
|
+
class GitHub < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
render_funding
|
20
13
|
|
@@ -27,8 +20,6 @@ module Rubysmith
|
|
27
20
|
|
28
21
|
private
|
29
22
|
|
30
|
-
attr_reader :configuration, :builder
|
31
|
-
|
32
23
|
def render_funding
|
33
24
|
return unless configuration.build_funding
|
34
25
|
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds project skeleton GitHub CI template.
|
8
|
-
class GitHubCI
|
8
|
+
class GitHubCI < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
return configuration unless configuration.build_git_hub_ci
|
20
13
|
|
@@ -24,8 +17,6 @@ module Rubysmith
|
|
24
17
|
|
25
18
|
private
|
26
19
|
|
27
|
-
attr_reader :configuration, :builder
|
28
|
-
|
29
20
|
def configuration_with_template
|
30
21
|
configuration.merge template_path: "%project_name%/.github/workflows/ci.yml.erb"
|
31
22
|
end
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds project skeleton Guard support for a red, green, refactor loop.
|
8
|
-
class Guard
|
8
|
+
class Guard < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
return configuration unless configuration.build_guard
|
20
13
|
|
@@ -25,10 +18,6 @@ module Rubysmith
|
|
25
18
|
builder.call(configuration.merge(template_path: "%project_name%/Guardfile.erb")).render
|
26
19
|
configuration
|
27
20
|
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
attr_reader :configuration, :builder
|
32
21
|
end
|
33
22
|
end
|
34
23
|
end
|
@@ -6,24 +6,13 @@ require "refinements/struct"
|
|
6
6
|
module Rubysmith
|
7
7
|
module Builders
|
8
8
|
# Initializes building of project by checking for existence first.
|
9
|
-
class Init
|
9
|
+
class Init < Abstract
|
10
10
|
using Refinements::Struct
|
11
11
|
|
12
|
-
def self.call(...) = new(...).call
|
13
|
-
|
14
|
-
def initialize configuration, builder: Builder
|
15
|
-
@configuration = configuration
|
16
|
-
@builder = builder
|
17
|
-
end
|
18
|
-
|
19
12
|
def call
|
20
13
|
builder.call(configuration.merge(template_path: "%project_name%")).check
|
21
14
|
configuration
|
22
15
|
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
attr_reader :configuration, :builder
|
27
16
|
end
|
28
17
|
end
|
29
18
|
end
|
@@ -5,16 +5,9 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds project skeleton Rake support.
|
8
|
-
class Rake
|
8
|
+
class Rake < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
return configuration unless configuration.build_rake
|
20
13
|
|
@@ -25,8 +18,6 @@ module Rubysmith
|
|
25
18
|
|
26
19
|
private
|
27
20
|
|
28
|
-
attr_reader :configuration, :builder
|
29
|
-
|
30
21
|
def add_binstub
|
31
22
|
builder.call(configuration.merge(template_path: "%project_name%/bin/rake.erb"))
|
32
23
|
.render
|
@@ -5,26 +5,15 @@ require "refinements/struct"
|
|
5
5
|
module Rubysmith
|
6
6
|
module Builders
|
7
7
|
# Builds project skeleton Reek code quality support.
|
8
|
-
class Reek
|
8
|
+
class Reek < Abstract
|
9
9
|
using Refinements::Struct
|
10
10
|
|
11
|
-
def self.call(...) = new(...).call
|
12
|
-
|
13
|
-
def initialize configuration, builder: Builder
|
14
|
-
@configuration = configuration
|
15
|
-
@builder = builder
|
16
|
-
end
|
17
|
-
|
18
11
|
def call
|
19
12
|
return configuration unless configuration.build_reek
|
20
13
|
|
21
14
|
builder.call(configuration.merge(template_path: "%project_name%/.reek.yml.erb")).render
|
22
15
|
configuration
|
23
16
|
end
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
attr_reader :configuration, :builder
|
28
17
|
end
|
29
18
|
end
|
30
19
|
end
|
@@ -6,16 +6,9 @@ module Rubysmith
|
|
6
6
|
module Builders
|
7
7
|
module RSpec
|
8
8
|
# Builds RSpec binstub for project skeleton.
|
9
|
-
class Binstub
|
9
|
+
class Binstub < Abstract
|
10
10
|
using Refinements::Struct
|
11
11
|
|
12
|
-
def self.call(...) = new(...).call
|
13
|
-
|
14
|
-
def initialize configuration, builder: Builder
|
15
|
-
@configuration = configuration
|
16
|
-
@builder = builder
|
17
|
-
end
|
18
|
-
|
19
12
|
def call
|
20
13
|
return configuration unless configuration.build_rspec
|
21
14
|
|
@@ -25,10 +18,6 @@ module Rubysmith
|
|
25
18
|
|
26
19
|
configuration
|
27
20
|
end
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
attr_reader :configuration, :builder
|
32
21
|
end
|
33
22
|
end
|
34
23
|
end
|