nugem 0.8.1 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -3
  3. data/CHANGELOG.md +13 -0
  4. data/Gemfile +26 -0
  5. data/README.md +23 -12
  6. data/exe/nugem +1 -5
  7. data/lib/nugem/cli/cli_gem.rb +4 -5
  8. data/lib/nugem/cli/cli_jekyll.rb +15 -15
  9. data/lib/nugem/cli/cli_rails.rb +3 -4
  10. data/lib/nugem/cli.rb +53 -39
  11. data/lib/nugem/git.rb +61 -59
  12. data/lib/nugem/version.rb +1 -1
  13. data/lib/nugem.rb +7 -22
  14. data/lib/util.rb +27 -0
  15. data/nugem.gemspec +23 -12
  16. data/spec/status_persistence.txt +0 -0
  17. data/templates/common/gem_scaffold/%gem_name%.gemspec.tt +2 -3
  18. data/templates/common/gem_scaffold/.bundle/config +2 -0
  19. data/templates/common/gem_scaffold/.gitignore.tt +27 -0
  20. data/templates/common/gem_scaffold/.markdownlint.json +8 -0
  21. data/templates/common/gem_scaffold/.rspec +4 -0
  22. data/templates/common/gem_scaffold/.rubocop.yml.tt +80 -0
  23. data/templates/common/gem_scaffold/.shellcheckrc +5 -0
  24. data/templates/common/gem_scaffold/.vscode/%gem_name%.json.code-snippets.tt +19 -0
  25. data/templates/common/gem_scaffold/.vscode/extensions.json +22 -0
  26. data/templates/common/gem_scaffold/.vscode/launch.json +31 -0
  27. data/templates/common/gem_scaffold/.vscode/settings.json +5 -0
  28. data/templates/common/gem_scaffold/CHANGELOG.md.tt +4 -1
  29. data/templates/common/gem_scaffold/Gemfile.tt +16 -28
  30. data/templates/common/gem_scaffold/README.md.tt +53 -13
  31. data/templates/common/gem_scaffold/bin/attach +2 -1
  32. data/templates/common/gem_scaffold/bin/build +7 -0
  33. data/templates/common/gem_scaffold/bin/reset +4 -0
  34. data/templates/common/gem_scaffold/bin/setup.tt +6 -3
  35. data/templates/common/gem_scaffold/lib/%gem_name%.rb.tt +2 -0
  36. data/templates/common/gem_scaffold/test/test_helper.rb.tt +3 -3
  37. data/templates/jekyll/common_scaffold/spec/spec_helper.rb +1 -1
  38. data/templates/jekyll/demo/demo/Gemfile.tt +6 -5
  39. data/templates/jekyll/demo/demo/_bin/debug +1 -1
  40. data/templates/rails/engine_scaffold/app/assets/images/%gem_name%/.keep +0 -0
  41. data/templates/rails/engine_scaffold/app/assets/javascripts/%gem_name%/.keep +0 -0
  42. data/templates/rails/engine_scaffold/app/assets/stylesheets/%gem_name%/.keep +0 -0
  43. data/templates/rails/engine_scaffold/app/controllers/.keep +0 -0
  44. data/templates/rails/engine_scaffold/app/helpers/.keep +0 -0
  45. data/templates/rails/engine_scaffold/app/mailers/.keep +0 -0
  46. data/templates/rails/engine_scaffold/app/models/.keep +0 -0
  47. data/templates/rails/engine_scaffold/app/views/.keep +0 -0
  48. data/templates/rails/plugin_scaffold/.envrc +1 -0
  49. data/templates/rails/plugin_scaffold/.simplecov.tt +18 -0
  50. data/templates/rails/plugin_scaffold/.travis.yml +4 -0
  51. data/templates/rails/plugin_scaffold/test/dummy/.envrc +1 -0
  52. data/templates/rails/plugin_scaffold/test/dummy/app/assets/images/.keep +0 -0
  53. data/templates/rails/plugin_scaffold/test/dummy/app/controllers/concerns/.keep +0 -0
  54. data/templates/rails/plugin_scaffold/test/dummy/app/models/.keep +0 -0
  55. data/templates/rails/plugin_scaffold/test/dummy/app/models/concerns/.keep +0 -0
  56. data/templates/rails/plugin_scaffold/test/dummy/lib/assets/.keep +0 -0
  57. data/templates/rails/plugin_scaffold/test/dummy/log/.keep +0 -0
  58. data/templates/rails/rails_scaffold/test/dummy/.envrc +1 -0
  59. data/templates/rails/rails_scaffold/test/dummy/app/assets/images/.keep +0 -0
  60. data/templates/rails/rails_scaffold/test/dummy/app/controllers/concerns/.keep +0 -0
  61. data/templates/rails/rails_scaffold/test/dummy/app/models/.keep +0 -0
  62. data/templates/rails/rails_scaffold/test/dummy/app/models/concerns/.keep +0 -0
  63. data/templates/rails/rails_scaffold/test/dummy/lib/assets/.keep +0 -0
  64. data/templates/rails/rails_scaffold/test/dummy/log/.keep +0 -0
  65. 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.authors = ['Igor Jancev', 'Mike Slinn']
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.homepage = 'https://github.com/mslinn/nugem'
14
- spec.license = 'MIT'
15
- spec.name = 'nugem'
16
- spec.require_paths = ['lib']
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 = 'Nugem creates a scaffold project for new gems.'
19
- spec.version = Nugem::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 = 'exe'
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 @plugin -%>
51
+ <%- if @rails -%>
53
52
  spec.add_dependency 'rails', '~> 7.0.5'
