gemstub 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gemstub.rb +34 -36
- metadata +4 -6
data/lib/gemstub.rb
CHANGED
@@ -38,7 +38,7 @@ module Gemstub
|
|
38
38
|
require 'rspec/core'
|
39
39
|
require 'rspec/core/rake_task'
|
40
40
|
desc 'Run specifications'
|
41
|
-
|
41
|
+
RSpec::Core::RakeTask.new(:default) do |t|
|
42
42
|
# opts = File.join('spec', 'spec.opts')
|
43
43
|
# t.spec_opts << '--options' << opts if File.exists?(opts)
|
44
44
|
# t.spec_files = Dir.glob('spec/**/*_spec.rb')
|
@@ -64,10 +64,10 @@ module Gemstub
|
|
64
64
|
s.description = "#{s.name} was developed by: #{s.author}"
|
65
65
|
s.email = ""
|
66
66
|
s.homepage = ""
|
67
|
-
s.files = FileList['lib/**/*.*', '
|
67
|
+
s.files = FileList['lib/**/*.*', 'LICENSE', 'bin/**/*.*']
|
68
68
|
s.require_paths = ['lib']
|
69
69
|
s.bindir = 'bin'
|
70
|
-
s.extra_rdoc_files = ['
|
70
|
+
s.extra_rdoc_files = ['LICENSE']
|
71
71
|
s.has_rdoc = true
|
72
72
|
yield s
|
73
73
|
end
|
@@ -80,13 +80,13 @@ module Gemstub
|
|
80
80
|
end
|
81
81
|
|
82
82
|
desc 'regenerate the gemspec'
|
83
|
-
task :gemspec
|
83
|
+
task :gemspec do
|
84
84
|
@gem_spec.version = "#{@gem_spec.version}.#{Time.now.strftime('%Y%m%d%H%M%S')}"
|
85
85
|
File.open(File.join("#{@gem_spec.name}.gemspec"), 'w') {|f| f.puts @gem_spec.to_ruby}
|
86
86
|
end
|
87
87
|
|
88
88
|
desc "Install the gem"
|
89
|
-
task :install => [:
|
89
|
+
task :install => [:package] do |t|
|
90
90
|
sudo = ENV['SUDOLESS'] == 'true' || RUBY_PLATFORM =~ /win32|cygwin/ ? '' : 'sudo'
|
91
91
|
puts `#{sudo} gem install #{File.join("pkg", @gem_spec.name)}-#{@gem_spec.version}.gem --no-update-sources --no-ri --no-rdoc`
|
92
92
|
end
|
@@ -97,42 +97,40 @@ module Gemstub
|
|
97
97
|
system "gem push #{gem_pkg}"
|
98
98
|
end
|
99
99
|
|
100
|
-
task :readme do
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
end
|
100
|
+
# task :readme do
|
101
|
+
# txt = File.read(File.join(FileUtils.pwd, 'README.textile'))
|
102
|
+
# plain = File.join(FileUtils.pwd, 'README')
|
103
|
+
#
|
104
|
+
# # txt.gsub!(/[\s](@\S+@)[\s]/, "<tt>#{$1}</tt>")
|
105
|
+
# txt.scan(/[\s]@(\S+)@[\s|\.]/).flatten.each do |word|
|
106
|
+
# # puts "replacing: @#{word}@ w/ <tt>#{word}</tt>"
|
107
|
+
# txt.gsub!("@#{word}@", "<tt>#{word}</tt>")
|
108
|
+
# end
|
109
|
+
#
|
110
|
+
# ['h1', 'h2', 'h3', 'h4'].each_with_index do |h, i|
|
111
|
+
# txt.scan(/(#{h}.\s)/).flatten.each do |word|
|
112
|
+
# eq = '=' * (i + 1)
|
113
|
+
# # puts "replacing: '#{word}' w/ #{eq}"
|
114
|
+
# txt.gsub!(word, eq)
|
115
|
+
# end
|
116
|
+
# end
|
117
|
+
#
|
118
|
+
# ['<pre><code>', '</code></pre>'].each do |h|
|
119
|
+
# txt.scan(/(#{h}.*$)/).flatten.each do |word|
|
120
|
+
# # puts "replacing: '#{word}' with nothing"
|
121
|
+
# txt.gsub!(word, '')
|
122
|
+
# end
|
123
|
+
# end
|
124
|
+
#
|
125
|
+
# txt.gsub!("\n\n\n", "\n\n")
|
126
|
+
# File.open(plain, 'w') {|f| f.write txt}
|
127
|
+
# end
|
128
128
|
|
129
129
|
end # gem_spec
|
130
130
|
|
131
131
|
def rdoc(&block)
|
132
132
|
Rake::RDocTask.new do |rd|
|
133
|
-
rd.main = "README"
|
134
133
|
rd.rdoc_files = Dir.glob(File.join('lib', '**', '*.rb'))
|
135
|
-
rd.rdoc_files << 'README'
|
136
134
|
rd.rdoc_files << 'LICENSE'
|
137
135
|
rd.rdoc_dir = "doc"
|
138
136
|
rd.options << "--line-numbers"
|
@@ -141,7 +139,7 @@ module Gemstub
|
|
141
139
|
yield rd if block_given?
|
142
140
|
end
|
143
141
|
|
144
|
-
task :doc => [:
|
142
|
+
task :doc => [:rerdoc]
|
145
143
|
end
|
146
144
|
|
147
145
|
end # class << self
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: gemstub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.0.
|
5
|
+
version: 2.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Mark Bates
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-05-19 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rspec
|
@@ -83,7 +82,6 @@ files:
|
|
83
82
|
- lib/gemstub.rb
|
84
83
|
- README
|
85
84
|
- bin/gemstub
|
86
|
-
has_rdoc: true
|
87
85
|
homepage: http://www.mackframework.com
|
88
86
|
licenses: []
|
89
87
|
|
@@ -97,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
95
|
requirements:
|
98
96
|
- - ">="
|
99
97
|
- !ruby/object:Gem::Version
|
100
|
-
hash:
|
98
|
+
hash: -1017185686430537970
|
101
99
|
segments:
|
102
100
|
- 0
|
103
101
|
version: "0"
|
@@ -110,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
110
108
|
requirements: []
|
111
109
|
|
112
110
|
rubyforge_project: gemstub
|
113
|
-
rubygems_version: 1.
|
111
|
+
rubygems_version: 1.8.2
|
114
112
|
signing_key:
|
115
113
|
specification_version: 3
|
116
114
|
summary: "Gemstub is a very simple tool for creating the stub code you need to build a gem. Usage: at a command prompt simply type: gemstub your_gem_name_here That's it, after that, you all you have to do is the actual coding of your gem! Enjoy!"
|