thorgem 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.markdown +62 -0
- data/Rakefile +42 -0
- data/VERSION +1 -0
- data/bin/thorgem +5 -0
- data/lib/thorgem.rb +141 -0
- data/lib/thorgem.thor +95 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/thortask_spec.rb +7 -0
- data/templates/.gitignore +1 -0
- data/templates/MITLICENSE +22 -0
- data/templates/README.markdown +6 -0
- data/templates/_signatures/APP.RUBY.TASK.THOR.signature +10 -0
- data/templates/bin/binary.erb +5 -0
- data/templates/bin/binary.erb.bat +1 -0
- data/templates/cucumber.yml +3 -0
- data/templates/features/app_name.feature +11 -0
- data/templates/features/support/env.rb +2 -0
- data/templates/lib/app_name.rb +53 -0
- data/templates/lib/templates/my_template.erb +1 -0
- data/templates/lib/templates/optional/opt_template.erb +1 -0
- data/templates/spec/app_name/sample_spec.rb +22 -0
- data/templates/spec/spec_helper.rb +1 -0
- data/templates/wiki/home.textile +6 -0
- data/thorgem.gemspec +72 -0
- data/thortask.gemspec +73 -0
- metadata +94 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Kristian Mandrup
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Thor Gem ##
|
2
|
+
|
3
|
+
When run, it generates a new gem project with a skeleton structure for rapidly creating a Thor based gem.
|
4
|
+
|
5
|
+
## Installation ##
|
6
|
+
|
7
|
+
Thor Gem is installed as a gem and provides an executable <code>thorgem</code> to run it.
|
8
|
+
|
9
|
+
## From github
|
10
|
+
<pre>
|
11
|
+
$ git clone git@github.com:kristianmandrup/thorgem.git
|
12
|
+
$ rake install
|
13
|
+
</pre>
|
14
|
+
|
15
|
+
## Install directly as a gem
|
16
|
+
|
17
|
+
The quick installation alternative using the latest release on RubyGems.
|
18
|
+
|
19
|
+
<code>gem install thortask</code>
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Generate Thor gem 'mytask' skeleton structure
|
24
|
+
|
25
|
+
<pre>
|
26
|
+
$ thortask mytask
|
27
|
+
</pre>
|
28
|
+
|
29
|
+
Generate Thor gem 'mytask' in namespace 'my_namespace'. The executable will be named 'my_namespace_mytask'.
|
30
|
+
If the task is installed in the thor repository, it will can be run by thor as 'my_namespace::mytask'.
|
31
|
+
|
32
|
+
<pre>
|
33
|
+
$ thortask mytask --namespace my_namespace
|
34
|
+
</pre>
|
35
|
+
|
36
|
+
Creates Thor gem project_creator skipping generation of skeleton for rspec and cucumber.
|
37
|
+
|
38
|
+
<pre>
|
39
|
+
$ thortask creator --namespace project --no-rspec --skip-cucumber
|
40
|
+
</pre>
|
41
|
+
|
42
|
+
Creates task project:good without any tests generated
|
43
|
+
|
44
|
+
## TODO
|
45
|
+
|
46
|
+
Allow templates to be deployed within `~/.thor` in a `templates` dir for each task directory.
|
47
|
+
|
48
|
+
Example deployment structure:
|
49
|
+
<pre>
|
50
|
+
.thor
|
51
|
+
+ my_task
|
52
|
+
+ templates
|
53
|
+
- main.thor
|
54
|
+
|
55
|
+
+ my_other_task
|
56
|
+
+ templates
|
57
|
+
- main.thor
|
58
|
+
</pre>
|
59
|
+
|
60
|
+
## Community ##
|
61
|
+
|
62
|
+
Suggestions for improvement are welcome!
|
data/Rakefile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
begin
|
2
|
+
require 'jeweler'
|
3
|
+
Jeweler::Tasks.new do |gem|
|
4
|
+
gem.name = "thorgem"
|
5
|
+
gem.summary = %Q{Creates a new thor task as a gem}
|
6
|
+
gem.description = %Q{Creates a new thor task configured to your taste}
|
7
|
+
gem.email = "kmandrup@gmail.com"
|
8
|
+
gem.homepage = "http://github.com/kristianmandrup/thortask"
|
9
|
+
gem.authors = ["Kristian Mandrup"]
|
10
|
+
# gem.add_development_dependency "rspec", ">= 1.2.9"
|
11
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
12
|
+
end
|
13
|
+
Jeweler::GemcutterTasks.new
|
14
|
+
rescue LoadError
|
15
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
16
|
+
end
|
17
|
+
|
18
|
+
# require 'spec/rake/spectask'
|
19
|
+
# Spec::Rake::SpecTask.new(:spec) do |spec|
|
20
|
+
# spec.libs << 'lib' << 'spec'
|
21
|
+
# spec.spec_files = FileList['spec/**/*_spec.rb']
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# Spec::Rake::SpecTask.new(:rcov) do |spec|
|
25
|
+
# spec.libs << 'lib' << 'spec'
|
26
|
+
# spec.pattern = 'spec/**/*_spec.rb'
|
27
|
+
# spec.rcov = true
|
28
|
+
# end
|
29
|
+
#
|
30
|
+
# task :spec => :check_dependencies
|
31
|
+
#
|
32
|
+
# task :default => :spec
|
33
|
+
#
|
34
|
+
# require 'rake/rdoctask'
|
35
|
+
# Rake::RDocTask.new do |rdoc|
|
36
|
+
# version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
37
|
+
#
|
38
|
+
# rdoc.rdoc_dir = 'rdoc'
|
39
|
+
# rdoc.title = "thortask #{version}"
|
40
|
+
# rdoc.rdoc_files.include('README*')
|
41
|
+
# rdoc.rdoc_files.include('lib/**/*.rb')
|
42
|
+
# end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
data/bin/thorgem
ADDED
data/lib/thorgem.rb
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
require 'active_support/inflector'
|
2
|
+
require 'thor'
|
3
|
+
require 'thor/group'
|
4
|
+
|
5
|
+
class Thorgem< Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
# Define arguments and options
|
9
|
+
argument :app_name
|
10
|
+
|
11
|
+
class_option :namespace, :type => :string, :default => nil, :desc => 'namespace of thor task'
|
12
|
+
|
13
|
+
class_option :jewel, :type => :boolean, :default => true, :aliases => ['-j'], :desc => 'create task as a jewel'
|
14
|
+
class_option :binaries, :type => :boolean, :default => true, :aliases => ['-b'], :desc => 'add binaries'
|
15
|
+
class_option :rspec, :type => :boolean, :default => true, :desc => 'congigure rspec'
|
16
|
+
class_option :wiki, :type => :boolean, :default => true, :aliases => ['-w'], :desc => 'add wiki dir'
|
17
|
+
|
18
|
+
class_option :templates, :type => :boolean, :default => false, :aliases => ['-t'], :desc => 'add templates dir'
|
19
|
+
class_option :cucumber, :type => :boolean, :default => false, :aliases => ['-c'], :desc => 'configure use of cucumber'
|
20
|
+
class_option :signatures, :type => :boolean, :default => false, :aliases => ['-s'], :desc => 'create signature files'
|
21
|
+
|
22
|
+
def self.source_root
|
23
|
+
# template_path(__FILE__)
|
24
|
+
File.expand_path(File.dirname(__FILE__) + '/../templates')
|
25
|
+
end
|
26
|
+
|
27
|
+
def main
|
28
|
+
create_jewel if options[:jewel]
|
29
|
+
create_root if !options[:jewel]
|
30
|
+
main_flow
|
31
|
+
end
|
32
|
+
|
33
|
+
protected
|
34
|
+
|
35
|
+
def create_jewel
|
36
|
+
run "jeweler #{app_name}"
|
37
|
+
self.destination_root = File.expand_path(app_name, destination_root)
|
38
|
+
FileUtils.cd(destination_root)
|
39
|
+
end
|
40
|
+
|
41
|
+
def create_root
|
42
|
+
self.destination_root = File.expand_path(app_name, destination_root)
|
43
|
+
empty_directory '.'
|
44
|
+
FileUtils.cd(destination_root)
|
45
|
+
end
|
46
|
+
|
47
|
+
def main_flow
|
48
|
+
lib
|
49
|
+
readme
|
50
|
+
wiki if options[:wiki]
|
51
|
+
signatures if options[:signatures]
|
52
|
+
binaries if options[:binaries]
|
53
|
+
cucumber if options[:cucumber]
|
54
|
+
rspec if !options[:rspec]
|
55
|
+
licence if options[:license]
|
56
|
+
end
|
57
|
+
|
58
|
+
def cucumber
|
59
|
+
empty_directory 'features'
|
60
|
+
inside 'features' do
|
61
|
+
template 'app_name.feature', "#{app_name}.feature"
|
62
|
+
empty_directory 'step_definitions'
|
63
|
+
empty_directory 'support'
|
64
|
+
inside 'support' do
|
65
|
+
template 'env.rb'
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def binaries
|
71
|
+
empty_directory 'bin'
|
72
|
+
inside "bin" do
|
73
|
+
template 'binary.erb', "#{ns_app_name}"
|
74
|
+
template 'binary.erb.bat', "#{ns_app_name}.bat"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def rspec
|
79
|
+
empty_directory 'spec'
|
80
|
+
inside 'spec' do
|
81
|
+
empty_directory "#{app_name}"
|
82
|
+
template 'spec_helper.rb', "#{app_name}/spec_helper.rb"
|
83
|
+
template 'app_name/sample_spec.rb', "#{app_name}/#{app_name}_spec.rb"
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def signatures
|
88
|
+
empty_directory '_signatures'
|
89
|
+
inside '_signatures' do
|
90
|
+
template 'APP.RUBY.TASK.THOR.signature', 'APP.RUBY.TASK.THOR.signature'
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def lib
|
95
|
+
empty_directory 'lib'
|
96
|
+
inside 'lib' do
|
97
|
+
template 'app_name.rb', "#{app_name}.thor"
|
98
|
+
template 'app_name.rb', "#{app_name}.rb" if !File.exist("#{app_name}.rb") # if not jewel
|
99
|
+
directory 'templates' if options[:templates]
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def wiki
|
104
|
+
empty_directory 'wiki'
|
105
|
+
inside 'wiki' do
|
106
|
+
template 'home.textile'
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
def readme
|
111
|
+
run "rm -f README.rdoc" if File.exist? 'README.rdoc'
|
112
|
+
template 'README.markdown'
|
113
|
+
end
|
114
|
+
|
115
|
+
def licence
|
116
|
+
if yes? "Use MIT license?"
|
117
|
+
say("WARNING: Env. variable USERNAME not set, using USERNAME = '#{ENV['USER']}' in license", :yellow) if !ENV['USERNAME']
|
118
|
+
# Make a copy of the MITLICENSE file at the source root
|
119
|
+
template "MITLICENSE"
|
120
|
+
return
|
121
|
+
end
|
122
|
+
say("Shame on you!", :red)
|
123
|
+
end
|
124
|
+
|
125
|
+
private
|
126
|
+
|
127
|
+
def class_name
|
128
|
+
name = if options[:namespace]
|
129
|
+
"#{options[:namespace]}::#{app_name}"
|
130
|
+
else
|
131
|
+
app_name
|
132
|
+
end
|
133
|
+
name.camelize
|
134
|
+
end
|
135
|
+
|
136
|
+
def ns_app_name
|
137
|
+
return "#{options[:namespace]}_#{app_name}" if options[:namespace]
|
138
|
+
app_name
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|
data/lib/thorgem.thor
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'active_support/inflector'
|
2
|
+
require 'thor'
|
3
|
+
require 'thor/group'
|
4
|
+
|
5
|
+
class Thorgem < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
# Define arguments and options
|
9
|
+
argument :app_name
|
10
|
+
class_option :namespace, :type => :string, :default => false, :desc => 'namespace of thor task'
|
11
|
+
class_option :skip_rspec, :type => :boolean, :default => false, :desc => 'skip creation of rspec config'
|
12
|
+
class_option :skip_cucumber, :type => :boolean, :default => false, :aliases => ['-c'], :desc => 'skip creation of cucumber config'
|
13
|
+
class_option :skip_signatures, :type => :boolean, :default => false, :aliases => ['-s'], :desc => 'skip creation of signature files'
|
14
|
+
class_option :templates, :type => :boolean, :default => false, :aliases => ['-t'], :desc => 'set to create initial templates dir'
|
15
|
+
class_option :binaries, :type => :boolean, :default => false, :aliases => ['-b'], :desc => 'create binaries'
|
16
|
+
|
17
|
+
def self.source_root
|
18
|
+
# template_path(__FILE__)
|
19
|
+
File.join(File.dirname(__FILE__), '..', 'templates')
|
20
|
+
end
|
21
|
+
|
22
|
+
def create_root
|
23
|
+
self.destination_root = File.expand_path(app_name, destination_root)
|
24
|
+
empty_directory '.'
|
25
|
+
FileUtils.cd(destination_root)
|
26
|
+
end
|
27
|
+
|
28
|
+
def create_cucumber_features
|
29
|
+
return if options[:skip_cucumber]
|
30
|
+
empty_directory 'features'
|
31
|
+
inside 'features' do
|
32
|
+
template('app_name.feature', "#{app_name}.feature")
|
33
|
+
empty_directory 'step_definitions'
|
34
|
+
empty_directory 'support'
|
35
|
+
inside 'support' do
|
36
|
+
template 'env.rb'
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def create_binaries
|
42
|
+
return if !options[:binaries]
|
43
|
+
empty_directory 'bin'
|
44
|
+
inside "bin" do
|
45
|
+
template 'binary', "#{app_name}"
|
46
|
+
template 'binary.bat', "#{app_name}.bat"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def create_specs
|
51
|
+
return if options[:skip_rspec]
|
52
|
+
empty_directory 'spec'
|
53
|
+
inside 'spec' do
|
54
|
+
empty_directory "#{app_name}"
|
55
|
+
template 'spec_helper.rb', "#{app_name}/spec_helper.rb"
|
56
|
+
template 'app_name/sample_spec.rb', "#{app_name}/#{app_name}_spec.rb"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def create_signature
|
61
|
+
return if options[:skip_signatures]
|
62
|
+
empty_directory '_signatures'
|
63
|
+
inside '_signatures' do
|
64
|
+
template 'APP.RUBY.TASK.THOR.signature', 'APP.RUBY.TASK.THOR.signature'
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def create_lib
|
69
|
+
empty_directory 'lib'
|
70
|
+
inside 'lib' do
|
71
|
+
template 'app_name.rb', "#{app_name}.thor"
|
72
|
+
directory 'templates' if options[:templates]
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def copy_readme
|
77
|
+
template 'README.markdown'
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
def copy_licence
|
82
|
+
if yes?("Use MIT license?")
|
83
|
+
|
84
|
+
if !ENV['USERNAME']
|
85
|
+
say "WARNING: Env. variable USERNAME not set, using USERNAME = '#{ENV['USER']}' in license", :yellow
|
86
|
+
end
|
87
|
+
|
88
|
+
# Make a copy of the MITLICENSE file at the source root
|
89
|
+
template "MITLICENSE"
|
90
|
+
else
|
91
|
+
say "Shame on you…", :red
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
end
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.DS_Store
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) <%= "<#{Time.new.year}> <#{ENV['USERNAME'] || ENV['USER'] || 'Unknown author' }>" %>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1 @@
|
|
1
|
+
@"ruby.exe" "%~dpn0" %*
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'active_support/inflector'
|
2
|
+
require 'thor'
|
3
|
+
require 'thor/group'
|
4
|
+
|
5
|
+
<%= "module #{options[:namespace].camelize}" if options[:namespace] %>
|
6
|
+
class <%= app_name.camelize %> < Thor::Group
|
7
|
+
include Thor::Actions
|
8
|
+
|
9
|
+
# group used when displaying thor tasks with: thor list or thor -T
|
10
|
+
<% if options[:namespace] %>
|
11
|
+
group :<%= options[:namespace] %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
# Define arguments
|
15
|
+
argument :name
|
16
|
+
# argument :my_arg_name, :type (:string, :hash, :array, :numeric), :default, :required, :optional, :desc, :banner
|
17
|
+
|
18
|
+
# Define options
|
19
|
+
class_option :my_option, :type => :boolean, :default => true
|
20
|
+
# class_option :my_other_option, :type (:string, :hash, :array, :numeric or :boolean), :default, :required => false, :group, :aliases => '-p', :desc, :banner
|
21
|
+
|
22
|
+
def self.source_root
|
23
|
+
# use line below when deploying the task
|
24
|
+
# template_path(__FILE__)
|
25
|
+
# local_template_path(__FILE__) # tries ROOT/templates and then ROOT/lib/templates
|
26
|
+
File.expand_path(File.dirname(__FILE__) + '/../templates')
|
27
|
+
end
|
28
|
+
|
29
|
+
def main
|
30
|
+
create_root
|
31
|
+
create_optional if options[:my_option]
|
32
|
+
end
|
33
|
+
|
34
|
+
protected
|
35
|
+
|
36
|
+
def create_root
|
37
|
+
self.destination_root = File.expand_path(name, destination_root)
|
38
|
+
empty_directory '.'
|
39
|
+
FileUtils.cd(destination_root)
|
40
|
+
end
|
41
|
+
|
42
|
+
def create_optional
|
43
|
+
empty_directory 'optional'
|
44
|
+
<% if options[:templates] %>
|
45
|
+
template 'my_template.erb', "#{name}.rb"
|
46
|
+
inside 'optional' do
|
47
|
+
template 'opt_template.erb', "opt_#{name}.rb"
|
48
|
+
end
|
49
|
+
<% end %>
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
<%= "end" if options[:namespace] %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Name: <%= name %>
|
@@ -0,0 +1 @@
|
|
1
|
+
Optional name: <%= name %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module <%= app_name.camelize %>
|
4
|
+
describe Basic do
|
5
|
+
let(:output) {double('output').as_null_object}
|
6
|
+
let(:game) {Game.new(output)}
|
7
|
+
|
8
|
+
describe "#start" do
|
9
|
+
it "starts the app" do
|
10
|
+
output.should_receive(:puts).with("Welcome to #{app_name}!")
|
11
|
+
game.start('1234')
|
12
|
+
end
|
13
|
+
end # start
|
14
|
+
|
15
|
+
context "logged in" do
|
16
|
+
describe "#welcome" do
|
17
|
+
# ...
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require '<%= app_name %>'
|
data/thorgem.gemspec
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{thorgem}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Kristian Mandrup"]
|
12
|
+
s.date = %q{2010-06-26}
|
13
|
+
s.default_executable = %q{thorgem}
|
14
|
+
s.description = %q{Creates a new thor task configured to your taste}
|
15
|
+
s.email = %q{kmandrup@gmail.com}
|
16
|
+
s.executables = ["thorgem"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.markdown"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".gitignore",
|
24
|
+
"LICENSE",
|
25
|
+
"README.markdown",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/thorgem",
|
29
|
+
"lib/thorgem.rb",
|
30
|
+
"lib/thorgem.thor",
|
31
|
+
"spec/spec.opts",
|
32
|
+
"spec/spec_helper.rb",
|
33
|
+
"spec/thortask_spec.rb",
|
34
|
+
"templates/.gitignore",
|
35
|
+
"templates/MITLICENSE",
|
36
|
+
"templates/README.markdown",
|
37
|
+
"templates/_signatures/APP.RUBY.TASK.THOR.signature",
|
38
|
+
"templates/bin/binary.erb",
|
39
|
+
"templates/bin/binary.erb.bat",
|
40
|
+
"templates/cucumber.yml",
|
41
|
+
"templates/features/app_name.feature",
|
42
|
+
"templates/features/support/env.rb",
|
43
|
+
"templates/lib/app_name.rb",
|
44
|
+
"templates/lib/templates/my_template.erb",
|
45
|
+
"templates/lib/templates/optional/opt_template.erb",
|
46
|
+
"templates/spec/app_name/sample_spec.rb",
|
47
|
+
"templates/spec/spec_helper.rb",
|
48
|
+
"templates/wiki/home.textile",
|
49
|
+
"thorgem.gemspec",
|
50
|
+
"thortask.gemspec"
|
51
|
+
]
|
52
|
+
s.homepage = %q{http://github.com/kristianmandrup/thortask}
|
53
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
54
|
+
s.require_paths = ["lib"]
|
55
|
+
s.rubygems_version = %q{1.3.7}
|
56
|
+
s.summary = %q{Creates a new thor task as a gem}
|
57
|
+
s.test_files = [
|
58
|
+
"spec/spec_helper.rb",
|
59
|
+
"spec/thortask_spec.rb"
|
60
|
+
]
|
61
|
+
|
62
|
+
if s.respond_to? :specification_version then
|
63
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
64
|
+
s.specification_version = 3
|
65
|
+
|
66
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
67
|
+
else
|
68
|
+
end
|
69
|
+
else
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
data/thortask.gemspec
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{thortask}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Kristian Mandrup"]
|
12
|
+
s.date = %q{2010-06-26}
|
13
|
+
s.default_executable = %q{thortask}
|
14
|
+
s.description = %q{Creates a new thor task configured to your taste}
|
15
|
+
s.email = %q{kmandrup@gmail.com}
|
16
|
+
s.executables = ["thortask"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE",
|
19
|
+
"README.markdown"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".gitignore",
|
24
|
+
"LICENSE",
|
25
|
+
"README.markdown",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"bin/thortask",
|
29
|
+
"lib/thortask.rb",
|
30
|
+
"lib/thortask.thor",
|
31
|
+
"spec/spec.opts",
|
32
|
+
"spec/spec_helper.rb",
|
33
|
+
"spec/thortask_spec.rb",
|
34
|
+
"templates/.gitignore",
|
35
|
+
"templates/MITLICENSE",
|
36
|
+
"templates/README.markdown",
|
37
|
+
"templates/_signatures/APP.RUBY.TASK.THOR.signature",
|
38
|
+
"templates/bin/binary.erb",
|
39
|
+
"templates/bin/binary.erb.bat",
|
40
|
+
"templates/cucumber.yml",
|
41
|
+
"templates/features/app_name.feature",
|
42
|
+
"templates/features/support/env.rb",
|
43
|
+
"templates/lib/app_name.rb",
|
44
|
+
"templates/lib/templates/my_template.erb",
|
45
|
+
"templates/lib/templates/optional/opt_template.erb",
|
46
|
+
"templates/spec/app_name/sample_spec.rb",
|
47
|
+
"templates/spec/spec_helper.rb",
|
48
|
+
"thortask.gemspec"
|
49
|
+
]
|
50
|
+
s.homepage = %q{http://github.com/kristianmandrup/thortask}
|
51
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
52
|
+
s.require_paths = ["lib"]
|
53
|
+
s.rubygems_version = %q{1.3.7}
|
54
|
+
s.summary = %q{Creates a new thor task}
|
55
|
+
s.test_files = [
|
56
|
+
"spec/spec_helper.rb",
|
57
|
+
"spec/thortask_spec.rb"
|
58
|
+
]
|
59
|
+
|
60
|
+
if s.respond_to? :specification_version then
|
61
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
62
|
+
s.specification_version = 3
|
63
|
+
|
64
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
65
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
66
|
+
else
|
67
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
68
|
+
end
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: thorgem
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 1
|
9
|
+
version: 0.1.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Kristian Mandrup
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-06-26 00:00:00 +02:00
|
18
|
+
default_executable: thorgem
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: Creates a new thor task configured to your taste
|
22
|
+
email: kmandrup@gmail.com
|
23
|
+
executables:
|
24
|
+
- thorgem
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files:
|
28
|
+
- LICENSE
|
29
|
+
- README.markdown
|
30
|
+
files:
|
31
|
+
- .document
|
32
|
+
- .gitignore
|
33
|
+
- LICENSE
|
34
|
+
- README.markdown
|
35
|
+
- Rakefile
|
36
|
+
- VERSION
|
37
|
+
- bin/thorgem
|
38
|
+
- lib/thorgem.rb
|
39
|
+
- lib/thorgem.thor
|
40
|
+
- spec/spec.opts
|
41
|
+
- spec/spec_helper.rb
|
42
|
+
- spec/thortask_spec.rb
|
43
|
+
- templates/.gitignore
|
44
|
+
- templates/MITLICENSE
|
45
|
+
- templates/README.markdown
|
46
|
+
- templates/_signatures/APP.RUBY.TASK.THOR.signature
|
47
|
+
- templates/bin/binary.erb
|
48
|
+
- templates/bin/binary.erb.bat
|
49
|
+
- templates/cucumber.yml
|
50
|
+
- templates/features/app_name.feature
|
51
|
+
- templates/features/support/env.rb
|
52
|
+
- templates/lib/app_name.rb
|
53
|
+
- templates/lib/templates/my_template.erb
|
54
|
+
- templates/lib/templates/optional/opt_template.erb
|
55
|
+
- templates/spec/app_name/sample_spec.rb
|
56
|
+
- templates/spec/spec_helper.rb
|
57
|
+
- templates/wiki/home.textile
|
58
|
+
- thorgem.gemspec
|
59
|
+
- thortask.gemspec
|
60
|
+
has_rdoc: true
|
61
|
+
homepage: http://github.com/kristianmandrup/thortask
|
62
|
+
licenses: []
|
63
|
+
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options:
|
66
|
+
- --charset=UTF-8
|
67
|
+
require_paths:
|
68
|
+
- lib
|
69
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
+
none: false
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
85
|
+
requirements: []
|
86
|
+
|
87
|
+
rubyforge_project:
|
88
|
+
rubygems_version: 1.3.7
|
89
|
+
signing_key:
|
90
|
+
specification_version: 3
|
91
|
+
summary: Creates a new thor task as a gem
|
92
|
+
test_files:
|
93
|
+
- spec/spec_helper.rb
|
94
|
+
- spec/thortask_spec.rb
|