rubygems-tasks 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ ### 0.2.4 / 2013-04-8
2
+
3
+ * Use the new `Gem::Package` class when running under Ruby 2.0.0.
4
+ * Fix `hg showconfig extensions hgext gpg` empty test by ignoring the trailing
5
+ new-line (thanks @wrzasa).
6
+
1
7
  ### 0.2.3 / 2012-04-30
2
8
 
3
9
  * {Gem::Tasks::Printing#status} and {Gem::Tasks::Printing#debug} will not
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2012 Hal Brodigan
1
+ Copyright (c) 2011-2013 Hal Brodigan
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -14,35 +14,37 @@ installing and releasing Ruby Gems.
14
14
 
15
15
  ## Philosophy
16
16
 
17
- The Rake tasks which you use to manage a Ruby project _should not_ be coupled
17
+ The Rake tasks which you use to manage a Ruby project should not be coupled
18
18
  to the project generator which you used to create the project.
19
- Project generators have _nothing_ to do with the Rake tasks used to build,
19
+ Project generators have nothing to do with the Rake tasks used to build,
20
20
  install and release a Ruby project.
21
21
 
22
22
  Recently, many Ruby Developers began creating Ruby projects by hand,
23
23
  building/releasing RubyGems using `gem build` / `gem push`. Sometimes this
24
24
  resulted in RubyGems being released with uncommitted changes, or the developer
25
25
  forgetting to tag the release. Ruby Developers should have access to
26
- _agnostic_ and _unobtrusive_ Rake tasks, to _automate_ the release process.
26
+ **agnostic** and **unobtrusive** Rake tasks, to **automate** the release
27
+ process.
28
+
27
29
  This is what rubygems-tasks seeks to provide.
28
30
 
29
31
  ## Features
30
32
 
31
- * Provides tasks to build, install and push gems to [rubygems.org][1].
33
+ * Provides tasks to build, install and push gems to [rubygems.org].
32
34
  * Loads all project metadata from the `.gemspec` file.
33
35
  * Supports loading multiple `.gemspec` files.
34
- * Supports pushing gems to alternate [RubyGems][2] servers.
36
+ * Supports pushing gems to alternate [Gemcutter] servers.
35
37
  * Supports optionally building `.tar.gz` and `.zip` archives.
36
38
  * `build:tar`
37
39
  * `build:zip`
38
- * Supports [Git][3], [Mercurial][4] and [SubVersion][5] Source-Code-Managers
40
+ * Supports [Git], [Mercurial] and [SubVersion] Source-Code-Managers
39
41
  (SCMs).
40
42
  * Supports creating PGP signed Git/Mercurial tags.
41
43
  * Provides optional `sign` tasks for package integrity:
42
44
  * `sign:checksum`
43
45
  * `sign:pgp`
44
46
  * Provides a `console` task, for jumping right into your code.
45
- * Defines task aliases for users coming from [Jeweler][6] or [Hoe][7].
47
+ * Defines task aliases for users coming from [Jeweler] or [Hoe].
46
48
  * ANSI coloured messages!
47
49
 
48
50
  ## Anti-Features
@@ -65,7 +67,7 @@ Specifying an alternate Ruby Console to run:
65
67
  tasks.console.command = 'pry'
66
68
  end
67
69
 
68
- Enable pushing gems to an in-house [RubyGems][2] server:
70
+ Enable pushing gems to an in-house [Gemcutter] server:
69
71
 
70
72
  Gem::Tasks.new do |tasks|
71
73
  tasks.push.host = 'gems.company.com'
@@ -100,14 +102,16 @@ Selectively defining tasks:
100
102
 
101
103
  ## Copyright
102
104
 
103
- Copyright (c) 2011-2012 Hal Brodigan
105
+ Copyright (c) 2011-2013 Hal Brodigan
104
106
 
105
107
  See {file:LICENSE.txt} for details.
106
108
 
107
- [1]: https://rubygems.org/
108
- [2]: https://github.com/rubygems/rubygems.org#readme
109
- [3]: http://git-scm.com/
110
- [4]: http://mercurial.selenic.com/
111
- [5]: http://subversion.tigris.org/
112
- [6]: https://github.com/technicalpickles/jeweler#readme
113
- [7]: https://github.com/seattlerb/hoe#readme
109
+ [Git]: http://git-scm.com/
110
+ [Mercurial]: http://mercurial.selenic.com/
111
+ [SubVersion]: http://subversion.tigris.org/
112
+
113
+ [Jeweler]: https://github.com/technicalpickles/jeweler#readme
114
+ [Hoe]: https://github.com/seattlerb/hoe#readme
115
+
116
+ [rubygems.org]: https://rubygems.org/
117
+ [Gemcutter]: https://github.com/rubygems/rubygems.org#readme
@@ -1,12 +1,12 @@
1
1
  name: rubygems-tasks
2
- version: 0.2.3
2
+ version: 0.2.4
3
3
  summary: Rake tasks for managing and releasing Ruby Gems.
4
4
  description:
5
5
  Agnostic and unobtrusive Rake tasks for managing and releasing Ruby Gems.
6
6
 
7
7
  authors: Postmodern
8
8
  email: postmodern.mod3@gmail.com
9
- homepage: https://github.com/postmodern/rubygems-tasks
9
+ homepage: https://github.com/postmodern/rubygems-tasks#readme
10
10
  has_yard: true
11
11
 
12
12
  development_dependencies:
@@ -1,8 +1,11 @@
1
1
  require 'rubygems/tasks/build/task'
2
2
 
3
- require 'rubygems/builder'
4
3
  require 'fileutils'
5
4
 
5
+ if Gem::VERSION > '2.' then require 'rubygems/package'
6
+ else require 'rubygems/builder'
7
+ end
8
+
6
9
  module Gem
7
10
  class Tasks
8
11
  module Build
@@ -49,9 +52,13 @@ module Gem
49
52
  # @api semipublic
50
53
  #
51
54
  def build(path,gemspec)
52
- builder = ::Gem::Builder.new(gemspec)
55
+ gem = if ::Gem::VERSION > '2.'
56
+ ::Gem::Package.build(gemspec)
57
+ else
58
+ ::Gem::Builder.new(gemspec).build
59
+ end
53
60
 
54
- mv builder.build, Project::PKG_DIR
61
+ mv gem, Project::PKG_DIR
55
62
  end
56
63
 
57
64
  end
@@ -1,7 +1,5 @@
1
1
  require 'rubygems/tasks/task'
2
2
 
3
- require 'rubygems/builder'
4
-
5
3
  module Gem
6
4
  class Tasks
7
5
  module Build
@@ -79,7 +79,7 @@ module Gem
79
79
 
80
80
  Dir.chdir(@root) do
81
81
  @gemspecs = Hash[Dir['*.gemspec'].map { |path|
82
- [File.basename(path).chomp('.gemspec'), Specification.load(path)]
82
+ [File.basename(path,'.gemspec'), Specification.load(path)]
83
83
  }]
84
84
  end
85
85
 
@@ -57,11 +57,7 @@ module Gem
57
57
 
58
58
  namespace :scm do
59
59
  task :tag, [:name] => :validate do |t,args|
60
- tag = if args.name
61
- args.name
62
- else
63
- version_tag(@project.gemspec.version)
64
- end
60
+ tag = (args.name || version_tag(@project.gemspec.version))
65
61
 
66
62
  status "Tagging #{tag} ..."
67
63
 
@@ -120,7 +116,7 @@ module Gem
120
116
  when :git
121
117
  !`git config user.signingkey`.chomp.empty?
122
118
  when :hg
123
- !`hg showconfig extensions hgext gpg`.chomp.empty?
119
+ !`hg showconfig extensions.hgext.gpg`.empty?
124
120
  else
125
121
  false
126
122
  end
@@ -58,7 +58,7 @@ module Gem
58
58
  # @param [String] command
59
59
  # The `gem` command to run.
60
60
  #
61
- # @param [Array<String>] command
61
+ # @param [Array<String>] arguments
62
62
  # Additional arguments for the command.
63
63
  #
64
64
  # @return [Boolean]
@@ -121,7 +121,7 @@ module Gem
121
121
  # Defines a task that will invoke one or all of the specifies tasks
122
122
  # within the namespace.
123
123
  #
124
- # @param [String] namespace
124
+ # @param [String] prefix
125
125
  # The namespace of the sub-tasks to call.
126
126
  #
127
127
  # @param [Array<Symbol>] names
@@ -28,8 +28,6 @@ module Gem
28
28
  #
29
29
  class Tasks
30
30
 
31
- include Rake::DSL
32
-
33
31
  #
34
32
  # The `build` tasks.
35
33
  #
metadata CHANGED
@@ -1,57 +1,63 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rubygems-tasks
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 31
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 4
10
+ version: 0.2.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Postmodern
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-04-30 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2013-04-08 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: rspec
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '2.4'
22
- type: :development
23
22
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: '2.4'
30
- - !ruby/object:Gem::Dependency
31
- name: yard
32
- requirement: !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
33
24
  none: false
34
- requirements:
25
+ requirements:
35
26
  - - ~>
36
- - !ruby/object:Gem::Version
37
- version: '0.7'
27
+ - !ruby/object:Gem::Version
28
+ hash: 11
29
+ segments:
30
+ - 2
31
+ - 4
32
+ version: "2.4"
38
33
  type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: yard
39
37
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
38
+ requirement: &id002 !ruby/object:Gem::Requirement
41
39
  none: false
42
- requirements:
40
+ requirements:
43
41
  - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '0.7'
42
+ - !ruby/object:Gem::Version
43
+ hash: 5
44
+ segments:
45
+ - 0
46
+ - 7
47
+ version: "0.7"
48
+ type: :development
49
+ version_requirements: *id002
46
50
  description: Agnostic and unobtrusive Rake tasks for managing and releasing Ruby Gems.
47
51
  email: postmodern.mod3@gmail.com
48
52
  executables: []
53
+
49
54
  extensions: []
50
- extra_rdoc_files:
55
+
56
+ extra_rdoc_files:
51
57
  - ChangeLog.md
52
58
  - LICENSE.txt
53
59
  - README.md
54
- files:
60
+ files:
55
61
  - .document
56
62
  - .gitignore
57
63
  - .rspec
@@ -95,31 +101,40 @@ files:
95
101
  - spec/sign/pgp_spec.rb
96
102
  - spec/spec_helper.rb
97
103
  - spec/tasks_spec.rb
98
- homepage: https://github.com/postmodern/rubygems-tasks
104
+ homepage: https://github.com/postmodern/rubygems-tasks#readme
99
105
  licenses: []
106
+
100
107
  post_install_message:
101
108
  rdoc_options: []
102
- require_paths:
109
+
110
+ require_paths:
103
111
  - lib
104
- required_ruby_version: !ruby/object:Gem::Requirement
112
+ required_ruby_version: !ruby/object:Gem::Requirement
105
113
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ hash: 3
118
+ segments:
119
+ - 0
120
+ version: "0"
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
111
122
  none: false
112
- requirements:
113
- - - ! '>='
114
- - !ruby/object:Gem::Version
115
- version: '0'
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ hash: 3
127
+ segments:
128
+ - 0
129
+ version: "0"
116
130
  requirements: []
131
+
117
132
  rubyforge_project:
118
- rubygems_version: 1.8.23
133
+ rubygems_version: 1.8.24
119
134
  signing_key:
120
135
  specification_version: 3
121
136
  summary: Rake tasks for managing and releasing Ruby Gems.
122
- test_files:
137
+ test_files:
123
138
  - spec/console_spec.rb
124
139
  - spec/install_spec.rb
125
140
  - spec/project_spec.rb