blastr 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -1
- data/lib/scm/hg.rb +1 -1
- data/lib/scm/svn.rb +6 -7
- data/lib/version.rb +1 -1
- data/test/scm/test_svn.rb +4 -4
- metadata +5 -5
data/History.txt
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
== 0.2.3 2012-12-19
|
2
|
+
|
3
|
+
* Fix the Subversion module picking the wrong 'latest revision' from console output
|
4
|
+
|
1
5
|
== 0.2.2 2012-12-18
|
2
6
|
|
3
|
-
* Fix a fatal missing constant error introduced by a shoddy refactoring
|
7
|
+
* Fix a fatal missing constant error introduced by a shoddy refactoring
|
4
8
|
|
5
9
|
== 0.2.1 2012-12-17
|
6
10
|
|
data/lib/scm/hg.rb
CHANGED
@@ -66,6 +66,7 @@ module Blastr::SourceControl
|
|
66
66
|
end
|
67
67
|
|
68
68
|
private
|
69
|
+
|
69
70
|
def hg_log(revision = 0)
|
70
71
|
separator = "-" * 70
|
71
72
|
template = "\\nchangeset {rev}:{node} by {author}:\\n{desc}\\n#{separator}"
|
@@ -73,7 +74,6 @@ module Blastr::SourceControl
|
|
73
74
|
hg_log_entries(output)
|
74
75
|
end
|
75
76
|
|
76
|
-
private
|
77
77
|
def with_clone
|
78
78
|
clone_dir = Blastr::FileSystem.temp_dir
|
79
79
|
Blastr::FileSystem::delete_at_exit(clone_dir)
|
data/lib/scm/svn.rb
CHANGED
@@ -34,7 +34,7 @@ module Blastr::SourceControl
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def initialize(svn_url)
|
37
|
-
@svn_url = with_protocol_scheme(svn_url)
|
37
|
+
@svn_url = Subversion.with_protocol_scheme(svn_url)
|
38
38
|
end
|
39
39
|
|
40
40
|
def url
|
@@ -47,12 +47,12 @@ module Blastr::SourceControl
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def latest_revision
|
50
|
-
entries = commits_since(as_revision("
|
51
|
-
return entries.
|
52
|
-
SubversionRevision.new("
|
50
|
+
entries = commits_since(as_revision("0"))
|
51
|
+
return entries.last.revision unless entries.empty?
|
52
|
+
SubversionRevision.new("0")
|
53
53
|
end
|
54
54
|
|
55
|
-
def commits_since(since_revision = 1)
|
55
|
+
def commits_since(since_revision = as_revision("1"))
|
56
56
|
svn_log_output = svn_log(since_revision)
|
57
57
|
svn_log_entries(svn_log_output)
|
58
58
|
end
|
@@ -70,7 +70,7 @@ module Blastr::SourceControl
|
|
70
70
|
|
71
71
|
private
|
72
72
|
|
73
|
-
def with_protocol_scheme(path)
|
73
|
+
def self.with_protocol_scheme(path)
|
74
74
|
return path if Subversion.has_protocol_scheme?(path)
|
75
75
|
"file://#{path}"
|
76
76
|
end
|
@@ -98,7 +98,6 @@ module Blastr::SourceControl
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
-
private
|
102
101
|
def content_of(file)
|
103
102
|
file = open(file)
|
104
103
|
content = file.read
|
data/lib/version.rb
CHANGED
data/test/scm/test_svn.rb
CHANGED
@@ -47,16 +47,16 @@ class TestSubversion < AbstractScmTestCase
|
|
47
47
|
|
48
48
|
def test_detects_latest_revision_from_commit_log
|
49
49
|
repo = scm.new("/fakerepo")
|
50
|
-
repo.expects(:commits_since).with(revision("
|
50
|
+
repo.expects(:commits_since).with(revision("0")).returns([
|
51
51
|
logentry(revision("15"), "author", "comment")
|
52
52
|
])
|
53
53
|
assert_equal revision("15"), repo.latest_revision
|
54
54
|
end
|
55
55
|
|
56
|
-
def
|
56
|
+
def test_latest_revision_for_empty_log_defaults_to_revision_zero
|
57
57
|
repo = scm.new("/fakerepo")
|
58
|
-
repo.expects(:commits_since).with(revision("
|
59
|
-
assert_equal revision("
|
58
|
+
repo.expects(:commits_since).with(revision("0")).returns([])
|
59
|
+
assert_equal revision("0"), repo.latest_revision
|
60
60
|
end
|
61
61
|
|
62
62
|
private
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blastr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-12-18 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mocha
|
16
|
-
requirement: &
|
16
|
+
requirement: &70151258269660 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70151258269660
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: git
|
27
|
-
requirement: &
|
27
|
+
requirement: &70151258260500 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70151258260500
|
36
36
|
description: Blastr observes a version control repository for commits and makes audible
|
37
37
|
announcements out of the commit messages.
|
38
38
|
email:
|