gemsmith 15.5.0 → 16.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/LICENSE.adoc +207 -155
  4. data/README.adoc +177 -189
  5. data/exe/gemsmith +6 -0
  6. data/gemsmith.gemspec +41 -0
  7. data/lib/gemsmith/builders/bundler.rb +34 -0
  8. data/lib/gemsmith/builders/cli.rb +86 -0
  9. data/lib/gemsmith/builders/git/commit.rb +46 -0
  10. data/lib/gemsmith/builders/git/ignore.rb +37 -0
  11. data/lib/gemsmith/builders/rspec/helper.rb +47 -0
  12. data/lib/gemsmith/builders/specification.rb +35 -0
  13. data/lib/gemsmith/cli/actions/build.rb +53 -0
  14. data/lib/gemsmith/cli/actions/config.rb +35 -0
  15. data/lib/gemsmith/cli/actions/edit.rb +38 -0
  16. data/lib/gemsmith/cli/actions/install.rb +36 -0
  17. data/lib/gemsmith/cli/actions/publish.rb +36 -0
  18. data/lib/gemsmith/cli/actions/view.rb +38 -0
  19. data/lib/gemsmith/cli/parser.rb +33 -0
  20. data/lib/gemsmith/cli/parsers/build.rb +54 -0
  21. data/lib/gemsmith/cli/parsers/core.rb +94 -0
  22. data/lib/gemsmith/cli/shell.rb +66 -0
  23. data/lib/gemsmith/configuration/enhancers/template_root.rb +20 -0
  24. data/lib/gemsmith/configuration/loader.rb +50 -0
  25. data/lib/gemsmith/container.rb +21 -0
  26. data/lib/gemsmith/gems/finder.rb +21 -0
  27. data/lib/gemsmith/gems/loader.rb +21 -0
  28. data/lib/gemsmith/gems/picker.rb +43 -0
  29. data/lib/gemsmith/gems/presenter.rb +50 -0
  30. data/lib/gemsmith/templates/%project_name%/%project_name%.gemspec.erb +49 -0
  31. data/lib/gemsmith/templates/%project_name%/exe/%project_name%.erb +5 -0
  32. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/actions/config.rb.erb +35 -0
  33. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parser.rb.erb +31 -0
  34. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/parsers/core.rb.erb +54 -0
  35. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/shell.rb.erb +38 -0
  36. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/configuration/content.rb.erb +18 -0
  37. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/configuration/defaults.yml.erb +0 -0
  38. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/configuration/loader.rb.erb +33 -0
  39. data/lib/gemsmith/templates/%project_name%/lib/%project_path%/container.rb.erb +35 -0
  40. data/lib/gemsmith/templates/{%gem_name%/lib/%gem_path%/identity.rb.tt → %project_name%/lib/%project_path%/identity.rb.erb} +1 -1
  41. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/actions/config_spec.rb.erb +24 -0
  42. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parser_spec.rb.erb +25 -0
  43. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/parsers/core_spec.rb.erb +53 -0
  44. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/cli/shell_spec.rb.erb +43 -0
  45. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/configuration/content_spec.rb.erb +15 -0
  46. data/lib/gemsmith/templates/%project_name%/spec/lib/%project_path%/configuration/loader_spec.rb.erb +29 -0
  47. data/lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_container.rb.erb +22 -0
  48. data/lib/gemsmith/templates/%project_name%/spec/support/shared_examples/a_parser.rb.erb +7 -0
  49. data/lib/gemsmith/tools/cleaner.rb +29 -0
  50. data/lib/gemsmith/tools/editor.rb +30 -0
  51. data/lib/gemsmith/tools/installer.rb +39 -0
  52. data/lib/gemsmith/tools/packager.rb +33 -0
  53. data/lib/gemsmith/tools/publisher.rb +34 -0
  54. data/lib/gemsmith/tools/pusher.rb +36 -0
  55. data/lib/gemsmith/tools/validator.rb +28 -0
  56. data/lib/gemsmith/tools/versioner.rb +43 -0
  57. data/lib/gemsmith/tools/viewer.rb +28 -0
  58. data/lib/gemsmith.rb +5 -3
  59. data.tar.gz.sig +0 -0
  60. metadata +87 -115
  61. metadata.gz.sig +0 -0
  62. data/bin/gemsmith +0 -9
  63. data/lib/gemsmith/authenticators/basic.rb +0 -28
  64. data/lib/gemsmith/authenticators/ruby_gems.rb +0 -41
  65. data/lib/gemsmith/cli.rb +0 -259
  66. data/lib/gemsmith/credentials.rb +0 -82
  67. data/lib/gemsmith/errors/base.rb +0 -9
  68. data/lib/gemsmith/errors/requirement_conversion.rb +0 -9
  69. data/lib/gemsmith/errors/requirement_operator.rb +0 -9
  70. data/lib/gemsmith/errors/specification.rb +0 -9
  71. data/lib/gemsmith/gem/inspector.rb +0 -30
  72. data/lib/gemsmith/gem/module_formatter.rb +0 -50
  73. data/lib/gemsmith/gem/requirement.rb +0 -55
  74. data/lib/gemsmith/gem/specification.rb +0 -74
  75. data/lib/gemsmith/generators/base.rb +0 -46
  76. data/lib/gemsmith/generators/bundler.rb +0 -19
  77. data/lib/gemsmith/generators/bundler_audit.rb +0 -15
  78. data/lib/gemsmith/generators/circle_ci.rb +0 -14
  79. data/lib/gemsmith/generators/cli.rb +0 -17
  80. data/lib/gemsmith/generators/documentation.rb +0 -36
  81. data/lib/gemsmith/generators/engine.rb +0 -77
  82. data/lib/gemsmith/generators/gem.rb +0 -29
  83. data/lib/gemsmith/generators/git.rb +0 -45
  84. data/lib/gemsmith/generators/git_hub.rb +0 -15
  85. data/lib/gemsmith/generators/git_lint.rb +0 -14
  86. data/lib/gemsmith/generators/guard.rb +0 -14
  87. data/lib/gemsmith/generators/pragma.rb +0 -49
  88. data/lib/gemsmith/generators/rake.rb +0 -76
  89. data/lib/gemsmith/generators/reek.rb +0 -17
  90. data/lib/gemsmith/generators/rspec.rb +0 -39
  91. data/lib/gemsmith/generators/rubocop.rb +0 -18
  92. data/lib/gemsmith/generators/ruby.rb +0 -12
  93. data/lib/gemsmith/helpers/cli.rb +0 -59
  94. data/lib/gemsmith/helpers/template.rb +0 -30
  95. data/lib/gemsmith/identity.rb +0 -12
  96. data/lib/gemsmith/rake/builder.rb +0 -57
  97. data/lib/gemsmith/rake/publisher.rb +0 -100
  98. data/lib/gemsmith/rake/setup.rb +0 -4
  99. data/lib/gemsmith/rake/tasks.rb +0 -83
  100. data/lib/gemsmith/templates/%gem_name%/%gem_name%.gemspec.tt +0 -44
  101. data/lib/gemsmith/templates/%gem_name%/.circleci/config.yml.tt +0 -31
  102. data/lib/gemsmith/templates/%gem_name%/.github/ISSUE_TEMPLATE.md.tt +0 -14
  103. data/lib/gemsmith/templates/%gem_name%/.github/PULL_REQUEST_TEMPLATE.md.tt +0 -11
  104. data/lib/gemsmith/templates/%gem_name%/.gitignore.tt +0 -6
  105. data/lib/gemsmith/templates/%gem_name%/.reek.yml.tt +0 -6
  106. data/lib/gemsmith/templates/%gem_name%/.rubocop.yml.tt +0 -15
  107. data/lib/gemsmith/templates/%gem_name%/.ruby-version.tt +0 -1
  108. data/lib/gemsmith/templates/%gem_name%/CHANGES.md.tt +0 -3
  109. data/lib/gemsmith/templates/%gem_name%/CODE_OF_CONDUCT.md.tt +0 -66
  110. data/lib/gemsmith/templates/%gem_name%/CONTRIBUTING.md.tt +0 -22
  111. data/lib/gemsmith/templates/%gem_name%/Gemfile.tt +0 -47
  112. data/lib/gemsmith/templates/%gem_name%/Guardfile.tt +0 -21
  113. data/lib/gemsmith/templates/%gem_name%/LICENSE.md.tt +0 -20
  114. data/lib/gemsmith/templates/%gem_name%/README.md.tt +0 -93
  115. data/lib/gemsmith/templates/%gem_name%/Rakefile.tt +0 -12
  116. data/lib/gemsmith/templates/%gem_name%/bin/%gem_name%.tt +0 -8
  117. data/lib/gemsmith/templates/%gem_name%/bin/console.tt +0 -10
  118. data/lib/gemsmith/templates/%gem_name%/bin/setup.tt +0 -8
  119. data/lib/gemsmith/templates/%gem_name%/lib/%gem_path%/cli.rb.tt +0 -61
  120. data/lib/gemsmith/templates/%gem_name%/lib/%gem_path%/engine.rb.tt +0 -6
  121. data/lib/gemsmith/templates/%gem_name%/lib/%gem_path%.rb.tt +0 -7
  122. data/lib/gemsmith/templates/%gem_name%/lib/generators/%gem_path%/install/USAGE.tt +0 -8
  123. data/lib/gemsmith/templates/%gem_name%/lib/generators/%gem_path%/install/install_generator.rb.tt +0 -12
  124. data/lib/gemsmith/templates/%gem_name%/lib/generators/%gem_path%/upgrade/USAGE.tt +0 -8
  125. data/lib/gemsmith/templates/%gem_name%/lib/generators/%gem_path%/upgrade/upgrade_generator.rb.tt +0 -10
  126. data/lib/gemsmith/templates/%gem_name%/spec/lib/%gem_path%/cli_spec.rb.tt +0 -81
  127. data/lib/gemsmith/templates/%gem_name%/spec/rails_helper.rb.tt +0 -14
  128. data/lib/gemsmith/templates/%gem_name%/spec/spec_helper.rb.tt +0 -37
  129. data/lib/gemsmith/templates/%gem_name%/spec/support/shared_contexts/temp_dir.rb.tt +0 -9
