hoe-gemspec 1.0.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/CHANGELOG.rdoc +6 -0
- data/Manifest.txt +13 -0
- data/README.rdoc +62 -0
- data/Rakefile +21 -0
- data/lib/hoe/gemspec.rb +18 -0
- data/test/fixture_project/Gemfile +13 -0
- data/test/fixture_project/History.txt +6 -0
- data/test/fixture_project/Manifest.txt +8 -0
- data/test/fixture_project/README.txt +57 -0
- data/test/fixture_project/Rakefile +11 -0
- data/test/fixture_project/lib/fixture_project.rb +3 -0
- data/test/fixture_project/test/test_fixture_project.rb +8 -0
- data/test/test_hoe_gemspec.rb +15 -0
- metadata +144 -0
data/CHANGELOG.rdoc
ADDED
data/Manifest.txt
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
CHANGELOG.rdoc
|
2
|
+
Manifest.txt
|
3
|
+
README.rdoc
|
4
|
+
Rakefile
|
5
|
+
lib/hoe/gemspec.rb
|
6
|
+
test/fixture_project/Gemfile
|
7
|
+
test/fixture_project/History.txt
|
8
|
+
test/fixture_project/Manifest.txt
|
9
|
+
test/fixture_project/README.txt
|
10
|
+
test/fixture_project/Rakefile
|
11
|
+
test/fixture_project/lib/fixture_project.rb
|
12
|
+
test/fixture_project/test/test_fixture_project.rb
|
13
|
+
test/test_hoe_gemspec.rb
|
data/README.rdoc
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
= hoe-gemspec
|
2
|
+
|
3
|
+
* http://github.com/flavorjones/hoe-gemspec
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
Generate a prerelease gemspec based on a Hoe spec.
|
8
|
+
|
9
|
+
== FEATURES/PROBLEMS:
|
10
|
+
|
11
|
+
Creates a rake task to generate a prerelease gemspec based on your Hoe.spec:
|
12
|
+
|
13
|
+
* `gem:spec`
|
14
|
+
|
15
|
+
Why would you want to do this? I mean, why would anyone want to generate a prerelease gemspec?
|
16
|
+
|
17
|
+
* to allow users of your library to build their project off of master quickly, without having to clone or fork your repository.
|
18
|
+
|
19
|
+
== SYNOPSIS:
|
20
|
+
|
21
|
+
Just add the following line to your Rakefile before you call `Hoe.spec`:
|
22
|
+
|
23
|
+
Hoe.plugin :gemspec
|
24
|
+
|
25
|
+
And then run the following command to generate a gemspec:
|
26
|
+
|
27
|
+
rake gem:spec
|
28
|
+
|
29
|
+
And then checkin the generated gemspec file to your version control system of choice.
|
30
|
+
|
31
|
+
== REQUIREMENTS:
|
32
|
+
|
33
|
+
* hoe >= 2.2.0
|
34
|
+
|
35
|
+
== INSTALL:
|
36
|
+
|
37
|
+
* gem install hoe-gemspec
|
38
|
+
|
39
|
+
== LICENSE:
|
40
|
+
|
41
|
+
(The MIT License)
|
42
|
+
|
43
|
+
Copyright (c) 2010 Mike Dalessio
|
44
|
+
|
45
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
46
|
+
a copy of this software and associated documentation files (the
|
47
|
+
'Software'), to deal in the Software without restriction, including
|
48
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
49
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
50
|
+
permit persons to whom the Software is furnished to do so, subject to
|
51
|
+
the following conditions:
|
52
|
+
|
53
|
+
The above copyright notice and this permission notice shall be
|
54
|
+
included in all copies or substantial portions of the Software.
|
55
|
+
|
56
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
57
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
58
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
59
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
60
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
61
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
62
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'hoe'
|
5
|
+
|
6
|
+
Hoe.plugin :git
|
7
|
+
Hoe.plugin :gemspec
|
8
|
+
|
9
|
+
Hoe.spec 'hoe-gemspec' do
|
10
|
+
developer('Mike Dalessio', 'mike.dalessio@gmail.com')
|
11
|
+
|
12
|
+
self.extra_rdoc_files = FileList["*.rdoc"]
|
13
|
+
self.history_file = "CHANGELOG.rdoc"
|
14
|
+
self.readme_file = "README.rdoc"
|
15
|
+
self.test_globs = ["test/test_*.rb"]
|
16
|
+
|
17
|
+
extra_deps << ["hoe", ">=2.2.0"]
|
18
|
+
extra_dev_deps << ["rake", ">=0"]
|
19
|
+
end
|
20
|
+
|
21
|
+
# vim: syntax=ruby
|
data/lib/hoe/gemspec.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
class Hoe #:nodoc:
|
2
|
+
#
|
3
|
+
# Rake task to generate a prerelease gemspec based on your Hoe.spec
|
4
|
+
#
|
5
|
+
# * <tt>gem:spec</tt>
|
6
|
+
#
|
7
|
+
module Gemspec
|
8
|
+
VERSION = "1.0.0" #:nodoc:
|
9
|
+
|
10
|
+
def define_gemspec_tasks
|
11
|
+
desc "generate a prerelease gemspec from your Hoe.spec"
|
12
|
+
task "gem:spec" do
|
13
|
+
spec.version = "#{spec.version}.#{Time.now.strftime("%Y%m%d%H%M%S")}"
|
14
|
+
File.open("#{name}.gemspec","w") { |f| f.write spec.to_ruby }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
source :gemcutter
|
4
|
+
|
5
|
+
gem "yyy", ">=0"
|
6
|
+
gem "zzz", "<1.5.0"
|
7
|
+
|
8
|
+
gem "rubyforge", ">=2.0.4", :group => [:development, :test]
|
9
|
+
gem "aaa", ">=0", :group => [:development, :test]
|
10
|
+
gem "bbb", ">=2.2.0", :group => [:development, :test]
|
11
|
+
gem "hoe", ">=2.6.1", :group => [:development, :test]
|
12
|
+
|
13
|
+
# vim: syntax=ruby
|
@@ -0,0 +1,57 @@
|
|
1
|
+
= fixture_project
|
2
|
+
|
3
|
+
* FIX (url)
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
FIX (describe your package)
|
8
|
+
|
9
|
+
== FEATURES/PROBLEMS:
|
10
|
+
|
11
|
+
* FIX (list of features or problems)
|
12
|
+
|
13
|
+
== SYNOPSIS:
|
14
|
+
|
15
|
+
FIX (code sample of usage)
|
16
|
+
|
17
|
+
== REQUIREMENTS:
|
18
|
+
|
19
|
+
* FIX (list of requirements)
|
20
|
+
|
21
|
+
== INSTALL:
|
22
|
+
|
23
|
+
* FIX (sudo gem install, anything else)
|
24
|
+
|
25
|
+
== DEVELOPERS:
|
26
|
+
|
27
|
+
After checking out the source, run:
|
28
|
+
|
29
|
+
$ rake newb
|
30
|
+
|
31
|
+
This task will install any missing dependencies, run the tests/specs,
|
32
|
+
and generate the RDoc.
|
33
|
+
|
34
|
+
== LICENSE:
|
35
|
+
|
36
|
+
(The MIT License)
|
37
|
+
|
38
|
+
Copyright (c) 2010 FIX
|
39
|
+
|
40
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
41
|
+
a copy of this software and associated documentation files (the
|
42
|
+
'Software'), to deal in the Software without restriction, including
|
43
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
44
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
45
|
+
permit persons to whom the Software is furnished to do so, subject to
|
46
|
+
the following conditions:
|
47
|
+
|
48
|
+
The above copyright notice and this permission notice shall be
|
49
|
+
included in all copies or substantial portions of the Software.
|
50
|
+
|
51
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
52
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
53
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
54
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
55
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
56
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
57
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'hoe'
|
3
|
+
$: << File.expand_path(File.join(File.dirname(__FILE__),"../../lib"))
|
4
|
+
Hoe.plugin :gemspec
|
5
|
+
Hoe.spec "fixture_project" do
|
6
|
+
developer("MCA","mca@example.com")
|
7
|
+
extra_deps << ["yyy", ">=0"]
|
8
|
+
extra_deps << ["zzz", "< 1.5.0"]
|
9
|
+
extra_dev_deps << ["aaa", ">=0"]
|
10
|
+
extra_dev_deps << ["bbb", ">= 2.2.0"]
|
11
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "test/unit"
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
class TestHoeBundler < Test::Unit::TestCase
|
5
|
+
def test_output
|
6
|
+
gemfile = nil
|
7
|
+
Dir.chdir(File.join(File.dirname(__FILE__), "fixture_project")) do
|
8
|
+
FileUtils.rm_f "fixture_project.gemspec"
|
9
|
+
system "rake gem:spec"
|
10
|
+
gemspec = File.read "fixture_project.gemspec"
|
11
|
+
|
12
|
+
assert_match /"1\.0\.0\.\d{14}"/, gemspec.grep(/s\.version/).first
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hoe-gemspec
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Mike Dalessio
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-09-03 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: hoe
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 7
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 2
|
33
|
+
- 0
|
34
|
+
version: 2.2.0
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rubyforge
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 7
|
46
|
+
segments:
|
47
|
+
- 2
|
48
|
+
- 0
|
49
|
+
- 4
|
50
|
+
version: 2.0.4
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rake
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
62
|
+
segments:
|
63
|
+
- 0
|
64
|
+
version: "0"
|
65
|
+
type: :development
|
66
|
+
version_requirements: *id003
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
name: hoe
|
69
|
+
prerelease: false
|
70
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 21
|
76
|
+
segments:
|
77
|
+
- 2
|
78
|
+
- 6
|
79
|
+
- 1
|
80
|
+
version: 2.6.1
|
81
|
+
type: :development
|
82
|
+
version_requirements: *id004
|
83
|
+
description: Generate a prerelease gemspec based on a Hoe spec.
|
84
|
+
email:
|
85
|
+
- mike.dalessio@gmail.com
|
86
|
+
executables: []
|
87
|
+
|
88
|
+
extensions: []
|
89
|
+
|
90
|
+
extra_rdoc_files:
|
91
|
+
- Manifest.txt
|
92
|
+
- CHANGELOG.rdoc
|
93
|
+
- README.rdoc
|
94
|
+
files:
|
95
|
+
- CHANGELOG.rdoc
|
96
|
+
- Manifest.txt
|
97
|
+
- README.rdoc
|
98
|
+
- Rakefile
|
99
|
+
- lib/hoe/gemspec.rb
|
100
|
+
- test/fixture_project/Gemfile
|
101
|
+
- test/fixture_project/History.txt
|
102
|
+
- test/fixture_project/Manifest.txt
|
103
|
+
- test/fixture_project/README.txt
|
104
|
+
- test/fixture_project/Rakefile
|
105
|
+
- test/fixture_project/lib/fixture_project.rb
|
106
|
+
- test/fixture_project/test/test_fixture_project.rb
|
107
|
+
- test/test_hoe_gemspec.rb
|
108
|
+
has_rdoc: true
|
109
|
+
homepage: http://github.com/flavorjones/hoe-gemspec
|
110
|
+
licenses: []
|
111
|
+
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options:
|
114
|
+
- --main
|
115
|
+
- README.rdoc
|
116
|
+
require_paths:
|
117
|
+
- lib
|
118
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
+
none: false
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
hash: 3
|
124
|
+
segments:
|
125
|
+
- 0
|
126
|
+
version: "0"
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
none: false
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
hash: 3
|
133
|
+
segments:
|
134
|
+
- 0
|
135
|
+
version: "0"
|
136
|
+
requirements: []
|
137
|
+
|
138
|
+
rubyforge_project: hoe-gemspec
|
139
|
+
rubygems_version: 1.3.7
|
140
|
+
signing_key:
|
141
|
+
specification_version: 3
|
142
|
+
summary: Generate a prerelease gemspec based on a Hoe spec.
|
143
|
+
test_files:
|
144
|
+
- test/test_hoe_gemspec.rb
|