hoe-telicopter 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.0.0 / 2010-01-23
2
+
3
+ * 1 major enhancement
4
+
5
+ * made it actually work
6
+
1
7
  === 0.1.0 / 2010-01-22
2
8
 
3
9
  * 1 major enhancement
data/Manifest.txt CHANGED
@@ -4,5 +4,5 @@ Manifest.txt
4
4
  README.txt
5
5
  Rakefile
6
6
  lib/hoe/email.rb
7
- lib/hoe/hotelicutter.rb
7
+ lib/hoe/prefixer.rb
8
8
  lib/hoe/telicopter.rb
data/README.txt CHANGED
@@ -4,13 +4,15 @@
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- Hoe plugins providing tasks used by seattle.rb including minitest,
8
- perforce, and email providing full front-to-back release/annouce
9
- automation.
7
+ Hoe plugins providing tasks used by hotelicopter including git fork prefix
8
+ releasing to gemcutter, and email providing release/annouce automation.
9
+
10
+ this plugin is base on the seattlerb hoe plugin by Ryan Davis
10
11
 
11
12
  == FEATURES/PROBLEMS:
12
13
 
13
14
  * hoe/email - automates sending release email.
15
+ * hoe/prefixer - sticks a prefix on the gem before pushing to gemcutter
14
16
  * hoe/telicopter - activates all the telicopter plugins.
15
17
 
16
18
  == SYNOPSIS:
@@ -18,12 +20,17 @@ automation.
18
20
  require 'rubygems'
19
21
  require 'hoe'
20
22
 
21
- Hoe.plugin :seattlerb
23
+ Hoe.plugins.delete :gemcutter
24
+ Hoe.plugins.delete :rubyforge
25
+
26
+ Hoe.plugin :telicopter
22
27
 
23
28
  Hoe.spec 'blah' do
24
- developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
29
+ developer 'jim nist', 'jim@hotelicopter.com'
25
30
 
26
- email_to << 'blah@mailing_list.com'
31
+ email_to << 'boskos@mailing_list.com'
32
+
33
+ prefix = 'myfreakyprefix'
27
34
  end
28
35
 
29
36
  == USING EMAIL PLUGIN:
data/Rakefile CHANGED
@@ -12,7 +12,9 @@ Hoe.plugins.delete :rubyforge
12
12
  Hoe.plugin :doofus, :git
13
13
 
14
14
  Hoe.spec 'hoe-telicopter' do
15
+
15
16
  developer('jim nist', 'jim@hotelicopter.com')
17
+
16
18
  extra_deps << %w(hoe >=2.5.0)
17
19
  extra_deps << %w(gemcutter >=0.3.0)
18
20
  extra_dev_deps << %w(hoe-doofus >=1.0.0)
data/lib/hoe/email.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  ##
2
- # code taken from hoe-seattlerb
2
+ # code taken directly from hoe-seattlerb
3
3
  #
4
4
  module Hoe::Email
5
5
 
@@ -0,0 +1,53 @@
1
+ ##
2
+ # this is used to publish gems to gemcutter that have been forked from other
3
+ # gems. it adds the 'g1nn13-' prefix to the gem before publishing, leaving the
4
+ # insides of the gem the unchanged as is the current custom.
5
+ #
6
+ # note however, that this custom may soon changeto support 'namespaces' in gems.
7
+ # TODO: change this when and if it makes sense.
8
+ #
9
+ # this file is 'based' on the lib/hoe/gemcutter.rb from the hoe gem.
10
+ #
11
+
12
+ require 'rake'
13
+ gem "gemcutter" # lame. gemcutter doesn't have a VERSION const.
14
+
15
+ module Hoe::Prefixer
16
+
17
+ Hoe::DEFAULT_CONFIG["prefixer"] = {
18
+ "prefix" => "pre",
19
+ }
20
+
21
+ attr_reader :prefix
22
+
23
+ def initialize_prefixer
24
+ version = Gem.loaded_specs['gemcutter'].version
25
+ dependency_target << ['gemcutter', ">= #{version}"]
26
+
27
+ with_config do |config, _|
28
+ @prefix = config["prefixer"]["prefix"] rescue nil
29
+ end
30
+ end
31
+
32
+ def define_prefixer_tasks
33
+ desc "Push prefixed gem to gemcutter."
34
+ task :release_to_prefixer => [:clean, :package, :release_sanity] do
35
+ pkg = "pkg/#{spec.name}-#{spec.version}"
36
+ gems = Dir["#{pkg}*.gem"]
37
+
38
+ # make sure we have the trailing dash on the prefix
39
+ @prefix = "#{@prefix}-" unless @prefix.index("-") == @prefix.length - 1
40
+
41
+ gems.each do |g|
42
+ new_name = "#{File.dirname(g)}/#{@prefix}#{File.basename(g)}"
43
+ File.rename(g, new_name)
44
+ # TODO - once gemcutter supports command invocation, use it.
45
+ # We could still fail here due to --format executable
46
+ sh Gem.ruby, "-S", "gem", "push", new_name
47
+ end
48
+ end
49
+
50
+ task :release_to => :release_to_prefixer
51
+ end
52
+
53
+ end unless defined? Hoe::Prefixer
@@ -2,10 +2,10 @@
2
2
  # all this really does is include the other plugins defined here
