bundlegem 1.1.0 → 1.2.0.pre.rc.1

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.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -1
  3. data/README.md +26 -37
  4. data/Rakefile +3 -5
  5. data/bin/bundlegem +45 -40
  6. data/bundlegem.gemspec +5 -11
  7. data/changelog +14 -3
  8. data/config/config +1 -1
  9. data/lib/bundlegem/cli/cli.rb +0 -4
  10. data/lib/bundlegem/cli/dir_to_template.rb +16 -13
  11. data/lib/bundlegem/cli/gem.rb +77 -158
  12. data/lib/bundlegem/strings.rb +1 -1
  13. data/lib/bundlegem/template_manager.rb +2 -2
  14. data/lib/bundlegem/templates/test_template/#{name}.rb.tt +1 -0
  15. data/lib/bundlegem/version.rb +1 -1
  16. data/lib/bundlegem.rb +13 -15
  17. data/spec/bundlegem_spec.rb +30 -29
  18. data/spec/data/variable_manifest_test.rb +1 -0
  19. data/spec/spec_helper.rb +1 -2
  20. data/spec/template_manager_spec.rb +1 -1
  21. metadata +7 -113
  22. data/.travis.yml +0 -3
  23. data/lib/bundlegem/cli.rb +0 -166
  24. data/lib/bundlegem/friendly_errors.rb +0 -79
  25. data/lib/bundlegem/templates/Executable +0 -16
  26. data/lib/bundlegem/templates/Executable.standalone +0 -12
  27. data/lib/bundlegem/templates/Gemfile +0 -4
  28. data/lib/bundlegem/templates/c_extension_gem/#{name}.gemspec.tt +0 -28
  29. data/lib/bundlegem/templates/c_extension_gem/.travis.yml.tt +0 -3
  30. data/lib/bundlegem/templates/c_extension_gem/CODE_OF_CONDUCT.md.tt +0 -13
  31. data/lib/bundlegem/templates/c_extension_gem/Gemfile.tt +0 -4
  32. data/lib/bundlegem/templates/c_extension_gem/LICENSE.txt.tt +0 -21
  33. data/lib/bundlegem/templates/c_extension_gem/README.md.tt +0 -39
  34. data/lib/bundlegem/templates/c_extension_gem/Rakefile.tt +0 -13
  35. data/lib/bundlegem/templates/c_extension_gem/bin/#{name}.tt +0 -3
  36. data/lib/bundlegem/templates/c_extension_gem/bin/console.tt +0 -14
  37. data/lib/bundlegem/templates/c_extension_gem/changelog.tt +0 -7
  38. data/lib/bundlegem/templates/c_extension_gem/ext/#{name}/#{name}.c.tt +0 -9
  39. data/lib/bundlegem/templates/c_extension_gem/ext/#{name}/#{name}.h.tt +0 -6
  40. data/lib/bundlegem/templates/c_extension_gem/ext/#{name}/extconf.rb.tt +0 -3
  41. data/lib/bundlegem/templates/c_extension_gem/gitignore.tt +0 -16
  42. data/lib/bundlegem/templates/c_extension_gem/lib/#{name}/version.rb.tt +0 -7
  43. data/lib/bundlegem/templates/c_extension_gem/lib/#{name}.rb.tt +0 -12
  44. data/lib/bundlegem/templates/c_extension_gem/rspec.tt +0 -2
  45. data/lib/bundlegem/templates/c_extension_gem/spec/#{name}_spec.rb.tt +0 -11
  46. data/lib/bundlegem/templates/c_extension_gem/spec/spec_helper.rb.tt +0 -2
  47. data/lib/bundlegem/templates/cli_gem/#{name}.gemspec.tt +0 -42
  48. data/lib/bundlegem/templates/cli_gem/CODE_OF_CONDUCT.md.tt +0 -13
  49. data/lib/bundlegem/templates/cli_gem/Gemfile.tt +0 -4
  50. data/lib/bundlegem/templates/cli_gem/LICENSE.txt.tt +0 -3
  51. data/lib/bundlegem/templates/cli_gem/README.md.tt +0 -38
  52. data/lib/bundlegem/templates/cli_gem/Rakefile.tt +0 -31
  53. data/lib/bundlegem/templates/cli_gem/bin/console.tt +0 -14
  54. data/lib/bundlegem/templates/cli_gem/changelog.tt +0 -7
  55. data/lib/bundlegem/templates/cli_gem/exe/#{name}.tt +0 -12
  56. data/lib/bundlegem/templates/cli_gem/ext/#{name}/#{name}.c.tt +0 -9
  57. data/lib/bundlegem/templates/cli_gem/ext/#{name}/#{name}.h.tt +0 -6
  58. data/lib/bundlegem/templates/cli_gem/ext/#{name}/extconf.rb.tt +0 -3
  59. data/lib/bundlegem/templates/cli_gem/gitignore.tt +0 -15
  60. data/lib/bundlegem/templates/cli_gem/lib/#{name}/config.rb.tt +0 -40
  61. data/lib/bundlegem/templates/cli_gem/lib/#{name}/constants.rb.tt +0 -9
  62. data/lib/bundlegem/templates/cli_gem/lib/#{name}/version.rb.tt +0 -7
  63. data/lib/bundlegem/templates/cli_gem/lib/#{name}.rb.tt +0 -26
  64. data/lib/bundlegem/templates/cli_gem/rspec.tt +0 -2
  65. data/lib/bundlegem/templates/cli_gem/spec/#{name}/config_spec.rb.tt +0 -25
  66. data/lib/bundlegem/templates/cli_gem/spec/#{name}_int.rb.tt +0 -16
  67. data/lib/bundlegem/templates/cli_gem/spec/#{name}_spec.rb.tt +0 -17
  68. data/lib/bundlegem/templates/cli_gem/spec/data/sample_data.json.tt +0 -1
  69. data/lib/bundlegem/templates/cli_gem/spec/spec_helper.rb.tt +0 -2
  70. data/lib/bundlegem/templates/newgem/#{name}.gemspec.tt +0 -33
  71. data/lib/bundlegem/templates/newgem/.gitignore.tt +0 -16
  72. data/lib/bundlegem/templates/newgem/.travis.yml.tt +0 -3
  73. data/lib/bundlegem/templates/newgem/CODE_OF_CONDUCT.md.tt +0 -13
  74. data/lib/bundlegem/templates/newgem/Gemfile.tt +0 -10
  75. data/lib/bundlegem/templates/newgem/LICENSE.txt.tt +0 -21
  76. data/lib/bundlegem/templates/newgem/README.md.tt +0 -41
  77. data/lib/bundlegem/templates/newgem/Rakefile.tt +0 -40
  78. data/lib/bundlegem/templates/newgem/bin/#{name}.tt +0 -3
  79. data/lib/bundlegem/templates/newgem/bin/console.tt +0 -14
  80. data/lib/bundlegem/templates/newgem/changelog.tt +0 -7
  81. data/lib/bundlegem/templates/newgem/lib/#{name}/version.rb.tt +0 -7
  82. data/lib/bundlegem/templates/newgem/lib/#{name}.rb.tt +0 -12
  83. data/lib/bundlegem/templates/newgem/rspec.tt +0 -2
  84. data/lib/bundlegem/templates/newgem/spec/#{name}_spec.rb.tt +0 -11
  85. data/lib/bundlegem/templates/newgem/spec/spec_helper.rb.tt +0 -2
