lazyatom-gem-this 0.1.2 → 0.1.4

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.
Files changed (5) hide show
  1. data/Rakefile +16 -1
  2. data/Rakefile.erb +15 -0
  3. data/Readme.markdown +2 -2
  4. data/bin/gem-this +1 -1
  5. metadata +2 -2
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ spec = Gem::Specification.new do |s|
15
15
 
16
16
  # Change these as appropriate
17
17
  s.name = "gem-this"
18
- s.version = "0.1.2"
18
+ s.version = "0.1.4"
19
19
  s.summary = "Make existing code into a gem, without any fuss."
20
20
  s.author = "James Adam"
21
21
  s.email = "james@lazyatom.com"
@@ -68,6 +68,9 @@ end
68
68
 
69
69
  # If you want to publish to RubyForge automatically, here's a simple
70
70
  # task to help do that. If you don't, just get rid of this.
71
+ # Be sure to set up your Rubyforge account details with the Rubyforge
72
+ # gem; you'll need to run `rubyforge setup` and `rubyforge config` at
73
+ # the very least.
71
74
  begin
72
75
  require "rake/contrib/sshpublisher"
73
76
  namespace :rubyforge do
@@ -76,6 +79,18 @@ begin
76
79
  task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
77
80
 
78
81
  namespace :release do
82
+ desc "Release a new version of this gem"
83
+ task :gem => [:package] do
84
+ require 'rubyforge'
85
+ rubyforge = RubyForge.new
86
+ rubyforge.configure
87
+ rubyforge.login
88
+ rubyforge.userconfig['release_notes'] = spec.summary
89
+ path_to_gem = File.join(File.dirname(__FILE__), "pkg", "#{spec.name}-#{spec.version}.gem")
90
+ puts "Publishing #{spec.name}-#{spec.version.to_s} to Rubyforge..."
91
+ rubyforge.add_release(spec.rubyforge_project, spec.name, spec.version.to_s, path_to_gem)
92
+ end
93
+
79
94
  desc "Publish RDoc to RubyForge."
80
95
  task :docs => [:rdoc] do
81
96
  config = YAML.load(
data/Rakefile.erb CHANGED
@@ -103,6 +103,9 @@ end
103
103
 
104
104
  # If you want to publish to RubyForge automatically, here's a simple
105
105
  # task to help do that. If you don't, just get rid of this.
106
+ # Be sure to set up your Rubyforge account details with the Rubyforge
107
+ # gem; you'll need to run `rubyforge setup` and `rubyforge config` at
108
+ # the very least.
106
109
  begin
107
110
  require "rake/contrib/sshpublisher"
108
111
  namespace :rubyforge do
@@ -111,6 +114,18 @@ begin
111
114
  task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
112
115
 
113
116
  namespace :release do
117
+ desc "Release a new version of this gem"
118
+ task :gem => [:package] do
119
+ require 'rubyforge'
120
+ rubyforge = RubyForge.new
121
+ rubyforge.configure
122
+ rubyforge.login
123
+ rubyforge.userconfig['release_notes'] = spec.summary
124
+ path_to_gem = File.join(File.dirname(__FILE__), "pkg", "#{spec.name}-#{spec.version}.gem")
125
+ puts "Publishing #{spec.name}-#{spec.version.to_s} to Rubyforge..."
126
+ rubyforge.add_release(spec.rubyforge_project, spec.name, spec.version.to_s, path_to_gem)
127
+ end
128
+
114
129
  desc "Publish RDoc to RubyForge."
115
130
  task :docs => [:rdoc] do
116
131
  config = YAML.load(
data/Readme.markdown CHANGED
@@ -7,9 +7,9 @@ But, more likely than that, it's just that I don't think that far ahead. I'm mor
7
7
 
8
8
  Anyway, sometimes - after a bit of tinkering and pondering - I do end up with a library that I consider gem-worthy and fit for consumption. But every time I look at the existing tools to build gems, I'm paralysed by the comprehensive nature of their function.
9
9
 
10
- Often, they'll try to generate a particular directory structure, with test stubs and a website.
10
+ Often, they'll try to generate a particular directory structure, with test stubs and a website, which is fine in principle, but I've already got my code the way I want it; I'm not generating a new project.
11
11
 
12
- Even worse, sometimes they'll add themselves as dependencies for your gem!
12
+ Even worse, sometimes they'll add themselves as dependencies for your gem! Yuck.
13
13
 
14
14
  I am not interested in that. I just want the simplest thing that could possibly work, to build my gem and make it available to the world. I will add any bells and whistles that I want later.
15
15
 
data/bin/gem-this CHANGED
@@ -44,7 +44,7 @@ def using_git?
44
44
  end
45
45
 
46
46
  def add_to_gitignore
47
- ignores = File.readlines(".gitignore")
47
+ ignores = File.readlines(".gitignore") if File.exist?(".gitignore")
48
48
  ignores += ["pkg", "rdoc"]
49
49
  File.open(".gitignore", "w") { |f| f.write ignores.map { |l| l.strip }.uniq.join("\n") }
50
50
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazyatom-gem-this
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Adam
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-05 00:00:00 -07:00
12
+ date: 2009-04-08 00:00:00 -07:00
13
13
  default_executable: gem-this
14
14
  dependencies: []
15
15