blastr 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +20 -0
- data/History.txt +4 -0
- data/Rakefile +12 -22
- data/blastr.gemspec +21 -0
- data/lib/blastr.rb +0 -3
- data/lib/version.rb +4 -0
- data/test/people/test_people.rb +19 -2
- data/test/scm/test_mercurial_log.rb +6 -0
- data/test/scm/test_svn_log.rb +6 -0
- data/test/scm/test_svn_revision.rb +2 -2
- data/test/test_blastr.rb +1 -1
- data/test/tts/test_tts.rb +1 -1
- metadata +54 -89
- data/Manifest.txt +0 -36
- data/PostInstall.txt +0 -7
data/.gitignore
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/History.txt
CHANGED
data/Rakefile
CHANGED
@@ -1,22 +1,12 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
summary = "Blastr is an audible commit radiator"
|
14
|
-
url = "http://github.com/lkoskela/blastr"
|
15
|
-
clean_globs = ['test/output/*.png', '**/.DS_Store', 'tmp', '*.log']
|
16
|
-
changes = paragraphs_of('History.txt', 0..1).join("\n\n")
|
17
|
-
remote_rdoc_dir = '' # Release to root
|
18
|
-
rsync_args = '-av --delete --ignore-errors'
|
19
|
-
extra_deps = [
|
20
|
-
['git','>= 1.2.5'],
|
21
|
-
]
|
22
|
-
end
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/testtask"
|
3
|
+
|
4
|
+
desc "Default: run tests."
|
5
|
+
task :default => :test
|
6
|
+
|
7
|
+
desc "Run unit tests"
|
8
|
+
Rake::TestTask.new do |t|
|
9
|
+
t.libs << "test"
|
10
|
+
t.test_files = FileList['test/**/test*.rb']
|
11
|
+
t.verbose = false
|
12
|
+
end
|
data/blastr.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require File.expand_path("../lib/version.rb", __FILE__)
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "blastr"
|
7
|
+
s.version = Blastr::VERSION
|
8
|
+
s.authors = ["Lasse Koskela"]
|
9
|
+
s.email = ["lasse.koskela@gmail.com"]
|
10
|
+
s.homepage = "http://github.com/lkoskela/blastr"
|
11
|
+
s.summary = %q{Blastr is an audible commit radiator}
|
12
|
+
s.description = %q{Blastr observes a version control repository for commits and makes audible announcements out of the commit messages.}
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
|
19
|
+
s.add_development_dependency "mocha"
|
20
|
+
s.add_runtime_dependency "git"
|
21
|
+
end
|
data/lib/blastr.rb
CHANGED
@@ -7,9 +7,6 @@ module Blastr
|
|
7
7
|
require File.expand_path(File.join(File.dirname(__FILE__), 'scm/scm.rb'))
|
8
8
|
require File.expand_path(File.join(File.dirname(__FILE__), 'tts/tts.rb'))
|
9
9
|
require File.expand_path(File.join(File.dirname(__FILE__), 'people/people.rb'))
|
10
|
-
|
11
|
-
VERSION = '0.1.2'
|
12
|
-
COPYRIGHT = "Copyright (c) 2009-#{Time.now.year}, Lasse Koskela. All Rights Reserved."
|
13
10
|
|
14
11
|
def self.trap_and_exit(signal)
|
15
12
|
trap(signal) {
|
data/lib/version.rb
ADDED
data/test/people/test_people.rb
CHANGED
@@ -3,6 +3,7 @@ require 'fileutils'
|
|
3
3
|
|
4
4
|
class TestPeopleFile < Test::Unit::TestCase
|
5
5
|
def setup
|
6
|
+
create_blastr_directory
|
6
7
|
backup_people_file
|
7
8
|
end
|
8
9
|
|
@@ -10,28 +11,44 @@ class TestPeopleFile < Test::Unit::TestCase
|
|
10
11
|
restore_people_file
|
11
12
|
end
|
12
13
|
|
13
|
-
def
|
14
|
+
def test_should_handle_missing_people_file_parent_directory
|
15
|
+
parent_dir = File.dirname(Blastr::People::PEOPLE_FILE)
|
16
|
+
FileUtils.rm_r(parent_dir)
|
17
|
+
assert_equal({}, Blastr::People.people)
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_should_handle_missing_people_file
|
14
21
|
FileUtils.rm(Blastr::People::PEOPLE_FILE)
|
15
22
|
assert_equal({}, Blastr::People.people)
|
16
23
|
assert_equal "nick", Blastr::People.full_name_of("nick")
|
17
24
|
end
|
18
25
|
|
19
|
-
def
|
26
|
+
def test_should_use_existing_names_from_people_file
|
20
27
|
open(Blastr::People::PEOPLE_FILE, 'w') do |f|
|
21
28
|
f << "nick: Full Name\n"
|
22
29
|
f << "name: In Full"
|
23
30
|
end
|
24
31
|
assert_equal({"nick" => "Full Name", "name" => "In Full"}, Blastr::People.people)
|
25
32
|
assert_equal "Full Name", Blastr::People.full_name_of("nick")
|
33
|
+
assert_equal "hot5hot", Blastr::People.full_name_of("hot5hot")
|
26
34
|
end
|
27
35
|
|
28
36
|
private
|
37
|
+
|
38
|
+
def create_blastr_directory
|
39
|
+
FileUtils.mkdir_p(File.dirname(Blastr::People::PEOPLE_FILE))
|
40
|
+
end
|
41
|
+
|
29
42
|
def backup_people_file
|
30
43
|
people_file = Blastr::People::PEOPLE_FILE
|
44
|
+
return unless File.exist?(people_file)
|
31
45
|
@backup_of_people_file = File.join(Blastr::FileSystem.temp_dir, File.basename(people_file))
|
32
46
|
FileUtils.cp(people_file, @backup_of_people_file)
|
33
47
|
end
|
48
|
+
|
34
49
|
def restore_people_file
|
50
|
+
return unless File.exist?(@backup_of_people_file)
|
51
|
+
create_blastr_directory
|
35
52
|
FileUtils.cp(@backup_of_people_file, Blastr::People::PEOPLE_FILE)
|
36
53
|
end
|
37
54
|
end
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
require File.expand_path(File.join(File.dirname(__FILE__), '../test_helper.rb'))
|
2
3
|
|
3
4
|
class TestMercurialLogParsing < Test::Unit::TestCase
|
@@ -5,6 +6,11 @@ class TestMercurialLogParsing < Test::Unit::TestCase
|
|
5
6
|
def setup
|
6
7
|
@hg = Blastr::SourceControl::Mercurial.new("hg:http://whatever")
|
7
8
|
end
|
9
|
+
|
10
|
+
def test_no_entries
|
11
|
+
@log = "----------------------------------------------------------------------\n"
|
12
|
+
should_produce_entries []
|
13
|
+
end
|
8
14
|
|
9
15
|
def test_one_entry
|
10
16
|
@log = <<EOS
|
data/test/scm/test_svn_log.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
require File.expand_path(File.join(File.dirname(__FILE__), '../test_helper.rb'))
|
2
3
|
|
3
4
|
class TestSubversionLogParsing < Test::Unit::TestCase
|
@@ -5,6 +6,11 @@ class TestSubversionLogParsing < Test::Unit::TestCase
|
|
5
6
|
def setup
|
6
7
|
@svn = Blastr::SourceControl::Subversion.new("svn://whatever")
|
7
8
|
end
|
9
|
+
|
10
|
+
def test_no_entries
|
11
|
+
@log = "------------------------------------------------------------------------\n"
|
12
|
+
should_produce_entries []
|
13
|
+
end
|
8
14
|
|
9
15
|
def test_one_entry
|
10
16
|
@log = <<EOS
|
@@ -13,8 +13,8 @@ class TestSubversionRevision < Test::Unit::TestCase
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def test_before_comparison_between_revisions
|
16
|
-
rev123 =
|
17
|
-
rev456 =
|
16
|
+
rev123 = revision("123")
|
17
|
+
rev456 = revision("456")
|
18
18
|
assert rev123.before?(rev456) == true
|
19
19
|
assert rev456.before?(rev123) == false
|
20
20
|
end
|
data/test/test_blastr.rb
CHANGED
data/test/tts/test_tts.rb
CHANGED
metadata
CHANGED
@@ -1,81 +1,55 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: blastr
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 2
|
10
|
-
version: 0.1.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Lasse Koskela
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
name: rubyforge
|
23
|
-
prerelease: false
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
12
|
+
date: 2012-12-17 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: mocha
|
16
|
+
requirement: &70176230716280 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 0
|
33
|
-
- 4
|
34
|
-
version: 2.0.4
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
35
22
|
type: :development
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: hoe
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: *70176230716280
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: git
|
27
|
+
requirement: &70176230715780 !ruby/object:Gem::Requirement
|
41
28
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
version_requirements: *id002
|
53
|
-
description: |-
|
54
|
-
Blastr observes a version control repository for commits and makes audible
|
55
|
-
announcements out of the commit messages. It currently supports Subversion,
|
56
|
-
Git, and Mercurial on Linux and OS X, possibly on other UNIX-like operating
|
57
|
-
systems as well.
|
58
|
-
|
59
|
-
See the project website at Rubyforge[http://rubyforge.org/projects/blastr/]
|
60
|
-
to file a bug report or submit a feature request.
|
61
|
-
email:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70176230715780
|
36
|
+
description: Blastr observes a version control repository for commits and makes audible
|
37
|
+
announcements out of the commit messages.
|
38
|
+
email:
|
62
39
|
- lasse.koskela@gmail.com
|
63
|
-
executables:
|
40
|
+
executables:
|
64
41
|
- blastr
|
65
42
|
extensions: []
|
66
|
-
|
67
|
-
|
43
|
+
extra_rdoc_files: []
|
44
|
+
files:
|
45
|
+
- .gitignore
|
46
|
+
- Gemfile
|
47
|
+
- Gemfile.lock
|
68
48
|
- History.txt
|
69
|
-
- Manifest.txt
|
70
|
-
- PostInstall.txt
|
71
|
-
- README.txt
|
72
|
-
files:
|
73
|
-
- History.txt
|
74
|
-
- Manifest.txt
|
75
|
-
- PostInstall.txt
|
76
49
|
- README.txt
|
77
50
|
- Rakefile
|
78
51
|
- bin/blastr
|
52
|
+
- blastr.gemspec
|
79
53
|
- config/website.yml
|
80
54
|
- lib/blastr.rb
|
81
55
|
- lib/error.rb
|
@@ -86,6 +60,7 @@ files:
|
|
86
60
|
- lib/scm/scm.rb
|
87
61
|
- lib/scm/svn.rb
|
88
62
|
- lib/tts/tts.rb
|
63
|
+
- lib/version.rb
|
89
64
|
- script/console
|
90
65
|
- script/destroy
|
91
66
|
- script/generate
|
@@ -106,43 +81,33 @@ files:
|
|
106
81
|
- test/test_helper.rb
|
107
82
|
- test/tts/test_tts.rb
|
108
83
|
- website/index.html
|
109
|
-
|
110
|
-
homepage: http://rubyforge.org/projects/blastr/
|
84
|
+
homepage: http://github.com/lkoskela/blastr
|
111
85
|
licenses: []
|
112
|
-
|
113
86
|
post_install_message:
|
114
|
-
rdoc_options:
|
115
|
-
|
116
|
-
- README.txt
|
117
|
-
require_paths:
|
87
|
+
rdoc_options: []
|
88
|
+
require_paths:
|
118
89
|
- lib
|
119
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
91
|
none: false
|
121
|
-
requirements:
|
122
|
-
- -
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
|
125
|
-
|
126
|
-
- 0
|
127
|
-
version: "0"
|
128
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
97
|
none: false
|
130
|
-
requirements:
|
131
|
-
- -
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
|
134
|
-
segments:
|
135
|
-
- 0
|
136
|
-
version: "0"
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
137
102
|
requirements: []
|
138
|
-
|
139
|
-
|
140
|
-
rubygems_version: 1.3.7
|
103
|
+
rubyforge_project:
|
104
|
+
rubygems_version: 1.8.17
|
141
105
|
signing_key:
|
142
106
|
specification_version: 3
|
143
|
-
summary: Blastr
|
144
|
-
test_files:
|
107
|
+
summary: Blastr is an audible commit radiator
|
108
|
+
test_files:
|
145
109
|
- test/people/test_people.rb
|
110
|
+
- test/scm/abstract_scm_testcase.rb
|
146
111
|
- test/scm/test_git.rb
|
147
112
|
- test/scm/test_git_log_entry.rb
|
148
113
|
- test/scm/test_git_revision.rb
|
data/Manifest.txt
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
PostInstall.txt
|
4
|
-
README.txt
|
5
|
-
Rakefile
|
6
|
-
bin/blastr
|
7
|
-
config/website.yml
|
8
|
-
lib/blastr.rb
|
9
|
-
lib/error.rb
|
10
|
-
lib/filesystem.rb
|
11
|
-
lib/people/people.rb
|
12
|
-
lib/scm/git.rb
|
13
|
-
lib/scm/hg.rb
|
14
|
-
lib/scm/scm.rb
|
15
|
-
lib/scm/svn.rb
|
16
|
-
lib/tts/tts.rb
|
17
|
-
script/console
|
18
|
-
script/destroy
|
19
|
-
script/generate
|
20
|
-
test/people/test_people.rb
|
21
|
-
test/scm/abstract_scm_testcase.rb
|
22
|
-
test/scm/test_git.rb
|
23
|
-
test/scm/test_git_log_entry.rb
|
24
|
-
test/scm/test_git_revision.rb
|
25
|
-
test/scm/test_log_entry.rb
|
26
|
-
test/scm/test_mercurial.rb
|
27
|
-
test/scm/test_mercurial_log.rb
|
28
|
-
test/scm/test_mercurial_revision.rb
|
29
|
-
test/scm/test_svn.rb
|
30
|
-
test/scm/test_svn_log.rb
|
31
|
-
test/scm/test_svn_revision.rb
|
32
|
-
test/test_blastr.rb
|
33
|
-
test/test_filesystem.rb
|
34
|
-
test/test_helper.rb
|
35
|
-
test/tts/test_tts.rb
|
36
|
-
website/index.html
|