metadata CHANGED
@@ -1,28 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundlegem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0.pre.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - TheNotary
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-06-17 00:00:00.000000000 Z
10
+ date: 2025-08-11 00:00:00.000000000 Z
11
11
  dependencies:
12
- - !ruby/object:Gem::Dependency
13
- name: thor
14
- requirement: !ruby/object:Gem::Requirement
15
- requirements:
16
- - - '='
17
- - !ruby/object:Gem::Version
18
- version: 0.19.1
19
- type: :runtime
20
- prerelease: false
21
- version_requirements: !ruby/object:Gem::Requirement
22
- requirements:
23
- - - '='
24
- - !ruby/object:Gem::Version
25
- version: 0.19.1
26
12
  - !ruby/object:Gem::Dependency
27
13
  name: bundler
28
14
  requirement: !ruby/object:Gem::Requirement
@@ -37,34 +23,6 @@ dependencies:
37
23
  - - "~>"
38
24
  - !ruby/object:Gem::Version
39
25
  version: '2.5'
40
- - !ruby/object:Gem::Dependency
41
- name: ostruct
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: '0'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
- - !ruby/object:Gem::Dependency
55
- name: reline
56
- requirement: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- type: :runtime
62
- prerelease: false
63
- version_requirements: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: '0'
68
26
  - !ruby/object:Gem::Dependency
