capillary 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/capillary.gemspec +25 -0
- data/lib/capillary/commit.rb +2 -2
- data/lib/capillary/version.rb +1 -1
- data/test/capillary/commit_test.rb +2 -2
- metadata +4 -3
data/Gemfile.lock
CHANGED
data/capillary.gemspec
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "capillary/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "capillary"
|
7
|
+
s.version = Capillary::VERSION
|
8
|
+
s.authors = ["Marius Mathiesen", "Christian Johansen"]
|
9
|
+
s.email = ["marius@gitorious.org", "christian@gitorious.org"]
|
10
|
+
s.homepage = "http://gitorious.org/capillary"
|
11
|
+
s.summary = %q{Capillary generates a JSON payload from Git log output}
|
12
|
+
s.description = %q{Capillary works in conjunction with capillary.js, which outputs a beautiful graphical representation of your repository history}
|
13
|
+
|
14
|
+
s.rubyforge_project = "capillary"
|
15
|
+
|
16
|
+
s.add_dependency "json", "~> 1.5.1"
|
17
|
+
|
18
|
+
s.add_development_dependency "minitest", "~> 2.0"
|
19
|
+
s.add_development_dependency "mini_shoulda", "~> 0.3.0"
|
20
|
+
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.test_files = `git ls-files -- {test}/*`.split("\n")
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
|
+
s.require_paths = ["lib"]
|
25
|
+
end
|
data/lib/capillary/commit.rb
CHANGED
@@ -38,7 +38,7 @@ module Capillary
|
|
38
38
|
|
39
39
|
def ref_names=(spec)
|
40
40
|
if spec == ""
|
41
|
-
@ref_names =
|
41
|
+
@ref_names = []
|
42
42
|
else
|
43
43
|
@ref_names = spec.gsub(/[\(\)]/,"").split(/,\s?/)
|
44
44
|
end
|
@@ -47,7 +47,7 @@ module Capillary
|
|
47
47
|
def to_hash
|
48
48
|
{ "id" => id,
|
49
49
|
"parent_ids" => parent_ids,
|
50
|
-
"
|
50
|
+
"committed_at" => committed_at,
|
51
51
|
"committer_email" => committer_email,
|
52
52
|
"ref_names" => ref_names,
|
53
53
|
"message" => message }
|
data/lib/capillary/version.rb
CHANGED
@@ -52,14 +52,14 @@ class CommitTest < MiniTest::Spec
|
|
52
52
|
|
53
53
|
should "not include non-specified ref names" do
|
54
54
|
@commit.ref_names = ""
|
55
|
-
|
55
|
+
assert_equal [], @commit.ref_names
|
56
56
|
end
|
57
57
|
|
58
58
|
should "convert commit to JSON" do
|
59
59
|
assert_equal JSON.parse(@commit.to_json), {
|
60
60
|
"id" => "a7cf78bfff06d52b5b0aa021508b44c00cad067a",
|
61
61
|
"parent_ids" => ["db75ad82d678d51b29709d26af64d4a85b6f8071"],
|
62
|
-
"
|
62
|
+
"committed_at" => "Wed Jul 13 07:55:47 +0200 2011",
|
63
63
|
"committer_email" => "chris@example.com",
|
64
64
|
"ref_names" => ["master", "refactor"],
|
65
65
|
"message" => "And this is commit 10 Merge branch 'topic'"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capillary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marius Mathiesen
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- README
|
83
83
|
- Rakefile
|
84
84
|
- bin/capillary
|
85
|
+
- capillary.gemspec
|
85
86
|
- lib/capillary.rb
|
86
87
|
- lib/capillary/commit.rb
|
87
88
|
- lib/capillary/log_parser.rb
|