gemsmith 9.0.0 → 9.1.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/lib/gemsmith/cli.rb +2 -0
- data/lib/gemsmith/credentials.rb +1 -0
- data/lib/gemsmith/generators/cli.rb +1 -0
- data/lib/gemsmith/generators/gem.rb +1 -0
- data/lib/gemsmith/generators/rails.rb +1 -0
- data/lib/gemsmith/generators/rake.rb +38 -11
- data/lib/gemsmith/identity.rb +1 -1
- data/lib/gemsmith/rake/publisher.rb +1 -0
- data/lib/gemsmith/rake/tasks.rb +2 -0
- data/lib/gemsmith/templates/%gem_name%/.codeclimate.yml.tt +3 -10
- data/lib/gemsmith/templates/%gem_name%/.gitignore.tt +2 -0
- data/lib/gemsmith/templates/%gem_name%/.rubocop.yml.tt +2 -46
- data/lib/gemsmith/templates/%gem_name%/.travis.yml.tt +1 -1
- data/lib/gemsmith/templates/%gem_name%/CONTRIBUTING.md.tt +10 -18
- data/lib/gemsmith/templates/%gem_name%/spec/spec_helper.rb.tt +1 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5f55d84251f20431e1121f296e9d86012d0a3a5
|
4
|
+
data.tar.gz: c675b86c73436f12fdebc56c10539e1d4a9b3c61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d486e73b98e1f8fc9c7407862fb30a8c9a4f6fdd1859d877db698523b9feb11d93989f793935ceb17ea3fcc3f0e7ec732b4bc3a6fbc29f95a0df817db7810686
|
7
|
+
data.tar.gz: e748b627bcceae7c034a904205b17b6d56f3e5e4fdc9bd741d56babdba1741dd2601cb7046ffbc5a193908e3d288f8a2edcc3e7e4c85e58e7f1cf72281a46b73
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/gemsmith/cli.rb
CHANGED
@@ -28,6 +28,7 @@ module Gemsmith
|
|
28
28
|
File.expand_path File.join(File.dirname(__FILE__), "templates")
|
29
29
|
end
|
30
30
|
|
31
|
+
# rubocop:disable Metrics/MethodLength
|
31
32
|
def self.configuration
|
32
33
|
Runcom::Configuration.new file_name: Identity.file_name, defaults: {
|
33
34
|
year: Time.now.year,
|
@@ -161,6 +162,7 @@ module Gemsmith
|
|
161
162
|
desc: "Add Patreon support.",
|
162
163
|
type: :boolean,
|
163
164
|
default: configuration.to_h.dig(:generate, :patreon)
|
165
|
+
# rubocop:disable Metrics/AbcSize
|
164
166
|
def generate name
|
165
167
|
print_cli_and_rails_engine_option_error && return if options.cli? && options.rails?
|
166
168
|
|
data/lib/gemsmith/credentials.rb
CHANGED
@@ -19,6 +19,7 @@ module Gemsmith
|
|
19
19
|
cli.run "rails plugin new --skip #{configuration.dig :gem, :name} #{engine_options}"
|
20
20
|
end
|
21
21
|
|
22
|
+
# rubocop:disable Metrics/AbcSize
|
22
23
|
def create_generator_files
|
23
24
|
cli.empty_directory "#{generator_root}/templates"
|
24
25
|
cli.template "#{generator_root}/install/install_generator.rb.tt", configuration
|
@@ -1,40 +1,67 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "refinements/arrays"
|
4
|
+
|
3
5
|
module Gemsmith
|
4
6
|
module Generators
|
5
7
|
# Generates Rake support.
|
6
8
|
class Rake < Base
|
9
|
+
using Refinements::Arrays
|
10
|
+
|
11
|
+
def generate_code_quality_task
|
12
|
+
return "" if code_quality_tasks.empty?
|
13
|
+
%(\ndesc "Run code quality checks"\ntask code_quality: %i[#{code_quality_tasks}]\n)
|
14
|
+
end
|
15
|
+
|
16
|
+
def generate_default_task
|
17
|
+
return "" if default_task.empty?
|
18
|
+
%(\ntask default: %i[#{default_task}]\n)
|
19
|
+
end
|
20
|
+
|
7
21
|
def run
|
8
22
|
cli.template "%gem_name%/Rakefile.tt", configuration
|
9
|
-
|
23
|
+
append_code_quality_task
|
24
|
+
append_default_task
|
10
25
|
end
|
11
26
|
|
12
27
|
private
|
13
28
|
|
14
29
|
def rspec_task
|
15
|
-
|
30
|
+
configuration.dig(:generate, :rspec) ? "spec" : ""
|
16
31
|
end
|
17
32
|
|
18
33
|
def reek_task
|
19
|
-
|
34
|
+
configuration.dig(:generate, :reek) ? "reek" : ""
|
20
35
|
end
|
21
36
|
|
22
37
|
def rubocop_task
|
23
|
-
|
38
|
+
configuration.dig(:generate, :rubocop) ? "rubocop" : ""
|
24
39
|
end
|
25
40
|
|
26
41
|
def scss_lint_task
|
27
|
-
|
42
|
+
configuration.dig(:generate, :scss_lint) ? "scss_lint" : ""
|
43
|
+
end
|
44
|
+
|
45
|
+
def code_quality_tasks
|
46
|
+
[reek_task, rubocop_task, scss_lint_task].compress.join " "
|
47
|
+
end
|
48
|
+
|
49
|
+
def code_quality_task
|
50
|
+
code_quality_tasks.empty? ? "" : "code_quality"
|
51
|
+
end
|
52
|
+
|
53
|
+
def default_task
|
54
|
+
[code_quality_task, rspec_task].compress.join " "
|
28
55
|
end
|
29
56
|
|
30
|
-
def
|
31
|
-
|
57
|
+
def append_code_quality_task
|
58
|
+
return if code_quality_task.empty?
|
59
|
+
cli.append_to_file "%gem_name%/Rakefile", generate_code_quality_task
|
32
60
|
end
|
33
61
|
|
34
|
-
def
|
35
|
-
return if
|
36
|
-
cli.append_to_file "%gem_name%/Rakefile",
|
37
|
-
%(\ntask default: %w[#{default_tasks.join(" ")}]\n)
|
62
|
+
def append_default_task
|
63
|
+
return if default_task.empty?
|
64
|
+
cli.append_to_file "%gem_name%/Rakefile", generate_default_task
|
38
65
|
end
|
39
66
|
end
|
40
67
|
end
|
data/lib/gemsmith/identity.rb
CHANGED
data/lib/gemsmith/rake/tasks.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
prepare:
|
2
|
+
fetch:
|
3
|
+
- https://raw.githubusercontent.com/bkuhlmann/code_quality/v0.1.0/configurations/.rubocop.yml
|
2
4
|
engines:
|
3
5
|
shellcheck:
|
4
6
|
enabled: true
|
5
|
-
bundler-audit:
|
6
|
-
enabled: true
|
7
7
|
reek:
|
8
8
|
enabled: <%= config.dig :generate, :reek %>
|
9
9
|
rubocop:
|
@@ -16,13 +16,6 @@ engines:
|
|
16
16
|
languages:
|
17
17
|
- ruby
|
18
18
|
- javascript
|
19
|
-
fixme:
|
20
|
-
enabled: true
|
21
|
-
config:
|
22
|
-
strings:
|
23
|
-
- TODO
|
24
|
-
- FIX
|
25
|
-
- DUPLICATE
|
26
19
|
ratings:
|
27
20
|
paths:
|
28
21
|
- "app/**/*"
|
@@ -1,50 +1,6 @@
|
|
1
|
+
inherit_from:
|
2
|
+
- https://raw.githubusercontent.com/bkuhlmann/code_quality/v0.1.0/configurations/.rubocop.yml
|
1
3
|
<%- if config.dig(:generate, :rails) -%>
|
2
|
-
AllCops:
|
3
|
-
Exclude:
|
4
|
-
- "spec/dummy/**/*"
|
5
|
-
- "bin/rails"
|
6
|
-
- "vendor/**/*"
|
7
4
|
Rails:
|
8
5
|
Enabled: true
|
9
6
|
<%- end -%>
|
10
|
-
Style/AndOr:
|
11
|
-
EnforcedStyle: conditionals
|
12
|
-
Style/CaseIndentation:
|
13
|
-
IndentOneStep: true
|
14
|
-
Style/Documentation:
|
15
|
-
Enabled: false
|
16
|
-
Style/EmptyMethod:
|
17
|
-
EnforcedStyle: expanded
|
18
|
-
Style/MethodDefParentheses:
|
19
|
-
EnforcedStyle: require_no_parentheses
|
20
|
-
Style/NumericLiterals:
|
21
|
-
Enabled: false
|
22
|
-
Style/PercentLiteralDelimiters:
|
23
|
-
PreferredDelimiters:
|
24
|
-
"%w": "[]"
|
25
|
-
"%W": "[]"
|
26
|
-
"%i": "[]"
|
27
|
-
"%I": "[]"
|
28
|
-
"%r": "()"
|
29
|
-
Style/SafeNavigation:
|
30
|
-
Enabled: false
|
31
|
-
Style/SignalException:
|
32
|
-
EnforcedStyle: semantic
|
33
|
-
Style/SingleLineBlockParams:
|
34
|
-
Enabled: false
|
35
|
-
Style/SpaceInsideHashLiteralBraces:
|
36
|
-
EnforcedStyle: no_space
|
37
|
-
Style/StringLiterals:
|
38
|
-
EnforcedStyle: double_quotes
|
39
|
-
Style/StringLiteralsInInterpolation:
|
40
|
-
EnforcedStyle: double_quotes
|
41
|
-
Style/VariableNumber:
|
42
|
-
EnforcedStyle: snake_case
|
43
|
-
Metrics/BlockLength:
|
44
|
-
Exclude:
|
45
|
-
- "**/*.gemspec"
|
46
|
-
- "spec/**/*"
|
47
|
-
Metrics/LineLength:
|
48
|
-
Max: 100
|
49
|
-
Metrics/ParameterLists:
|
50
|
-
Max: 3
|
@@ -3,7 +3,7 @@ language: ruby
|
|
3
3
|
gemfile:
|
4
4
|
- gemfiles/rails-<%= config.dig(:versions, :rails) %>.x.gemfile
|
5
5
|
<%- end -%>
|
6
|
-
before_install: gem update --system
|
6
|
+
before_install: gem update --system
|
7
7
|
<%- if config.dig(:generate, :code_climate) -%>
|
8
8
|
after_script: bundle exec codeclimate-test-reporter
|
9
9
|
<%- end -%>
|
@@ -1,33 +1,25 @@
|
|
1
1
|
# Overview
|
2
2
|
|
3
|
-
Thanks for taking an interest in this open source project. Your support and involvement is greatly
|
4
|
-
following details what you need to know in order to contribute.
|
3
|
+
Thanks for taking an interest in this open source project. Your support and involvement is greatly
|
4
|
+
appreciated. The following details what you need to know in order to contribute.
|
5
5
|
|
6
6
|
# Requirements
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
- Follow these [Git Styles](https://github.com/bkuhlmann/style_guides/blob/master/programming/git.md).
|
11
|
-
- Follow these [Bash Styles](https://github.com/bkuhlmann/style_guides/blob/master/programming/languages/bash.md).
|
12
|
-
- Follow these [CSS Styles](https://github.com/bkuhlmann/style_guides/blob/master/programming/languages/css.md).
|
13
|
-
- Follow these [Ruby Styles](https://github.com/bkuhlmann/style_guides/blob/master/programming/languages/ruby/ruby.md).
|
8
|
+
Read through the [Programming Style
|
9
|
+
Guides](https://github.com/bkuhlmann/style_guides/tree/master/programming).
|
14
10
|
|
15
11
|
# Contributing Code
|
16
12
|
|
17
|
-
0. Read the project README
|
18
|
-
0. Fork the master branch of the repository.
|
19
|
-
0. Ensure there are no setup, usage, and/or test issues (
|
20
|
-
0. Add tests for new functionality
|
21
|
-
0.
|
22
|
-
0. Push your feature branch and submit a pull request.
|
13
|
+
0. Read the project README before starting.
|
14
|
+
0. Fork the `master` branch of the repository.
|
15
|
+
0. Ensure there are no setup, usage, and/or test issues (see README for details).
|
16
|
+
0. Add tests for new functionality and ensure they pass.
|
17
|
+
0. Submit a pull request and follow the instructions it provides.
|
23
18
|
|
24
19
|
# Submitting Issues
|
25
20
|
|
26
21
|
0. Submit an issue via the GitHub Issues tab (assuming one does not already exist).
|
27
|
-
0.
|
28
|
-
0. Specify your enviroment setup (OS, browser, language, etc. with version info).
|
29
|
-
0. Provide a stack dump (if possible).
|
30
|
-
0. Explain any additional details that might help diagnose the problem quickly.
|
22
|
+
0. Follow the instructions provided within the GitHub issue template.
|
31
23
|
|
32
24
|
# Feedback
|
33
25
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemsmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
n/LUZ1dKhIHzfKx1B4+TEIefArObGfkLIDM8+Dq1RX7TF1k81Men7iu4MgE9bYBn
|
31
31
|
3dE+xI3FdB5gWcdWxdtgRCmWjtXeYYyb4z6NQQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2017-
|
33
|
+
date: 2017-02-05 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: bundler
|
@@ -457,7 +457,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
457
457
|
version: '0'
|
458
458
|
requirements: []
|
459
459
|
rubyforge_project:
|
460
|
-
rubygems_version: 2.6.
|
460
|
+
rubygems_version: 2.6.10
|
461
461
|
signing_key:
|
462
462
|
specification_version: 4
|
463
463
|
summary: A command line interface for smithing new Ruby gems.
|
metadata.gz.sig
CHANGED
Binary file
|