69
27
  name: rake
70
28
  requirement: !ruby/object:Gem::Requirement
@@ -107,8 +65,8 @@ dependencies:
107
65
  - - ">="
108
66
  - !ruby/object:Gem::Version
109
67
  version: '0'
110
- description: " This is a gem for making more gems! I KNOW! ISN'T THAT LIKE WISHING
111
- FOR MORE WISHES!"
68
+ description: " This is a gem for making more gems! I know! It's like asking a genie
69
+ for more wishes but it actually works!"
112
70
  email:
113
71
  - no@mail.plz
114
72
  executables:
@@ -118,7 +76,6 @@ extra_rdoc_files: []
118
76
  files:
119
77
  - ".gitignore"
120
78
  - ".rspec"
121
- - ".travis.yml"
122
79
  - Gemfile
123
80
  - LICENSE.txt
124
81
  - README.md
@@ -128,77 +85,14 @@ files:
128
85
  - changelog
129
86
  - config/config
130
87
  - lib/bundlegem.rb
131
- - lib/bundlegem/cli.rb
132
88
  - lib/bundlegem/cli/cli.rb
133
89
  - lib/bundlegem/cli/dir_to_template.rb
134
90
  - lib/bundlegem/cli/gem.rb
135
91
  - lib/bundlegem/configurator.rb
136
92
  - lib/bundlegem/core/core.rb
137
93
  - lib/bundlegem/core/dir_to_template.rb
138
- - lib/bundlegem/friendly_errors.rb
139
94
  - lib/bundlegem/strings.rb
140
95
  - lib/bundlegem/template_manager.rb
