git.rb 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/Array/all_but_first.rb +7 -0
- data/lib/Array/all_but_last.rb +7 -0
- data/lib/Git/VERSION.rb +1 -1
- data/lib/Thoran/Array/AllButFirst/all_but_first.rb +28 -0
- data/lib/Thoran/Array/AllButLast/all_but_last.rb +28 -0
- data/lib/Thoran/Array/FirstX/firstX.rb +32 -0
- data/lib/Thoran/Array/LastX/lastX.rb +33 -0
- metadata +10 -4
- /data/lib/{git.rb → Git.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 511701d18690f97859f52fa405f8e570fff9394fb2ddfbd1b40056ba279cabe7
|
4
|
+
data.tar.gz: 3d12a68af103f82c3d3fa924687a6bd26a9fa0510fc4de6f0195ed45e90b2c8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f8bed8621c8b8cc1098eeae14703514377079cd92f7479ac0f40460412dbfa4f835245ff6dee8c1ebde7d0126cbb41c92338429482a27cad0c4166d5f7fb9d0
|
7
|
+
data.tar.gz: 01716cffa50628740a9e90a09b41ac0d060ad5fd4aba2d151193337572c7aad076c0c97a6ed8e3c90e8a054e9b0c9603ed1c50e2be5b9648d558844198283291
|
data/lib/Git/VERSION.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
# Thoran/Array/AllButFirst/all_but_first.rb
|
2
|
+
# Thoran::Array::AllButFirst#all_but_first
|
3
|
+
|
4
|
+
# 20141223
|
5
|
+
# 0.1.0
|
6
|
+
|
7
|
+
# Description: This returns a copy of the receiving array with the first element removed.
|
8
|
+
|
9
|
+
# Changes:
|
10
|
+
# 1. + Thoran namespace.
|
11
|
+
|
12
|
+
require 'Thoran/Array/FirstX/firstX'
|
13
|
+
|
14
|
+
module Thoran
|
15
|
+
module Array
|
16
|
+
module AllButFirst
|
17
|
+
|
18
|
+
def all_but_first
|
19
|
+
d = self.dup
|
20
|
+
d.first!
|
21
|
+
d
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
Array.send(:include, Thoran::Array::AllButFirst)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Thoran/Array/AllButLast/all_but_last.rb
|
2
|
+
# Thoran::Array::AllButLast#all_but_last
|
3
|
+
|
4
|
+
# 20180804
|
5
|
+
# 0.1.0
|
6
|
+
|
7
|
+
# Description: This returns a copy of the receiving array with the last element removed.
|
8
|
+
|
9
|
+
# Changes:
|
10
|
+
# 1. + Thoran namespace.
|
11
|
+
|
12
|
+
require 'Thoran/Array/LastX/lastX'
|
13
|
+
|
14
|
+
module Thoran
|
15
|
+
module Array
|
16
|
+
module AllButLast
|
17
|
+
|
18
|
+
def all_but_last
|
19
|
+
d = self.dup
|
20
|
+
d.last!
|
21
|
+
d
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
Array.send(:include, Thoran::Array::AllButLast)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# Thoran/Array/FirstX/firstX.rb
|
2
|
+
# Thoran::Array::FirstX#first!
|
3
|
+
|
4
|
+
# 20180804
|
5
|
+
# 0.3.3
|
6
|
+
|
7
|
+
# Description: Sometimes it makes more sense to treat arrays this way.
|
8
|
+
|
9
|
+
# Changes since 0.2:
|
10
|
+
# 1. Added the original version 0.1.0 of the implementation to the later 0.1.0!
|
11
|
+
# 0/1
|
12
|
+
# 2. Switched the tests to spec-style.
|
13
|
+
# 1/2
|
14
|
+
# 3. Added a test for the state of the array afterward, since this is meant to be an in place change.
|
15
|
+
# 2/3
|
16
|
+
# 4. Added tests for the extended functionality introduced in the first version 0.1.0.
|
17
|
+
|
18
|
+
module Thoran
|
19
|
+
module Array
|
20
|
+
module FirstX
|
21
|
+
|
22
|
+
def first!(n = 1)
|
23
|
+
return_value = []
|
24
|
+
n.times{return_value << self.shift}
|
25
|
+
return_value.size == 1 ? return_value[0] : return_value
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Array.send(:include, Thoran::Array::FirstX)
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Thoran/Array/LastX/lastX.rb
|
2
|
+
# Thoran::Array::LastX#last!
|
3
|
+
|
4
|
+
# 20180804
|
5
|
+
# 0.2.3
|
6
|
+
|
7
|
+
# Description: Sometimes it makes more sense to treat arrays this way.
|
8
|
+
|
9
|
+
# Changes since 0.1:
|
10
|
+
# 1. Added the complement of the extended version of Array#first!.
|
11
|
+
# 0/1
|
12
|
+
# 2. Switched the tests to spec-style.
|
13
|
+
# 1/2
|
14
|
+
# 3. Added a test for the state of the array afterward, since this is meant to be an in place change.
|
15
|
+
# 2/3
|
16
|
+
# 4. Added tests for the extended functionality introduced in the first version 0.1.0.
|
17
|
+
# 5. Fixed the implementation, so that the order is retained by unshifting the popped values rather than appending the shifted values as is the case with Array#first!.
|
18
|
+
|
19
|
+
module Thoran
|
20
|
+
module Array
|
21
|
+
module LastX
|
22
|
+
|
23
|
+
def last!(n = 1)
|
24
|
+
return_value = []
|
25
|
+
n.times{return_value.unshift(self.pop)}
|
26
|
+
return_value.size == 1 ? return_value[0] : return_value
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
Array.send(:include, Thoran::Array::LastX)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -44,6 +44,9 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
+
- lib/Array/all_but_first.rb
|
48
|
+
- lib/Array/all_but_last.rb
|
49
|
+
- lib/Git.rb
|
47
50
|
- lib/Git/Blame.rb
|
48
51
|
- lib/Git/Branch.rb
|
49
52
|
- lib/Git/Log.rb
|
@@ -52,8 +55,11 @@ files:
|
|
52
55
|
- lib/Ordinal.rb
|
53
56
|
- lib/Ordinal/Array.rb
|
54
57
|
- lib/String/capture.rb
|
58
|
+
- lib/Thoran/Array/AllButFirst/all_but_first.rb
|
59
|
+
- lib/Thoran/Array/AllButLast/all_but_last.rb
|
60
|
+
- lib/Thoran/Array/FirstX/firstX.rb
|
61
|
+
- lib/Thoran/Array/LastX/lastX.rb
|
55
62
|
- lib/Thoran/String/Capture/capture.rb
|
56
|
-
- lib/git.rb
|
57
63
|
homepage: http://github.com/thoran/git.rb
|
58
64
|
licenses:
|
59
65
|
- MIT
|
@@ -73,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
79
|
- !ruby/object:Gem::Version
|
74
80
|
version: '0'
|
75
81
|
requirements: []
|
76
|
-
rubygems_version: 3.
|
82
|
+
rubygems_version: 3.4.14
|
77
83
|
signing_key:
|
78
84
|
specification_version: 4
|
79
85
|
summary: Do git stuff from Ruby.
|
/data/lib/{git.rb → Git.rb}
RENAMED
File without changes
|