hoe-mercurial 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ R�x�BU��"��k�*�%�A\y�]h��`�=m&G��c���c���<��_͏�7ho��DTF]�H&P�
2
+ ew8�b��~��^e�G5�*,R��L�~TXH��3<�+�[&�yP[(q'|��z���'�#H�5F�<l���Ih������g�����*Ygś����ݗ�p׷|-��j����`��:�l{?���>�Տ��|`z���RJ�6�i[�;�T�A�5*%��ɣ��-^�k[
data/History.md CHANGED
@@ -1,4 +1,15 @@
1
- ## 1.2.1 [2011-02-01] Michael Granger <ged@FaerieMUD.org>
1
+ ## v1.3.0 [2011-09-19] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ Added a new task :check_history, and a new config option 'check_history_on_release'
4
+ for ensuring the History file is updated before releasing.
5
+
6
+
7
+ ## v1.2.2 [2011-08-22] Michael Granger <ged@FaerieMUD.org>
8
+
9
+ Don't overlay existing mercurial tasks if an 'hg:checkin' task already exists.
10
+
11
+
12
+ ## v1.2.1 [2011-02-01] Michael Granger <ged@FaerieMUD.org>
2
13
 
3
14
  Bugfixes:
4
15
 
@@ -7,7 +18,8 @@ Bugfixes:
7
18
  * Fixed the add_include_dirs call, describe the 'ci' task
8
19
  * Updated hoe dependency
9
20
 
10
- ## 1.2.0 [2011-01-05] Michael Granger <ged@FaerieMUD.org>
21
+
22
+ ## v1.2.0 [2011-01-05] Michael Granger <ged@FaerieMUD.org>
11
23
 
12
24
  Removed old attributes:
13
25
 
@@ -19,12 +31,12 @@ Enhancements:
19
31
  * hoe-mercurial now injects itself as a dev dependency.
20
32
 
21
33
 
22
- ## 1.1.1 [2011-01-04] Michael Granger <ged@FaerieMUD.org>
34
+ ## v1.1.1 [2011-01-04] Michael Granger <ged@FaerieMUD.org>
23
35
 
24
36
  Simplified the hg:checkin task.
25
37
 
26
38
 
27
- ## 1.1.0 [2010-12-14] Michael Granger <ged@FaerieMUD.org>
39
+ ## v1.1.0 [2010-12-14] Michael Granger <ged@FaerieMUD.org>
28
40
 
29
41
  Initial release after forking from hoe-hg.
30
42
 
data/README.md CHANGED
@@ -46,6 +46,21 @@ uncommitted files, it also verifies that you want to release with
46
46
  uncommitted changes, and ensures you've bumped the version number by
47
47
  checking for an existing tag with the same version.
48
48
 
49
+ If you also wish to check the History file to ensure that you have an
50
+ entry for each release tag, add this to your hoespec:
51
+
52
+ self.check_history_on_release = true
53
+
54
+ You can also invoke or add the ':check_history' task as a dependency
55
+ yourself if you wish to check it at other times.
56
+
57
+ It expects lines like:
58
+
59
+ == v1.3.0 <other stuff>
60
+
61
+ to be in your History file. Markdown, RDoc, and Textile headers are
62
+ all supported.
63
+
49
64
  To sign tagged revisions using 'hg sign', do this in your hoespec:
50
65
 
51
66
  self.hg_sign_tags = true
data/Rakefile CHANGED
@@ -21,6 +21,7 @@ hoespec = Hoe.spec "hoe-mercurial" do
21
21
 
22
22
  self.spec_extras[:licenses] = ["BSD"]
23
23
  self.hg_sign_tags = true
24
+ self.check_history_on_release = true
24
25
 
25
26
  self.dependency 'hoe', "~> #{Hoe::VERSION[ /\d+\.\d+/ ]}"
26
27
  end
@@ -55,6 +56,7 @@ file 'ChangeLog' => '.hg/branch' do |task|
55
56
  end
56
57
 
57
58
  # Rebuild the ChangeLog immediately before release
58
- task :prerelease => 'ChangeLog'
59
+ task :prerelease => [ :check_history, 'ChangeLog' ]
60
+
59
61
 
60
62
 
@@ -438,26 +438,50 @@ class Hoe
438
438
  include Hoe::RakeHelpers,
439
439
  Hoe::MercurialHelpers
440
440
 
441
- VERSION = '1.2.2'
441
+ VERSION = '1.3.0'
442
442
 
443
443
  # The name of the file to edit for the commit message
444
444
  COMMIT_MSG_FILE = 'commit-msg.txt'
445
445
 
446
446
  attr_accessor :hg_release_tag_prefix
447
447
  attr_accessor :hg_sign_tags
448
+ attr_accessor :check_history_on_release
448
449
 
449
450
 
450
451
  ### Set up defaults
451
452
  def initialize_mercurial
452
453
  # Follow semantic versioning tagging specification (http://semver.org/)
453
- self.hg_release_tag_prefix = "v"
454
- self.hg_sign_tags = false
454
+ self.hg_release_tag_prefix = "v"
455
+ self.hg_sign_tags = false
456
+ self.check_history_on_release = false
455
457
 
456
- self.extra_dev_deps << ['hoe-mercurial', "~> #{VERSION}"] unless
458
+ self.dependency( 'hoe-mercurial', "~> #{VERSION}", :developer ) unless
457
459
  self.name == 'hoe-mercurial'
458
460
  end
459
461
 
460
462
 
463
+ ### Read the list of tags and return any that don't have a corresponding section
464
+ ### in the history file.
465
+ def get_unhistoried_version_tags( include_pkg_version=true )
466
+ prefix = self.hg_release_tag_prefix
467
+ tag_pattern = /#{prefix}\d+(\.\d+)+/
468
+ release_tags = get_tags().grep( /^#{tag_pattern}$/ )
469
+
470
+ release_tags << "#{prefix}#{version}" if include_pkg_version
471
+
472
+ IO.readlines( self.history_file ).each do |line|
473
+ if line =~ /^(?:h\d\.|#+|=+)\s+(#{tag_pattern})\s+/
474
+ trace " found an entry for tag %p: %p" % [ $1, line ]
475
+ release_tags.delete( $1 )
476
+ else
477
+ trace " no tag on line %p" % [ line ]
478
+ end
479
+ end
480
+
481
+ return release_tags
482
+ end
483
+
484
+
461
485
  ### Hoe hook -- Define Rake tasks when the plugin is loaded.
462
486
  def define_mercurial_tasks
463
487
  return unless File.exist?( ".hg" ) &&
@@ -490,6 +514,9 @@ class Hoe
490
514
  fail
491
515
  end
492
516
 
517
+ # Ensure that the History file contains an entry for every release
518
+ Rake::Task[ 'check_history' ].invoke if self.check_history_on_release
519
+
493
520
  # Sign the current rev
494
521
  if self.hg_sign_tags
495
522
  log "Signing rev #{rev}"
@@ -620,6 +647,17 @@ class Hoe
620
647
  # Hook the release task and prep the repo first
621
648
  task :prerelease => 'hg:prep_release'
622
649
 
650
+ desc "Check the history file to ensure it contains an entry for each release tag"
651
+ task :check_history do
652
+ log "Checking history..."
653
+ missing_tags = get_unhistoried_version_tags()
654
+
655
+ unless missing_tags.empty?
656
+ abort "%s needs updating; missing entries for tags: %p" %
657
+ [ self.history_file, missing_tags ]
658
+ end
659
+ end
660
+
623
661
  rescue ::Exception => err
624
662
  $stderr.puts "%s while defining Mercurial tasks: %s" % [ err.class.name, err.message ]
625
663
  raise
metadata CHANGED
@@ -5,17 +5,37 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 2
9
- - 2
10
- version: 1.2.2
8
+ - 3
9
+ - 0
10
+ version: 1.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Granger
14
14
  autorequire:
15
15
  bindir: bin
16
- cert_chain: []
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-----
17
37
 
18
- date: 2011-08-22 00:00:00 Z
38
+ date: 2011-09-19 00:00:00 Z
19
39
  dependencies:
20
40
  - !ruby/object:Gem::Dependency
21
41
  name: hoe
@@ -33,9 +53,25 @@ dependencies:
33
53
  type: :runtime
34
54
  version_requirements: *id001
35
55
  - !ruby/object:Gem::Dependency
36
- name: hoe
56
+ name: hoe-highline
37
57
  prerelease: false
38
58
  requirement: &id002 !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ~>
62
+ - !ruby/object:Gem::Version
63
+ hash: 29
64
+ segments:
65
+ - 0
66
+ - 0
67
+ - 1
68
+ version: 0.0.1
69
+ type: :development
70
+ version_requirements: *id002
71
+ - !ruby/object:Gem::Dependency
72
+ name: hoe
73
+ prerelease: false
74
+ requirement: &id003 !ruby/object:Gem::Requirement
39
75
  none: false
40
76
  requirements:
41
77
  - - ~>
@@ -46,7 +82,7 @@ dependencies:
46
82
  - 12
47
83
  version: "2.12"
48
84
  type: :development
49
- version_requirements: *id002
85
+ version_requirements: *id003
50
86
  description: |-
51
87
  This is a fork of the [hoe-hg](https://bitbucket.org/mml/hoe-hg)
52
88
  plugin. I forked it because I use quite a few additional Mercurial
Binary file