141
- - lib/bundlegem/templates/Executable
142
- - lib/bundlegem/templates/Executable.standalone
143
- - lib/bundlegem/templates/Gemfile
144
- - lib/bundlegem/templates/c_extension_gem/#{name}.gemspec.tt
145
- - lib/bundlegem/templates/c_extension_gem/.travis.yml.tt
146
- - lib/bundlegem/templates/c_extension_gem/CODE_OF_CONDUCT.md.tt
147
- - lib/bundlegem/templates/c_extension_gem/Gemfile.tt
148
- - lib/bundlegem/templates/c_extension_gem/LICENSE.txt.tt
149
- - lib/bundlegem/templates/c_extension_gem/README.md.tt
150
- - lib/bundlegem/templates/c_extension_gem/Rakefile.tt
151
- - lib/bundlegem/templates/c_extension_gem/bin/#{name}.tt
152
- - lib/bundlegem/templates/c_extension_gem/bin/console.tt
153
- - lib/bundlegem/templates/c_extension_gem/changelog.tt
154
- - lib/bundlegem/templates/c_extension_gem/ext/#{name}/#{name}.c.tt
155
- - lib/bundlegem/templates/c_extension_gem/ext/#{name}/#{name}.h.tt
156
- - lib/bundlegem/templates/c_extension_gem/ext/#{name}/extconf.rb.tt
157
- - lib/bundlegem/templates/c_extension_gem/gitignore.tt
158
- - lib/bundlegem/templates/c_extension_gem/lib/#{name}.rb.tt
159
- - lib/bundlegem/templates/c_extension_gem/lib/#{name}/version.rb.tt
160
- - lib/bundlegem/templates/c_extension_gem/rspec.tt
161
- - lib/bundlegem/templates/c_extension_gem/spec/#{name}_spec.rb.tt
162
- - lib/bundlegem/templates/c_extension_gem/spec/spec_helper.rb.tt
163
- - lib/bundlegem/templates/cli_gem/#{name}.gemspec.tt
164
- - lib/bundlegem/templates/cli_gem/CODE_OF_CONDUCT.md.tt
165
- - lib/bundlegem/templates/cli_gem/Gemfile.tt
166
- - lib/bundlegem/templates/cli_gem/LICENSE.txt.tt
167
- - lib/bundlegem/templates/cli_gem/README.md.tt
168
- - lib/bundlegem/templates/cli_gem/Rakefile.tt
169
- - lib/bundlegem/templates/cli_gem/bin/console.tt
170
- - lib/bundlegem/templates/cli_gem/changelog.tt
171
- - lib/bundlegem/templates/cli_gem/exe/#{name}.tt
172
- - lib/bundlegem/templates/cli_gem/ext/#{name}/#{name}.c.tt
173
- - lib/bundlegem/templates/cli_gem/ext/#{name}/#{name}.h.tt
174
- - lib/bundlegem/templates/cli_gem/ext/#{name}/extconf.rb.tt
175
- - lib/bundlegem/templates/cli_gem/gitignore.tt
176
- - lib/bundlegem/templates/cli_gem/lib/#{name}.rb.tt
177
- - lib/bundlegem/templates/cli_gem/lib/#{name}/config.rb.tt
178
- - lib/bundlegem/templates/cli_gem/lib/#{name}/constants.rb.tt
179
- - lib/bundlegem/templates/cli_gem/lib/#{name}/version.rb.tt
180
- - lib/bundlegem/templates/cli_gem/rspec.tt
181
- - lib/bundlegem/templates/cli_gem/spec/#{name}/config_spec.rb.tt
182
- - lib/bundlegem/templates/cli_gem/spec/#{name}_int.rb.tt
183
- - lib/bundlegem/templates/cli_gem/spec/#{name}_spec.rb.tt
184
- - lib/bundlegem/templates/cli_gem/spec/data/sample_data.json.tt
185
- - lib/bundlegem/templates/cli_gem/spec/spec_helper.rb.tt
186
- - lib/bundlegem/templates/newgem/#{name}.gemspec.tt
187
- - lib/bundlegem/templates/newgem/.gitignore.tt
188
- - lib/bundlegem/templates/newgem/.travis.yml.tt
189
- - lib/bundlegem/templates/newgem/CODE_OF_CONDUCT.md.tt
190
- - lib/bundlegem/templates/newgem/Gemfile.tt
191
- - lib/bundlegem/templates/newgem/LICENSE.txt.tt
192
- - lib/bundlegem/templates/newgem/README.md.tt
193
- - lib/bundlegem/templates/newgem/Rakefile.tt
194
- - lib/bundlegem/templates/newgem/bin/#{name}.tt
195
- - lib/bundlegem/templates/newgem/bin/console.tt
196
- - lib/bundlegem/templates/newgem/changelog.tt
197
- - lib/bundlegem/templates/newgem/lib/#{name}.rb.tt
198
- - lib/bundlegem/templates/newgem/lib/#{name}/version.rb.tt
199
- - lib/bundlegem/templates/newgem/rspec.tt
200
- - lib/bundlegem/templates/newgem/spec/#{name}_spec.rb.tt
201
- - lib/bundlegem/templates/newgem/spec/spec_helper.rb.tt
202
96
  - lib/bundlegem/templates/template-test/#{name}.rb.tt
