hoe-deveiate 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (8) hide show
  1. data.tar.gz.sig +0 -0
  2. data/ChangeLog +53 -0
  3. data/History.md +4 -0
  4. data/README.md +59 -0
  5. data/Rakefile +30 -0
  6. data/lib/hoe/deveiate.rb +148 -0
  7. metadata +205 -0
  8. metadata.gz.sig +0 -0
Binary file
@@ -0,0 +1,53 @@
1
+ 2011-04-07 Michael Granger <ged@FaerieMUD.org>
2
+
3
+ * lib/hoe/deveiate.rb:
4
+ Undo the double-init safeguards, which were causing more harm than
5
+ good.
6
+ [4b4713c1f9e4] [tip]
7
+
8
+ * lib/hoe/deveiate.rb:
9
+ Bumped patch version, ensure the @email_to Array is always declared.
10
+ [b61ae31f692b]
11
+
12
+ * lib/hoe/deveiate.rb:
13
+ Avoid double-initializing; register the highline and mercurial
14
+ plugins with Hoe.
15
+ [28a27f19668d]
16
+
17
+ * lib/hoe/deveiate.rb:
18
+ Bump the patch version.
19
+ [dc6c7b755fe5]
20
+
21
+ * lib/hoe/deveiate.rb:
22
+ Force loading of hoe-mercurial and hoe-highline, avoid doubling the
23
+ :pre task if it's already defined.
24
+ [d0fdfe132adf]
25
+
26
+ 2011-04-06 Michael Granger <ged@FaerieMUD.org>
27
+
28
+ * lib/hoe/deveiate.rb:
29
+ Bump the version to 0.0.2.
30
+ [16c817b7efcf]
31
+
32
+ * Rakefile, lib/hoe/deveiate.rb:
33
+ Don't upload to rubygems.org, fix the :pre task, run specs before
34
+ checkin.
35
+ [79e16e7998bf]
36
+
37
+ 2011-03-22 Michael Granger <ged@FaerieMUD.org>
38
+
39
+ * .hgignore, Rakefile:
40
+ Adding missing tmail dependency.
41
+ [a1d3c0eb16c2]
42
+
43
+ 2011-03-14 Michael Granger <ged@FaerieMUD.org>
44
+
45
+ * .hgignore, ChangeLog, Rakefile, lib/hoe/deveiate.rb:
46
+ Ignoring generated stuff, removing ChangeLog, fixed the :send_email
47
+ task.
48
+ [12d1961b4934]
49
+
50
+ * ChangeLog, History.md, Manifest.txt, README.md, Rakefile,
51
+ lib/hoe/deveiate.rb:
52
+ Initial version
53
+ [eb077ae7ff6c]
@@ -0,0 +1,4 @@
1
+ ## 0.0.1 [2011-03-12] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ Initial release.
4
+
@@ -0,0 +1,59 @@
1
+ # hoe-deveiate
2
+
3
+ * http://deveiate.org/hoe-deveiate
4
+
5
+
6
+ ## Description
7
+
8
+ A collection of Rake tasks and utility functions I use to maintain my Open
9
+ Source projects. It's really only useful if you want to help maintain one of
10
+ them.
11
+
12
+
13
+ ## Installation
14
+
15
+ gem install hoe-deveiate
16
+
17
+
18
+ ## Contributing
19
+
20
+ You can check out the current development source from
21
+ [my Mercurial repo](http://repo.deveiate.org/hoe-deveiate).
22
+
23
+ After checking out the source, run:
24
+
25
+ $ rake newb
26
+
27
+ to install any missing dependencies.
28
+
29
+
30
+ ## License
31
+
32
+ Copyright (c) 2011, Michael Granger
33
+ All rights reserved.
34
+
35
+ Redistribution and use in source and binary forms, with or without
36
+ modification, are permitted provided that the following conditions are met:
37
+
38
+ * Redistributions of source code must retain the above copyright notice,
39
+ this list of conditions and the following disclaimer.
40
+
41
+ * Redistributions in binary form must reproduce the above copyright notice,
42
+ this list of conditions and the following disclaimer in the documentation
43
+ and/or other materials provided with the distribution.
44
+
45
+ * Neither the name of the author/s, nor the names of the project's
46
+ contributors may be used to endorse or promote products derived from this
47
+ software without specific prior written permission.
48
+
49
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
50
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
52
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
53
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
55
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
56
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
57
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
58
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
59
+
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env rake
2
+
3
+ require 'hoe'
4
+
5
+ Hoe.add_include_dirs 'lib'
6
+
7
+ Hoe.plugin :mercurial
8
+ Hoe.plugin :signing
9
+
10
+ Hoe.plugins.delete :rubyforge
11
+
12
+ hoespec = Hoe.spec 'hoe-deveiate' do
13
+ self.readme_file = 'README.md'
14
+ self.history_file = 'History.md'
15
+
16
+ self.developer 'Michael Granger', 'ged@FaerieMUD.org'
17
+
18
+ self.dependency( 'hoe-highline', '~> 0.0' )
19
+ self.dependency( 'hoe-mercurial', '~> 1.0' )
20
+ self.dependency( 'tmail', '~> 1.2' )
21
+
22
+ self.spec_extras[:licenses] = ["BSD"]
23
+ self.require_ruby_version( '>=1.8.7' )
24
+ self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
25
+
26
+ self.email_to.replace([ 'ged@FaerieMUD.org' ]) if self.respond_to?( :email_to )
27
+ end
28
+
29
+ ENV['VERSION'] ||= hoespec.spec.version.to_s
30
+
@@ -0,0 +1,148 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'tmail'
4
+ require 'net/smtp'
5
+ require 'openssl'
6
+
7
+ # This gem depends on the prompts and stuff from hoe-highline
8
+ require 'hoe/mercurial'
9
+ require 'hoe/highline'
10
+
11
+ Hoe.plugin( :highline, :mercurial )
12
+
13
+
14
+ # A collection of Rake tasks and utility functions I use to maintain my
15
+ # Open Source projects.
16
+ #
17
+ # @author Michael Granger <ged@FaerieMUD.org>
18
+ #
19
+ module Hoe::Deveiate
20
+
21
+ # Library version constant
22
+ VERSION = '0.0.6'
23
+
24
+ # Version-control revision constant
25
+ REVISION = %q$Revision: ce18441aa813 $
26
+
27
+
28
+ ### Extension callback
29
+ def self::extended( mod )
30
+ mod.extend( Hoe::Mercurial )
31
+ mod.extend( Hoe::Highline )
32
+ super
33
+ end
34
+
35
+
36
+ ### Set up defaults
37
+ def initialize_deveiate
38
+ $hoespec = self
39
+
40
+ @email_to ||= []
41
+ @email_from = nil unless defined?( @email_from )
42
+ self.hg_sign_tags = true
43
+
44
+ with_config do |config, _|
45
+ self.spec_extras[:signing_key] = config['signing_key_file'] or
46
+ abort "no signing key ('signing_key_file') configured."
47
+ @email_config = config['email']
48
+ @email_to = Array( @email_config['to'] )
49
+ end
50
+
51
+ $stderr.puts "Done initializing hoe-deveiate" if Rake.application.options.trace
52
+ end
53
+
54
+
55
+ # Where to send announcement emails
56
+ attr_reader :email_to
57
+
58
+ # Who to send announcement emails as
59
+ attr_accessor :email_from
60
+
61
+
62
+ ### Add tasks
63
+ def define_deveiate_tasks
64
+
65
+ task 'hg:precheckin' => [:spec] if File.directory?( 'spec' )
66
+
67
+ # Rebuild the ChangeLog immediately before release
68
+ task :prerelease => 'ChangeLog'
69
+
70
+ ### Task: prerelease
71
+ unless Rake::Task.task_defined?( :pre )
72
+ desc "Append the package build number to package versions"
73
+ task :pre do
74
+ rev = get_numeric_rev()
75
+ trace "Current rev is: %p" % [ rev ]
76
+ $hoespec.spec.version.version << "pre#{rev}"
77
+ Rake::Task[:gem].clear
78
+
79
+ Gem::PackageTask.new( $hoespec.spec ) do |pkg|
80
+ pkg.need_zip = true
81
+ pkg.need_tar = true
82
+ end
83
+ end
84
+ end
85
+
86
+ ### Make the ChangeLog update if the repo has changed since it was last built
87
+ file '.hg/branch'
88
+ file 'ChangeLog' => '.hg/branch' do |task|
89
+ $stderr.puts "Updating the changelog..."
90
+ content = make_changelog()
91
+ File.open( task.name, 'w', 0644 ) do |fh|
92
+ fh.print( content )
93
+ end
94
+ end
95
+
96
+ # Announcement tasks, mostly stolen from hoe-seattlerb
97
+
98
+ task :announce => :send_email
99
+
100
+ desc "Send a release announcement to: %p" % [ @email_to ]
101
+ task :send_email do
102
+ abort "no email config in your ~/.hoerc" unless defined?( @email_config )
103
+
104
+ @email_from = @email_config['from'] ||= "%s <%s>" % self.developer.first
105
+ smtp_host = @email_config['host'] || ask( "Email host: " )
106
+ smtp_port = @email_config['port'] || 'smtp'
107
+ smtp_port = Socket.getservbyname( smtp_port.to_s )
108
+ smtp_user = @email_config['user']
109
+
110
+ message = generate_email( :full )
111
+ say "<%= color 'About to send this email:', :subheader %>"
112
+ say( message )
113
+
114
+ if agree( "\n<%= color 'Okay to send it?', :warning %> " )
115
+ require 'socket'
116
+ require 'net/smtp'
117
+ require 'etc'
118
+
119
+ username = smtp_user || ask( "Email username: " ) do |q|
120
+ q.default = Etc.getlogin # default to the current user
121
+ end
122
+ password = ask( "Email password for #{username}: " ) do |q|
123
+ q.echo = color( '*', :yellow ) # Hide the password
124
+ end
125
+
126
+ say "Creating SMTP connection to #{smtp_host}:#{smtp_port}"
127
+ smtp = Net::SMTP.new( smtp_host, smtp_port )
128
+ smtp.set_debug_output( $stdout )
129
+ smtp.esmtp = true
130
+
131
+ # Don't verify the server cert, as my server's cert is self-signed
132
+ ssl_context = OpenSSL::SSL::SSLContext.new
133
+ ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE
134
+ smtp.enable_ssl( ssl_context )
135
+
136
+ helo = Socket.gethostname
137
+ smtp.start( helo, username, password, :plain ) do |smtp|
138
+ smtp.send_message( message, self.email_from, *self.email_to )
139
+ end
140
+ else
141
+ abort "Okay, aborting."
142
+ end
143
+ end
144
+
145
+ end
146
+
147
+ end # module Hoe::Deveiate
148
+
metadata ADDED
@@ -0,0 +1,205 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hoe-deveiate
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 6
10
+ version: 0.0.6
11
+ platform: ruby
12
+ authors:
13
+ - Michael Granger
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain:
17
+ - |
18
+ -----BEGIN CERTIFICATE-----
19
+ MIIDLDCCAhSgAwIBAgIBADANBgkqhkiG9w0BAQUFADA8MQwwCgYDVQQDDANnZWQx
20
+ FzAVBgoJkiaJk/IsZAEZFgdfYWVyaWVfMRMwEQYKCZImiZPyLGQBGRYDb3JnMB4X
21
+ DTEwMDkxNjE0NDg1MVoXDTExMDkxNjE0NDg1MVowPDEMMAoGA1UEAwwDZ2VkMRcw
22
+ FQYKCZImiZPyLGQBGRYHX2FlcmllXzETMBEGCgmSJomT8ixkARkWA29yZzCCASIw
23
+ DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALy//BFxC1f/cPSnwtJBWoFiFrir
24
+ h7RicI+joq/ocVXQqI4TDWPyF/8tqkvt+rD99X9qs2YeR8CU/YiIpLWrQOYST70J
25
+ vDn7Uvhb2muFVqq6+vobeTkILBEO6pionWDG8jSbo3qKm1RjKJDwg9p4wNKhPuu8
26
+ KGue/BFb67KflqyApPmPeb3Vdd9clspzqeFqp7cUBMEpFS6LWxy4Gk+qvFFJBJLB
27
+ BUHE/LZVJMVzfpC5Uq+QmY7B+FH/QqNndn3tOHgsPadLTNimuB1sCuL1a4z3Pepd
28
+ TeLBEFmEao5Dk3K/Q8o8vlbIB/jBDTUx6Djbgxw77909x6gI9doU4LD5XMcCAwEA
29
+ AaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFJeoGkOr9l4B
30
+ +saMkW/ZXT4UeSvVMA0GCSqGSIb3DQEBBQUAA4IBAQBG2KObvYI2eHyyBUJSJ3jN
31
+ vEnU3d60znAXbrSd2qb3r1lY1EPDD3bcy0MggCfGdg3Xu54z21oqyIdk8uGtWBPL
32
+ HIa9EgfFGSUEgvcIvaYqiN4jTUtidfEFw+Ltjs8AP9gWgSIYS6Gr38V0WGFFNzIH
33
+ aOD2wmu9oo/RffW4hS/8GuvfMzcw7CQ355wFR4KB/nyze+EsZ1Y5DerCAagMVuDQ
34
+ U0BLmWDFzPGGWlPeQCrYHCr+AcJz+NRnaHCKLZdSKj/RHuTOt+gblRex8FAh8NeA
35
+ cmlhXe46pZNJgWKbxZah85jIjx95hR8vOI+NAM5iH9kOqK13DrxacTKPhqj5PjwF
36
+ -----END CERTIFICATE-----
37
+
38
+ date: 2011-05-16 00:00:00 Z
39
+ dependencies:
40
+ - !ruby/object:Gem::Dependency
41
+ name: hoe-highline
42
+ prerelease: false
43
+ requirement: &id001 !ruby/object:Gem::Requirement
44
+ none: false
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ hash: 11
49
+ segments:
50
+ - 0
51
+ - 0
52
+ version: "0.0"
53
+ type: :runtime
54
+ version_requirements: *id001
55
+ - !ruby/object:Gem::Dependency
56
+ name: hoe-mercurial
57
+ prerelease: false
58
+ requirement: &id002 !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ hash: 15
64
+ segments:
65
+ - 1
66
+ - 0
67
+ version: "1.0"
68
+ type: :runtime
69
+ version_requirements: *id002
70
+ - !ruby/object:Gem::Dependency
71
+ name: tmail
72
+ prerelease: false
73
+ requirement: &id003 !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ~>
77
+ - !ruby/object:Gem::Version
78
+ hash: 11
79
+ segments:
80
+ - 1
81
+ - 2
82
+ version: "1.2"
83
+ type: :runtime
84
+ version_requirements: *id003
85
+ - !ruby/object:Gem::Dependency
86
+ name: hoe-mercurial
87
+ prerelease: false
88
+ requirement: &id004 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ hash: 29
94
+ segments:
95
+ - 1
96
+ - 2
97
+ - 1
98
+ version: 1.2.1
99
+ type: :development
100
+ version_requirements: *id004
101
+ - !ruby/object:Gem::Dependency
102
+ name: hoe-yard
103
+ prerelease: false
104
+ requirement: &id005 !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ hash: 31
110
+ segments:
111
+ - 0
112
+ - 1
113
+ - 2
114
+ version: 0.1.2
115
+ type: :development
116
+ version_requirements: *id005
117
+ - !ruby/object:Gem::Dependency
118
+ name: hoe-highline
119
+ prerelease: false
120
+ requirement: &id006 !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ hash: 29
126
+ segments:
127
+ - 0
128
+ - 0
129
+ - 1
130
+ version: 0.0.1
131
+ type: :development
132
+ version_requirements: *id006
133
+ - !ruby/object:Gem::Dependency
134
+ name: hoe
135
+ prerelease: false
136
+ requirement: &id007 !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ">="
140
+ - !ruby/object:Gem::Version
141
+ hash: 47
142
+ segments:
143
+ - 2
144
+ - 9
145
+ - 2
146
+ version: 2.9.2
147
+ type: :development
148
+ version_requirements: *id007
149
+ description: |-
150
+ A collection of Rake tasks and utility functions I use to maintain my Open
151
+ Source projects. It's really only useful if you want to help maintain one of
152
+ them.
153
+ email:
154
+ - ged@FaerieMUD.org
155
+ executables: []
156
+
157
+ extensions: []
158
+
159
+ extra_rdoc_files:
160
+ - History.md
161
+ files:
162
+ - ChangeLog
163
+ - History.md
164
+ - README.md
165
+ - Rakefile
166
+ - lib/hoe/deveiate.rb
167
+ homepage: http://deveiate.org/hoe-deveiate
168
+ licenses:
169
+ - BSD
170
+ post_install_message:
171
+ rdoc_options:
172
+ - --title
173
+ - HoeDeveiate Documentation
174
+ - --quiet
175
+ require_paths:
176
+ - lib
177
+ required_ruby_version: !ruby/object:Gem::Requirement
178
+ none: false
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ hash: 57
183
+ segments:
184
+ - 1
185
+ - 8
186
+ - 7
187
+ version: 1.8.7
188
+ required_rubygems_version: !ruby/object:Gem::Requirement
189
+ none: false
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ hash: 3
194
+ segments:
195
+ - 0
196
+ version: "0"
197
+ requirements: []
198
+
199
+ rubyforge_project: hoe-deveiate
200
+ rubygems_version: 1.8.1
201
+ signing_key:
202
+ specification_version: 3
203
+ summary: A collection of Rake tasks and utility functions I use to maintain my Open Source projects
204
+ test_files: []
205
+
Binary file