gem-this 0.3.1 → 0.3.2
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.
- data/Rakefile +1 -1
- data/Rakefile.erb +3 -47
- metadata +1 -1
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
|
|
20
20
|
|
21
21
|
# Change these as appropriate
|
22
22
|
s.name = "gem-this"
|
23
|
-
s.version = "0.3.
|
23
|
+
s.version = "0.3.2"
|
24
24
|
s.summary = "Make existing code into a gem, without any fuss."
|
25
25
|
s.author = "James Adam"
|
26
26
|
s.email = "james@lazyatom.com"
|
data/Rakefile.erb
CHANGED
@@ -92,16 +92,15 @@ spec = Gem::Specification.new do |s|
|
|
92
92
|
<% else %>
|
93
93
|
# s.add_development_dependency("mocha") # for example
|
94
94
|
<% end %>
|
95
|
-
|
96
|
-
# If you want to publish automatically to rubyforge, you'll may need
|
97
|
-
# to tweak this, and the publishing task below too.
|
98
|
-
s.rubyforge_project = "<%= name %>"
|
99
95
|
end
|
100
96
|
|
101
97
|
# This task actually builds the gem. We also regenerate a static
|
102
98
|
# .gemspec file, which is useful if something (i.e. GitHub) will
|
103
99
|
# be automatically building a gem for this project. If you're not
|
104
100
|
# using GitHub, edit as appropriate.
|
101
|
+
#
|
102
|
+
# To publish your gem online, install the 'gemcutter' gem; Read more
|
103
|
+
# about that here: http://gemcutter.org/pages/gem_docs
|
105
104
|
Rake::GemPackageTask.new(spec) do |pkg|
|
106
105
|
pkg.gem_spec = spec
|
107
106
|
|
@@ -121,46 +120,3 @@ desc 'Clear out RDoc and generated packages'
|
|
121
120
|
task :clean => [:clobber_rdoc, :clobber_package] do
|
122
121
|
rm "#{spec.name}.gemspec"
|
123
122
|
end
|
124
|
-
|
125
|
-
# If you want to publish to RubyForge automatically, here's a simple
|
126
|
-
# task to help do that. If you don't, just get rid of this.
|
127
|
-
# Be sure to set up your Rubyforge account details with the Rubyforge
|
128
|
-
# gem; you'll need to run `rubyforge setup` and `rubyforge config` at
|
129
|
-
# the very least.
|
130
|
-
begin
|
131
|
-
require "rake/contrib/sshpublisher"
|
132
|
-
namespace :rubyforge do
|
133
|
-
|
134
|
-
desc "Release gem and RDoc documentation to RubyForge"
|
135
|
-
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
|
136
|
-
|
137
|
-
namespace :release do
|
138
|
-
desc "Release a new version of this gem"
|
139
|
-
task :gem => [:package] do
|
140
|
-
require 'rubyforge'
|
141
|
-
rubyforge = RubyForge.new
|
142
|
-
rubyforge.configure
|
143
|
-
rubyforge.login
|
144
|
-
rubyforge.userconfig['release_notes'] = spec.summary
|
145
|
-
path_to_gem = File.join(File.dirname(__FILE__), "pkg", "#{spec.name}-#{spec.version}.gem")
|
146
|
-
puts "Publishing #{spec.name}-#{spec.version.to_s} to Rubyforge..."
|
147
|
-
rubyforge.add_release(spec.rubyforge_project, spec.name, spec.version.to_s, path_to_gem)
|
148
|
-
end
|
149
|
-
|
150
|
-
desc "Publish RDoc to RubyForge."
|
151
|
-
task :docs => [:rdoc] do
|
152
|
-
config = YAML.load(
|
153
|
-
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
|
154
|
-
)
|
155
|
-
|
156
|
-
host = "#{config['username']}@rubyforge.org"
|
157
|
-
remote_dir = "/var/www/gforge-projects/<%= name %>/" # Should be the same as the rubyforge project name
|
158
|
-
local_dir = 'rdoc'
|
159
|
-
|
160
|
-
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
rescue LoadError
|
165
|
-
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
166
|
-
end
|