ordserve 0.1.0 → 0.1.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/README.md +2 -2
- data/lib/ordserve/service.rb +4 -12
- data/lib/ordserve/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: 6b1c0696f730488ccc4412f9ee11f56d43f3de0754065f4807a3b259493ad427
|
4
|
+
data.tar.gz: 2d4d8cbedb53e238a2ed7232af00bda1b5d445af33360a0f16c59cb1644793da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f15223c7b1e88ae006344ae015213c69679a96514356eaffcd1e4658840b3a99031d0d7b0a6039a456eb555741716b99c784ea4d798484bece35c53e84b9f98
|
7
|
+
data.tar.gz: 4996fbada5be1b46079526abaa418ebeb9cb9d9ea11427a32fb5be4eed1d75d8c33650d62a6a19ea83835515565f0ad1dd490100f25708933ee43d26c573ea24
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -40,7 +40,7 @@ bandana ([inscribe no. 11627632](https://ordinals.com/inscription/a6b4b81f69e8c2
|
|
40
40
|
</svg>
|
41
41
|
```
|
42
42
|
|
43
|
-
Now try <http://localhost:3000/
|
43
|
+
Now try <http://localhost:3000/punk1.svg> and
|
44
44
|
you get the million dollar alien with bandana built from zero / scratch.
|
45
45
|
The two recursions (referenced via `/content/:id`) will get
|
46
46
|
the first-time "automagically" downloaded via the ordinals.com api
|
@@ -65,7 +65,7 @@ laser eyes ([inscribe no. 12359718](https://ordinals.com/inscription/72fe7ebda80
|
|
65
65
|
</svg>
|
66
66
|
```
|
67
67
|
|
68
|
-
Now try <http://localhost:3000/
|
68
|
+
Now try <http://localhost:3000/punk1a.svg> and
|
69
69
|
you get an ultra-rare never-before-seen alien with cap foward
|
70
70
|
and laser eyes built from zero / scratch.
|
71
71
|
The three recursions (referenced via `/content/:id`) will get
|
data/lib/ordserve/service.rb
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
# todo/check: find a better name?
|
3
3
|
class Ordserve < Sinatra::Base
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
set :public_folder, Dir.pwd ## use current working directory
|
6
|
+
set :static, true
|
7
7
|
|
8
8
|
get '/' do
|
9
9
|
erb :index
|
@@ -15,7 +15,7 @@ class Ordserve < Sinatra::Base
|
|
15
15
|
|
16
16
|
path = "#{Ordinals::Module::Ordserve.root}/samples/#{name}.svg"
|
17
17
|
|
18
|
-
blob =
|
18
|
+
blob = read_blob( path )
|
19
19
|
puts " #{blob.size} byte(s)"
|
20
20
|
blob
|
21
21
|
end
|
@@ -28,20 +28,12 @@ class Ordserve < Sinatra::Base
|
|
28
28
|
puts " serving local content blob >#{path}<..."
|
29
29
|
headers( 'Content-Type' => "application/octet-stream" )
|
30
30
|
|
31
|
-
blob =
|
31
|
+
blob = read_blob( path )
|
32
32
|
puts " #{blob.size} byte(s)"
|
33
33
|
blob
|
34
34
|
else
|
35
35
|
## download first
|
36
36
|
content = Ordinals.content( id )
|
37
|
-
## pp content
|
38
|
-
#=> #<Ordinals::Api::Content:0x000001a1352df938
|
39
|
-
# @data="RIFF\xF8\v\x00\x00WEBPVP8 \xEC\v\x00\x00...",
|
40
|
-
# @length=3072,
|
41
|
-
# @type="image/png"
|
42
|
-
|
43
|
-
## puts "data:"
|
44
|
-
## puts content.data
|
45
37
|
write_blob( path, content.data )
|
46
38
|
content.data
|
47
39
|
end
|
data/lib/ordserve/version.rb
CHANGED