rubysmith 0.15.0 → 1.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/LICENSE.adoc +207 -155
- data/README.adoc +352 -93
- data/{bin → exe}/rubysmith +0 -0
- data/lib/rubysmith/builder.rb +2 -3
- data/lib/rubysmith/builders/bundler.rb +7 -11
- data/lib/rubysmith/builders/circle_ci.rb +8 -2
- data/lib/rubysmith/builders/console.rb +8 -2
- data/lib/rubysmith/builders/core.rb +7 -3
- data/lib/rubysmith/builders/documentation/{change.rb → citation.rb} +8 -8
- data/lib/rubysmith/builders/documentation/license.rb +9 -4
- data/lib/rubysmith/builders/documentation/readme.rb +12 -18
- data/lib/rubysmith/builders/documentation/{contribution.rb → version.rb} +10 -5
- data/lib/rubysmith/builders/git/commit.rb +3 -1
- data/lib/rubysmith/builders/{rubocop/setup.rb → git/ignore.rb} +11 -7
- data/lib/rubysmith/builders/git/setup.rb +2 -1
- data/lib/rubysmith/builders/git_hub.rb +8 -3
- data/lib/rubysmith/builders/guard.rb +9 -3
- data/lib/rubysmith/builders/rake.rb +9 -3
- data/lib/rubysmith/builders/reek.rb +7 -2
- data/lib/rubysmith/builders/rspec/context.rb +8 -2
- data/lib/rubysmith/builders/rspec/helper.rb +8 -2
- data/lib/rubysmith/builders/rubocop.rb +34 -0
- data/lib/rubysmith/builders/setup.rb +8 -2
- data/lib/rubysmith/cli/actions/build.rb +11 -12
- data/lib/rubysmith/cli/actions/config.rb +4 -2
- data/lib/rubysmith/cli/actions/publish.rb +21 -0
- data/lib/rubysmith/cli/parser.rb +31 -0
- data/lib/rubysmith/cli/parsers/build.rb +89 -45
- data/lib/rubysmith/cli/parsers/core.rb +14 -10
- data/lib/rubysmith/cli/shell.rb +22 -15
- data/lib/rubysmith/configuration/content.rb +174 -0
- data/lib/rubysmith/configuration/defaults.yml +89 -0
- data/lib/rubysmith/configuration/enhancers/current_time.rb +24 -0
- data/lib/rubysmith/configuration/enhancers/git_email.rb +31 -0
- data/lib/rubysmith/configuration/enhancers/git_hub_user.rb +31 -0
- data/lib/rubysmith/configuration/enhancers/git_user.rb +33 -0
- data/lib/rubysmith/configuration/loader.rb +48 -0
- data/lib/rubysmith/container.rb +1 -1
- data/lib/rubysmith/extensions/bundler.rb +30 -0
- data/lib/rubysmith/extensions/milestoner.rb +35 -0
- data/lib/rubysmith/extensions/pragmater.rb +35 -0
- data/lib/rubysmith/extensions/rubocop.rb +29 -0
- data/lib/rubysmith/extensions/tocer.rb +37 -0
- data/lib/rubysmith/identity.rb +1 -1
- data/lib/rubysmith/templates/%project_name%/.github/ISSUE_TEMPLATE.md.erb +1 -4
- data/lib/rubysmith/templates/%project_name%/.github/PULL_REQUEST_TEMPLATE.md.erb +0 -3
- data/lib/rubysmith/templates/%project_name%/.gitignore.erb +11 -0
- data/lib/rubysmith/templates/%project_name%/.rubocop.yml.erb +2 -0
- data/lib/rubysmith/templates/%project_name%/CITATION.cff.erb +16 -0
- data/lib/rubysmith/templates/%project_name%/Gemfile.erb +19 -10
- data/lib/rubysmith/templates/%project_name%/LICENSE-hippocratic.adoc.erb +214 -0
- data/lib/rubysmith/templates/%project_name%/LICENSE-hippocratic.md.erb +214 -0
- data/lib/rubysmith/templates/%project_name%/README.adoc.erb +20 -21
- data/lib/rubysmith/templates/%project_name%/README.md.erb +20 -21
- data/lib/rubysmith/templates/%project_name%/Rakefile.erb +9 -0
- data/lib/rubysmith/templates/%project_name%/VERSIONS.adoc.erb +5 -0
- data/lib/rubysmith/templates/%project_name%/VERSIONS.md.erb +5 -0
- data/lib/rubysmith/templates/%project_name%/bin/rubocop.erb +0 -1
- data.tar.gz.sig +0 -0
- metadata +61 -42
- metadata.gz.sig +0 -0
- data/lib/rubysmith/builders/documentation/conduct.rb +0 -32
- data/lib/rubysmith/builders/pragma.rb +0 -32
- data/lib/rubysmith/builders/rubocop/formatter.rb +0 -31
- data/lib/rubysmith/cli/configuration/content.rb +0 -97
- data/lib/rubysmith/cli/configuration/defaults.yml +0 -46
- data/lib/rubysmith/cli/configuration/enhancers/current_time.rb +0 -26
- data/lib/rubysmith/cli/configuration/enhancers/git_hub_user.rb +0 -33
- data/lib/rubysmith/cli/configuration/enhancers/version.rb +0 -26
- data/lib/rubysmith/cli/configuration/loader.rb +0 -46
- data/lib/rubysmith/cli/parsers/assembler.rb +0 -32
- data/lib/rubysmith/cli/parsers.rb +0 -11
- data/lib/rubysmith/templates/%project_name%/CHANGES.adoc.erb +0 -5
- data/lib/rubysmith/templates/%project_name%/CHANGES.md.erb +0 -5
- data/lib/rubysmith/templates/%project_name%/CODE_OF_CONDUCT.adoc.erb +0 -114
- data/lib/rubysmith/templates/%project_name%/CODE_OF_CONDUCT.md.erb +0 -115
- data/lib/rubysmith/templates/%project_name%/CONTRIBUTING.adoc.erb +0 -22
- data/lib/rubysmith/templates/%project_name%/CONTRIBUTING.md.erb +0 -22
@@ -1,46 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "pathname"
|
4
|
-
require "refinements/hashes"
|
5
|
-
require "refinements/structs"
|
6
|
-
require "runcom"
|
7
|
-
require "yaml"
|
8
|
-
|
9
|
-
module Rubysmith
|
10
|
-
module CLI
|
11
|
-
module Configuration
|
12
|
-
# Represents the fully assembled Command Line Interface (CLI) configuration.
|
13
|
-
class Loader
|
14
|
-
using Refinements::Hashes
|
15
|
-
using Refinements::Structs
|
16
|
-
|
17
|
-
DEFAULTS = YAML.load_file(Pathname(__dir__).join("defaults.yml")).freeze
|
18
|
-
CLIENT = Runcom::Config.new "#{Identity::NAME}/configuration.yml", defaults: DEFAULTS
|
19
|
-
|
20
|
-
ENHANCERS = [
|
21
|
-
Enhancers::GitHubUser.new,
|
22
|
-
Enhancers::CurrentTime.new,
|
23
|
-
Enhancers::Version.new
|
24
|
-
].freeze
|
25
|
-
|
26
|
-
def self.call(...) = new(...).call
|
27
|
-
|
28
|
-
def self.with_defaults = new(client: DEFAULTS, enhancers: [])
|
29
|
-
|
30
|
-
def initialize content: Content.new, client: CLIENT, enhancers: ENHANCERS
|
31
|
-
@content = content
|
32
|
-
@client = client
|
33
|
-
@enhancers = enhancers
|
34
|
-
end
|
35
|
-
|
36
|
-
def call = enhancers.reduce(preload_content) { |preload, enhancer| enhancer.call preload }
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
attr_reader :content, :client, :enhancers
|
41
|
-
|
42
|
-
def preload_content = content.merge(**client.to_h.flatten_keys)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Rubysmith
|
4
|
-
module CLI
|
5
|
-
module Parsers
|
6
|
-
# Assembles and parses all Command Line Interface (CLI) options.
|
7
|
-
class Assembler
|
8
|
-
SECTIONS = [Core, Build].freeze # Order is important.
|
9
|
-
|
10
|
-
def initialize sections: SECTIONS, client: CLIENT, container: Container
|
11
|
-
@sections = sections
|
12
|
-
@client = client
|
13
|
-
@container = container
|
14
|
-
end
|
15
|
-
|
16
|
-
def call arguments = []
|
17
|
-
sections.each { |parser| parser.call client: client }
|
18
|
-
client.parse! arguments
|
19
|
-
configuration
|
20
|
-
end
|
21
|
-
|
22
|
-
def to_s = client.to_s
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
attr_reader :sections, :client, :container
|
27
|
-
|
28
|
-
def configuration = container[__method__]
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,114 +0,0 @@
|
|
1
|
-
= Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
== Our Pledge
|
4
|
-
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our community a
|
6
|
-
harassment-free experience for everyone, regardless of age, body size, visible or invisible
|
7
|
-
disability, ethnicity, sex characteristics, gender identity and expression, level of experience,
|
8
|
-
education, socio-economic status, nationality, personal appearance, race, religion, or sexual
|
9
|
-
identity and orientation.
|
10
|
-
|
11
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and
|
12
|
-
healthy community.
|
13
|
-
|
14
|
-
== Our Standards
|
15
|
-
|
16
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
17
|
-
|
18
|
-
* Demonstrating empathy and kindness toward other people
|
19
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
20
|
-
* Giving and gracefully accepting constructive feedback
|
21
|
-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the
|
22
|
-
experience
|
23
|
-
* Focusing on what is best not just for us as individuals, but for the overall community
|
24
|
-
|
25
|
-
Examples of unacceptable behavior include:
|
26
|
-
|
27
|
-
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
28
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
29
|
-
* Public or private harassment
|
30
|
-
* Publishing others' private information, such as a physical or email address, without their
|
31
|
-
explicit permission
|
32
|
-
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
33
|
-
|
34
|
-
== Enforcement Responsibilities
|
35
|
-
|
36
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior
|
37
|
-
and will take appropriate and fair corrective action in response to any behavior that they deem
|
38
|
-
inappropriate, threatening, offensive, or harmful.
|
39
|
-
|
40
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits,
|
41
|
-
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and
|
42
|
-
will communicate reasons for moderation decisions when appropriate.
|
43
|
-
|
44
|
-
== Scope
|
45
|
-
|
46
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is
|
47
|
-
officially representing the community in public spaces. Examples of representing our community
|
48
|
-
include using an official e-mail address, posting via an official social media account, or acting as
|
49
|
-
an appointed representative at an online or offline event.
|
50
|
-
|
51
|
-
== Enforcement
|
52
|
-
|
53
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
|
54
|
-
leaders responsible for enforcement at link:mailto:<%= configuration.author_email %>?subject=Conduct[<%=
|
55
|
-
configuration.author_name %>].
|
56
|
-
|
57
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
58
|
-
|
59
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any
|
60
|
-
incident.
|
61
|
-
|
62
|
-
== Enforcement Guidelines
|
63
|
-
|
64
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for
|
65
|
-
any action they deem in violation of this Code of Conduct:
|
66
|
-
|
67
|
-
=== 1. Correction
|
68
|
-
|
69
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
|
70
|
-
unwelcome in the community.
|
71
|
-
|
72
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the
|
73
|
-
nature of the violation and an explanation of why the behavior was inappropriate. A public apology
|
74
|
-
may be requested.
|
75
|
-
|
76
|
-
=== 2. Warning
|
77
|
-
|
78
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
79
|
-
|
80
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people
|
81
|
-
involved, including unsolicited interaction with those enforcing the Code of Conduct, for a
|
82
|
-
specified period of time. This includes avoiding interactions in community spaces as well as
|
83
|
-
external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
84
|
-
|
85
|
-
=== 3. Temporary Ban
|
86
|
-
|
87
|
-
**Community Impact**: A serious violation of community standards, including sustained inappropriate
|
88
|
-
behavior.
|
89
|
-
|
90
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the
|
91
|
-
community for a specified period of time. No public or private interaction with the people involved,
|
92
|
-
including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this
|
93
|
-
period. Violating these terms may lead to a permanent ban.
|
94
|
-
|
95
|
-
=== 4. Permanent Ban
|
96
|
-
|
97
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including
|
98
|
-
sustained inappropriate behavior, harassment of an individual, or aggression toward or
|
99
|
-
disparagement of classes of individuals.
|
100
|
-
|
101
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
102
|
-
|
103
|
-
== Attribution
|
104
|
-
|
105
|
-
This Code of Conduct is adapted from the
|
106
|
-
link:https://www.contributor-covenant.org/version/2/0/code_of_conduct.html[Contributor Covenant,
|
107
|
-
Version 2.0].
|
108
|
-
|
109
|
-
Community Impact Guidelines were inspired by link:https://github.com/mozilla/diversity[Mozilla's
|
110
|
-
code of conduct enforcement ladder].
|
111
|
-
|
112
|
-
For answers to common questions about this code of conduct, see the
|
113
|
-
link:https://www.contributor-covenant.org/faq[FAQ]. Translations are available
|
114
|
-
link:https://www.contributor-covenant.org/translations[here].
|
@@ -1,115 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our community a
|
6
|
-
harassment-free experience for everyone, regardless of age, body size, visible or invisible
|
7
|
-
disability, ethnicity, sex characteristics, gender identity and expression, level of experience,
|
8
|
-
education, socio-economic status, nationality, personal appearance, race, religion, or sexual
|
9
|
-
identity and orientation.
|
10
|
-
|
11
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and
|
12
|
-
healthy community.
|
13
|
-
|
14
|
-
## Our Standards
|
15
|
-
|
16
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
17
|
-
|
18
|
-
* Demonstrating empathy and kindness toward other people
|
19
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
20
|
-
* Giving and gracefully accepting constructive feedback
|
21
|
-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the
|
22
|
-
experience
|
23
|
-
* Focusing on what is best not just for us as individuals, but for the overall community
|
24
|
-
|
25
|
-
Examples of unacceptable behavior include:
|
26
|
-
|
27
|
-
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
28
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
29
|
-
* Public or private harassment
|
30
|
-
* Publishing others' private information, such as a physical or email address, without their
|
31
|
-
explicit permission
|
32
|
-
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
33
|
-
|
34
|
-
## Enforcement Responsibilities
|
35
|
-
|
36
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior
|
37
|
-
and will take appropriate and fair corrective action in response to any behavior that they deem
|
38
|
-
inappropriate, threatening, offensive, or harmful.
|
39
|
-
|
40
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits,
|
41
|
-
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and
|
42
|
-
will communicate reasons for moderation decisions when appropriate.
|
43
|
-
|
44
|
-
## Scope
|
45
|
-
|
46
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is
|
47
|
-
officially representing the community in public spaces. Examples of representing our community
|
48
|
-
include using an official e-mail address, posting via an official social media account, or acting as
|
49
|
-
an appointed representative at an online or offline event.
|
50
|
-
|
51
|
-
## Enforcement
|
52
|
-
|
53
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
|
54
|
-
leaders responsible for enforcement at [<%= configuration.author_name %>](mailto:<%= configuration.author_email
|
55
|
-
%>?subject=Conduct).
|
56
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
57
|
-
|
58
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any
|
59
|
-
incident.
|
60
|
-
|
61
|
-
## Enforcement Guidelines
|
62
|
-
|
63
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for
|
64
|
-
any action they deem in violation of this Code of Conduct:
|
65
|
-
|
66
|
-
### 1. Correction
|
67
|
-
|
68
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
|
69
|
-
unwelcome in the community.
|
70
|
-
|
71
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the
|
72
|
-
nature of the violation and an explanation of why the behavior was inappropriate. A public apology
|
73
|
-
may be requested.
|
74
|
-
|
75
|
-
### 2. Warning
|
76
|
-
|
77
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
78
|
-
|
79
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people
|
80
|
-
involved, including unsolicited interaction with those enforcing the Code of Conduct, for a
|
81
|
-
specified period of time. This includes avoiding interactions in community spaces as well as
|
82
|
-
external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
83
|
-
|
84
|
-
### 3. Temporary Ban
|
85
|
-
|
86
|
-
**Community Impact**: A serious violation of community standards, including
|
87
|
-
sustained inappropriate behavior.
|
88
|
-
|
89
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the
|
90
|
-
community for a specified period of time. No public or private interaction with the people involved,
|
91
|
-
including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this
|
92
|
-
period. Violating these terms may lead to a permanent ban.
|
93
|
-
|
94
|
-
### 4. Permanent Ban
|
95
|
-
|
96
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including
|
97
|
-
sustained inappropriate behavior, harassment of an individual, or aggression toward or
|
98
|
-
disparagement of classes of individuals.
|
99
|
-
|
100
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
101
|
-
|
102
|
-
## Attribution
|
103
|
-
|
104
|
-
This Code of Conduct is adapted from the [Contributor Covenant, Version
|
105
|
-
2.0](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html)
|
106
|
-
|
107
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement
|
108
|
-
ladder](https://github.com/mozilla/diversity).
|
109
|
-
|
110
|
-
[homepage]: https://www.contributor-covenant.org
|
111
|
-
|
112
|
-
For answers to common questions about this code of conduct, see the
|
113
|
-
[FAQ](https://www.contributor-covenant.org/faq). Translations are available
|
114
|
-
[here](https://www.contributor-covenant.org/translations).
|
115
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
= Contributing
|
2
|
-
|
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
|
-
|
6
|
-
== Code
|
7
|
-
|
8
|
-
. Read the project link:README.adoc[README] before starting.
|
9
|
-
. Fork and clone the `master` branch of this repository locally.
|
10
|
-
. Ensure there are no setup, usage, and/or test issues.
|
11
|
-
. Add tests for new functionality and ensure they pass.
|
12
|
-
. Submit a pull request, follow the instructions provided, and ensure the build passes.
|
13
|
-
|
14
|
-
== Issues
|
15
|
-
|
16
|
-
Submit an issue via the GitHub Issues tab (assuming one does not already exist) and follow the
|
17
|
-
instructions provided.
|
18
|
-
|
19
|
-
== Feedback
|
20
|
-
|
21
|
-
* Expect a response within one to three business days.
|
22
|
-
* Changes, alternatives, and/or improvements may be suggested upon review.
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# Contributing
|
2
|
-
|
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
|
-
|
6
|
-
## Code
|
7
|
-
|
8
|
-
1. Read the project README before starting.
|
9
|
-
1. Fork and clone the `master` branch of this repository locally.
|
10
|
-
1. Ensure there are no local setup, usage, and/or test issues.
|
11
|
-
1. Add tests for new functionality and ensure they pass.
|
12
|
-
1. Submit a pull request, follow the instructions provided, and ensure the build passes.
|
13
|
-
|
14
|
-
## Issues
|
15
|
-
|
16
|
-
- Submit an issue via the GitHub Issues tab (assuming one does not already exist) and follow the
|
17
|
-
instructions provided.
|
18
|
-
|
19
|
-
## Feedback
|
20
|
-
|
21
|
-
- Expect a response within one to three business days.
|
22
|
-
- Changes, alternatives, and/or improvements may be suggested upon review.
|