vlad-hg 2.0.1 → 2.0.2

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
+ === 2.0.2 / 2009-08-28
2
+
3
+ * 1 minor enhancement
4
+
5
+ * Fix a bug causing non-tip revisions to pull the wrong changeset hash.
6
+
1
7
  === 2.0.1 / 2009-08-19
2
8
 
3
9
  * 1 minor enhancement
data/Manifest.txt CHANGED
@@ -4,3 +4,4 @@ README.txt
4
4
  Rakefile
5
5
  lib/vlad/mercurial.rb
6
6
  test/test_vlad_mercurial.rb
7
+ test/vlad_test_case.rb
data/README.txt CHANGED
@@ -1,8 +1,8 @@
1
1
  = vlad-hg
2
2
 
3
- * http://vladhg.rubyforge.org/
3
+ * http://hitsquad.rubyforge.org/vlad-hg/
4
+ * http://rubyforge.org/projects/hitsquad/
4
5
  * http://bitbucket.org/krbullock/vlad-hg/
5
- * http://rubyforge.org/projects/vladhg/
6
6
 
7
7
  == DESCRIPTION:
8
8
 
@@ -3,7 +3,7 @@ require 'vlad'
3
3
  module Vlad
4
4
  class Mercurial
5
5
 
6
- VERSION = '2.0.1'.freeze
6
+ VERSION = '2.0.2'.freeze
7
7
 
8
8
  set :source, Vlad::Mercurial.new
9
9
  set :hg_cmd, "hg"
@@ -38,7 +38,7 @@ module Vlad
38
38
  # into a mercurial changeset ID.
39
39
 
40
40
  def revision(revision)
41
- "`#{hg_cmd} identify -R #{repository} | cut -f1 -d\\ `"
41
+ "`#{hg_cmd} identify -R #{repository} -r #{revision} | cut -f1 -d\\ `"
42
42
  end
43
43
 
44
44
  end
@@ -0,0 +1,72 @@
1
+ require 'minitest/autorun'
2
+ require 'stringio'
3
+ require 'vlad'
4
+
5
+ class StringIO
6
+ def readpartial(size) read end # suck!
7
+ end
8
+
9
+ module Process
10
+ def self.expected status
11
+ @@expected ||= []
12
+ @@expected << status
13
+ end
14
+
15
+ class << self
16
+ alias :waitpid2_old :waitpid2
17
+
18
+ def waitpid2(pid)
19
+ [ @@expected.shift ]
20
+ end
21
+ end
22
+ end
23
+
24
+ class Rake::RemoteTask
25
+ attr_accessor :commands, :action, :input, :output, :error
26
+
27
+ Status = Struct.new :exitstatus
28
+
29
+ class Status
30
+ def success?() exitstatus == 0 end
31
+ end
32
+
33
+ def system *command
34
+ @commands << command
35
+ self.action ? self.action[command.join(' ')] : true
36
+ end
37
+
38
+ def popen4 *command
39
+ @commands << command
40
+
41
+ @input = StringIO.new
42
+ out = StringIO.new @output.shift.to_s
43
+ err = StringIO.new @error.shift.to_s
44
+
45
+ raise if block_given?
46
+
47
+ status = self.action ? self.action[command.join(' ')] : 0
48
+ Process.expected Status.new(status)
49
+
50
+ return 42, @input, out, err
51
+ end
52
+
53
+ def select reads, writes, errs, timeout
54
+ [reads, writes, errs]
55
+ end
56
+
57
+ end
58
+
59
+ class VladTestCase < MiniTest::Unit::TestCase
60
+ def setup
61
+ @vlad = Rake::RemoteTask
62
+ @vlad.reset
63
+ Rake.application.clear
64
+ @task_count = Rake.application.tasks.size
65
+ @vlad.set :domain, "example.com"
66
+ end
67
+
68
+ def util_set_hosts
69
+ @vlad.host "app.example.com", :app
70
+ @vlad.host "db.example.com", :db
71
+ end
72
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vlad-hg
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin R. Bullock
@@ -30,7 +30,7 @@ cert_chain:
30
30
  5V3Udl4ET3bsEOJ+8xs=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-08-19 00:00:00 -05:00
33
+ date: 2009-08-28 00:00:00 -05:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
@@ -63,8 +63,9 @@ files:
63
63
  - Rakefile
64
64
  - lib/vlad/mercurial.rb
65
65
  - test/test_vlad_mercurial.rb
66
+ - test/vlad_test_case.rb
66
67
  has_rdoc: true
67
- homepage: http://vladhg.rubyforge.org/
68
+ homepage: http://hitsquad.rubyforge.org/vlad-hg/
68
69
  licenses: []
69
70
 
70
71
  post_install_message:
metadata.gz.sig CHANGED
Binary file