rubysmith 0.6.1 → 0.7.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.tar.gz.sig +0 -0
- data/README.adoc +4 -2
- data/lib/rubysmith.rb +1 -0
- data/lib/rubysmith/builder.rb +1 -4
- data/lib/rubysmith/builders/ruby_critic.rb +27 -0
- data/lib/rubysmith/cli/configuration.rb +2 -1
- data/lib/rubysmith/cli/defaults.yml +1 -0
- data/lib/rubysmith/cli/parsers/build.rb +6 -0
- data/lib/rubysmith/cli/processors/build.rb +1 -0
- data/lib/rubysmith/identity.rb +1 -1
- data/lib/rubysmith/realm.rb +1 -0
- data/lib/rubysmith/templates/%project_name%/.rubycritic.yml.erb +3 -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%/bin/guard.erb +0 -1
- data/lib/rubysmith/templates/%project_name%/bin/rubocop.erb +0 -1
- data/lib/rubysmith/templates/%project_name%/lib/%project_name%.rb.erb +3 -0
- metadata +4 -2
- metadata.gz.sig +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd9ee381ebc8f67ae293544be845606f47500fb44529b127936d89b071d77af8
|
4
|
+
data.tar.gz: 25a4b4469bbd3e5b7e43874e7552e94da1156682c15248c91cb2a16073290a33
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a83315a0432b40b43ebc89efaf7cd79d42f9886e711440698b5550e8e90e5ba442d78f655951684ff6c533b4bd07ab3237de60ef037a2c010bf5871859615b0d
|
7
|
+
data.tar.gz: 272bdef0ba9dfa1842af8b8715d554f28a83fb86174a762fff42e97ae4c7b8d52b549f702bcb75f0ad87af4ace2901e954cece399f2e8a6ec9b0025b460206b4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -23,7 +23,6 @@ toc::[]
|
|
23
23
|
== Features
|
24
24
|
|
25
25
|
* Builds a Ruby project skeleton for custom design and development.
|
26
|
-
* Uses link:https://www.alchemists.io/projects/refinements[Refinements] Ruby core library enhancements.
|
27
26
|
* Uses link:https://www.alchemists.io/projects/runcom[Runcom] for resource configuration management.
|
28
27
|
* Uses link:https://www.alchemists.io/projects/pragmater[Pragmater] for Ruby source pragma directives.
|
29
28
|
* Supports link:https://github.com/amazing-print/amazing_print[Amazing Print].
|
@@ -40,6 +39,7 @@ toc::[]
|
|
40
39
|
* Supports link:https://docs.rubocop.org/rubocop-performance[Rubocop Performance].
|
41
40
|
* Supports link:https://github.com/rubocop-hq/rubocop-rake[Rubocop Rake].
|
42
41
|
* Supports link:https://github.com/rubocop-hq/rubocop-rspec[Rubocop RSpec].
|
42
|
+
* Supports link:https://github.com/whitesmith/RubyCritic[RubyCritic].
|
43
43
|
* Supports link:https://github.com/simplecov-ruby/simplecov[SimpleCov].
|
44
44
|
* Supports common settings and a structured layout for building projects.
|
45
45
|
* Provides common documentation:
|
@@ -97,8 +97,9 @@ BUILD OPTIONS:
|
|
97
97
|
--[no-]refinements Add Refinements.
|
98
98
|
--[no-]rspec Add RSpec.
|
99
99
|
--[no-]rubocop Add Rubocop.
|
100
|
+
--[no-]ruby_critic Add RubyCritic.
|
100
101
|
--[no-]setup Add setup script.
|
101
|
-
--[no-]simple_cov Add SimpleCov
|
102
|
+
--[no-]simple_cov Add SimpleCov.
|
102
103
|
--min Use minimum/no options.
|
103
104
|
....
|
104
105
|
|
@@ -173,6 +174,7 @@ The default configuration is as follows:
|
|
173
174
|
:refinements: true
|
174
175
|
:rspec: true
|
175
176
|
:rubocop: true
|
177
|
+
:ruby_critic: true
|
176
178
|
:setup: true
|
177
179
|
:simple_cov: true
|
178
180
|
:builders:
|
data/lib/rubysmith.rb
CHANGED
@@ -22,6 +22,7 @@ require "rubysmith/builders/rspec/helper"
|
|
22
22
|
require "rubysmith/builders/pragma"
|
23
23
|
require "rubysmith/builders/rubocop/setup"
|
24
24
|
require "rubysmith/builders/rubocop/formatter"
|
25
|
+
require "rubysmith/builders/ruby_critic"
|
25
26
|
require "rubysmith/cli/parsers/core"
|
26
27
|
require "rubysmith/cli/parsers/build"
|
27
28
|
require "rubysmith/cli/parsers/assembler"
|
data/lib/rubysmith/builder.rb
CHANGED
@@ -10,10 +10,7 @@ module Rubysmith
|
|
10
10
|
class Builder
|
11
11
|
using Refinements::Pathnames
|
12
12
|
|
13
|
-
LOGGER = Logger.new(
|
14
|
-
STDOUT,
|
15
|
-
formatter: ->(severity, _at, _program, message) { "#{severity} #{message}\n" }
|
16
|
-
)
|
13
|
+
LOGGER = Logger.new(STDOUT, formatter: ->(_severity, _at, _program, message) { "#{message}\n" })
|
17
14
|
|
18
15
|
HELPERS = {
|
19
16
|
inserter: Text::Inserter,
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Rubysmith
|
4
|
+
module Builders
|
5
|
+
# Builds project skeleton RubyCritic code quality support.
|
6
|
+
class RubyCritic
|
7
|
+
def self.call realm, builder: Builder
|
8
|
+
new(realm, builder: builder).call
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize realm, builder: Builder
|
12
|
+
@realm = realm
|
13
|
+
@builder = builder
|
14
|
+
end
|
15
|
+
|
16
|
+
def call
|
17
|
+
return unless realm.build_ruby_critic
|
18
|
+
|
19
|
+
builder.call(realm.with(template_path: "%project_name%/.rubycritic.yml.erb")).render
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
attr_reader :realm, :builder
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -109,6 +109,12 @@ module Rubysmith
|
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
+
def add_ruby_critic
|
113
|
+
client.on "--[no-]ruby_critic", "Add RubyCritic." do |value|
|
114
|
+
options[:build_ruby_critic] = value
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
112
118
|
def add_setup
|
113
119
|
client.on "--[no-]setup", "Add setup script." do |value|
|
114
120
|
options[:build_setup] = value
|
data/lib/rubysmith/identity.rb
CHANGED
data/lib/rubysmith/realm.rb
CHANGED
@@ -26,6 +26,9 @@ source "https://rubygems.org"
|
|
26
26
|
<% if realm.build_rspec && realm.build_rubocop %>
|
27
27
|
gem "rubocop-rspec", "~> 2.0"
|
28
28
|
<% end %>
|
29
|
+
<% if realm.build_ruby_critic %>
|
30
|
+
gem "rubycritic", "~> 4.5", require: false
|
31
|
+
<% end %>
|
29
32
|
<% if realm.build_simple_cov %>
|
30
33
|
gem "simplecov", "~> 0.20"
|
31
34
|
<% end %>
|
@@ -18,6 +18,9 @@ require "bundler/setup"
|
|
18
18
|
<% if realm.build_rubocop %>
|
19
19
|
require "rubocop/rake_task"
|
20
20
|
<% end %>
|
21
|
+
<% if realm.build_ruby_critic %>
|
22
|
+
require "rubycritic/rake_task"
|
23
|
+
<% end %>
|
21
24
|
|
22
25
|
<% if realm.build_bundler_audit %>
|
23
26
|
Bundler::Audit::Task.new
|
@@ -34,8 +37,11 @@ require "bundler/setup"
|
|
34
37
|
<% if realm.build_rubocop %>
|
35
38
|
RuboCop::RakeTask.new
|
36
39
|
<% end %>
|
40
|
+
<% if realm.build_ruby_critic %>
|
41
|
+
RubyCritic::RakeTask.new
|
42
|
+
<% end %>
|
37
43
|
|
38
44
|
desc "Run code quality checks"
|
39
|
-
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 %>]
|
45
|
+
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 %> <% if realm.build_ruby_critic %>rubycritic<% end %>]
|
40
46
|
|
41
47
|
task default: %i[code_quality <% if realm.build_rspec %>spec<% end %>]
|
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.7.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-12-
|
31
|
+
date: 2020-12-13 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: pragmater
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/rubysmith/builders/rspec/helper.rb
|
116
116
|
- lib/rubysmith/builders/rubocop/formatter.rb
|
117
117
|
- lib/rubysmith/builders/rubocop/setup.rb
|
118
|
+
- lib/rubysmith/builders/ruby_critic.rb
|
118
119
|
- lib/rubysmith/builders/setup.rb
|
119
120
|
- lib/rubysmith/cli/configuration.rb
|
120
121
|
- lib/rubysmith/cli/defaults.yml
|
@@ -132,6 +133,7 @@ files:
|
|
132
133
|
- lib/rubysmith/templates/%project_name%/.reek.yml.erb
|
133
134
|
- lib/rubysmith/templates/%project_name%/.rubocop.yml.erb
|
134
135
|
- lib/rubysmith/templates/%project_name%/.ruby-version.erb
|
136
|
+
- lib/rubysmith/templates/%project_name%/.rubycritic.yml.erb
|
135
137
|
- lib/rubysmith/templates/%project_name%/CHANGES.adoc.erb
|
136
138
|
- lib/rubysmith/templates/%project_name%/CHANGES.md.erb
|
137
139
|
- lib/rubysmith/templates/%project_name%/CODE_OF_CONDUCT.adoc.erb
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
��c��҉>7<ݥd2�c?sS��kE�L>Ȟ�R��(�U5�5[8C�#��|Sm����ֳj���{U�*!����$ͫhF��������E�$f�Ø<:���`��cx7B0Meɸ�5�?_�rݧnJ��5E�<�s:�X�0o� :�Z�M_�͚�C���BB-�a�dne1�!�z;;�>\��:d���a�+��m1f*p.�k4BwXR'�iW
|
2
|
+
Z��
|