plus2_version 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/plus2_version/version.rb +1 -1
- data/lib/plus2_version/version_finder.rb +20 -4
- metadata +4 -4
@@ -1,7 +1,6 @@
|
|
1
1
|
module Plus2Version
|
2
2
|
class VersionFinder
|
3
3
|
class << self
|
4
|
-
|
5
4
|
def as_hash
|
6
5
|
{
|
7
6
|
:log => git('log HEAD^.. --shortstat --no-color --decorate').split("\n")
|
@@ -20,9 +19,26 @@ module Plus2Version
|
|
20
19
|
}
|
21
20
|
end
|
22
21
|
end
|
23
|
-
end
|
24
22
|
|
25
|
-
|
26
|
-
|
23
|
+
def snapshots
|
24
|
+
@snapshots ||= Hash.new {|h,k| h[k] = {} }
|
25
|
+
end
|
26
|
+
|
27
|
+
def snapshot_version(name)
|
28
|
+
name = name.to_s
|
29
|
+
snapshots[name] = {
|
30
|
+
:sha => sha,
|
31
|
+
:log => as_hash
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def sha_at(name)
|
36
|
+
snapshots[name.to_s][:sha]
|
37
|
+
end
|
38
|
+
|
39
|
+
def log_at(name)
|
40
|
+
snapshots[name.to_s][:log]
|
41
|
+
end
|
42
|
+
end
|
27
43
|
end
|
28
44
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plus2_version
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Lachie Cox
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-08 00:00:00 +11:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|