bones-extras 1.0.1 → 1.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.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 1.1.0 / 2009-11-08
2
+
3
+ * 1 minor enhancement
4
+ * Rubyforge tasks were moved to their own namespace
5
+
1
6
  == 1.0.1 / 2009-11-06
2
7
 
3
8
  * 1 bug fix
data/Rakefile CHANGED
@@ -8,14 +8,12 @@ end
8
8
  ensure_in_path 'lib'
9
9
  task :default => 'test:run'
10
10
 
11
- Bones.plugin :ann, :gem, :git, :notes, :rdoc
12
-
13
11
  Bones {
14
12
  name 'bones-extras'
15
13
  authors 'Tim Pease'
16
14
  email 'tim.pease@gmail.com'
17
15
  url 'http://github.com/TwP/bones-extras'
18
- version '1.0.1'
16
+ version '1.1.0'
19
17
  ignore_file '.gitignore'
20
18
 
21
19
  depend_on 'bones'
@@ -1,5 +1,7 @@
1
1
 
2
2
  module Bones::Plugins::Rubyforge
3
+ include ::Bones::Helpers
4
+ extend self
3
5
 
4
6
  def initialize_rubyforge
5
7
  ::Bones.config {
@@ -27,9 +29,8 @@ module Bones::Plugins::Rubyforge
27
29
  def post_load
28
30
  require 'rubyforge'
29
31
  require 'rake/contrib/sshpublisher'
30
- config = ::Bones.config
31
32
  have?(:rubyforge) { true }
32
- rescue LoadError
33
+ rescue LoadError => err
33
34
  have?(:rubyforge) { false }
34
35
  end
35
36
 
@@ -37,49 +38,43 @@ module Bones::Plugins::Rubyforge
37
38
  return unless have? :rubyforge
38
39
  config = ::Bones.config
39
40
 
40
- if have? :gem
41
- namespace :gem do
42
- desc 'Package and upload to RubyForge'
43
- task :release => [:clobber, 'gem'] do |t|
44
- v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
45
- abort "Versions don't match #{v} vs #{config.version}" if v != config.version
46
- pkg = "pkg/#{config.gem._spec.full_name}"
47
-
48
- rf = RubyForge.new
49
- rf.configure rescue nil
50
- puts 'Logging in'
51
- rf.login
52
-
53
- c = rf.userconfig
54
- c['release_notes'] = config.description if config.description
55
- c['release_changes'] = config.changes if config.changes
56
- c['preformatted'] = true
57
-
58
- files = Dir.glob("#{pkg}*.*")
59
-
60
- puts "Releasing #{config.name} v. #{config.version}"
61
- rf.add_release config.rubyforge.name, config.name, config.version, *files
62
- end
41
+ namespace :rubyforge do
42
+ desc 'Package gem and upload to RubyForge'
43
+ task :release => ['gem:clobber_package', 'gem:package'] do |t|
44
+ v = ENV['VERSION'] or abort 'Must supply VERSION=x.y.z'
45
+ abort "Versions don't match #{v} vs #{config.version}" if v != config.version
46
+ pkg = "pkg/#{config.gem._spec.full_name}"
47
+
48
+ rf = RubyForge.new
49
+ rf.configure rescue nil
50
+ puts 'Logging in'
51
+ rf.login
52
+
53
+ c = rf.userconfig
54
+ c['release_notes'] = config.description if config.description
55
+ c['release_changes'] = config.changes if config.changes
56
+ c['preformatted'] = true
57
+
58
+ files = Dir.glob("#{pkg}*.*")
59
+
60
+ puts "Releasing #{config.name} v. #{config.version}"
61
+ rf.add_release config.rubyforge.name, config.name, config.version, *files
62
+ end
63
+
64
+ desc 'Publish RDoc to RubyForge'
65
+ task :doc_release => %w(doc:clobber_rdoc doc:rdoc) do
66
+ config = YAML.load(
67
+ File.read(File.expand_path('~/.rubyforge/user-config.yml'))
68
+ )
69
+
70
+ host = "#{config['username']}@rubyforge.org"
71
+ remote_dir = "/var/www/gforge-projects/#{config.rubyforge.name}/"
72
+ remote_dir << config.rdoc.remote_dir if config.rdoc.remote_dir
73
+ local_dir = config.rdoc.dir
74
+
75
+ Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
63
76
  end
64
- end # have? :gem
65
-
66
- if have? :rdoc
67
- namespace :doc do
68
- desc 'Publish RDoc to RubyForge'
69
- task :release => %w(doc:clobber_rdoc doc:rdoc) do
70
- config = YAML.load(
71
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
72
- )
73
-
74
- host = "#{config['username']}@rubyforge.org"
75
- remote_dir = "/var/www/gforge-projects/#{config.rubyforge.name}/"
76
- remote_dir << config.rdoc.remote_dir if config.rdoc.remote_dir
77
- local_dir = config.rdoc.dir
78
-
79
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
80
- end
81
- end # namespace :doc
82
- end # have? :rdoc
77
+ end
83
78
 
84
79
  end
85
80
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bones-extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Pease
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-06 00:00:00 -07:00
12
+ date: 2009-11-08 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 3.0.0
23
+ version: 3.0.1
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bones
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.0
33
+ version: 3.0.1
34
34
  version:
35
35
  description: |-
36
36
  The extras package for Mr Bones provides some handy Rake tasks for running