gemsmith 4.0.0 → 4.1.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/README.md +4 -5
- data/lib/gemsmith/skeletons/rails_skeleton.rb +8 -0
- data/lib/gemsmith/templates/%gem_name%/%gem_name%.gemspec.tt +4 -11
- data/lib/gemsmith/templates/%gem_name%/spec/spec_helper.rb.tt +4 -0
- data/lib/gemsmith/version.rb +1 -1
- metadata +16 -2
- 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: 113faf8fea993a2965bf3f7d154c8bfaf9d5c03c
|
4
|
+
data.tar.gz: 291fe9c8a6c568462caf5cc74c7665e6549ed685
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f522034ceb316f3834aaf1d9c9d88c42b3568e82ee8c471b0b62d31e08b9b45997332f52340aee430f7e5edab72e9c094af43d13bf99ef4303991ae5ef6eccb4
|
7
|
+
data.tar.gz: 8ebd05448c22da01f61699e9d81019c1461f4031e1c4fd855ca9ffd875550ebf2d77bce3a6daeba287eaba03620c570dfe1b310db050f0b3b55be6f34f2a6b2d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -7,14 +7,12 @@
|
|
7
7
|
[](http://travis-ci.org/bkuhlmann/gemsmith)
|
8
8
|
[](https://www.gittip.com/bkuhlmann)
|
9
9
|
|
10
|
-
Gemsmith allows you to easily craft new gems via the command line with custom settings (if desired).
|
11
|
-
a fan of [Bundler](https://github.com/carlhuda/bundler), then you'll appreciate the additional capabilities of this
|
12
|
-
gem. Gemsmith is essentially an enhanced version of Bundler's gem building capabilities.
|
10
|
+
Gemsmith allows you to easily craft new gems via the command line with custom settings (if desired).
|
13
11
|
|
14
12
|
# Features
|
15
13
|
|
16
14
|
* Builds a gem skeleton with Bundler functionality in mind.
|
17
|
-
* Supports common settings
|
15
|
+
* Supports common settings to be applied when creating new gems.
|
18
16
|
* Supports [Thor](https://github.com/wycats/thor) command line functionality.
|
19
17
|
* Supports [Ruby on Rails](http://rubyonrails.org).
|
20
18
|
* Supports [RSpec](http://rspec.info).
|
@@ -25,7 +23,8 @@ gem. Gemsmith is essentially an enhanced version of Bundler's gem building capab
|
|
25
23
|
* Supports [Travis CI](http://travis-ci.org).
|
26
24
|
* Provides the ability to open the source code of any gem within your favorite editor.
|
27
25
|
* Provides the ability to read the documentation of any gem within your default browser.
|
28
|
-
* Adds commonly needed README, [CHANGELOG](CHANGELOG.md), [CONTRIBUTING](CONTRIBUTING.md), [LICENSE](LICENSE.md), etc.
|
26
|
+
* Adds commonly needed README, [CHANGELOG](CHANGELOG.md), [CONTRIBUTING](CONTRIBUTING.md), [LICENSE](LICENSE.md), etc.
|
27
|
+
template files.
|
29
28
|
|
30
29
|
# Requirements
|
31
30
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
module Gemsmith
|
2
2
|
module Skeletons
|
3
3
|
class RailsSkeleton < BaseSkeleton
|
4
|
+
def create_engine
|
5
|
+
system "rails plugin new #{template_options.fetch :gem_name} #{engine_options}"
|
6
|
+
end
|
7
|
+
|
4
8
|
def create_generator_files
|
5
9
|
empty_directory "#{generator_root}/templates"
|
6
10
|
template "#{generator_root}/install/install_generator.rb.tt", template_options
|
@@ -17,6 +21,10 @@ module Gemsmith
|
|
17
21
|
|
18
22
|
private
|
19
23
|
|
24
|
+
def engine_options
|
25
|
+
"--skip --skip-bundle --skip-test-unit --skip-keeps --mountable --dummy-path=spec/dummy"
|
26
|
+
end
|
27
|
+
|
20
28
|
def lib_gem_root
|
21
29
|
"#{lib_root}/%gem_name%"
|
22
30
|
end
|
@@ -1,15 +1,6 @@
|
|
1
1
|
$LOAD_PATH.push File.expand_path("../lib", __FILE__)
|
2
2
|
require "<%=config[:gem_name]%>/version"
|
3
3
|
|
4
|
-
def add_security_key specification, method, files
|
5
|
-
file = files.is_a?(Array) ? files.first : files
|
6
|
-
if File.exists? file
|
7
|
-
specification.send "#{method}=", files
|
8
|
-
else
|
9
|
-
puts "WARNING: Security key not found for #{specification.name} gem specification: #{file}"
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
4
|
Gem::Specification.new do |spec|
|
14
5
|
spec.name = "<%= config[:gem_name] %>"
|
15
6
|
spec.version = <%= config[:gem_class] %>::VERSION
|
@@ -24,8 +15,10 @@ Gem::Specification.new do |spec|
|
|
24
15
|
spec.post_install_message = "<%= config[:post_install_message] %>"
|
25
16
|
<%- end -%>
|
26
17
|
|
27
|
-
|
28
|
-
|
18
|
+
unless ENV["CI"] == "true"
|
19
|
+
spec.signing_key = File.expand_path("<%= config[:gem_private_key] %>")
|
20
|
+
spec.cert_chain = [File.expand_path("<%= config[:gem_public_key] %>")]
|
21
|
+
end
|
29
22
|
|
30
23
|
<%- if config[:pry] -%>
|
31
24
|
case Gem.ruby_engine
|
@@ -29,6 +29,10 @@ RSpec.configure do |config|
|
|
29
29
|
config.filter_run focus: true
|
30
30
|
config.order = "random"
|
31
31
|
|
32
|
+
config.mock_with :rspec do |mocks|
|
33
|
+
mocks.verify_partial_doubles = true
|
34
|
+
end
|
35
|
+
|
32
36
|
config.before(:all) { GC.disable }
|
33
37
|
config.after(:all) { GC.enable }
|
34
38
|
end
|
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.
|
4
|
+
version: 4.1.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: 2014-08-
|
33
|
+
date: 2014-08-10 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: pry-byebug
|
@@ -88,6 +88,20 @@ dependencies:
|
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '1.6'
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: rails
|
93
|
+
requirement: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - "~>"
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '4.1'
|
98
|
+
type: :runtime
|
99
|
+
prerelease: false
|
100
|
+
version_requirements: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - "~>"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '4.1'
|
91
105
|
- !ruby/object:Gem::Dependency
|
92
106
|
name: rake
|
93
107
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|