nugem 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -3
- data/CHANGELOG.md +13 -0
- data/Gemfile +26 -0
- data/README.md +23 -12
- data/exe/nugem +1 -5
- data/lib/nugem/cli/cli_gem.rb +4 -5
- data/lib/nugem/cli/cli_jekyll.rb +15 -15
- data/lib/nugem/cli/cli_rails.rb +3 -4
- data/lib/nugem/cli.rb +53 -39
- data/lib/nugem/git.rb +61 -59
- data/lib/nugem/version.rb +1 -1
- data/lib/nugem.rb +7 -22
- data/lib/util.rb +27 -0
- data/nugem.gemspec +23 -12
- data/spec/status_persistence.txt +0 -0
- data/templates/common/gem_scaffold/%gem_name%.gemspec.tt +2 -3
- data/templates/common/gem_scaffold/.bundle/config +2 -0
- data/templates/common/gem_scaffold/.gitignore.tt +27 -0
- data/templates/common/gem_scaffold/.markdownlint.json +8 -0
- data/templates/common/gem_scaffold/.rspec +4 -0
- data/templates/common/gem_scaffold/.rubocop.yml.tt +80 -0
- data/templates/common/gem_scaffold/.shellcheckrc +5 -0
- data/templates/common/gem_scaffold/.vscode/%gem_name%.json.code-snippets.tt +19 -0
- data/templates/common/gem_scaffold/.vscode/extensions.json +22 -0
- data/templates/common/gem_scaffold/.vscode/launch.json +31 -0
- data/templates/common/gem_scaffold/.vscode/settings.json +5 -0
- data/templates/common/gem_scaffold/CHANGELOG.md.tt +4 -1
- data/templates/common/gem_scaffold/Gemfile.tt +16 -28
- data/templates/common/gem_scaffold/README.md.tt +53 -13
- data/templates/common/gem_scaffold/bin/attach +2 -1
- data/templates/common/gem_scaffold/bin/build +7 -0
- data/templates/common/gem_scaffold/bin/reset +4 -0
- data/templates/common/gem_scaffold/bin/setup.tt +6 -3
- data/templates/common/gem_scaffold/lib/%gem_name%.rb.tt +2 -0
- data/templates/common/gem_scaffold/test/test_helper.rb.tt +3 -3
- data/templates/jekyll/common_scaffold/spec/spec_helper.rb +1 -1
- data/templates/jekyll/demo/demo/Gemfile.tt +6 -5
- data/templates/jekyll/demo/demo/_bin/debug +1 -1
- data/templates/rails/engine_scaffold/app/assets/images/%gem_name%/.keep +0 -0
- data/templates/rails/engine_scaffold/app/assets/javascripts/%gem_name%/.keep +0 -0
- data/templates/rails/engine_scaffold/app/assets/stylesheets/%gem_name%/.keep +0 -0
- data/templates/rails/engine_scaffold/app/controllers/.keep +0 -0
- data/templates/rails/engine_scaffold/app/helpers/.keep +0 -0
- data/templates/rails/engine_scaffold/app/mailers/.keep +0 -0
- data/templates/rails/engine_scaffold/app/models/.keep +0 -0
- data/templates/rails/engine_scaffold/app/views/.keep +0 -0
- data/templates/rails/plugin_scaffold/.envrc +1 -0
- data/templates/rails/plugin_scaffold/.simplecov.tt +18 -0
- data/templates/rails/plugin_scaffold/.travis.yml +4 -0
- data/templates/rails/plugin_scaffold/test/dummy/.envrc +1 -0
- data/templates/rails/plugin_scaffold/test/dummy/app/assets/images/.keep +0 -0
- data/templates/rails/plugin_scaffold/test/dummy/app/controllers/concerns/.keep +0 -0
- data/templates/rails/plugin_scaffold/test/dummy/app/models/.keep +0 -0
- data/templates/rails/plugin_scaffold/test/dummy/app/models/concerns/.keep +0 -0
- data/templates/rails/plugin_scaffold/test/dummy/lib/assets/.keep +0 -0
- data/templates/rails/plugin_scaffold/test/dummy/log/.keep +0 -0
- data/templates/rails/rails_scaffold/test/dummy/.envrc +1 -0
- data/templates/rails/rails_scaffold/test/dummy/app/assets/images/.keep +0 -0
- data/templates/rails/rails_scaffold/test/dummy/app/controllers/concerns/.keep +0 -0
- data/templates/rails/rails_scaffold/test/dummy/app/models/.keep +0 -0
- data/templates/rails/rails_scaffold/test/dummy/app/models/concerns/.keep +0 -0
- data/templates/rails/rails_scaffold/test/dummy/lib/assets/.keep +0 -0
- data/templates/rails/rails_scaffold/test/dummy/log/.keep +0 -0
- metadata +55 -2
data/lib/util.rb
CHANGED
@@ -8,4 +8,31 @@ module Nugem
|
|
8
8
|
ENV.fetch(Regexp.last_match(1), nil)
|
9
9
|
end
|
10
10
|
end
|
11
|
+
|
12
|
+
# The following methods are not required at present ... but they might be needed one day, so not deleting yet
|
13
|
+
|
14
|
+
# @param file must be a fully qualified file name
|
15
|
+
# @return Gem::Specification of gem that file points into, or nil if not called from a gem
|
16
|
+
def self.current_spec(file)
|
17
|
+
return nil unless File.file?(file)
|
18
|
+
|
19
|
+
searcher = if Gem::Specification.respond_to?(:find)
|
20
|
+
Gem::Specification
|
21
|
+
elsif Gem.respond_to?(:searcher)
|
22
|
+
Gem.searcher.init_gemspecs
|
23
|
+
end
|
24
|
+
|
25
|
+
searcher&.find do |spec|
|
26
|
+
file.start_with? spec.full_gem_path
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.gem_path(file)
|
31
|
+
spec = self.current_spec(file)
|
32
|
+
spec&.full_gem_path
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.template_directory
|
36
|
+
File.join gem_path(__FILE__), 'templates'
|
37
|
+
end
|
11
38
|
end
|
data/nugem.gemspec
CHANGED
@@ -1,23 +1,34 @@
|
|
1
1
|
require_relative 'lib/nugem/version'
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
|
-
spec.
|
5
|
-
spec.bindir = 'exe'
|
6
|
-
spec.email = ['igor@masterybits.com', 'mslinn@mslinn.com']
|
7
|
-
spec.executables = %w[nugem]
|
8
|
-
spec.files = Dir['.rubocop.yml', 'LICENSE.*', 'Rakefile', '{lib,spec,templates}/**/*', '*.gemspec', '*.md']
|
9
|
-
spec.description = <<~END_DESC
|
4
|
+
spec.description = <<~END_DESC
|
10
5
|
Nugem creates a scaffold project for new gems. You can choose between Github and Bitbucket,
|
11
6
|
Rubygems or Geminabox, with or without an executable, etc.
|
12
7
|
END_DESC
|
13
|
-
spec.
|
14
|
-
spec.
|
15
|
-
spec.
|
16
|
-
spec.
|
8
|
+
spec.authors = ['Igor Jancev', 'Mike Slinn']
|
9
|
+
spec.bindir = 'exe'
|
10
|
+
spec.email = ['igor@masterybits.com', 'mslinn@mslinn.com']
|
11
|
+
spec.executables = %w[nugem]
|
12
|
+
spec.files = Dir[
|
13
|
+
'.rubocop.yml',
|
14
|
+
'Gemfile',
|
15
|
+
'LICENSE.*',
|
16
|
+
'Rakefile',
|
17
|
+
'{lib,spec,templates}/**/*',
|
18
|
+
'templates/**/.*',
|
19
|
+
'templates/**/.*/*',
|
20
|
+
'*.gemspec',
|
21
|
+
'*.md'
|
22
|
+
]
|
23
|
+
spec.homepage = 'https://github.com/mslinn/nugem'
|
24
|
+
spec.license = 'MIT'
|
25
|
+
spec.name = 'nugem'
|
26
|
+
spec.require_paths = ['lib']
|
17
27
|
spec.required_ruby_version = '>= 3.1.0'
|
18
|
-
spec.summary
|
19
|
-
spec.version
|
28
|
+
spec.summary = 'Nugem creates a scaffold project for new gems.'
|
29
|
+
spec.version = Nugem::VERSION
|
20
30
|
|
31
|
+
spec.add_dependency 'jekyll'
|
21
32
|
spec.add_dependency 'rugged'
|
22
33
|
spec.add_dependency 'thor'
|
23
34
|
end
|
File without changes
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
|
10
10
|
spec.authors = ['<%= @repository.user_name %>']
|
11
11
|
<%- if @executable -%>
|
12
|
-
spec.bindir = '
|
12
|
+
spec.bindir = 'binstub'
|
13
13
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
14
14
|
<%- end -%>
|
15
15
|
spec.description = <<~END_DESC
|
@@ -41,7 +41,6 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.required_ruby_version = '>= 3.1.0'
|
42
42
|
spec.summary = '<%= @todo %>Write summary of what the gem is for'
|
43
43
|
spec.version = <%= @class_name %>::VERSION
|
44
|
-
|
45
44
|
<%- if @geminabox -%>
|
46
45
|
spec.add_dependency 'geminabox', '>= 2.2.1'
|
47
46
|
<%- end -%>
|
@@ -49,7 +48,7 @@ Gem::Specification.new do |spec|
|
|
49
48
|
spec.add_dependency 'jekyll', '>= 3.5.0'
|
50
49
|
spec.add_dependency 'jekyll_plugin_support', '>= 0.7.0'
|
51
50
|
<%- end -%>
|
52
|
-
<%- if @
|
51
|
+
<%- if @rails -%>
|
53
52
|
spec.add_dependency 'rails', '~> 7.0.5'
|
54
53
|
<%- end -%>
|
55
54
|
<%- if @executable -%>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/.bundle/
|
2
|
+
/.yardoc
|
3
|
+
/binstub/
|
4
|
+
/Gemfile.lock
|
5
|
+
/_yardoc/
|
6
|
+
/coverage/
|
7
|
+
/test/coverage/
|
8
|
+
/test/reports/
|
9
|
+
/doc/
|
10
|
+
/pkg/
|
11
|
+
/tmp/
|
12
|
+
<%- if @rails -%>
|
13
|
+
test/dummy/db/*.sqlite3
|
14
|
+
test/dummy/db/*.sqlite3-journal
|
15
|
+
test/dummy/log/*.log
|
16
|
+
test/dummy/tmp/
|
17
|
+
test/dummy/.sass-cache
|
18
|
+
<%- end -%>
|
19
|
+
<%- if @jekyll -%>
|
20
|
+
spec/status_persistence.txt
|
21
|
+
.jekyll-cache/
|
22
|
+
.jekyll-metadata
|
23
|
+
_site/
|
24
|
+
demo/_site/
|
25
|
+
demo/.jekyll-cache/
|
26
|
+
demo/.jekyll-metadata
|
27
|
+
<%- end -%>
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require:
|
2
|
+
<%- if @jekyll -%>
|
3
|
+
# - rubocop-jekyll
|
4
|
+
<%- end -%>
|
5
|
+
- rubocop-md
|
6
|
+
- rubocop-performance
|
7
|
+
<%- if @test_framework == 'minitest' -%>
|
8
|
+
- rubocop-minitest
|
9
|
+
<%- end -%>
|
10
|
+
- rubocop-rake
|
11
|
+
<%- if @test_framework == 'rspec' -%>
|
12
|
+
- rubocop-rspec
|
13
|
+
<%- end -%>
|
14
|
+
|
15
|
+
AllCops:
|
16
|
+
Exclude:
|
17
|
+
- binstub/**/*
|
18
|
+
- exe/**/*
|
19
|
+
- vendor/**/*
|
20
|
+
- Gemfile*
|
21
|
+
NewCops: enable
|
22
|
+
TargetRubyVersion: 3.1.3
|
23
|
+
|
24
|
+
Gemspec/DeprecatedAttributeAssignment:
|
25
|
+
Enabled: false
|
26
|
+
|
27
|
+
Gemspec/RequireMFA:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Layout/HashAlignment:
|
31
|
+
EnforcedColonStyle: table
|
32
|
+
EnforcedHashRocketStyle: table
|
33
|
+
|
34
|
+
Layout/LineLength:
|
35
|
+
Max: 150
|
36
|
+
|
37
|
+
Metrics/AbcSize:
|
38
|
+
Max: 35
|
39
|
+
|
40
|
+
Metrics/BlockLength:
|
41
|
+
Exclude:
|
42
|
+
- <%= @gem_name %>.gemspec
|
43
|
+
Max: 30
|
44
|
+
|
45
|
+
Metrics/CyclomaticComplexity:
|
46
|
+
Max: 15
|
47
|
+
|
48
|
+
Metrics/MethodLength:
|
49
|
+
Max: 40
|
50
|
+
|
51
|
+
Metrics/ModuleLength:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Metrics/PerceivedComplexity:
|
55
|
+
Max: 15
|
56
|
+
|
57
|
+
Naming/FileName:
|
58
|
+
Exclude:
|
59
|
+
- Rakefile
|
60
|
+
|
61
|
+
Style/Documentation:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
Style/FrozenStringLiteralComment:
|
65
|
+
Enabled: false
|
66
|
+
|
67
|
+
Style/TrailingCommaInHashLiteral:
|
68
|
+
EnforcedStyleForMultiline: comma
|
69
|
+
<%- if @test_framework == 'rspec' -%>
|
70
|
+
|
71
|
+
RSpec/FilePath:
|
72
|
+
IgnoreMethods: true
|
73
|
+
SpecSuffixOnly: true
|
74
|
+
|
75
|
+
RSpec/ExampleLength:
|
76
|
+
Max: 30
|
77
|
+
|
78
|
+
RSpec/MultipleExpectations:
|
79
|
+
Max: 15
|
80
|
+
<%- end -%>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{
|
2
|
+
// Place your workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
|
3
|
+
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
|
4
|
+
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
|
5
|
+
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
|
6
|
+
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
|
7
|
+
// Placeholders with the same ids are connected.
|
8
|
+
// Example:
|
9
|
+
// "Print to console": {
|
10
|
+
// "scope": "javascript,typescript",
|
11
|
+
// "prefix": "log",
|
12
|
+
// "body": [
|
13
|
+
// "console.log('$1');",
|
14
|
+
// "$2"
|
15
|
+
// ],
|
16
|
+
// "description": "Log output to console"
|
17
|
+
// }
|
18
|
+
//
|
19
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
|
3
|
+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
|
4
|
+
|
5
|
+
// List of extensions which should be recommended for users of this workspace.
|
6
|
+
"recommendations": [
|
7
|
+
"DavidAnson.vscode-markdownlint",
|
8
|
+
"devonray.snippet",
|
9
|
+
"KoichiSasada.vscode-rdbg",
|
10
|
+
"misogi.ruby-rubocop",
|
11
|
+
"redhat.vscode-yaml",
|
12
|
+
"shd101wyy.markdown-preview-enhanced",
|
13
|
+
"Shopify.ruby-lsp",
|
14
|
+
"timonwong.shellcheck",
|
15
|
+
],
|
16
|
+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
|
17
|
+
"unwantedRecommendations": [
|
18
|
+
"castwide.solargraph",
|
19
|
+
"rebornix.Ruby",
|
20
|
+
"wingrunr21.vscode-ruby",
|
21
|
+
]
|
22
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
3
|
+
// Hover to view descriptions of existing attributes.
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
5
|
+
"version": "0.2.0",
|
6
|
+
"configurations": [
|
7
|
+
{
|
8
|
+
"name": "Run selected Ruby file",
|
9
|
+
"program": "ruby ${file}",
|
10
|
+
"request": "launch",
|
11
|
+
"type": "ruby_lsp"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"name": "Attach rdebug-ide",
|
15
|
+
"request": "attach",
|
16
|
+
"type": "ruby_lsp",
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"name": "RSpec - active spec file only",
|
20
|
+
"program": "binstub/rspec -I ${workspaceRoot} ${file}",
|
21
|
+
"request": "launch",
|
22
|
+
"type": "ruby_lsp",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"name": "RSpec - all",
|
26
|
+
"program": "${workspaceRoot}/binstub/rspec -I ${workspaceRoot}",
|
27
|
+
"request": "launch",
|
28
|
+
"type": "ruby_lsp",
|
29
|
+
}
|
30
|
+
]
|
31
|
+
}
|
@@ -3,22 +3,11 @@ source 'https://rubygems.org'
|
|
3
3
|
# The <%= @gem_name %> gem dependencies are defined in <%= @gem_name %>.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
<%- if @jekyll -%>
|
7
6
|
group :test, :development do
|
8
|
-
gem '
|
9
|
-
<%- if @repository.public? -%>
|
10
|
-
gem 'coveralls', require: false
|
11
|
-
<%- end -%>
|
12
|
-
gem 'debase', '0.2.5.beta2', require: false
|
7
|
+
gem 'debug', '>= 1.0.0', require: false
|
13
8
|
gem 'gem-release', '>= 2.2.2', require: false
|
14
|
-
<%- if @
|
15
|
-
gem 'minitest', '>= 5.18.0', require: false
|
16
|
-
gem 'minitest-reporters', '>= 1.6.0', require: false
|
17
|
-
gem 'minitest-screenshot-reporter', '~> 0.0.6', require: false
|
18
|
-
<%- end -%>
|
9
|
+
<%- if @jekyll -%>
|
19
10
|
gem 'rake', require: false
|
20
|
-
<%- if @rspec -%>
|
21
|
-
gem 'rspec', require: false
|
22
11
|
<%- end -%>
|
23
12
|
gem 'rubocop', require: false
|
24
13
|
gem 'rubocop-md', require: false
|
@@ -27,30 +16,29 @@ group :test, :development do
|
|
27
16
|
<%- end -%>
|
28
17
|
gem 'rubocop-performance', require: false
|
29
18
|
gem 'rubocop-rake', require: false
|
19
|
+
<%- if @rspec -%>
|
30
20
|
gem 'rubocop-rspec', require: false
|
31
|
-
|
32
|
-
|
33
|
-
<%- end -%>
|
34
|
-
<%- if @plugin -%>
|
35
|
-
group :test, :development do
|
36
|
-
gem 'bundler', '>= 2.4.6', require: false
|
21
|
+
<%- end -%>
|
22
|
+
<%- if @rails -%>
|
37
23
|
gem 'capybara', '~> 3.39.1', require: false
|
38
24
|
gem 'capybara_minitest_spec', '~> 1.0.7', require: false
|
39
25
|
<%- if @repository.public? -%>
|
40
26
|
gem 'coveralls', require: false
|
41
27
|
<%- end -%>
|
42
28
|
gem 'database_cleaner', '~> 2.0.2', require: false
|
43
|
-
gem '
|
29
|
+
gem 'erb_lint', require: false
|
30
|
+
<%- if @minitest -%>
|
31
|
+
gem 'minitest', '>= 5.18.0', require: false
|
32
|
+
gem 'minitest-reporters', '>= 1.6.0', require: false
|
33
|
+
gem 'minitest-screenshot-reporter', '~> 0.0.6', require: false
|
34
|
+
<%- end -%>
|
44
35
|
gem 'poltergeist', '~> 1.10.1', require: false
|
45
36
|
gem 'quiet_assets'
|
46
|
-
gem 'rubocop', require: false
|
47
|
-
gem 'rubocop-md', require: false
|
48
|
-
gem 'rubocop-performance', require: false
|
49
|
-
gem 'rubocop-rake', require: false
|
50
|
-
<%- if @rspec -%>
|
51
|
-
gem 'rubocop-rspec', require: false
|
52
|
-
<%- end -%>
|
53
37
|
gem 'selenium-webdriver', '~> 4.9.1', require: false
|
54
38
|
gem 'sqlite3'
|
39
|
+
<%- end -%>
|
40
|
+
end
|
41
|
+
|
42
|
+
group :test do
|
43
|
+
gem 'rspec-match_ignoring_whitespace'
|
55
44
|
end
|
56
|
-
<%- end -%>
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# <%= @class_name %>
|
2
|
-
|
3
1
|
<%- if @repository.public? -%>
|
4
2
|
# `<%= gem_name.capitalize %>` [](https://badge.fury.io/rb/<%= gem_name %>)
|
5
3
|
<%- else -%>
|
@@ -12,21 +10,30 @@
|
|
12
10
|
## Installation
|
13
11
|
|
14
12
|
<%- if @jekyll -%>
|
15
|
-
Add
|
13
|
+
Add the following to your Jekyll website's `Gemfile`:
|
16
14
|
|
15
|
+
```ruby
|
17
16
|
group :jekyll_plugins do
|
18
17
|
gem '<%= @gem_name %>'
|
19
18
|
end
|
19
|
+
```
|
20
20
|
<%- end -%>
|
21
21
|
<%- unless @jekyll -%>
|
22
|
-
|
22
|
+
Either add this line to your application’s `Gemfile`:
|
23
23
|
|
24
24
|
```ruby
|
25
25
|
gem '<%= @gem_name %>'
|
26
26
|
```
|
27
|
+
|
28
|
+
... or add the following to your application’s `.gemspec`:
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
spec.add_dependency '<%= @gem_name %>'
|
32
|
+
```
|
27
33
|
<%- end -%>
|
28
34
|
|
29
35
|
And then execute:
|
36
|
+
|
30
37
|
```shell
|
31
38
|
$ bundle
|
32
39
|
```
|
@@ -39,24 +46,57 @@ $ bundle
|
|
39
46
|
|
40
47
|
## Development
|
41
48
|
|
42
|
-
After checking out
|
43
|
-
|
44
|
-
|
49
|
+
After checking out this git repository, install dependencies by typing:
|
50
|
+
|
51
|
+
```shell
|
52
|
+
$ bin/setup
|
53
|
+
```
|
54
|
+
|
55
|
+
You should do the above before running Visual Studio Code.
|
56
|
+
|
57
|
+
|
58
|
+
### Run the Tests
|
59
|
+
|
60
|
+
```shell
|
61
|
+
$ bundle exec rake test
|
62
|
+
```
|
45
63
|
|
46
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
47
64
|
|
48
|
-
|
49
|
-
|
50
|
-
|
65
|
+
### Interactive Session
|
66
|
+
|
67
|
+
The following will allow you to experiment:
|
68
|
+
|
69
|
+
```shell
|
70
|
+
$ bin/console
|
71
|
+
```
|
72
|
+
|
73
|
+
|
74
|
+
### Local Installation
|
75
|
+
|
76
|
+
To install this gem onto your local machine, type:
|
77
|
+
|
78
|
+
```shell
|
79
|
+
$ bundle exec rake install
|
80
|
+
```
|
81
|
+
|
82
|
+
|
83
|
+
### To Release A New Version
|
84
|
+
|
85
|
+
To create a git tag for the new version, push git commits and tags,
|
86
|
+
and push the new version of the gem to <%= @repository.gem_server_url -%>, type:
|
87
|
+
|
88
|
+
```shell
|
89
|
+
$ bundle exec rake release
|
90
|
+
```
|
51
91
|
|
52
92
|
|
53
93
|
## Contributing
|
54
94
|
|
55
|
-
Bug reports and pull requests are welcome
|
95
|
+
Bug reports and pull requests are welcome at <%= @repository.url %>.
|
56
96
|
|
57
97
|
|
58
98
|
<%- if @repository.public? -%>
|
59
99
|
## License
|
60
100
|
|
61
|
-
The gem is available as open source under the terms of the [MIT License](
|
101
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
62
102
|
<%- end -%>
|
@@ -10,15 +10,18 @@ done
|
|
10
10
|
DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
|
11
11
|
cd "$DIR/.." || exit
|
12
12
|
|
13
|
+
if [[ $(which apt) ]]; then
|
14
|
+
if [[ ! -f /usr/lib/x86_64-linux-gnu/libyaml.so ]]; then sudo apt install libyaml-dev; fi
|
15
|
+
fi
|
16
|
+
|
13
17
|
rm -f Gemfile.lock
|
14
|
-
bundle
|
18
|
+
if [[ -z "$( which bundle )" ]]; then gem install bundler; fi
|
19
|
+
BUNDLE_WITH="development" bundle
|
15
20
|
|
16
|
-
bundle binstubs debase --force --path binstub
|
17
21
|
<%- if @jekyll -%>
|
18
22
|
bundle binstubs jekyll --force --path binstub
|
19
23
|
<%- end -%>
|
20
24
|
bundle binstubs rspec-core --force --path binstub
|
21
25
|
bundle binstubs rubocop --force --path binstub
|
22
|
-
bundle binstubs ruby-debug-ide --force --path binstub
|
23
26
|
|
24
27
|
# Do any other automated setup that you need to do here
|
@@ -3,7 +3,7 @@ require 'coveralls'
|
|
3
3
|
Coveralls.wear!
|
4
4
|
<%- end -%>
|
5
5
|
|
6
|
-
<%- unless @
|
6
|
+
<%- unless @rails -%>
|
7
7
|
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
|
8
8
|
require '<%= @gem_name %>'
|
9
9
|
<%- end -%>
|
@@ -11,7 +11,7 @@ require '<%= @gem_name %>'
|
|
11
11
|
require 'minitest/autorun'
|
12
12
|
|
13
13
|
require 'minitest/reporters'
|
14
|
-
<%- if @
|
14
|
+
<%- if @rails -%>
|
15
15
|
require 'minitest/reporters/screenshot_reporter'
|
16
16
|
Minitest::Reporters.use! [Minitest::Reporters::SpecReporter.new,
|
17
17
|
Minitest::Reporters::JUnitReporter.new,
|
@@ -23,7 +23,7 @@ Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
|
|
23
23
|
# Filter out Minitest backtrace while allowing backtrace from other libraries to be shown.
|
24
24
|
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
25
25
|
|
26
|
-
<%- if @
|
26
|
+
<%- if @rails -%>
|
27
27
|
require File.expand_path('../test/dummy/config/environment.rb', __dir__)
|
28
28
|
ActiveRecord::Migrator.migrations_paths = [File.expand_path('../test/dummy/db/migrate', __dir__)]
|
29
29
|
<%- if @mountable -%>
|
@@ -14,8 +14,9 @@ group :jekyll_plugins do
|
|
14
14
|
gem 'jekyll-tagging'
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
gem '
|
19
|
-
gem '
|
20
|
-
gem 'rubocop
|
21
|
-
gem '
|
17
|
+
group :test, :development do
|
18
|
+
gem 'debug', '>= 1.0.0', require: false
|
19
|
+
gem 'rspec-core', require: false
|
20
|
+
gem 'rubocop', require: false
|
21
|
+
gem 'rubocop-rspec', require: false
|
22
|
+
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
function help {
|
6
6
|
echo "
|
7
7
|
$(basename $0) - Run the demo Jekyll website.
|
8
|
-
By default the demo Jekyll website runs without restriction under
|
8
|
+
By default the demo Jekyll website runs without restriction under `debug`,
|
9
9
|
and listens on 0.0.0.0:1234.
|
10
10
|
Options:
|
11
11
|
-h Show this error message
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
PATH_add bin
|