@@ -1,100 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "milestoner"
4
- require "refinements/pathnames"
5
- require "refinements/structs"
6
- require "gemsmith/identity"
7
- require "gemsmith/credentials"
8
- require "gemsmith/cli"
9
-
10
- module Gemsmith
11
- module Rake
12
- # Provides gem release functionality. Meant to be wrapped in Rake tasks.
13
- # :reek:TooManyInstanceVariables
14
- class Publisher
15
- using Refinements::Pathnames
16
- using Refinements::Structs
17
-
18
- def self.gem_spec_path
19
- Pathname.pwd.files("*.gemspec").first.to_s
20
- end
21
-
22
- # rubocop:disable Metrics/ParameterLists
23
- # :reek:LongParameterList
24
- def initialize gem_spec: Gemsmith::Gem::Specification.new(self.class.gem_spec_path.to_s),
25
- gem_config: Gemsmith::CLI.configuration.to_h,
26
- credentials: Gemsmith::Credentials,
27
- publisher: Milestoner::Tags::Publisher.new,
28
- milestoner_container: Milestoner::Container,
29
- shell: Bundler::UI::Shell.new,
30
- kernel: Kernel
31
-
32
- @gem_spec = gem_spec
33
- @gem_config = gem_config
34
- @credentials = credentials
35
- @publisher = publisher
36
- @milestoner_container = milestoner_container
37
- @shell = shell
38
- @kernel = kernel
39
- end
40
- # rubocop:enable Metrics/ParameterLists
41
-
42
- def push
43
- credentials.new(key: gem_spec.allowed_push_key.to_sym, url: gem_host)
44
- .tap(&:create)
45
- .then { |creds| %(--key "#{translate_key creds.key}" --host "#{gem_host}") }
46
- .then { |options| execute_push options }
47
- .then { |status| output_push status }
48
- end
49
-
50
- def publish
51
- milestoner_configuration.merge(git_tag_version: gem_spec.version, git_tag_sign: signed?)
52
- .then { |configuration| publisher.call configuration }
53
- push
54
- rescue Milestoner::Error => error
55
- shell.error error.message
56
- end
57
-
58
- def signed?
59
- gem_config.dig :publish, :sign
60
- end
61
-
62
- private
63
-
64
- attr_reader :gem_spec,
65
- :gem_config,
66
- :credentials,
67
- :publisher,
68
- :milestoner_container,
69
- :shell,
70
- :kernel
71
-
72
- def gem_host
73
- gem_spec.allowed_push_host
74
- end
75
-
76
- def translate_key key
77
- key == credentials::DEFAULT_KEY ? :rubygems : key
78
- end
79
-
80
- def execute_push options
81
- kernel.system %(gem push "pkg/#{gem_spec.package_file_name}" #{options})
82
- end
83
-
84
- def output_push status
85
- package = gem_spec.package_file_name
86
-
87
- if status
88
- shell.confirm "Pushed #{package} to #{gem_host}."
89
- else
90
- shell.error "Failed pushing #{package} to #{gem_host}. " \
91
- "Check gemspec and gem credential settings."
92
- end
93
-
94
- status
95
- end
96
-
97
- def milestoner_configuration = milestoner_container[:configuration]
98
- end
99
- end
100
- end
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "gemsmith/rake/tasks"
4
- Gemsmith::Rake::Tasks.setup
@@ -1,83 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "rake"
4
- require "refinements/pathnames"
5
- require "tocer/rake/tasks"
6
- require "gemsmith/gem/specification"
7
- require "gemsmith/errors/base"
8
- require "gemsmith/errors/specification"
9
- require "gemsmith/rake/builder"
10
- require "gemsmith/rake/publisher"
11
-
12
- module Gemsmith
13
- module Rake
14
- # Provides Rake tasks for use in all gems built by this gem.
15
- class Tasks
16
- include ::Rake::DSL
17
-
18
- using Refinements::Pathnames
19
-
20
- def self.default_gem_spec
21
- Pathname.pwd.files("*.gemspec").first
22
- end
23
-
24
- def self.setup
25
- new.install
26
- end
27
-
28
- def initialize gem_spec: Gem::Specification.new(self.class.default_gem_spec.to_s),
29
- builder: Rake::Builder.new,
30
- publisher: Rake::Publisher.new
31
- @gem_spec = gem_spec
32
- @builder = builder
33
- @publisher = publisher
34
- end
35
-
36
- # rubocop:disable Metrics/AbcSize
37
- # rubocop:disable Metrics/MethodLength
38
- # :reek:TooManyStatements
39
- def install
40
- Tocer::Rake::Tasks.setup
41
-
42
- desc "Clean gem artifacts"
43
- task :clean do
44
- builder.clean
45
- end
46
-
47
- task :validate do
48
- builder.validate
49
- end
50
-
51
- desc "Build #{gem_package} package"
52
- task build: %i[clean toc validate] do
53
- builder.build gem_spec
54
- end
55
-
56
- desc "Install #{gem_package} package"
57
- task install: :build do
58
- builder.install gem_spec
59
- end
60
-
61
- desc "Build, tag as #{gem_spec.version} (#{signed_label}), " \
62
- "and push #{gem_package} to RubyGems"
63
- task publish: :build do
64
- publisher.publish
65
- end
66
- end
67
- # rubocop:enable Metrics/AbcSize
68
- # rubocop:enable Metrics/MethodLength
69
-
70
- private
71
-
72
- attr_reader :gem_spec, :builder, :publisher
73
-
74
- def gem_package
75
- gem_spec.package_file_name
76
- end
77
-
78
- def signed_label
79
- publisher.signed? ? "signed" : "unsigned"
80
- end
81
- end
82
- end
83
- end
@@ -1,44 +0,0 @@
1
- require_relative "lib/<%= config.dig(:gem, :path) %>/identity"
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = <%= config.dig(:gem, :class) %>::Identity::NAME
5
- spec.version = <%= config.dig(:gem, :class) %>::Identity::VERSION
6
- spec.platform = <%= config.dig(:gem, :platform) %>
7
- spec.authors = ["<%= config.dig(:author, :name) %>"]
8
- spec.email = ["<%= config.dig(:author, :email) %>"]
9
- spec.homepage = "<%= config.dig(:gem, :url) %>"
10
- spec.summary = ""
11
- spec.license = "MIT"
12
-
13
- spec.metadata = {
14
- "bug_tracker_uri" => "<%= config.dig(:gem, :url) %>/issues",
15
- "changelog_uri" => "<%= config.dig(:gem, :url) %>/blob/master/CHANGES.md",
16
- "documentation_uri" => "<%= config.dig(:gem, :url) %>",
17
- "source_code_uri" => "<%= config.dig(:gem, :url) %>"
18
- }
19
-
20
- <%- if config.dig(:generate, :security) -%>
21
- spec.signing_key = Gem.default_key_path
22
- spec.cert_chain = [Gem.default_cert_path]
23
- <%- end -%>
24
-
25
- spec.required_ruby_version = "~> <%= config.dig(:versions, :ruby)[/\d+\.\d+/] %>"
26
- <%- if config.dig(:generate, :engine) -%>
27
- spec.add_dependency "rails", "~> <%= config.dig(:versions, :rails) %>"
28
- <%- end -%>
29
- <%- if config.dig(:generate, :cli) -%>
30
- spec.add_dependency "runcom", "~> 7.0"
31
- spec.add_dependency "thor", "~> 0.20"
32
- <%- end -%>
33
-
34
- <%- if config.dig(:generate, :engine) -%>
35
- spec.files = Dir["app/**/*", "bin/**/*", "config/**/*", "lib/**/*", "vendor/**/*"]
36
- <%- else -%>
37
- spec.files = Dir["lib/**/*"]
38
- <%- end -%>
39
- spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
40
- <%- if config.dig(:generate, :cli) -%>
41
- spec.executables << "<%= config.dig(:gem, :name) %>"
42
- <%- end -%>
43
- spec.require_paths = ["lib"]
44
- end
@@ -1,31 +0,0 @@
1
- version: 2.1
2
- jobs:
3
- build:
4
- working_directory: ~/project
5
- docker:
6
- - image: bkuhlmann/alpine-ruby:latest
7
- steps:
8
- - checkout
9
-
10
- - restore_cache:
11
- name: Bundler Restore
12
- keys:
13
- - gem-cache-{{.Branch}}-{{checksum "<%= config.dig(:gem, :name) %>.gemspec"}}
14
- - gem-cache-
15
-
16
- - run:
17
- name: Bundler Install
18
- command: |
19
- gem update --system
20
- bundle config set path "vendor/bundle"
21
- bundle install
22
-
23
- - save_cache:
24
- name: Bundler Store
25
- key: gem-cache-{{.Branch}}-{{checksum "<%= config.dig(:gem, :name) %>.gemspec"}}
26
- paths:
27
- - vendor/bundle
28
-
29
- - run:
30
- name: Build
31
- command: bundle exec rake
@@ -1,14 +0,0 @@
1
- ## Overview
2
- <!-- Required. Describe, briefly, the behavior experienced. -->
3
-
4
- ## Screenshots/Screencasts
5
- <!-- Optional. Attach screenshot(s) and/or screencast(s) that demo the behavior. -->
6
-
7
- ## Steps to Recreate
8
- <!-- Required. List exact steps (numbered list) to reproduce errant behavior. -->
9
-
10
- ## Desired Behavior
11
- <!-- Required. Describe the behavior you'd like to see or your idea of a proposed solution. -->
12
-
13
- ## Environment
14
- <!-- Required. What is your operating system, software version(s), etc. -->
@@ -1,11 +0,0 @@
1
- ## Overview
2
- <!-- Required. Why is this important/necessary and what is the overarching architecture. -->
3
-
4
- ## Screenshots/Screencasts
5
- <!-- Optional. Provide supporting image/video. -->
6
-
7
- ## Details
8
- <!-- Optional. List the key features/highlights as bullet points. -->
9
-
10
- ## Notes
11
- <!-- Optional. List additional notes/references as bullet points. -->
@@ -1,6 +0,0 @@
1
- *.gem
2
- .bundle
3
- .rubocop-http*
4
- pkg/*
5
- Gemfile.lock
6
- tmp
@@ -1,6 +0,0 @@
1
- detectors:
2
- IrresponsibleModule:
3
- enabled: false
4
- exclude_paths:
5
- - tmp
6
- - vendor
@@ -1,15 +0,0 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/ruby.yml
3
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/rake.yml
4
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/performance.yml
5
- <%- if config.dig(:generate, :rspec) -%>
6
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/rspec.yml
7
- <%- end -%>
8
- <%- if config.dig(:generate, :engine) -%>
9
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/rails.yml
10
- <%- end -%>
11
-
12
- <%- if config.dig(:generate, :cli) -%>
13
- Lint/Void:
14
- CheckForMethodsWithNoSideEffects: false
15
- <%- end -%>
@@ -1 +0,0 @@
1
- <%= config.dig(:versions, :ruby) %>
@@ -1,3 +0,0 @@
1
- # 0.1.0 (<%= Time.now.strftime "%Y-%m-%d" %>)
2
-
3
- - Added initial implementation.
@@ -1,66 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as contributors and maintainers
6
- pledge to making participation in our project and our community a harassment-free experience for
7
- everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity
8
- and expression, level of experience, education, socio-economic status, nationality, personal
9
- appearance, race, religion, or sexual identity and orientation.
10
-
11
- ## Our Standards
12
-
13
- Examples of behavior that contributes to creating a positive environment include:
14
-
15
- * Using welcoming and inclusive language
16
- * Being respectful of differing viewpoints and experiences
17
- * Gracefully accepting constructive criticism
18
- * Focusing on what is best for the community
19
- * Showing empathy towards other community members
20
-
21
- Examples of unacceptable behavior by participants include:
22
-
23
- * The use of sexualized language or imagery and unwelcome sexual attention or advances
24
- * Trolling, insulting/derogatory comments, and personal or political attacks
25
- * Public or private harassment
26
- * Publishing others' private information, such as a physical or electronic address, without explicit
27
- permission
28
- * Other conduct which could reasonably be considered inappropriate in a professional setting
29
-
30
- ## Our Responsibilities
31
-
32
- Project maintainers are responsible for clarifying the standards of acceptable behavior and are
33
- expected to take appropriate and fair corrective action in response to any instances of unacceptable
34
- behavior.
35
-
36
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
37
- code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or
38
- to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate,
39
- threatening, offensive, or harmful.
40
-
41
- ## Scope
42
-
43
- This Code of Conduct applies both within project spaces and in public spaces when an individual is
44
- representing the project or its community. Examples of representing a project or community include
45
- using an official project e-mail address, posting via an official social media account, or acting as
46
- an appointed representative at an online or offline event. Representation of a project may be
47
- further defined and clarified by project maintainers.
48
-
49
- ## Enforcement
50
-
51
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting
52
- the project team at [<%= config.dig :author, :name %>](mailto:<%= config.dig :author, :email %>).
53
- All complaints will be reviewed and investigated and will result in a response that is deemed
54
- necessary and appropriate to the circumstances. The project team is obligated to maintain
55
- confidentiality with regard to the reporter of an incident. Further details of specific enforcement
56
- policies may be posted separately.
57
-
58
- Project maintainers who do not follow or enforce the Code of Conduct in good faith may face
59
- temporary or permanent repercussions as determined by other members of the project's leadership.
60
-
61
- ## Attribution
62
-
63
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
64
- available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
65
-
66
- [homepage]: https://www.contributor-covenant.org
@@ -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.
@@ -1,47 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- group :code_quality do
6
- <%- if config.dig(:generate, :bundler_audit) -%>
7
- gem "bundler-audit", "~> 0.7"
8
- <%- end -%>
9
- <%- if config.dig(:generate, :git_lint) -%>
10
- gem "git-lint", "~> 2.0"
11
- <%- end -%>
12
- <%- if config.dig(:generate, :reek) -%>
13
- gem "reek", "~> 6.0"
14
- <%- end -%>
15
- <%- if config.dig(:generate, :rubocop) -%>
16
- gem "rubocop", "~> 1.14"
17
- gem "rubocop-performance", "~> 1.8"
18
- gem "rubocop-rake", "~> 0.5"
19
- <%- end -%>
20
- <%- if config.dig(:generate, :rubocop) && config.dig(:generate, :rspec) -%>
21
- gem "rubocop-rspec", "~> 2.0"
22
- <%- end -%>
23
- <%- if config.dig(:generate, :simple_cov) -%>
24
- gem "simplecov", "~> 0.20"
25
- <%- end -%>
26
- end
27
-
28
- group :development do
29
- gem "gemsmith", "~> <%= Gemsmith::Identity::VERSION[/\d+\.\d+/] %>"
30
- gem "rake", "~> 13.0"
31
- end
32
-
33
- group :test do
34
- <%- if config.dig(:generate, :guard) -%>
35
- gem "guard-rspec", "~> 4.7", require: false
36
- <%- end -%>
37
- <%- if config.dig(:generate, :rspec) -%>
38
- gem "<%= config.dig(:generate, :engine) ? "rspec-rails" : "rspec" %>", "~> 3.9"
39
- <%- end -%>
40
- end
41
-
42
- group :tools do
43
- <%- if config.dig(:generate, :pry) -%>
44
- gem "pry", "~> 0.13"
45
- gem "pry-byebug", "~> 3.9"
46
- <%- end -%>
47
- end
@@ -1,21 +0,0 @@
1
- guard :rspec, cmd: "bundle exec rspec --format documentation" do
2
- watch %r(^spec/.+_spec\.rb$)
3
- watch(%r(^lib/(.+)\.rb$)) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
- watch("spec/spec_helper.rb") { "spec" }
5
- <%- if config.dig(:generate, :engine) -%>
6
-
7
- # Rails
8
- watch(%r(^app/(.+)\.rb$)) { |m| "spec/#{m[1]}_spec.rb" }
9
- watch(%r(^app/(.*)(\.erb|\.haml|\.slim)$)) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
10
- watch(%r(^app/controllers/(.+)_(controller)\.rb$)) do |m|
11
- ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb"]
12
- end
13
- watch(%r(^spec/support/(.+)\.rb$)) { "spec" }
14
- watch("config/routes.rb") { "spec/routing" }
15
- watch("app/controllers/application_controller.rb") { "spec/controllers" }
16
- watch("spec/rails_helper.rb") { "spec" }
17
-
18
- # Capybara
19
- watch(%r(^app/views/(.+)/.*\.(erb|haml|slim)$)) { |m| "spec/features/#{m[1]}_spec.rb" }
20
- <%- end -%>
21
- end
@@ -1,20 +0,0 @@
1
- Copyright <%= config.fetch :year %> [<%= config.dig :organization, :name %>](<%= config.dig :organization, :url %>).
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,93 +0,0 @@
1
- <p align="center">
2
- <img src="<%= config.dig(:gem, :name) %>.png" alt="<%= config.dig(:gem, :label) %> Icon"/>
3
- </p>
4
-
5
- # <%= config.dig(:gem, :label) %>
6
-
7
- [![Gem Version](https://badge.fury.io/rb/<%= config.dig(:gem, :name) %>.svg)](http://badge.fury.io/rb/<%= config.dig(:gem, :name) %>)
8
- <%- if config.dig(:generate, :rubocop) -%>
9
- [![Alchemists Style Guide](https://img.shields.io/badge/code_style-alchemists-brightgreen.svg)](https://www.alchemists.io/projects/code_quality)
10
- <%- end -%>
11
- <%- if config.dig(:generate, :circle_ci) -%>
12
- [![Circle CI Status](https://circleci.com/gh/<%= config.fetch :github_user %>/<%= config.dig :gem, :name %>.svg?style=svg)](https://circleci.com/gh/<%= config.fetch :github_user %>/<%= config.dig :gem, :name %>)
13
- <%- end -%>
14
-
15
- <!-- Tocer[start]: Auto-generated, don't remove. -->
16
- <!-- Tocer[finish]: Auto-generated, don't remove. -->
17
-
18
- ## Features
19
-
20
- ## Screencasts
21
-
22
- ## Requirements
23
-
24
- 1. [Ruby](https://www.ruby-lang.org)
25
- <%- if config.dig(:generate, :engine) -%>
26
- 1. [Ruby on Rails](https://rubyonrails.org)
27
- <%- end -%>
28
-
29
- ## Setup
30
-
31
- To install, run:
32
-
33
- gem install <%= config.dig(:gem, :name) %>
34
-
35
- <%- unless config.dig(:generate, :cli) -%>
36
- Add the following to your Gemfile:
37
-
38
- gem "<%= config.dig(:gem, :name) %>"
39
- <%- end -%>
40
-
41
- ## Usage
42
-
43
- ## Development
44
-
45
- To contribute, run:
46
-
47
- git clone https://github.com/<%= config.dig(:github_user) %>/<%= config.dig(:gem, :name) %>.git
48
- cd <%= config.dig(:gem, :name) %>
49
- bin/setup
50
-
51
- You can also use the IRB console for direct access to all objects:
52
-
53
- bin/console
54
-
55
- <%- if config.dig(:generate, :rspec) -%>
56
- ## Tests
57
-
58
- To test, run:
59
-
60
- bundle exec rake
61
- <%- end -%>
62
-
63
- ## Versioning
64
-
65
- Read [Semantic Versioning](https://semver.org) for details. Briefly, it means:
66
-
67
- - Major (X.y.z) - Incremented for any backwards incompatible public API changes.
68
- - Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
69
- - Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
70
-
71
- ## Code of Conduct
72
-
73
- Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By
74
- participating in this project you agree to abide by its terms.
75
-
76
- ## Contributions
77
-
78
- Read [CONTRIBUTING](CONTRIBUTING.md) for details.
79
-
80
- ## License
81
-
82
- Copyright <%= config.fetch :year %> [<%= config.dig :organization, :name %>](<%= config.dig :organization, :url %>).
83
- Read [LICENSE](LICENSE.md) for details.
84
-
85
- ## History
86
-
87
- Read [CHANGES](CHANGES.md) for details.
88
- Built with [Gemsmith](https://www.alchemists.io/projects/gemsmith).
89
-
90
- ## Credits
91
-
92
- Developed by [<%= config.dig(:author, :name) %>](<%= config.dig :author, :url %>) at
93
- [<%= config.dig :organization, :name %>](<%= config.dig :organization, :url %>).
@@ -1,12 +0,0 @@
1
- require "bundler/setup"
2
- require "bundler/audit/task"
3
- require "gemsmith/rake/setup"
4
- require "git/lint/rake/setup"
5
- require "reek/rake/task"
6
- require "rspec/core/rake_task"
7
- require "rubocop/rake_task"
8
-
9
- Bundler::Audit::Task.new
10
- Reek::Rake::Task.new
11
- RSpec::Core::RakeTask.new :spec
12
- RuboCop::RakeTask.new
@@ -1,8 +0,0 @@
1
- #! /usr/bin/env ruby
2
-
3
- require "<%= config.dig(:gem, :path) %>"
4
- require "<%= config.dig(:gem, :path) %>/cli"
5
- require "<%= config.dig(:gem, :path) %>/identity"
6
-
7
- Process.setproctitle <%= config.dig(:gem, :class) %>::Identity::VERSION_LABEL
8
- <%= config.dig(:gem, :class) %>::CLI.start
@@ -1,10 +0,0 @@
1
- #! /usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- Bundler.require :tools
6
-
7
- require "<%= config.dig :gem, :path %>"
8
- require "irb"
9
-
10
- IRB.start __FILE__
@@ -1,8 +0,0 @@
1
- #! /usr/bin/env bash
2
-
3
- set -o nounset
4
- set -o errexit
5
- set -o pipefail
6
- IFS=$'\n\t'
7
-
8
- bundle install