ordinals 1.2.0 → 1.2.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/CHANGELOG.md +1 -1
- data/lib/ordinals/cache.rb +0 -5
- data/lib/ordinals/sandbox.rb +1 -6
- data/lib/ordinals/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 689dcb72a0c9c4a381e7389c99651c31373391ebc52ff342c2ab523778717fda
|
|
4
|
+
data.tar.gz: 1f444088a912221cedfcf2b1a13c8473ef666d68e2580f90c3e154ebe0334611
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1624715a985b048b9223029e2fde16dbc8f3cb7fc3ffb401058dcfb20b8db072669b8a37784b62664f68e0adbe81711b375d3ebf8e28cd3bf4dc0ad53cda03f1
|
|
7
|
+
data.tar.gz: 7d29a44b6c4df9c76308fb4ce3daae7be30184e39d1ae18b714fc16143929d7ec3d5e16424040e3a0374460d78dee2d1987b5a8730158844df9d7878a870cbef
|
data/CHANGELOG.md
CHANGED
data/lib/ordinals/cache.rb
CHANGED
|
@@ -6,8 +6,6 @@ class Cache
|
|
|
6
6
|
def initialize( dir )
|
|
7
7
|
@dir = dir
|
|
8
8
|
@force = false
|
|
9
|
-
@delay_in_s = 0.5 ## wait 0.5s before next (possible) request
|
|
10
|
-
@requests = 0
|
|
11
9
|
end
|
|
12
10
|
|
|
13
11
|
|
|
@@ -56,7 +54,6 @@ def add( id )
|
|
|
56
54
|
print "."
|
|
57
55
|
else
|
|
58
56
|
print " meta-#{id} "
|
|
59
|
-
sleep( @delay_in_s ) if @delay_in_s && @requests > 0
|
|
60
57
|
|
|
61
58
|
## fetch and cache in cache
|
|
62
59
|
meta = Ordinals.inscription( id )
|
|
@@ -64,7 +61,6 @@ def add( id )
|
|
|
64
61
|
meta_txt = json_to_txt( meta )
|
|
65
62
|
|
|
66
63
|
write_text( meta_path, meta_txt )
|
|
67
|
-
@requests += 1
|
|
68
64
|
end
|
|
69
65
|
|
|
70
66
|
|
|
@@ -88,7 +84,6 @@ def add( id )
|
|
|
88
84
|
print "."
|
|
89
85
|
else
|
|
90
86
|
print " blob-#{id} "
|
|
91
|
-
sleep( @delay_in_s ) if @delay_in_s && @requests > 0
|
|
92
87
|
|
|
93
88
|
## note: save text as blob - byte-by-byte as is (might be corrupt text)
|
|
94
89
|
content = Ordinals.content( id )
|
data/lib/ordinals/sandbox.rb
CHANGED
|
@@ -5,8 +5,6 @@ class Sandbox
|
|
|
5
5
|
def initialize( dir='./content' )
|
|
6
6
|
@dir = dir
|
|
7
7
|
@force = false
|
|
8
|
-
@delay_in_s = 0.5 ## wait 0.5s before next (possible) request
|
|
9
|
-
@requests = 0
|
|
10
8
|
end
|
|
11
9
|
|
|
12
10
|
|
|
@@ -24,9 +22,7 @@ class Sandbox
|
|
|
24
22
|
path = "#{@dir}/#{id}"
|
|
25
23
|
if !@force && File.exist?( path )
|
|
26
24
|
## puts " in sandbox"
|
|
27
|
-
else
|
|
28
|
-
sleep( @delay_in_s ) if @delay_in_s && @requests > 0
|
|
29
|
-
|
|
25
|
+
else
|
|
30
26
|
## note: save text as blob - byte-by-byte as is (might be corrupt text)
|
|
31
27
|
content = Ordinals.content( id )
|
|
32
28
|
## pp content
|
|
@@ -38,7 +34,6 @@ class Sandbox
|
|
|
38
34
|
## puts "data:"
|
|
39
35
|
## puts content.data
|
|
40
36
|
write_blob( path, content.data )
|
|
41
|
-
@requests += 1
|
|
42
37
|
end
|
|
43
38
|
end
|
|
44
39
|
|
data/lib/ordinals/version.rb
CHANGED