54
53
  <%- end -%>
55
54
  <%- if @executable -%>
@@ -0,0 +1,2 @@
1
+ ---
2
+ BUNDLE_BIN: "binstub"
@@ -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,8 @@
1
+ {
2
+ "MD012": false,
3
+ "MD014": false,
4
+ "MD013": { "line_length": 120 },
5
+ "MD024": false,
6
+ "MD033": false,
7
+ "MD034": false
8
+ }
@@ -0,0 +1,4 @@
1
+ --color
2
+ --format documentation
3
+ --order defined
4
+ --require spec_helper
@@ -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,5 @@
1
+ disable=SC1091
2
+ disable=SC2059
3
+ disable=SC2086
4
+ disable=SC2155
5
+ disable=SC2181
@@ -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
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "ruby.rubocop.configFilePath": ".rubocop.yml",
3
+ "ruby.rubocop.useBundler": true,
4
+ "ruby.rubocop.executePath": "./binstub/"
5
+ }
@@ -1,2 +1,5 @@
1
+ # Change Log
2
+
1
3
  ## 0.1.0
2
- * Initial release.
4
+
5
+ * Initial release.
@@ -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 'bundler', '>= 2.4.6', require: false
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 @minitest -%>
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
- gem 'ruby-debug-ide', require: false
32
- end
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 'gem-release', '>= 2.2.2', require: false
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 %>` [![Gem Version](https://badge.fury.io/rb/<%= gem_name %>.svg)](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 this line to your Jekyll website's Gemfile, within the jekyll_plugins group:
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
- Add this line to your application's Gemfile:
22
+ Either add this line to your application&rsquo;s `Gemfile`:
23
23
 
24
24
  ```ruby
25
25
  gem '<%= @gem_name %>'
26
26
  ```
27
+
28
+ ... or add the following to your application&rsquo;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 the repo, run `bin/setup` to install dependencies.
43
- Then, run `rake test` to run the tests.
44
- You can also run `bin/console` for an interactive prompt that will allow you to experiment.
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
- To release a new version, run `bundle exec rake release`,
49
- which will create a git tag for the version, push git commits and tags,
50
- and push the `.gem` file to <%= @repository.gem_server_url -%>.
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 on <%= @repository.host %> at <%= @repository.url %>.
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](http://opensource.org/licenses/MIT).
101
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
62
102
  <%- end -%>
@@ -31,4 +31,5 @@ bin/build
31
31
  set -e
32
32
 
33
33
  cd "$1" > /dev/null || exit 1
34
- _bin/debug
34
+ shift
35
+ _bin/debug "$@"
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+
3
+ NAME="$( basename -s .git "$( git remote get-url origin )" )"
4
+
5
+ gem uninstall "$NAME" -aIx --user-install --force
6
+
7
+ bundle exec rake install
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ git checkout . # restores project
4
+ git clean -fd # Nukes untracked files and directories
@@ -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
@@ -10,3 +10,5 @@ require_relative '<%= @gem_name %>/version'
10
10
  Dir[File.join(__dir__, '*.rb')].each do |file|
11
11
  require file unless file.end_with?('/<%= @gem_name %>.rb')
12
12
  end
13
+
14
+ # Write the code for your gem here
@@ -3,7 +3,7 @@ require 'coveralls'
3
3
  Coveralls.wear!
4
4
  <%- end -%>
5
5
 
6
- <%- unless @plugin -%>
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 @plugin -%>
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 @plugin -%>
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 -%>
@@ -30,7 +30,7 @@ class SiteMock
30
30
  attr_reader :config
31
31
 
32
32
  def initialize
33
- @config = YAML.safe_load(File.read('../demo/_config.yml'))
33
+ @config = YAML.safe_load_file(File.read('../demo/_config.yml'))
34
34
  @config['env'] = { 'JEKYLL_ENV' => 'development' }
35
35
  end
36
36
 
@@ -14,8 +14,9 @@ group :jekyll_plugins do
14
14
  gem 'jekyll-tagging'
15
15
  end
16
16
 
17
- gem 'debase', '0.2.5.beta2', require: false
18
- gem 'rspec-core', require: false
19
- gem 'rubocop', require: false
20
- gem 'rubocop-rspec', require: false
21
- gem 'ruby-debug-ide', require: false
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 ruby-debug-ide and debase,
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
@@ -0,0 +1 @@
1
+ PATH_add bin