gibbler 0.10.0.pre.RC1 → 0.10.0
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/.gitignore +1 -1
- data/Gemfile +3 -1
- data/Gemfile.lock +55 -0
- data/README.md +88 -80
- data/VERSION.yml +2 -2
- data/gibbler.gemspec +22 -0
- data/lib/gibbler.rb +6 -3
- data/try/02_compat_try.rb +1 -10
- data/try/11_basic_try.rb +21 -14
- data/try/15_file_try.rb +8 -8
- metadata +22 -21
- data/sig/gibbler.rbs +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a479165cd2790400e7bb4df99cc331bca1d73395f27536b954eb4e3bcde107a
|
4
|
+
data.tar.gz: 0fcc8f318ac1601b153bd044363c42bb041d47a5500ba4dba81bd69dc103f286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 510027067dbf7f7bb9f16fca0ff92ba4fe796fd5ac7321823aa0b2e54954c9a6ddb919219f349ab912f47a78a737b19bb4fd10beddb57b0337748ae33938d353
|
7
|
+
data.tar.gz: 057167cfa60322508b366a7a5a5661f8325ab7821f7b6028a65d8cf0307ce6985f81654567bf688844ad3d0a0f834262bf92b98976698a33cb2d2dc718da6a6b
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
ast (2.4.2)
|
5
|
+
attic (1.0.0.pre.RC3)
|
6
|
+
rake (>= 13.0.6)
|
7
|
+
drydock (0.6.9)
|
8
|
+
json (2.7.2)
|
9
|
+
language_server-protocol (3.17.0.3)
|
10
|
+
parallel (1.24.0)
|
11
|
+
parser (3.3.0.5)
|
12
|
+
ast (~> 2.4.1)
|
13
|
+
racc
|
14
|
+
racc (1.7.3)
|
15
|
+
rainbow (3.1.1)
|
16
|
+
rake (13.2.0)
|
17
|
+
regexp_parser (2.9.0)
|
18
|
+
rexml (3.2.6)
|
19
|
+
rubocop (1.62.1)
|
20
|
+
json (~> 2.3)
|
21
|
+
language_server-protocol (>= 3.17.0)
|
22
|
+
parallel (~> 1.10)
|
23
|
+
parser (>= 3.3.0.2)
|
24
|
+
rainbow (>= 2.2.2, < 4.0)
|
25
|
+
regexp_parser (>= 1.8, < 3.0)
|
26
|
+
rexml (>= 3.2.5, < 4.0)
|
27
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
28
|
+
ruby-progressbar (~> 1.7)
|
29
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
30
|
+
rubocop-ast (1.31.2)
|
31
|
+
parser (>= 3.3.0.4)
|
32
|
+
ruby-progressbar (1.13.0)
|
33
|
+
storable (0.10.pre.RC1)
|
34
|
+
sysinfo (0.9.0.pre.RC1)
|
35
|
+
drydock (< 1.0)
|
36
|
+
storable (= 0.10.pre.RC1)
|
37
|
+
tryouts (2.2.0.pre.RC1)
|
38
|
+
sysinfo (= 0.9.0.pre.RC1)
|
39
|
+
unicode-display_width (2.5.0)
|
40
|
+
|
41
|
+
PLATFORMS
|
42
|
+
arm64-darwin-22
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
attic (>= 0.9.0.pre.rc2)
|
47
|
+
rake
|
48
|
+
rubocop
|
49
|
+
tryouts (= 2.2.0.pre.RC1)
|
50
|
+
|
51
|
+
RUBY VERSION
|
52
|
+
ruby 3.2.0p0
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
2.5.7
|
data/README.md
CHANGED
@@ -13,54 +13,59 @@ Check out [this post on RubyInside](http://www.rubyinside.com/gibbler-git-like-h
|
|
13
13
|
|
14
14
|
Install the gem and add to the application's Gemfile by executing:
|
15
15
|
|
16
|
-
|
16
|
+
```bash
|
17
|
+
$ bundle add gibbler
|
18
|
+
```
|
17
19
|
|
18
20
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
19
21
|
|
20
|
-
|
22
|
+
```bash
|
23
|
+
$ gem install gibbler
|
24
|
+
```
|
25
|
+
|
21
26
|
|
22
27
|
## Usage
|
23
28
|
|
24
29
|
### Example 1 -- Standalone Usage
|
25
30
|
|
26
31
|
```ruby
|
27
|
-
|
32
|
+
require 'gibbler'
|
28
33
|
|
29
|
-
|
30
|
-
|
34
|
+
g = Gibbler.new 'id', 1001 # => f4fb3796ababa3788d1bded8fdc589ab1ccb1c3d
|
35
|
+
g.base(36) # => sm71s7eam4hm5jlsuzlqkbuktwpe5h9
|
31
36
|
|
32
|
-
|
33
|
-
|
37
|
+
g == 'f4fb3796ababa3788d1bded8fdc589ab1ccb1c3d' # => true
|
38
|
+
g === 'f4fb379' # => true
|
34
39
|
```
|
35
40
|
|
36
41
|
### Example 2 -- Mixins Usage
|
37
42
|
|
38
43
|
```ruby
|
39
|
-
|
44
|
+
require 'gibbler/mixins'
|
40
45
|
|
41
|
-
|
42
|
-
|
46
|
+
"kimmy".gibbler # => c8027100ecc54945ab15ddac529230e38b1ba6a1
|
47
|
+
:kimmy.gibbler # => 52be7494a602d85ff5d8a8ab4ffe7f1b171587df
|
43
48
|
|
44
|
-
|
45
|
-
|
46
|
-
|
49
|
+
config = {}
|
50
|
+
config.gibbler # => 4fdcadc66a38feb9c57faf3c5a18d5e76a6d29bf
|
51
|
+
config.gibbled? # => false
|
47
52
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
53
|
+
config[:server] = {
|
54
|
+
:users => [:dave, :ali],
|
55
|
+
:ports => [22, 80, 443]
|
56
|
+
}
|
57
|
+
config.gibbled? # => true
|
58
|
+
config.gibbler # => ef23d605f8c4fc80a8e580f9a0e8dab8426454a8
|
54
59
|
|
55
|
-
|
60
|
+
config[:server][:users] << :yanni
|
56
61
|
|
57
|
-
|
62
|
+
config.gibbler # => 4c558a56bc2abf5f8a845a69e47ceb5e0003683f
|
58
63
|
|
59
|
-
|
64
|
+
config.gibbler.short # => 4c558a56
|
60
65
|
|
61
|
-
|
66
|
+
config.gibbler.base36 # => 8x00l83jov4j80i9vfzpaxr9jag23wf
|
62
67
|
|
63
|
-
|
68
|
+
config.gibbler.base36.short # => 8x00l83j
|
64
69
|
```
|
65
70
|
|
66
71
|
### Example 3 -- Object History
|
@@ -68,33 +73,33 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
68
73
|
Gibbler can also keep track of the history of changes to an object. By default Gibbler supports history for Hash, Array, and String objects. The `gibbler_commit` method creates a clone of the current object and stores in an instance variable using the current hash digest as the key.
|
69
74
|
|
70
75
|
```ruby
|
71
|
-
|
72
|
-
|
76
|
+
require 'gibbler/mixins'
|
77
|
+
require 'gibbler/history'
|
73
78
|
|
74
|
-
|
75
|
-
|
79
|
+
a = { :magic => :original }
|
80
|
+
a.gibbler_commit # => d7049916ddb25e6cc438b1028fb957e5139f9910
|
76
81
|
|
77
|
-
|
78
|
-
|
82
|
+
a[:magic] = :updated
|
83
|
+
a.gibbler_commit # => b668098e16d08898532bf3aa33ce2253a3a4150e
|
79
84
|
|
80
|
-
|
81
|
-
|
85
|
+
a[:magic] = :changed
|
86
|
+
a.gibbler_commit # => 0b11c377fccd44554a601e5d2b135c46dc1c4cb1
|
82
87
|
|
83
|
-
|
88
|
+
a.gibbler_history # => d7049916, b668098e, 0b11c377
|
84
89
|
|
85
|
-
|
86
|
-
|
87
|
-
|
90
|
+
a.gibbler_revert! 'd7049916' # Return to a specific commit
|
91
|
+
a.gibbler # => d7049916ddb25e6cc438b1028fb957e5139f9910
|
92
|
+
a # => { :magic => :original }
|
88
93
|
|
89
|
-
|
94
|
+
a.delete :magic
|
90
95
|
|
91
|
-
|
92
|
-
|
93
|
-
|
96
|
+
a.gibbler_revert! # Return to the previous commit
|
97
|
+
a.gibbler # => 0b11c377fccd44554a601e5d2b135c46dc1c4cb1
|
98
|
+
a # => { :magic => :changed }
|
94
99
|
|
95
100
|
|
96
|
-
|
97
|
-
|
101
|
+
a.gibbler_object 'b668098e' # => { :magic => :updated }
|
102
|
+
a.gibbler_stamp # => 2009-07-01 18:56:52 -0400
|
98
103
|
```
|
99
104
|
|
100
105
|

|
@@ -105,18 +110,21 @@ Gibbler can also keep track of the history of changes to an object. By default G
|
|
105
110
|
If you have control over the namespaces of your objects, you can use the method aliases to tighten up your code a bit. The "gibbler" and "gibbled?" methods can be accessed via "digest" and "changed?", respectively. (The reason they're not enabled by default is to avoid conflicts.)
|
106
111
|
|
107
112
|
```ruby
|
108
|
-
|
113
|
+
require 'gibbler/aliases'
|
109
114
|
|
110
|
-
|
111
|
-
|
115
|
+
"kimmy".digest # => c8027100ecc54945ab15ddac529230e38b1ba6a1
|
116
|
+
:kimmy.digest # => 52be7494a602d85ff5d8a8ab4ffe7f1b171587df
|
112
117
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
118
|
+
a = [:a, :b, :c]
|
119
|
+
a.digest # => e554061823b8f06367555d1ee4c25b4ffee61944
|
120
|
+
a << :d
|
121
|
+
a.changed? # => true
|
122
|
+
```
|
117
123
|
|
118
124
|
The history methods also have aliases which remove the "gibbler_" prefix.
|
119
125
|
|
126
|
+
|
127
|
+
```ruby
|
120
128
|
require 'gibbler/aliases'
|
121
129
|
require 'gibbler/history'
|
122
130
|
|
@@ -132,36 +140,36 @@ The history methods also have aliases which remove the "gibbler_" prefix.
|
|
132
140
|
By default Gibbler creates SHA1 hashes. You can change this globally or per instance.
|
133
141
|
|
134
142
|
```ruby
|
135
|
-
|
143
|
+
require 'gibbler/mixins'
|
136
144
|
|
137
|
-
|
145
|
+
Gibbler.digest_type = Digest::MD5
|
138
146
|
|
139
|
-
|
147
|
+
:kimmy.gibbler # => 0c61ff17f46223f355759934154d5dcb
|
140
148
|
|
141
|
-
|
149
|
+
:kimmy.gibbler(Digest::SHA1) # => 52be7494a602d85ff5d8a8ab4ffe7f1b171587df
|
142
150
|
```
|
143
151
|
|
144
152
|
In Jruby, you can grab the digest types from the openssl library.
|
145
153
|
|
146
154
|
```ruby
|
147
|
-
|
155
|
+
require 'openssl'
|
148
156
|
|
149
|
-
|
157
|
+
Gibbler.digest_type = OpenSSL::Digest::SHA256
|
150
158
|
|
151
|
-
|
159
|
+
:kimmy.gibbler # => 1069428e6273cf329436c3dce9b680d4d4e229d7b7...
|
152
160
|
```
|
153
161
|
|
154
162
|
### Example 6 -- All your base
|
155
163
|
|
156
164
|
```ruby
|
157
|
-
|
165
|
+
require 'gibbler/mixins'
|
158
166
|
|
159
|
-
|
160
|
-
|
161
|
-
|
167
|
+
:kimmy.gibbler # => 52be7494a602d85ff5d8a8ab4ffe7f1b171587df
|
168
|
+
:kimmy.gibbler.base(16) # => 52be7494a602d85ff5d8a8ab4ffe7f1b171587df
|
169
|
+
:kimmy.gibbler.base(36) # => 9nydr6mpv6w4k8ngo3jtx0jz1n97h7j
|
162
170
|
|
163
|
-
|
164
|
-
|
171
|
+
:kimmy.gibbler.base(10) # => 472384540402900668368761869477227308873774630879
|
172
|
+
:kimmy.gibbler.to_i # => 472384540402900668368761869477227308873774630879
|
165
173
|
```
|
166
174
|
|
167
175
|
### Example 7 -- Global secret
|
@@ -169,13 +177,13 @@ In Jruby, you can grab the digest types from the openssl library.
|
|
169
177
|
Gibbler can prepend all digest inputs with a global secret. You can set this once per project to ensure your project's digests are unique.
|
170
178
|
|
171
179
|
```ruby
|
172
|
-
|
180
|
+
require 'gibbler/mixins'
|
173
181
|
|
174
|
-
|
182
|
+
:kimmy.gibbler # => 52be7494a602d85ff5d8a8ab4ffe7f1b171587df
|
175
183
|
|
176
|
-
|
184
|
+
Gibbler.secret = "sUp0r5ekRu7"
|
177
185
|
|
178
|
-
|
186
|
+
:kimmy.gibbler # => 6c5f5aff4d809cec7e7da091214a35a2698489f8
|
179
187
|
```
|
180
188
|
|
181
189
|
### Supported Classes
|
@@ -183,16 +191,16 @@ Gibbler can prepend all digest inputs with a global secret. You can set this onc
|
|
183
191
|
Gibbler methods are available only to the classes which explicitly include them [see docs'(https://delanotes.com/gibbler) for details on which classes are supported by default). You can also extend custom objects:
|
184
192
|
|
185
193
|
```ruby
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
194
|
+
class FullHouse
|
195
|
+
include Gibbler::Complex
|
196
|
+
attr_accessor :roles
|
197
|
+
end
|
190
198
|
|
191
|
-
|
192
|
-
|
199
|
+
a = FullHouse.new
|
200
|
+
a.gibbler # => 4192d4cb59975813f117a51dcd4454ac16df6703
|
193
201
|
|
194
|
-
|
195
|
-
|
202
|
+
a.roles = [:jesse, :joey, :danny, :kimmy, :michelle, :dj, :stephanie]
|
203
|
+
a.gibbler # => 6ea546919dc4caa2bab69799b71d48810a1b48fa
|
196
204
|
```
|
197
205
|
|
198
206
|
`Gibbler::Complex` creates a digest based on the name of the class and the names and values of the instance variables. See the RDocs[http://delano.github.com/gibbler] for other Gibbler::* types.
|
@@ -200,9 +208,9 @@ Gibbler methods are available only to the classes which explicitly include them
|
|
200
208
|
If you want to support all Ruby objects, add the following to your application:
|
201
209
|
|
202
210
|
```ruby
|
203
|
-
|
204
|
-
|
205
|
-
|
211
|
+
class Object
|
212
|
+
include Gibbler::String
|
213
|
+
end
|
206
214
|
```
|
207
215
|
|
208
216
|
`Gibbler::String` creates a digest based on the name of the class and the output of the to_s method. This is a reasonable default for most objects however any object that includes the object address in to_s (e.g. "Object:0x0x4ac9f0...") will produce unreliable digests (because the address can change).
|
@@ -237,13 +245,13 @@ Bug reports and pull requests are welcome [GitHub Issues](https://github.com/del
|
|
237
245
|
* Kalin Harvey ([krrh](https://github.com/kalin)) for the early feedback and artistic direction.
|
238
246
|
* Alex Peuchert ([aaalex](https://github.com/aaalex)) for creating the screencast.
|
239
247
|
|
248
|
+
* Andrea Barber
|
249
|
+
|
250
|
+
|
240
251
|
## Code of Conduct
|
241
252
|
|
242
253
|
Everyone interacting in the Gibbler project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/delano/gibbler/blob/main/CODE_OF_CONDUCT.md).
|
243
254
|
|
244
|
-
## Credits
|
245
|
-
|
246
|
-
Gibbler was created by [Delano Mandelbaum](https://delanotes.com/).
|
247
255
|
|
248
256
|
## License
|
249
257
|
|
data/VERSION.yml
CHANGED
data/gibbler.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "gibbler"
|
3
|
+
s.version = "0.10.0"
|
4
|
+
s.summary = "Git-like hashes for Ruby objects"
|
5
|
+
s.description = "About Gibbler: Git-like hashes for Ruby objects"
|
6
|
+
s.authors = ["Delano Mandelbaum"]
|
7
|
+
s.email = "gems@solutious.com"
|
8
|
+
s.homepage = "https://github.com/delano/gibbler"
|
9
|
+
s.license = "MIT"
|
10
|
+
|
11
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
12
|
+
s.bindir = "exe"
|
13
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
14
|
+
s.require_paths = ["lib"]
|
15
|
+
|
16
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.6.8")
|
17
|
+
|
18
|
+
s.add_dependency "rake", "~> 13.0"
|
19
|
+
|
20
|
+
s.add_development_dependency "rubocop", "~> 1.0"
|
21
|
+
s.add_development_dependency "tryouts", "~> 2.2"
|
22
|
+
end
|
data/lib/gibbler.rb
CHANGED
@@ -3,10 +3,12 @@
|
|
3
3
|
unless defined?(GIBBLER_LIB_HOME)
|
4
4
|
GIBBLER_LIB_HOME = File.expand_path File.dirname(__FILE__)
|
5
5
|
end
|
6
|
+
|
7
|
+
require 'attic'
|
6
8
|
require 'digest/sha1'
|
7
9
|
|
8
10
|
|
9
|
-
|
11
|
+
# = Gibbler
|
10
12
|
#
|
11
13
|
# "Hola, Tanneritos"
|
12
14
|
#
|
@@ -146,8 +148,9 @@ class Gibbler < String
|
|
146
148
|
def gibbler(digest_type=nil)
|
147
149
|
#gibbler_debug caller[0]
|
148
150
|
gibbler_debug :GIBBLER, self.class, self
|
149
|
-
|
150
|
-
self.gibbler_cache =
|
151
|
+
ret = Gibbler::Digest.new self.__gibbler(digest_type)
|
152
|
+
self.gibbler_cache = ret unless self.frozen?
|
153
|
+
ret
|
151
154
|
end
|
152
155
|
|
153
156
|
# Has this object been modified?
|
data/try/02_compat_try.rb
CHANGED
@@ -1,14 +1,5 @@
|
|
1
|
-
|
1
|
+
require_relative '../lib/gibbler/mixins'
|
2
2
|
|
3
3
|
## Gibbler Objects have gibbler_cache method
|
4
4
|
"kimmy".respond_to? :gibbler_cache
|
5
5
|
#=> true
|
6
|
-
|
7
|
-
## Gibbler Objects have __gibbler_cache method
|
8
|
-
"kimmy".respond_to? :__gibbler_cache
|
9
|
-
#=> true
|
10
|
-
|
11
|
-
## __gibbler_cache returns the same value as gibbler_cache
|
12
|
-
@a = "kimmy" and @a.gibbler
|
13
|
-
@a.gibbler_cache
|
14
|
-
#=> @a.__gibbler_cache
|
data/try/11_basic_try.rb
CHANGED
@@ -41,15 +41,15 @@ require 'gibbler/mixins'
|
|
41
41
|
|
42
42
|
# Populated Hash instance
|
43
43
|
{ :a => [1,2,3, [4,5,6]], :b => { :c => Class } }.gibbler
|
44
|
-
#=> "
|
44
|
+
#=> "8faca3e967c94fe996fac1b5a5f595ef77e10df4"
|
45
45
|
|
46
46
|
# Empty Array instance
|
47
47
|
Array.gibbler
|
48
|
-
#=> '
|
48
|
+
#=> '83c4994bb01eefc06aa267aa99aa12b55696616e'
|
49
49
|
|
50
50
|
# Populated Array instance
|
51
51
|
[1, 2, :runtime, [3, "four", [Object, true]]].gibbler
|
52
|
-
#=> "
|
52
|
+
#=> "067c28147176992b95b9301817846abc85cbd7e4"
|
53
53
|
|
54
54
|
# Knows when a Hash has not changed
|
55
55
|
a = { :magic => true }
|
@@ -65,20 +65,27 @@ require 'gibbler/mixins'
|
|
65
65
|
a.gibbled?
|
66
66
|
#=> true
|
67
67
|
|
68
|
-
# Two Symbol digests don't cross streams
|
69
|
-
a, b = :something, :anything
|
70
|
-
a.gibbler
|
71
|
-
b.gibbler
|
72
|
-
[a.gibbler_cache.short, b.gibbler_cache.short]
|
73
|
-
#=> ["667ce086", "92d5f7cd"]
|
74
|
-
|
75
68
|
# Two String digests don't cross streams"
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
69
|
+
a, b = 'something', 'anything'
|
70
|
+
a.gibbler
|
71
|
+
b.gibbler
|
72
|
+
[a.gibbler_cache.short, b.gibbler_cache.short]
|
80
73
|
#=> ["ce0c7694", "c13b2f02"]
|
81
74
|
|
75
|
+
# Strings aren't inherently "frozen" so their gibbler cache
|
76
|
+
# values are primed after running gibbler the first time.
|
77
|
+
a = 'something'
|
78
|
+
a.gibbler
|
79
|
+
[a.frozen?, a.gibbler_cache]
|
80
|
+
#=> [false, "ce0c7694"]
|
81
|
+
|
82
|
+
# Symbols are inherently "frozen" so their gibbler cache
|
83
|
+
# values are never populated.
|
84
|
+
a = :something
|
85
|
+
a.gibbler
|
86
|
+
[a.frozen?, a.gibbler_cache]
|
87
|
+
#=> [true, nil]
|
88
|
+
|
82
89
|
## DISABLED: If gibbler/history is required, there will be an
|
83
90
|
## additional attic_var (:gibbler_history), but only if the
|
84
91
|
## gibbler_history method has been called already (the history
|
data/try/15_file_try.rb
CHANGED
@@ -2,15 +2,15 @@ require 'tempfile'
|
|
2
2
|
require 'gibbler/mixins'
|
3
3
|
|
4
4
|
@tempfile = "tryouts-9000-awesome.txt"
|
5
|
-
|
5
|
+
|
6
6
|
## File can gibbler
|
7
|
-
file = File.new(File.join('.', '
|
7
|
+
file = File.new(File.join('.', 'LICENSE.txt'))
|
8
8
|
file.gibbler
|
9
|
-
#=> 'c052e87bd0acb7e08c98dad7f8b09b4382a08ef6'
|
10
|
-
|
9
|
+
#=> 'c052e87bd0acb7e08c98dad7f8b09b4382a08ef6'
|
10
|
+
|
11
11
|
## Gibbler is different for each path
|
12
|
-
file1 = File.new(File.join('.', '
|
13
|
-
file2 = File.new(File.join('.', 'README.
|
12
|
+
file1 = File.new(File.join('.', 'LICENSE.txt'))
|
13
|
+
file2 = File.new(File.join('.', 'README.md'))
|
14
14
|
file1.gibbler == file2.gibbler
|
15
15
|
#=> false
|
16
16
|
|
@@ -30,7 +30,7 @@ require 'gibbler/mixins'
|
|
30
30
|
#=> '6d93f752fc23f36bffa5ddf9ee97d04be82efbdb'
|
31
31
|
|
32
32
|
## JRuby doesn't like to use File.new with directories
|
33
|
-
###=> '92cbcb7de73d7748b28d9e911f461013de34410f'
|
33
|
+
###=> '92cbcb7de73d7748b28d9e911f461013de34410f'
|
34
34
|
### "File gibbler cares about trailing slash (/tmp/)", File.new(__FILE__)
|
35
35
|
|
36
|
-
File.unlink @tempfile if File.
|
36
|
+
File.unlink @tempfile if File.exist? @tempfile
|
metadata
CHANGED
@@ -1,58 +1,58 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gibbler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.0
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delano Mandelbaum
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '13.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '13.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubocop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '1.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: tryouts
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.2
|
47
|
+
version: '2.2'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.2
|
55
|
-
description: '
|
54
|
+
version: '2.2'
|
55
|
+
description: 'About Gibbler: Git-like hashes for Ruby objects'
|
56
56
|
email: gems@solutious.com
|
57
57
|
executables: []
|
58
58
|
extensions: []
|
@@ -66,18 +66,19 @@ files:
|
|
66
66
|
- CHANGELOG.md
|
67
67
|
- CODE_OF_CONDUCT.md
|
68
68
|
- Gemfile
|
69
|
+
- Gemfile.lock
|
69
70
|
- LICENSE.txt
|
70
71
|
- README.md
|
71
72
|
- VERSION.yml
|
72
73
|
- bin/console
|
73
74
|
- bin/setup
|
75
|
+
- gibbler.gemspec
|
74
76
|
- img/whoababy.gif
|
75
77
|
- lib/gibbler.rb
|
76
78
|
- lib/gibbler/aliases.rb
|
77
79
|
- lib/gibbler/history.rb
|
78
80
|
- lib/gibbler/mixins.rb
|
79
81
|
- lib/gibbler/version.rb
|
80
|
-
- sig/gibbler.rbs
|
81
82
|
- try/01_core_ext_try.rb
|
82
83
|
- try/02_compat_try.rb
|
83
84
|
- try/05_gibbler_digest_try.rb
|
@@ -99,7 +100,7 @@ files:
|
|
99
100
|
- try/59_history_exceptions_try.rb
|
100
101
|
- try/80_performance_try.rb
|
101
102
|
- try/90_alias_try.rb
|
102
|
-
homepage:
|
103
|
+
homepage: https://github.com/delano/gibbler
|
103
104
|
licenses:
|
104
105
|
- MIT
|
105
106
|
metadata: {}
|
@@ -111,14 +112,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
112
|
requirements:
|
112
113
|
- - ">="
|
113
114
|
- !ruby/object:Gem::Version
|
114
|
-
version:
|
115
|
+
version: 2.6.8
|
115
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
117
|
requirements:
|
117
|
-
- - "
|
118
|
+
- - ">="
|
118
119
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
120
|
+
version: '0'
|
120
121
|
requirements: []
|
121
|
-
rubygems_version: 3.
|
122
|
+
rubygems_version: 3.4.12
|
122
123
|
signing_key:
|
123
124
|
specification_version: 4
|
124
125
|
summary: Git-like hashes for Ruby objects
|
data/sig/gibbler.rbs
DELETED