blastr 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/Manifest.txt +2 -2
- data/bin/blastr +7 -5
- data/lib/blastr.rb +1 -1
- data/lib/blastr/git.rb +5 -5
- data/lib/blastr/svn.rb +1 -3
- metadata +3 -3
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/bin/blastr
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'rubygems'
|
4
4
|
require 'yaml'
|
5
|
-
require
|
6
|
-
require
|
5
|
+
require "#{File.dirname(__FILE__)}/../lib/blastr.rb"
|
6
|
+
require "#{File.dirname(__FILE__)}/../lib/blastr/tts.rb"
|
7
7
|
|
8
8
|
scm_url = ARGV[0]
|
9
9
|
scm = Blastr.scm(scm_url)
|
@@ -32,9 +32,11 @@ end
|
|
32
32
|
|
33
33
|
puts "Polling for #{scm.name} commits since revision #{since_revision}..."
|
34
34
|
while true
|
35
|
-
scm.commits_since(since_revision.to_s).
|
36
|
-
|
37
|
-
|
35
|
+
scm.commits_since(since_revision.to_s).each do |commit|
|
36
|
+
if since_revision.before?(commit.revision)
|
37
|
+
announce(commit)
|
38
|
+
since_revision = commit.revision
|
39
|
+
end
|
38
40
|
end
|
39
41
|
sleep 30
|
40
42
|
end
|
data/lib/blastr.rb
CHANGED
data/lib/blastr/git.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
1
|
require 'rubygems'
|
4
2
|
require 'git'
|
5
3
|
require 'blastr/scm.rb'
|
@@ -8,17 +6,18 @@ module Blastr
|
|
8
6
|
|
9
7
|
class GitLogEntry < LogEntry
|
10
8
|
def initialize(commit)
|
11
|
-
@revision = GitRevision.new(commit.sha)
|
9
|
+
@revision = GitRevision.new(commit.sha, commit.date)
|
12
10
|
@author = commit.author.name
|
13
11
|
@comment = commit.message
|
14
12
|
end
|
15
13
|
end
|
16
14
|
|
17
15
|
class GitRevision
|
18
|
-
attr_accessor :name
|
16
|
+
attr_accessor :name, :date
|
19
17
|
|
20
|
-
def initialize(name)
|
18
|
+
def initialize(name, date = nil)
|
21
19
|
@name = name
|
20
|
+
@date = date
|
22
21
|
end
|
23
22
|
|
24
23
|
def to_s
|
@@ -28,6 +27,7 @@ module Blastr
|
|
28
27
|
def before?(revision)
|
29
28
|
return false if @name == "HEAD"
|
30
29
|
return true if revision.name == "HEAD"
|
30
|
+
return @date < revision.date unless @date.nil?
|
31
31
|
@name < revision.name
|
32
32
|
end
|
33
33
|
end
|
data/lib/blastr/svn.rb
CHANGED
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.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lasse Koskela
|
@@ -52,10 +52,10 @@ files:
|
|
52
52
|
- Rakefile
|
53
53
|
- bin/blastr
|
54
54
|
- lib/blastr.rb
|
55
|
-
- lib/blastr/tts.rb
|
56
|
-
- lib/blastr/scm.rb
|
57
55
|
- lib/blastr/git.rb
|
56
|
+
- lib/blastr/scm.rb
|
58
57
|
- lib/blastr/svn.rb
|
58
|
+
- lib/blastr/tts.rb
|
59
59
|
- script/console
|
60
60
|
- script/destroy
|
61
61
|
- script/generate
|