203
97
  - lib/bundlegem/templates/template-test/#{name}/keep.tt
204
98
  - lib/bundlegem/templates/template-test/#{underscored_name}/keep.tt
@@ -222,9 +116,9 @@ licenses:
222
116
  - MIT
223
117
  metadata:
224
118
  bug_tracker_uri: https://github.com/TheNotary/bundlegem/issues
225
- changelog_uri: https://github.com/TheNotary/bundlegem/releases/tag/v1.1.0
226
- documentation_uri: https://api.rubyonrails.org/v1.1.0/
227
- source_code_uri: https://github.com/TheNotary/bundlegem/tree/v1.1.0
119
+ changelog_uri: https://github.com/TheNotary/bundlegem/releases/tag/v1.2.0-rc.1
120
+ documentation_uri: https://api.rubyonrails.org/v1.2.0-rc.1/
121
+ source_code_uri: https://github.com/TheNotary/bundlegem/tree/v1.2.0-rc.1
228
122
  rdoc_options: []
229
123
  require_paths:
230
124
  - lib
data/.travis.yml DELETED
@@ -1,3 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.1.3
data/lib/bundlegem/cli.rb DELETED
@@ -1,166 +0,0 @@
1
- require 'bundlegem'
2
- require 'thor'
3
-
4
- module Bundlegem
5
- class CLI < Thor
6
- include Thor::Actions
7
- AUTO_INSTALL_CMDS = %w[show binstubs outdated exec open console licenses clean]
8
-
9
- def self.start(*)
10
- super
11
- rescue Exception => e
12
- # Bundlegem.ui = UI::Shell.new
13
- puts e
14
- raise e
15
- ensure
16
- # Bundlegem.cleanup
17
- end
18
-
19
- def initialize(*args)
20
- super
21
- current_cmd = args.last[:current_command].name
22
- # custom_gemfile = options[:gemfile] || Bundlegem.settings[:gemfile]
23
- # ENV['BUNDLE_GEMFILE'] = File.expand_path(custom_gemfile) if custom_gemfile
24
- # Bundlegem::Retry.attempts = options[:retry] || Bundlegem.settings[:retry] || Bundlegem::Retry::DEFAULT_ATTEMPTS
25
- # Bundlegem.rubygems.ui = UI::RGProxy.new(Bundlegem.ui)
26
- # auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)
27
- rescue UnknownArgumentError => e
28
- raise InvalidOption, e.message
29
- ensure
30
- self.options ||= {}
31
- # Bundlegem.ui = UI::Shell.new(options)
32
- # Bundlegem.ui.level = "debug" if options["verbose"]
33
- end
34
-
35
- check_unknown_options!(:except => [:config, :exec])
36
- stop_on_unknown_option! :exec
37
-
38
- default_task :gem
39
- class_option "no-color", :type => :boolean, :desc => "Disable colorization in output"
40
- class_option "retry", :type => :numeric, :aliases => "-r", :banner => "NUM",
41
- :desc => "Specify the number of times you wish to attempt network commands"
42
- class_option "verbose", :type => :boolean, :desc => "Enable verbose output mode", :aliases => "-V"
43
-
44
- def help(cli = nil)
45
- case cli
46
- when "gemfile" then command = "gemfile.5"
47
- when nil then command = "bundle"
48
- else command = "bundle-#{cli}"
49
- end
50
-
51
- manpages = %w(
52
- bundle
53
- bundle-config
54
- bundle-exec
55
- bundle-install
56
- bundle-package
57
- bundle-update
58
- bundle-platform
59
- gemfile.5)
60
-
61
- if manpages.include?(command)
62
- root = File.expand_path("../man", __FILE__)
63
-
64
- if Bundlegem.which("man") && root !~ %r{^file:/.+!/META-INF/jruby.home/.+}
65
- Kernel.exec "man #{root}/#{command}"
66
- else
67
- puts File.read("#{root}/#{command}.txt")
68
- end
69
- else
70
- super
71
- end
72
- end
73
-
74
- def self.handle_no_command_error(command, has_namespace = $thor_runner)
75
- require 'bundlegem/cli/gem'
76
- Gem.new(options, name, self).run
77
-
78
-
79
-
80
- # return super unless command_path = Bundlegem.which("Bundlegem-#{command}")
81
-
82
- # Kernel.exec(command_path, *ARGV[1..-1])
83
- end
84
-
85
- desc "init [OPTIONS]", "Generates a Gemfile into the current working directory"
86
- long_desc <<-D
87
- Init generates a default Gemfile in the current working directory. When adding a
88
- Gemfile to a gem with a gemspec, the --gemspec option will automatically add each
89
- dependency listed in the gemspec file to the newly created Gemfile.
90
- D
91
- method_option "gemspec", :type => :string, :banner => "Use the specified .gemspec to create the Gemfile"
92
- def init
93
- require 'bundlegem/cli/init'
94
- Init.new(options.dup).run
95
- end
96
-
97
-
98
-
99
- desc "version", "Prints the bundler's version information"
100
- def version
101
- Bundler.ui.info "Bundler version #{Bundler::VERSION}"
102
- end
103
- map %w(-v --version) => :version
104
-
105
-
106
- desc "gem GEM [OPTIONS]", "Creates a skeleton for creating a rubygem"
107
- method_option :bin, :type => :boolean, :default => false, :aliases => '-b', :desc => "Generate a binary for your library. Set a default with `bundle config gem.mit true`."
108
- method_option :coc, :type => :boolean, :desc => "Generate a code of conduct file. Set a default with `bundle config gem.coc true`."
109
- method_option :edit, :type => :string, :aliases => "-e", :required => false, :banner => "EDITOR",
110
- :lazy_default => [ENV['BUNDLER_EDITOR'], ENV['VISUAL'], ENV['EDITOR']].find{|e| !e.nil? && !e.empty? },
111
- :desc => "Open generated gemspec in the specified editor (defaults to $EDITOR or $BUNDLER_EDITOR)"
112
- method_option :ext, :type => :boolean, :default => false, :desc => "Generate the boilerplate for C extension code"
113
- method_option :mit, :type => :boolean, :desc => "Generate an MIT license file"
114
- method_option :test, :type => :string, :lazy_default => 'rspec', :aliases => '-t', :banner => "rspec",
115
- :desc => "Generate a test directory for your library, either rspec or minitest. Set a default with `bundle config gem.test rspec`."
116
- method_option :template, :type => :string, :lazy_default => "cli_gem", :aliases => '-u', :banner => "default", :desc => "Generate a gem based on the user's predefined template."
117
- def gem(name)
118
- # options = {"bin"=>false, "ext"=>false}
119
- # name = "gem_name"
120
- # self.class == Bundlegem::CLI
121
- require 'bundlegem/cli/gem'
122
- Gem.new(options, name, self).run
123
- end
124
-
125
- def self.source_root
126
- File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
127
- end
128
-
129
-
130
- desc "platform [OPTIONS]", "Displays platform compatibility information"
131
- method_option "ruby", :type => :boolean, :default => false, :banner =>
132
- "only display ruby related platform information"
133
- def platform
134
- require 'bundlegem/cli/platform'
135
- Platform.new(options).run
136
- end
137
-
138
-
139
- desc "env", "Print information about the environment Bundler is running under"
140
- def env
141
- Env.new.write($stdout)
142
- end
143
-
144
- private
145
-
146
- # Automatically invoke `bundle install` and resume if
147
- # Bundler.settings[:auto_install] exists. This is set through config cmd
148
- # `bundle config auto_install 1`.
149
- #
150
- # Note that this method `nil`s out the global Definition object, so it
151
- # should be called first, before you instantiate anything like an
152
- # `Installer` that'll keep a reference to the old one instead.
153
- def auto_install
154
- return unless Bundler.settings[:auto_install]
155
-
156
- begin
157
- Bundler.definition.specs
158
- rescue GemNotFound
159
- Bundler.ui.info "Automatically installing missing gems."
160
- Bundler.reset!
161
- invoke :install, []
162
- Bundler.reset!
163
- end
164
- end
165
- end
166
- end
@@ -1,79 +0,0 @@
1
- # encoding: utf-8
2
- require "cgi"
3
- require "bundlegem/vendored_thor"
4
-
5
- module Bundlegem
6
- def self.with_friendly_errors
7
- yield
8
- rescue Bundlegem::Dsl::DSLError => e
9
- Bundlegem.ui.error e.message
10
- exit e.status_code
11
- rescue Bundlegem::BundlegemError => e
12
- Bundlegem.ui.error e.message, :wrap => true
13
- Bundlegem.ui.trace e
14
- exit e.status_code
15
- rescue Thor::AmbiguousTaskError => e
16
- Bundlegem.ui.error e.message
17
- exit 15
18
- rescue Thor::UndefinedTaskError => e
19
- Bundlegem.ui.error e.message
20
- exit 15
21
- rescue Thor::Error => e
22
- Bundlegem.ui.error e.message
23
- exit 1
24
- rescue LoadError => e
25
- raise e unless e.message =~ /cannot load such file -- openssl|openssl.so|libcrypto.so/
26
- Bundlegem.ui.error "\nCould not load OpenSSL."
27
- Bundlegem.ui.warn <<-WARN, :wrap => true
28
- You must recompile Ruby with OpenSSL support or change the sources in your \
29
- Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL \
30
- using RVM are available at http://rvm.io/packages/openssl.
31
- WARN
32
- Bundlegem.ui.trace e
33
- exit 1
34
- rescue Interrupt => e
35
- Bundlegem.ui.error "\nQuitting..."
36
- Bundlegem.ui.trace e
37
- exit 1
38
- rescue SystemExit => e
39
- exit e.status
40
- rescue Exception => e
41
- request_issue_report_for(e)
42
- exit 1
43
- end
44
-
45
- def self.request_issue_report_for(e)
46
- Bundlegem.ui.info <<-EOS.gsub(/^ {6}/, '')
47
- #{'――― ERROR REPORT TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――'}
48
- - What did you do?
49
- - What did you expect to happen?
50
- - What happened instead?
51
-
52
- Error details
53
-
54
- #{e.class}: #{e.message}
55
- #{e.backtrace.join("\n ")}
56
-
57
- #{Bundlegem::Env.new.report(:print_gemfile => false).gsub(/\n/, "\n ").strip}
58
- #{'――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――'}
59
-
60
- EOS
61
-
62
- Bundlegem.ui.error "Unfortunately, an unexpected error occurred, and Bundlegem cannot continue."
63
-
64
- Bundlegem.ui.warn <<-EOS.gsub(/^ {6}/, '')
65
-
66
- First, try this link to see if there are any existing issue reports for this error:
67
- #{issues_url(e)}
68
-
69
- If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
70
- TODO: Change the link that was here
71
- EOS
72
- end
73
-
74
- def self.issues_url(exception)
75
- 'TODO: Change the link that was here' \
76
- "#{CGI.escape(exception.message)}&type=Issues"
77
- end
78
-
79
- end
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG['ruby_install_name'] %>
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application '<%= executable %>' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../<%= relative_gemfile_path %>",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('<%= spec.name %>', '<%= executable %>')
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG['ruby_install_name'] %>
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application '<%= executable %>' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- $:.unshift File.expand_path '../<%= standalone_path %>', __FILE__
10
-
11
- require 'bundler/setup'
12
- load File.expand_path '../<%= executable_path %>', __FILE__
@@ -1,4 +0,0 @@
1
- # A sample Gemfile
2
- source "https://rubygems.org"
3
-
4
- # gem "rails"
@@ -1,28 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require '<%=config[:namespaced_path]%>/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = <%=config[:name].inspect%>
8
- spec.version = <%=config[:constant_name]%>::VERSION
9
- spec.authors = [<%=config[:author].inspect%>]
10
- spec.email = [<%=config[:email].inspect%>]
11
-
12
- spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.}
13
- # spec.description = %q{TODO: delete this line since you're in a hurry.}
14
- spec.homepage = "https://github.com/<%=config[:author]%>/<%=config[:name]%>"
15
- # spec.license = "MIT" # uncomment this line if MIT is the best license for your situation
16
-
17
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.bindir = "exe"
19
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
- spec.require_paths = ["lib"]
21
- spec.extensions = ["ext/<%=config[:underscored_name]%>/extconf.rb"]
22
-
23
-
24
- spec.add_development_dependency "bundler"
25
- spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "rake-compiler"
27
- spec.add_development_dependency "rspec"
28
- end
@@ -1,3 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - <%= RUBY_VERSION %>
@@ -1,13 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
-
5
- We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
-
7
- Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
-
9
- Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
-
11
- Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
-
13
- This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in <%=config[:name]%>.gemspec
4
- gemspec
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) <%=Time.now.year%> <%=config[:author]%>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1,39 +0,0 @@
1
- # <%=config[:constant_name]%>
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/<%=config[:namespaced_path]%>`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
7
- ## Installation
8
-
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem '<%=config[:name]%>'
13
- ```
14
-
15
- And then execute:
16
-
17
- $ bundle
18
-
19
- Or install it yourself as:
20
-
21
- $ gem install <%=config[:name]%>
22
-
23
- ## Usage
24
-
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the code located in this directory, ignoring other installed copies of this gem.<% end %>
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- 1. Fork it ( https://github.com/[my-github-username]/<%=config[:name]%>/fork )
36
- 2. Create your feature branch (`git checkout -b my-new-feature`)
37
- 3. Commit your changes (`git commit -am 'Add some feature'`)
38
- 4. Push to the branch (`git push origin my-new-feature`)
39
- 5. Create a new Pull Request
@@ -1,13 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
7
- require "rake/extensiontask"
8
-
9
- task :build => :compile
10
-
11
- Rake::ExtensionTask.new("<%=config[:underscored_name]%>") do |ext|
12
- ext.lib_dir = "lib/<%=config[:namespaced_path]%>"
13
- end
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "<%= config[:namespaced_path] %>"
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "<%= config[:namespaced_path] %>"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
@@ -1,7 +0,0 @@
1
- ** 0.0.x **
2
- TODO: List off what features you'll be including at some point in the
3
- future.
4
-
5
- ** 0.0.1 **
6
- TODO: List off what features you'll be including in the first release
7
-
@@ -1,9 +0,0 @@
1
- #include "<%=config[:underscored_name]%>.h"
2
-
3
- VALUE rb_m<%=config[:constant_array].join%>;
4
-
5
- void
6
- Init_<%=config[:underscored_name]%>(void)
7
- {
8
- rb_m<%=config[:constant_array].join%> = rb_define_module(<%=config[:constant_name].inspect%>);
9
- }
@@ -1,6 +0,0 @@
1
- #ifndef <%=config[:underscored_name].upcase%>_H
2
- #define <%=config[:underscored_name].upcase%>_H 1
3
-
4
- #include "ruby.h"
5
-
6
- #endif /* <%=config[:underscored_name].upcase%>_H */
@@ -1,3 +0,0 @@
1
- require "mkmf"
2
-
3
- create_makefile(<%= config[:makefile_path].inspect %>)
@@ -1,16 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- <%- if config[:ext] -%>
11
- *.bundle
12
- *.so
13
- *.o
14
- *.a
15
- mkmf.log
16
- <%- end -%>