3
3
  #
4
4
 
5
- Hoe.plugin :email, :hotelicutter
5
+ Hoe.plugin :email, :prefixer
6
6
 
7
7
  module Hoe::Telicopter
8
- VERSION = "0.2.0"
8
+ VERSION = "0.2.1"
9
9
 
10
10
  def define_telicopter_tasks
11
11
  # nothing to do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe-telicopter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jim nist
@@ -73,9 +73,10 @@ dependencies:
73
73
  version: 2.5.0
74
74
  version:
75
75
  description: |-
76
- Hoe plugins providing tasks used by seattle.rb including minitest,
77
- perforce, and email providing full front-to-back release/annouce
78
- automation.
76
+ Hoe plugins providing tasks used by hotelicopter including git fork prefix
77
+ releasing to gemcutter, and email providing release/annouce automation.
78
+
79
+ this plugin is base on the seattlerb hoe plugin by Ryan Davis
79
80
  email:
80
81
  - jim@hotelicopter.com
81
82
  executables: []
@@ -93,7 +94,7 @@ files:
93
94
  - README.txt
94
95
  - Rakefile
95
96
  - lib/hoe/email.rb
96
- - lib/hoe/hotelicutter.rb
97
+ - lib/hoe/prefixer.rb
97
98
  - lib/hoe/telicopter.rb
98
99
  has_rdoc: true
99
100
  homepage: https://github.com/g1nn13/hoe-telicopter
@@ -123,6 +124,6 @@ rubyforge_project: hoe-telicopter
123
124
  rubygems_version: 1.3.5
124
125
  signing_key:
125
126
  specification_version: 3
126
- summary: Hoe plugins providing tasks used by seattle.rb including minitest, perforce, and email providing full front-to-back release/annouce automation.
127
+ summary: Hoe plugins providing tasks used by hotelicopter including git fork prefix releasing to gemcutter, and email providing release/annouce automation
127
128
  test_files: []
128
129
 
@@ -1,46 +0,0 @@
1
- ##
2
- # this is used to publish gems for hotelicopter that we have forked from other
3
- # gems. it adds the 'g1nn13-' prefix to the gem before publishing, leaving the
4
- # insides of the gem the unchanged as is the current custom.
5
- #
6
- # note however, that this custom may change in the near future to support the
7
- # idea of 'namespaces' in gems. TODO: change this when and if it makes sense.
8
- #
9
- # this file is 'based' on the lib/hoe/gemcutter.rb from the hoe gem.
10
- #
11
-
12
- require 'rake'
13
- gem "gemcutter" # lame. gemcutter doesn't have a VERSION const.
14
-
15
- module Hoe::Hotelicutter
16
-
17
- PREFIX = 'g1nn13-'
18
-
19
- def initialize_hotelicutter
20
- version = Gem.loaded_specs['gemcutter'].version
21
- dependency_target << ['gemcutter', ">= #{version}"]
22
- end
23
-
24
- def define_hotelicutter_tasks
25
- desc "Push g1nn13- gem to gemcutter."
26
- task :release_to_hotelicutter => [:clean, :package, :release_sanity] do
27
- pkg = "pkg/#{spec.name}-#{spec.version}"
28
- gems = Dir["#{pkg}*.gem"]
29
-
30
- gems.each do |g|
31
- new_name = "#{File.dirname(g)}/#{PREFIX}#{File.basename(g)}"
32
- # pre-append the prefix before publishing
33
- File.rename(g, new_name)
34
- # TODO - once gemcutter supports command invocation, use it.
35
- # We could still fail here due to --format executable
36
- sh Gem.ruby, "-S", "gem", "push", new_name
37
- end
38
- end
39
-
40
- task :release_to => :release_to_hotelicutter
41
- end
42
-
43
- def add_prefix(name)
44
- "#{PREFIX}#{name}"
45
- end
46
- end unless defined? Hoe::Hotelicutter