hoe-deveiate 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d8fe057e89823489d827d290efff9707daf45aa2
4
+ data.tar.gz: 66fa9314e448b3760ec84554d65421307eaa80b1
5
+ SHA512:
6
+ metadata.gz: d209dd9021612a7c8cc8ccd0565ff631c5edd7a48d98e0b6dcba670eafa48b68087207eaa867cf871e2b90fc1c0858ddfa675ec3230a9feb38eab2358d970a4c
7
+ data.tar.gz: 594f80f10ace333185ad58394b3b7e52d41224b2d9796737293be33cc7c30281b570f32917c4d2cfcdb7b21dc0c3b694a044066f8edc6e43d88fd050f847175e
@@ -0,0 +1,3 @@
1
+ sH�'_���ߔ����9� �� <~��{�r� �f��A_?РNJe������y�K��K����g���r�C�[�#!5����:c�ur��B��dQ�nx9=r���
2
+
3
+ (F��7?'!����NdzG��\� 6��Mp�Ee�}�ݘl��]��X���֞���޽�i�짱�Ո�����l|EV��r9��L&��\Q���T���lhN�̃Q�go�Cӛ�7�T�����A�S�?��W
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ == v0.3.0 [2013-08-15] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ - Add RVM gemset-updating task.
4
+ - Test under Ruby 2 by default
5
+
6
+
1
7
  == v0.2.0 [2013-03-03] Michael Granger <ged@FaerieMUD.org>
2
8
 
3
9
  - Add some quality-checking tasks
data/Rakefile CHANGED
@@ -21,14 +21,14 @@ $hoespec = Hoe.spec 'hoe-deveiate' do
21
21
 
22
22
  self.developer 'Michael Granger', 'ged@FaerieMUD.org'
23
23
 
24
- self.dependency 'hoe', '~> 3.5.1'
24
+ self.dependency 'hoe', '~> 3.6'
25
25
  self.dependency 'hoe-highline', '~> 0.0'
26
26
  self.dependency 'hoe-mercurial', '~> 1.4'
27
27
  self.dependency 'mail', '~> 2.5'
28
- self.dependency 'rspec', '~> 2.13'
28
+ self.dependency 'rspec', '~> 2.14'
29
29
  self.dependency 'rdoc', '~> 4.0'
30
30
 
31
- self.spec_extras[:licenses] = ["BSD"]
31
+ self.license 'BSD'
32
32
  self.require_ruby_version( '>=1.8.7' )
33
33
  # self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
34
34
  end
@@ -41,3 +41,6 @@ end
41
41
 
42
42
  ENV['VERSION'] ||= $hoespec.spec.version.to_s
43
43
 
44
+ # Ensure the specs pass before checking in
45
+ task 'hg:precheckin' => ['deps:gemset', :check_history, :check_manifest]
46
+
@@ -5,6 +5,7 @@ require 'hoe'
5
5
  require 'mail'
6
6
  require 'net/smtp'
7
7
  require 'openssl'
8
+ require 'pathname'
8
9
 
9
10
  Hoe.plugin( :highline, :mercurial )
10
11
 
@@ -14,10 +15,10 @@ Hoe.plugin( :highline, :mercurial )
14
15
  module Hoe::Deveiate
15
16
 
16
17
  # Library version constant
17
- VERSION = '0.2.0'
18
+ VERSION = '0.3.0'
18
19
 
19
20
  # Version-control revision constant
20
- REVISION = %q$Revision: da47f9e5264f $
21
+ REVISION = %q$Revision: 674e3312ed6a $
21
22
 
22
23
  # Regexp to match trailing whitespace
23
24
  TRAILING_WHITESPACE_RE = /[ \t]+$/
@@ -25,6 +26,9 @@ module Hoe::Deveiate
25
26
  # Emoji for style advisories
26
27
  SADFACE = "\u{1f622}"
27
28
 
29
+ # The name of the RVM gemset
30
+ RVM_GEMSET = Pathname( '.rvm.gems' )
31
+
28
32
 
29
33
  ### Set up defaults
30
34
  def initialize_deveiate
@@ -181,6 +185,32 @@ module Hoe::Deveiate
181
185
  end
182
186
  end
183
187
 
188
+ namespace :deps do
189
+
190
+ if RVM_GEMSET.exist?
191
+ desc "Update the project's RVM gemset"
192
+ task :gemset do
193
+ deps = make_gemset_recommendations( $hoespec.spec )
194
+ updates = deps.values.compact
195
+
196
+ if !updates.empty?
197
+ $stderr.puts "%d gems in the current gemset have newer matching versions:" %
198
+ [ updates.length ]
199
+ deps.each do |old, newer|
200
+ next unless newer
201
+ $stderr.puts " #{old} -> #{newer}"
202
+ end
203
+
204
+ if ask( "Update? " )
205
+ update_rvm_gemset( deps )
206
+ run 'rvm', 'gemset', 'import', RVM_GEMSET.to_s
207
+ end
208
+ end
209
+ end
210
+ end
211
+
212
+ end
213
+
184
214
  ### Make the ChangeLog update if the repo has changed since it was last built
185
215
  file '.hg/branch'
186
216
  file 'ChangeLog' => '.hg/branch' do |task|
@@ -193,6 +223,60 @@ module Hoe::Deveiate
193
223
 
194
224
  end
195
225
 
226
+
227
+ ### Update the contents of .rvm.gems to include the latest gems.
228
+ def update_rvm_gemset( deps )
229
+ RVM_GEMSET.open( File::WRONLY|File::TRUNC, 0644 ) do |fh|
230
+ deps.sort_by {|dep, _| dep.name }.each do |dep, newer|
231
+ if newer
232
+ fh.puts( dep.name + ' -v' + newer.to_s )
233
+ else
234
+ mspec = dep.matching_specs.last
235
+ fh.puts( dep.name + ' -v' + mspec.version.to_s )
236
+ end
237
+ end
238
+ end
239
+ end
240
+
241
+
242
+ ### Print out the list of dependency calls that should be included in the
243
+ ### Hoespec in the Rakefile.
244
+ def print_hoespec_dependencies( deps )
245
+ deps.each_key do |dep|
246
+ $stderr.puts "self.dependency '%s', '%s'" % [ dep.name, dep.version.to_s ]
247
+ end
248
+ end
249
+
250
+
251
+ ### Return a Hash of Gem::Dependency objects, the keys of which are dependencies
252
+ ### in the current gemspec, and the values are which are either +nil+ if the
253
+ ### current gemset contains the latest version of the gem which matches the
254
+ ### dependency, or the newer version if there is a newer one.
255
+ def make_gemset_recommendations( gemspec )
256
+ recommendations = {}
257
+ fetcher = Gem::SpecFetcher.fetcher
258
+
259
+ gemspec.dependencies.each do |dep|
260
+ newer_dep = nil
261
+ if (( mspec = dep.matching_specs.last ))
262
+ newer_dep = Gem::Dependency.new( dep.name, dep.requirement, "> #{mspec.version}" )
263
+ else
264
+ newer_dep = Gem::Dependency.new( dep.name, dep.requirement )
265
+ end
266
+ remotes, _ = fetcher.search_for_dependency( newer_dep )
267
+ remotes.map! {|gem, _| gem.version }
268
+
269
+ if remotes.empty?
270
+ recommendations[ dep ] = nil
271
+ else
272
+ recommendations[ dep ] = remotes.last
273
+ end
274
+ end
275
+
276
+ return recommendations
277
+ end
278
+
279
+
196
280
  ### Define tasks used to announce new releases
197
281
  def define_announce_tasks
198
282
 
metadata CHANGED
@@ -1,65 +1,54 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe-deveiate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Granger
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain:
12
- - !binary |-
13
- LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURiRENDQWxTZ0F3SUJB
14
- Z0lCQVRBTkJna3Foa2lHOXcwQkFRVUZBREErTVF3d0NnWURWUVFEREFOblpX
15
- UXgKR1RBWEJnb0praWFKay9Jc1pBRVpGZ2xHWVdWeWFXVk5WVVF4RXpBUkJn
16
- b0praWFKay9Jc1pBRVpGZ052Y21jdwpIaGNOTVRNd01qSTNNVFkwT0RVNFdo
17
- Y05NVFF3TWpJM01UWTBPRFU0V2pBK01Rd3dDZ1lEVlFRRERBTm5aV1F4CkdU
18
- QVhCZ29Ka2lhSmsvSXNaQUVaRmdsR1lXVnlhV1ZOVlVReEV6QVJCZ29Ka2lh
19
- SmsvSXNaQUVaRmdOdmNtY3cKZ2dFaU1BMEdDU3FHU0liM0RRRUJBUVVBQTRJ
20
- QkR3QXdnZ0VLQW9JQkFRRGI5Mm1reVl3dUdCZzFvUnh0MnRrSAorVW8zTEFz
21
- YUwvQVBCZlNMenk4bzMrQjNBVUhLQ2pNVWFWZUJvWmRXdE1IQjc1WDNWUWx2
22
- WGZaTXlCeGo1OVZvCmNEdGhyM3pkYW80SG55cnpBSVFmN0JPNVk4S0J3VkQr
23
- eXlYQ0QvTjY1VFR3cXNRbk8zaWU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LbtpXtji5QXor
27
+ ON6oln4tWBIB3Klbr3szq5oR3Rc1D02SaBTalxSndp4M6UkW9hRFu5jn98pDB4fq
28
+ 5l8wMMU0Xdmqx1VYvysVAjVFVC/W4NNvlmg+2mEgSVZP5K6Tc9qDh3eMQInoYw6h
29
+ t1YA6RsUJHp5vGQyhP1x34YpLAaly8icbns/8PqOf7Osn9ztmg8bOMJCeb32eQLj
30
+ 6mKCwjpegytE0oifXfF8k75A9105cBnNiMZOe1tXiqYc/exCgWvbggurzDOcRkZu
31
+ /YSusaiDXHKU2O3Akc3htA==
32
+ -----END CERTIFICATE-----
33
+ date: 2013-08-16 00:00:00.000000000 Z
42
34
  dependencies:
43
35
  - !ruby/object:Gem::Dependency
44
36
  name: hoe
45
37
  requirement: !ruby/object:Gem::Requirement
46
- none: false
47
38
  requirements:
48
39
  - - ~>
49
40
  - !ruby/object:Gem::Version
50
- version: 3.5.1
41
+ version: '3.6'
51
42
  type: :runtime
52
43
  prerelease: false
53
44
  version_requirements: !ruby/object:Gem::Requirement
54
- none: false
55
45
  requirements:
56
46
  - - ~>
57
47
  - !ruby/object:Gem::Version
58
- version: 3.5.1
48
+ version: '3.6'
59
49
  - !ruby/object:Gem::Dependency
60
50
  name: hoe-highline
61
51
  requirement: !ruby/object:Gem::Requirement
62
- none: false
63
52
  requirements:
64
53
  - - ~>
65
54
  - !ruby/object:Gem::Version
@@ -67,7 +56,6 @@ dependencies:
67
56
  type: :runtime
68
57
  prerelease: false
69
58
  version_requirements: !ruby/object:Gem::Requirement
70
- none: false
71
59
  requirements:
72
60
  - - ~>
73
61
  - !ruby/object:Gem::Version
@@ -75,7 +63,6 @@ dependencies:
75
63
  - !ruby/object:Gem::Dependency
76
64
  name: hoe-mercurial
77
65
  requirement: !ruby/object:Gem::Requirement
78
- none: false
79
66
  requirements:
80
67
  - - ~>
81
68
  - !ruby/object:Gem::Version
@@ -83,7 +70,6 @@ dependencies:
83
70
  type: :runtime
84
71
  prerelease: false
85
72
  version_requirements: !ruby/object:Gem::Requirement
86
- none: false
87
73
  requirements:
88
74
  - - ~>
89
75
  - !ruby/object:Gem::Version
@@ -91,7 +77,6 @@ dependencies:
91
77
  - !ruby/object:Gem::Dependency
92
78
  name: mail
93
79
  requirement: !ruby/object:Gem::Requirement
94
- none: false
95
80
  requirements:
96
81
  - - ~>
97
82
  - !ruby/object:Gem::Version
@@ -99,7 +84,6 @@ dependencies:
99
84
  type: :runtime
100
85
  prerelease: false
101
86
  version_requirements: !ruby/object:Gem::Requirement
102
- none: false
103
87
  requirements:
104
88
  - - ~>
105
89
  - !ruby/object:Gem::Version
@@ -107,23 +91,20 @@ dependencies:
107
91
  - !ruby/object:Gem::Dependency
108
92
  name: rspec
109
93
  requirement: !ruby/object:Gem::Requirement
110
- none: false
111
94
  requirements:
112
95
  - - ~>
113
96
  - !ruby/object:Gem::Version
114
- version: '2.13'
97
+ version: '2.14'
115
98
  type: :runtime
116
99
  prerelease: false
117
100
  version_requirements: !ruby/object:Gem::Requirement
118
- none: false
119
101
  requirements:
120
102
  - - ~>
121
103
  - !ruby/object:Gem::Version
122
- version: '2.13'
104
+ version: '2.14'
123
105
  - !ruby/object:Gem::Dependency
124
106
  name: rdoc
125
107
  requirement: !ruby/object:Gem::Requirement
126
- none: false
127
108
  requirements:
128
109
  - - ~>
129
110
  - !ruby/object:Gem::Version
@@ -131,17 +112,14 @@ dependencies:
131
112
  type: :runtime
132
113
  prerelease: false
133
114
  version_requirements: !ruby/object:Gem::Requirement
134
- none: false
135
115
  requirements:
136
116
  - - ~>
137
117
  - !ruby/object:Gem::Version
138
118
  version: '4.0'
139
- description: ! 'A collection of Rake tasks and utility functions I use to maintain
140
- my Open
141
-
142
- Source projects. It''s really only useful if you want to help maintain one of
143
-
144
- them.'
119
+ description: |-
120
+ A collection of Rake tasks and utility functions I use to maintain my Open
121
+ Source projects. It's really only useful if you want to help maintain one of
122
+ them.
145
123
  email:
146
124
  - ged@FaerieMUD.org
147
125
  executables: []
@@ -160,6 +138,7 @@ files:
160
138
  homepage: http://deveiate.org/hoe-deveiate
161
139
  licenses:
162
140
  - BSD
141
+ metadata: {}
163
142
  post_install_message:
164
143
  rdoc_options:
165
144
  - --main
@@ -167,22 +146,20 @@ rdoc_options:
167
146
  require_paths:
168
147
  - lib
169
148
  required_ruby_version: !ruby/object:Gem::Requirement
170
- none: false
171
149
  requirements:
172
- - - ! '>='
150
+ - - '>='
173
151
  - !ruby/object:Gem::Version
174
152
  version: 1.8.7
175
153
  required_rubygems_version: !ruby/object:Gem::Requirement
176
- none: false
177
154
  requirements:
178
- - - ! '>='
155
+ - - '>='
179
156
  - !ruby/object:Gem::Version
180
157
  version: '0'
181
158
  requirements: []
182
159
  rubyforge_project: hoe-deveiate
183
- rubygems_version: 1.8.25
160
+ rubygems_version: 2.0.5
184
161
  signing_key:
185
- specification_version: 3
162
+ specification_version: 4
186
163
  summary: A collection of Rake tasks and utility functions I use to maintain my Open
187
164
  Source projects
188
165
  test_files: []
metadata.gz.sig CHANGED
Binary file