rjgit 5.7.0.0 → 5.7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actor.rb +10 -3
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee1618ecf4d5b33793cda5f7f2d4a83af873e48167ae426f144cbb21177beab0
|
4
|
+
data.tar.gz: 95b32d3cbf4b5b85117986d1daa088180390d327b6503b9b042aa1055a00d20a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 268fecedf6964680fc7e94c8fa4b3f66333d556976c154a0db0bbbb8121ee9e23bae563c4493bab07ed798d09b7c57d677062d1a5d5561e56f0d4ab56a256eab
|
7
|
+
data.tar.gz: 00bfe427f864a3aa3854c5aac56b94d1067695dbd0bd6e2dcf8f7302ad6545bd6a55c0c656e6f897bd848a921be35545067ef328fcc577aa2010b7ff1c005c1f
|
data/lib/actor.rb
CHANGED
@@ -2,6 +2,7 @@ module RJGit
|
|
2
2
|
|
3
3
|
# PersonIdent in JGit
|
4
4
|
import 'org.eclipse.jgit.lib.PersonIdent'
|
5
|
+
import 'java.util.TimeZone'
|
5
6
|
|
6
7
|
class Actor
|
7
8
|
|
@@ -17,10 +18,11 @@ module RJGit
|
|
17
18
|
return self.new(name, email)
|
18
19
|
end
|
19
20
|
|
20
|
-
def initialize(name, email)
|
21
|
+
def initialize(name, email, time = nil)
|
21
22
|
@name = name
|
22
23
|
@email = email
|
23
|
-
@
|
24
|
+
@time = time
|
25
|
+
@person_ident = @time ? PersonIdent.new(name, email, time.to_java, TimeZone.getTimeZone(time.zone)) : PersonIdent.new(name, email)
|
24
26
|
end
|
25
27
|
|
26
28
|
# Create an Actor from a string.
|
@@ -43,7 +45,8 @@ module RJGit
|
|
43
45
|
# time - The Time the commit was authored or committed.
|
44
46
|
#
|
45
47
|
# Returns a String.
|
46
|
-
def output(time)
|
48
|
+
def output(time = nil)
|
49
|
+
time = time || self.time
|
47
50
|
offset = time.utc_offset / 60
|
48
51
|
"%s <%s> %d %+.2d%.2d" % [
|
49
52
|
@name,
|
@@ -52,6 +55,10 @@ module RJGit
|
|
52
55
|
offset / 60,
|
53
56
|
offset.abs % 60]
|
54
57
|
end
|
58
|
+
|
59
|
+
def time
|
60
|
+
Time.at(@person_ident.getWhen.getTime/1000)
|
61
|
+
end
|
55
62
|
|
56
63
|
end
|
57
64
|
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rjgit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.7.0.
|
4
|
+
version: 5.7.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maarten Engelen
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2020-
|
15
|
+
date: 2020-04-29 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|