git.rb 0.14.0 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9384ea9ff7a0b15bc14560e44361c2e7623bb41de51603ed4e841e99bf1ac4e4
4
- data.tar.gz: 7ec3f96ffe3c518043b7d7f9bc49d1f74a5ce107bced7ee7a8743c81fb552b0b
3
+ metadata.gz: 511701d18690f97859f52fa405f8e570fff9394fb2ddfbd1b40056ba279cabe7
4
+ data.tar.gz: 3d12a68af103f82c3d3fa924687a6bd26a9fa0510fc4de6f0195ed45e90b2c8a
5
5
  SHA512:
6
- metadata.gz: 1c7bdb144d90f5b35670fcc7f507b78dd36268d12c7876d5e7ccd6466d842a73a12ac6df6c550f6b586f42d8a53d16a4c7c8fe49777482b2f32581b8e3db44a0
7
- data.tar.gz: 2d1bfdd796552b533f90dcbda5e46b150db147f696c15bb496ec8dd8328267893110506f1e63a32b7ec2753f9f3a5e2a002b50d5c888947e96893bea39216a07
6
+ metadata.gz: 6f8bed8621c8b8cc1098eeae14703514377079cd92f7479ac0f40460412dbfa4f835245ff6dee8c1ebde7d0126cbb41c92338429482a27cad0c4166d5f7fb9d0
7
+ data.tar.gz: 01716cffa50628740a9e90a09b41ac0d060ad5fd4aba2d151193337572c7aad076c0c97a6ed8e3c90e8a054e9b0c9603ed1c50e2be5b9648d558844198283291
@@ -0,0 +1,7 @@
1
+ # Array/all_but_first.rb
2
+ # Array#all_but_first
3
+
4
+ # 20180804
5
+ # 0.1.0 (The same version number as the current version of Thoran/Array/AllButFirst.)
6
+
7
+ require 'Thoran/Array/AllButFirst/all_but_first'
@@ -0,0 +1,7 @@
1
+ # Array/all_but_last.rb
2
+ # Array#all_but_last
3
+
4
+ # 20180804
5
+ # 0.1.0 (The same version number as the current version of Thoran/Array/AllButLast.)
6
+
7
+ require 'Thoran/Array/AllButLast/all_but_last'
data/lib/Git/VERSION.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
 
3
- VERSION = '0.14.0'
3
+ VERSION = '0.14.1'
4
4
 
5
5
  end
@@ -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.0
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: 2022-05-27 00:00:00.000000000 Z
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.2.22
82
+ rubygems_version: 3.4.14
77
83
  signing_key:
78
84
  specification_version: 4
79
85
  summary: Do git stuff from Ruby.
File without changes