gemsmith 2.0.0 → 2.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
- data/{LICENSE.rdoc → LICENSE.md} +1 -1
- data/README.md +154 -0
- data/lib/gemsmith.rb +2 -2
- data/lib/gemsmith/cli.rb +32 -131
- data/lib/gemsmith/cli_helpers.rb +90 -0
- data/lib/gemsmith/cli_options.rb +94 -0
- data/lib/gemsmith/skeletons/base_skeleton.rb +35 -0
- data/lib/gemsmith/skeletons/cli_skeleton.rb +10 -0
- data/lib/gemsmith/skeletons/default_skeleton.rb +21 -0
- data/lib/gemsmith/skeletons/documentation_skeleton.rb +12 -0
- data/lib/gemsmith/skeletons/git_skeleton.rb +13 -0
- data/lib/gemsmith/skeletons/rails_skeleton.rb +51 -0
- data/lib/gemsmith/skeletons/rspec_skeleton.rb +17 -0
- data/lib/gemsmith/skeletons/travis_skeleton.rb +9 -0
- data/lib/gemsmith/templates/{gem.gemspec.tmp → %gem_name%/%gem_name%.gemspec.tt} +4 -3
- data/lib/gemsmith/templates/{gitignore.tmp → %gem_name%/.gitignore.tt} +2 -1
- data/lib/gemsmith/templates/{rspec.tmp → %gem_name%/.rspec.tt} +0 -0
- data/lib/gemsmith/templates/%gem_name%/.ruby-version.tt +1 -0
- data/lib/gemsmith/templates/{travis.yml.tmp → %gem_name%/.travis.yml.tt} +0 -2
- data/lib/gemsmith/templates/{CHANGELOG.rdoc.tmp → %gem_name%/CHANGELOG.md.tt} +1 -1
- data/lib/gemsmith/templates/{CONTRIBUTING.md.tmp → %gem_name%/CONTRIBUTING.md.tt} +0 -0
- data/lib/gemsmith/templates/{Gemfile.tmp → %gem_name%/Gemfile.tt} +0 -0
- data/lib/gemsmith/templates/{LICENSE.rdoc.tmp → %gem_name%/LICENSE.md.tt} +1 -1
- data/lib/gemsmith/templates/%gem_name%/README.md.tt +59 -0
- data/lib/gemsmith/templates/{Rakefile.tmp → %gem_name%/Rakefile.tt} +0 -0
- data/lib/gemsmith/templates/{bin/gem.tmp → %gem_name%/bin/%gem_name%.tt} +0 -0
- data/lib/gemsmith/templates/{gemfiles/rails-3.2.x.gemfile.tmp → %gem_name%/gemfiles/rails-3.2.x.gemfile.tt} +1 -1
- data/lib/gemsmith/templates/%gem_name%/lib/%gem_name%.rb.tt +33 -0
- data/lib/gemsmith/templates/{lib/gem/action_controller/class_methods.rb.tmp → %gem_name%/lib/%gem_name%/action_controller/class_methods.rb.tt} +2 -2
- data/lib/gemsmith/templates/{lib/gem/action_controller/instance_methods.rb.tmp → %gem_name%/lib/%gem_name%/action_controller/instance_methods.rb.tt} +0 -0
- data/lib/gemsmith/templates/{lib/gem/action_view/instance_methods.rb.tmp → %gem_name%/lib/%gem_name%/action_view/instance_methods.rb.tt} +0 -0
- data/lib/gemsmith/templates/{lib/gem/active_record/class_methods.rb.tmp → %gem_name%/lib/%gem_name%/active_record/class_methods.rb.tt} +2 -2
- data/lib/gemsmith/templates/{lib/gem/active_record/instance_methods.rb.tmp → %gem_name%/lib/%gem_name%/active_record/instance_methods.rb.tt} +0 -0
- data/lib/gemsmith/templates/{lib/gem/cli.rb.tmp → %gem_name%/lib/%gem_name%/cli.rb.tt} +1 -1
- data/lib/gemsmith/templates/{lib/gem/version.rb.tmp → %gem_name%/lib/%gem_name%/version.rb.tt} +0 -0
- data/lib/gemsmith/templates/{lib/generators/gem/install/USAGE.tmp → %gem_name%/lib/generators/%gem_name%/install/USAGE.tt} +0 -0
- data/lib/gemsmith/templates/{lib/generators/gem/install/install_generator.rb.tmp → %gem_name%/lib/generators/%gem_name%/install/install_generator.rb.tt} +0 -0
- data/lib/gemsmith/templates/{lib/generators/gem/upgrade/USAGE.tmp → %gem_name%/lib/generators/%gem_name%/upgrade/USAGE.tt} +0 -0
- data/lib/gemsmith/templates/{lib/generators/gem/upgrade/upgrade_generator.rb.tmp → %gem_name%/lib/generators/%gem_name%/upgrade/upgrade_generator.rb.tt} +0 -0
- data/lib/gemsmith/templates/{spec/gem_spec.rb.tmp → %gem_name%/spec/%gem_name%_spec.rb.tt} +0 -0
- data/lib/gemsmith/templates/{spec/spec_helper.rb.tmp → %gem_name%/spec/spec_helper.rb.tt} +2 -1
- data/lib/gemsmith/version.rb +1 -1
- metadata +61 -40
- data/CHANGELOG.rdoc +0 -134
- data/README.rdoc +0 -133
- data/lib/gemsmith/templates/README.rdoc.tmp +0 -59
- data/lib/gemsmith/templates/gemfiles/rails-3.0.x.gemfile.tmp +0 -5
- data/lib/gemsmith/templates/gemfiles/rails-3.1.x.gemfile.tmp +0 -5
- data/lib/gemsmith/templates/lib/gem.rb.tmp +0 -33
@@ -1,59 +0,0 @@
|
|
1
|
-
= Overview
|
2
|
-
|
3
|
-
{<img src="https://badge.fury.io/rb/<%= config[:gem_name] %>.png" alt="Gem Version" />}[http://badge.fury.io/rb/<%= config[:gem_name] %>]
|
4
|
-
<%- if config[:code_climate] -%>
|
5
|
-
{<img src="https://codeclimate.com/github/<%= config[:github_user] %>/<%= config[:gem_name] %>.png" alt="Code Climate GPA" />}[https://codeclimate.com/github/<%= config[:github_user] %>/<%= config[:gem_name] %>]
|
6
|
-
<%- end -%>
|
7
|
-
<%- if config[:travis] -%>
|
8
|
-
{<img src="https://secure.travis-ci.org/<%= config[:github_user] %>/<%= config[:gem_name] %>.png" alt="Travis CI Status" />}[http://travis-ci.org/<%= config[:github_user] %>/<%= config[:gem_name] %>]
|
9
|
-
<%- end -%>
|
10
|
-
|
11
|
-
= Features
|
12
|
-
|
13
|
-
= Requirements
|
14
|
-
|
15
|
-
<%- if config[:rails] -%>
|
16
|
-
1. {Ruby on Rails}[http://rubyonrails.org].
|
17
|
-
<%- end -%>
|
18
|
-
|
19
|
-
= Setup
|
20
|
-
|
21
|
-
Type the following from the command line to install:
|
22
|
-
|
23
|
-
gem install <%= config[:gem_name] %>
|
24
|
-
|
25
|
-
<%- if config[:rails] -%>
|
26
|
-
Add the following to your Gemfile:
|
27
|
-
|
28
|
-
gem "<%= config[:gem_name] %>"
|
29
|
-
<%- end -%>
|
30
|
-
|
31
|
-
= Usage
|
32
|
-
|
33
|
-
<%- if config[:rspec] -%>
|
34
|
-
= Tests
|
35
|
-
|
36
|
-
To test, do the following:
|
37
|
-
|
38
|
-
1. cd to the gem root.
|
39
|
-
2. bundle install
|
40
|
-
3. bundle exec rspec spec
|
41
|
-
<%- end -%>
|
42
|
-
|
43
|
-
= Contributions
|
44
|
-
|
45
|
-
Read CONTRIBUTING for details.
|
46
|
-
|
47
|
-
= Credits
|
48
|
-
|
49
|
-
Developed by {<%= config[:author_name] %>}[<%= config[:author_url] %>] at {<%= config[:company_name] %>}[<%= config[:company_url] %>]
|
50
|
-
|
51
|
-
= License
|
52
|
-
|
53
|
-
Copyright (c) <%= config[:year] %> {<%= config[:company_name] %>}[<%= config[:company_url] %>].
|
54
|
-
Read the LICENSE for details.
|
55
|
-
|
56
|
-
= History
|
57
|
-
|
58
|
-
Read the CHANGELOG for details.
|
59
|
-
Built with Gemsmith[https://github.com/bkuhlmann/gemsmith].
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "version.rb"
|
2
|
-
|
3
|
-
<%- if config[:rails] -%>
|
4
|
-
# Rails Enhancements
|
5
|
-
if defined? Rails
|
6
|
-
# Dependencies
|
7
|
-
require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "active_record", "class_methods.rb"
|
8
|
-
require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "active_record", "instance_methods.rb"
|
9
|
-
require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_view", "instance_methods.rb"
|
10
|
-
require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_controller", "class_methods.rb"
|
11
|
-
require File.join File.dirname(__FILE__), "<%= config[:gem_name] %>", "action_controller", "instance_methods.rb"
|
12
|
-
|
13
|
-
# Model
|
14
|
-
if defined? ActiveRecord
|
15
|
-
ActiveRecord::Base.send :include, <%= config[:gem_class] %>::ActiveRecord
|
16
|
-
end
|
17
|
-
|
18
|
-
# View
|
19
|
-
if defined? ActionView
|
20
|
-
ActionView::Base.send :include, <%= config[:gem_class] %>::ActionView
|
21
|
-
end
|
22
|
-
|
23
|
-
# Controller
|
24
|
-
if defined? ActionController
|
25
|
-
ActionController::Base.send :include, <%= config[:gem_class] %>::ActionController
|
26
|
-
end
|
27
|
-
end
|
28
|
-
<%- else -%>
|
29
|
-
# Namespace
|
30
|
-
module <%= config[:gem_class] %>
|
31
|
-
# TODO - Add code here.
|
32
|
-
end
|
33
|
-
<%- end -%>
|