blastr 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ == 0.0.4 2009-01-17
2
+
3
+ * Git fixes.
4
+
1
5
  == 0.0.3 2009-01-17
2
6
 
3
7
  * Implementation for both Subversion and Git along with a new structure.
@@ -5,10 +5,10 @@ README.rdoc
5
5
  Rakefile
6
6
  bin/blastr
7
7
  lib/blastr.rb
8
- lib/blastr/tts.rb
9
- lib/blastr/scm.rb
10
8
  lib/blastr/git.rb
9
+ lib/blastr/scm.rb
11
10
  lib/blastr/svn.rb
11
+ lib/blastr/tts.rb
12
12
  script/console
13
13
  script/destroy
14
14
  script/generate
data/bin/blastr CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  require 'rubygems'
4
4
  require 'yaml'
5
- require 'lib/blastr.rb'
6
- require 'lib/blastr/tts.rb'
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).reverse.each do |commit|
36
- announce(commit) if since_revision.before?(commit.revision)
37
- since_revision = commit.revision
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
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module Blastr
5
- VERSION = '0.0.3'
5
+ VERSION = '0.0.4'
6
6
 
7
7
  require 'blastr/git.rb'
8
8
  require 'blastr/svn.rb'
@@ -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
@@ -1,5 +1,3 @@
1
- #!/usr/bin/env ruby
2
-
3
1
  require 'fileutils'
4
2
  require 'blastr/scm.rb'
5
3
 
@@ -53,7 +51,7 @@ module Blastr
53
51
  comment = entry[2]
54
52
  entries << LogEntry.new(revision, author, comment)
55
53
  end
56
- entries.reverse
54
+ entries
57
55
  end
58
56
 
59
57
  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.0.3
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