gemsmith 4.3.0 → 5.0.0
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/LICENSE.md +1 -1
- data/README.md +11 -11
- data/lib/gemsmith/cli.rb +1 -0
- data/lib/gemsmith/cli_helpers.rb +2 -2
- data/lib/gemsmith/cli_options.rb +3 -2
- data/lib/gemsmith/skeletons/rails_skeleton.rb +4 -1
- data/lib/gemsmith/templates/%gem_name%/%gem_name%.gemspec.tt +4 -4
- data/lib/gemsmith/templates/%gem_name%/.travis.yml.tt +4 -0
- data/lib/gemsmith/templates/%gem_name%/lib/%gem_name%.rb.tt +3 -0
- data/lib/gemsmith/templates/%gem_name%/spec/spec_helper.rb.tt +3 -6
- data/lib/gemsmith/templates/%gem_name%/spec/support/kit/temp_dir.rb.tt +1 -1
- data/lib/gemsmith/version.rb +1 -1
- metadata +20 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20f24c4b3a47e59d46c38f625d1e1348da14b8e6
|
4
|
+
data.tar.gz: a18387718db5ff5fb2122a6e9f201b9fc8243a77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 618afb656d11ecec14b61a20664fa4112aabb08b6a7adf199fdd930e7637cec4591a7d024c281de65dbece635dd09a808248b42d794cc09d9441d9c676c2f110
|
7
|
+
data.tar.gz: 67154aad2d2caed78d29e2fb563fe317df422253b8c82af861e207d231d1f07d236d72e0b1231e7d7b6354af31410bb964adf994151638494b771f3da5f80912
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -32,7 +32,6 @@ Gemsmith allows you to easily craft new gems via the command line with custom se
|
|
32
32
|
0. Any of the following Ruby VMs:
|
33
33
|
- [MRI 2.x.x](http://www.ruby-lang.org)
|
34
34
|
- [JRuby 1.x.x](http://jruby.org)
|
35
|
-
- [Rubinius 2.x.x](http://rubini.us)
|
36
35
|
0. [RubyGems](http://rubygems.org).
|
37
36
|
0. [Bundler](https://github.com/carlhuda/bundler).
|
38
37
|
|
@@ -40,7 +39,7 @@ Gemsmith allows you to easily craft new gems via the command line with custom se
|
|
40
39
|
|
41
40
|
For a secure install, type the following from the command line (recommended):
|
42
41
|
|
43
|
-
gem cert --add <(curl -Ls
|
42
|
+
gem cert --add <(curl -Ls https://www.alchemists.io/gem-public.pem)
|
44
43
|
gem install gemsmith --trust-policy MediumSecurity
|
45
44
|
|
46
45
|
NOTE: A HighSecurity trust policy would be best but MediumSecurity enables signed gem verification while
|
@@ -57,10 +56,10 @@ You can configure common settings for future gem builds by creating the followin
|
|
57
56
|
...using the following settings (for example):
|
58
57
|
|
59
58
|
---
|
60
|
-
:author_name:
|
61
|
-
:author_email:
|
62
|
-
:author_url:
|
63
|
-
:company_name:
|
59
|
+
:author_name: Joe Smith
|
60
|
+
:author_email: joe@smithware.com
|
61
|
+
:author_url: https://www.smithware.com
|
62
|
+
:company_name: Smithware
|
64
63
|
|
65
64
|
If no options are configured, then the defaults are as follows:
|
66
65
|
|
@@ -75,9 +74,8 @@ If no options are configured, then the defaults are as follows:
|
|
75
74
|
company_url: <author URL>
|
76
75
|
github_user: <github user>
|
77
76
|
year: <current year>
|
78
|
-
ruby_version: 2.
|
79
|
-
|
80
|
-
rails_version: 4.0
|
77
|
+
ruby_version: 2.2.0
|
78
|
+
rails_version: 4.2
|
81
79
|
|
82
80
|
# Usage
|
83
81
|
|
@@ -94,6 +92,8 @@ For more gem creation options, type: gemsmith help create
|
|
94
92
|
|
95
93
|
-b, [--bin], [--no-bin] # Add binary support.
|
96
94
|
-r, [--rails], [--no-rails] # Add Rails support.
|
95
|
+
-S, [--security], [--no-security] # Add security support.
|
96
|
+
# Default: true
|
97
97
|
-p, [--pry], [--no-pry] # Add Pry support.
|
98
98
|
# Default: true
|
99
99
|
-g, [--guard], [--no-guard] # Add Guard support.
|
@@ -176,11 +176,11 @@ Read [CONTRIBUTING](CONTRIBUTING.md) for details.
|
|
176
176
|
|
177
177
|
# Credits
|
178
178
|
|
179
|
-
Developed by [Brooke Kuhlmann](
|
179
|
+
Developed by [Brooke Kuhlmann](https://www.alchemists.io) at [Alchemists](https://www.alchemists.io).
|
180
180
|
|
181
181
|
# License
|
182
182
|
|
183
|
-
Copyright (c) 2011 [Alchemists](
|
183
|
+
Copyright (c) 2011 [Alchemists](https://www.alchemists.io).
|
184
184
|
Read the [LICENSE](LICENSE.md) for details.
|
185
185
|
|
186
186
|
# History
|
data/lib/gemsmith/cli.rb
CHANGED
@@ -38,6 +38,7 @@ module Gemsmith
|
|
38
38
|
map %w(-c --create) => :create
|
39
39
|
method_option :bin, aliases: "-b", desc: "Add binary support.", type: :boolean, default: false
|
40
40
|
method_option :rails, aliases: "-r", desc: "Add Rails support.", type: :boolean, default: false
|
41
|
+
method_option :security, aliases: "-S", desc: "Add security support.", type: :boolean, default: true
|
41
42
|
method_option :pry, aliases: "-p", desc: "Add Pry support.", type: :boolean, default: true
|
42
43
|
method_option :guard, aliases: "-g", desc: "Add Guard support.", type: :boolean, default: true
|
43
44
|
method_option :rspec, aliases: "-s", desc: "Add RSpec support.", type: :boolean, default: true
|
data/lib/gemsmith/cli_helpers.rb
CHANGED
@@ -31,7 +31,7 @@ module Gemsmith
|
|
31
31
|
# ===== Parameters
|
32
32
|
# * +options+ - Optional. The hash to convert. Default: {}
|
33
33
|
def enforce_symbol_keys options = {}
|
34
|
-
options.
|
34
|
+
options.each.with_object({}) { |(key, value), hash| hash[key.to_sym] = value }
|
35
35
|
end
|
36
36
|
|
37
37
|
# Prints currently installed gem name and version information.
|
@@ -39,7 +39,7 @@ module Gemsmith
|
|
39
39
|
# * +gems+ - Required. The array of gem names (i.e. gem specifications).
|
40
40
|
def print_gems gems
|
41
41
|
say "Multiple versions found:"
|
42
|
-
gems.
|
42
|
+
gems.each.with_index do |spec, index|
|
43
43
|
say "#{index + 1}. #{spec.name} #{spec.version.version}"
|
44
44
|
end
|
45
45
|
end
|
data/lib/gemsmith/cli_options.rb
CHANGED
@@ -32,6 +32,7 @@ module Gemsmith
|
|
32
32
|
post_install_message: @settings[:post_install_message],
|
33
33
|
bin: default_boolean(:bin),
|
34
34
|
rails: default_boolean(:rails),
|
35
|
+
security: default_boolean(:security, true),
|
35
36
|
pry: default_boolean(:pry, true),
|
36
37
|
guard: default_boolean(:guard, true),
|
37
38
|
rspec: default_boolean(:rspec, true),
|
@@ -86,11 +87,11 @@ module Gemsmith
|
|
86
87
|
end
|
87
88
|
|
88
89
|
def ruby_version
|
89
|
-
@settings[:ruby_version] || "2.
|
90
|
+
@settings[:ruby_version] || "2.2.0"
|
90
91
|
end
|
91
92
|
|
92
93
|
def rails_version
|
93
|
-
@settings[:rails_version] || "4.
|
94
|
+
@settings[:rails_version] || "4.2"
|
94
95
|
end
|
95
96
|
|
96
97
|
def default_boolean key, value = false
|
@@ -2,7 +2,10 @@ module Gemsmith
|
|
2
2
|
module Skeletons
|
3
3
|
class RailsSkeleton < BaseSkeleton
|
4
4
|
def create_engine
|
5
|
-
|
5
|
+
gem_name = template_options.fetch :gem_name
|
6
|
+
system "rails plugin new #{gem_name} #{engine_options}"
|
7
|
+
remove_file "#{gem_name}/MIT-LICENSE", template_options
|
8
|
+
remove_file "#{gem_name}/README.rdoc", template_options
|
6
9
|
end
|
7
10
|
|
8
11
|
def create_generator_files
|
@@ -15,10 +15,12 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.post_install_message = "<%= config[:post_install_message] %>"
|
16
16
|
<%- end -%>
|
17
17
|
|
18
|
-
|
18
|
+
<%- if config[:security] -%>
|
19
|
+
if ENV["RUBY_GEM_SECURITY"] == "enabled"
|
19
20
|
spec.signing_key = File.expand_path("<%= config[:gem_private_key] %>")
|
20
21
|
spec.cert_chain = [File.expand_path("<%= config[:gem_public_key] %>")]
|
21
22
|
end
|
23
|
+
<%- end -%>
|
22
24
|
|
23
25
|
<%- if config[:pry] -%>
|
24
26
|
case Gem.ruby_engine
|
@@ -27,9 +29,6 @@ Gem::Specification.new do |spec|
|
|
27
29
|
spec.add_development_dependency "pry-stack_explorer"
|
28
30
|
when "jruby"
|
29
31
|
spec.add_development_dependency "pry-nav"
|
30
|
-
when "rbx"
|
31
|
-
spec.add_development_dependency "pry-nav"
|
32
|
-
spec.add_development_dependency "pry-stack_explorer"
|
33
32
|
else
|
34
33
|
raise RuntimeError.new("Unsupported Ruby Engine!")
|
35
34
|
end
|
@@ -61,6 +60,7 @@ Gem::Specification.new do |spec|
|
|
61
60
|
<%- if config[:guard] -%>
|
62
61
|
spec.add_development_dependency "rb-fsevent" # Guard file events for OSX.
|
63
62
|
spec.add_development_dependency "guard-rspec"
|
63
|
+
spec.add_development_dependency "terminal-notifier"
|
64
64
|
spec.add_development_dependency "terminal-notifier-guard"
|
65
65
|
<%- end -%>
|
66
66
|
<%- if config[:code_climate] -%>
|
@@ -19,14 +19,11 @@ case Gem.ruby_engine
|
|
19
19
|
require "pry-stack_explorer"
|
20
20
|
when "jruby"
|
21
21
|
require "pry-nav"
|
22
|
-
when "rbx"
|
23
|
-
require "pry-nav"
|
24
|
-
require "pry-stack_explorer"
|
25
22
|
end
|
26
23
|
<%- end -%>
|
27
24
|
|
28
25
|
Dir[File.join(File.dirname(__FILE__), "support/kit/**/*.rb")].each { |file| require file }
|
29
26
|
|
30
|
-
|
31
|
-
|
32
|
-
end
|
27
|
+
# Uncomment to add a custom configuration. For the default configuration, see the "support/kit" folder.
|
28
|
+
# RSpec.configure do |config|
|
29
|
+
# end
|
@@ -2,7 +2,7 @@ require "rspec/core/shared_context"
|
|
2
2
|
|
3
3
|
module RSpecSupportKitTempDirContext
|
4
4
|
extend RSpec::Core::SharedContext
|
5
|
-
let
|
5
|
+
let(:temp_dir) { File.expand_path "../../../../tmp/rspec", __FILE__ }
|
6
6
|
end
|
7
7
|
|
8
8
|
RSpec.configure do |config|
|
data/lib/gemsmith/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemsmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 5.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
fMlZDUGx3lQarp/vPjK+6XH7DLXjBEKqeIGBIpLthYUvDxJRp23C+T3liGSL32vg
|
31
31
|
mSpxxwmK95GDFuEy2mNPaxnazdkw8c+7DbrSpzd/CnNZkRgitxOavs8=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2015-01-01 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: pry-byebug
|
@@ -80,14 +80,14 @@ dependencies:
|
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
83
|
+
version: '2.0'
|
84
84
|
type: :runtime
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
90
|
+
version: '2.0'
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rails
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,6 +200,20 @@ dependencies:
|
|
200
200
|
- - ">="
|
201
201
|
- !ruby/object:Gem::Version
|
202
202
|
version: '0'
|
203
|
+
- !ruby/object:Gem::Dependency
|
204
|
+
name: terminal-notifier
|
205
|
+
requirement: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - ">="
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0'
|
210
|
+
type: :development
|
211
|
+
prerelease: false
|
212
|
+
version_requirements: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - ">="
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '0'
|
203
217
|
- !ruby/object:Gem::Dependency
|
204
218
|
name: terminal-notifier-guard
|
205
219
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,7 +245,7 @@ dependencies:
|
|
231
245
|
description: 'Ruby gem skeleton generation for the professional gemsmith. Includes
|
232
246
|
custom settings, binary, Ruby on Rails, and RSpec support. '
|
233
247
|
email:
|
234
|
-
-
|
248
|
+
- brooke@alchemists.io
|
235
249
|
executables:
|
236
250
|
- gemsmith
|
237
251
|
extensions: []
|
@@ -306,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
320
|
version: '0'
|
307
321
|
requirements: []
|
308
322
|
rubyforge_project:
|
309
|
-
rubygems_version: 2.4.
|
323
|
+
rubygems_version: 2.4.5
|
310
324
|
signing_key:
|
311
325
|
specification_version: 4
|
312
326
|
summary: Ruby gem skeleton generation for the professional gemsmith.
|
metadata.gz.sig
CHANGED
Binary file
|