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 ADDED
@@ -0,0 +1,5 @@
1
+ # ignore generated gem
2
+ pkg/
3
+ doc/
4
+ coverage.info
5
+ coverage/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in mazkut.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ blastr (1)
5
+ git
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ git (1.2.5)
11
+ metaclass (0.0.1)
12
+ mocha (0.13.1)
13
+ metaclass (~> 0.0.1)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ blastr!
20
+ mocha
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.2.0 2012-12-17
2
+
3
+ * Migrate from Hoe to a .gemspec file
4
+
1
5
  == 0.1.2 2010-12-06
2
6
 
3
7
  * Add missing files from 0.1.1
data/Rakefile CHANGED
@@ -1,22 +1,12 @@
1
- require 'rubygems'
2
- require 'hoe'
3
-
4
- $:.unshift(File.dirname(__FILE__) + "/lib")
5
- require File.expand_path(File.join(File.dirname(__FILE__), 'lib/blastr'))
6
-
7
- Hoe.plugin :git
8
-
9
- Hoe.spec 'blastr' do
10
- name = "blastr"
11
- developer('Lasse Koskela', 'lasse.koskela@gmail.com')
12
- description = "Blastr observes a version control repository for commits and makes audible announcements out of the commit messages."
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
@@ -0,0 +1,4 @@
1
+ module Blastr
2
+ VERSION = '0.2.0'
3
+ COPYRIGHT = "Copyright (c) 2009-#{Time.now.year}, Lasse Koskela. All Rights Reserved."
4
+ end
@@ -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 test_with_missing_people_file
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 test_with_existing_people_file
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
@@ -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 = Blastr::SourceControl::SubversionRevision.new("123")
17
- rev456 = Blastr::SourceControl::SubversionRevision.new("456")
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
@@ -1,5 +1,5 @@
1
1
  require File.expand_path(File.join(File.dirname(__FILE__), 'test_helper.rb'))
2
- require 'mocha'
2
+ require 'mocha/setup'
3
3
 
4
4
  module Blastr
5
5
  class Process
data/test/tts/test_tts.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require File.expand_path(File.join(File.dirname(__FILE__), '../test_helper.rb'))
2
- require 'mocha'
2
+ require 'mocha/setup'
3
3
 
4
4
  class TestTTSImplementation < Test::Unit::TestCase
5
5
  def test_availability_depends_on_binary_existing_in_PATH
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
- hash: 31
5
- prerelease: false
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
- date: 2010-12-06 00:00:00 +08:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
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
- hash: 7
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
- requirement: &id002 !ruby/object:Gem::Requirement
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
- hash: 19
46
- segments:
47
- - 2
48
- - 7
49
- - 0
50
- version: 2.7.0
51
- type: :development
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
- extra_rdoc_files:
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
- has_rdoc: true
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
- - --main
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
- hash: 3
125
- segments:
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
- hash: 3
134
- segments:
135
- - 0
136
- version: "0"
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
137
102
  requirements: []
138
-
139
- rubyforge_project: blastr
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 observes a version control repository for commits and makes audible announcements out of the commit messages
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
data/PostInstall.txt DELETED
@@ -1,7 +0,0 @@
1
-
2
- For more information on blastr, see http://blastr.rubyforge.org
3
-
4
- NOTE: Change this information in PostInstall.txt
5
- You can also delete it if you don't want it.
6
-
7
-