strict-data-uri 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/README.md +22 -10
- data/lib/strict/data/uri/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ded663b1e65780a930ccc7c0854ea00c6a3a28ca1bc73427d4f1f474593975a
|
4
|
+
data.tar.gz: 4a5c7fa06914fc9189c3b935f2dae4319a58e866a83c26da37bbbc1f66389863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97368d76356937d44ed01d6f8e32b19f191a5731d12936893ad20b5df709628cde328f7c86ceb6ff7ef8d6448572f3f0d506b1bb3d9a67e516e7a14bfc5a4529
|
7
|
+
data.tar.gz: 7ca778110dc3f2069b9f7c41fc9b43ad59e7d91fdd8ba02139167b855d11f066112e1138a182578677a2d583cd63fe08ff89603dfae0dd4c19105aed5d156f34
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Strict::Data::Uri
|
2
2
|
|
3
|
-
|
3
|
+
This en- and decodes data URIs.
|
4
4
|
|
5
|
-
|
5
|
+
This was inspired by [data-uri](https://rubygems.org/gems/data-uri).
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -14,21 +14,33 @@ gem 'strict-data-uri'
|
|
14
14
|
|
15
15
|
And then execute:
|
16
16
|
|
17
|
-
|
17
|
+
```bash
|
18
|
+
bundle install
|
19
|
+
```
|
18
20
|
|
19
|
-
|
21
|
+
## Usage
|
20
22
|
|
21
|
-
|
23
|
+
Encode a string into a data URI:
|
22
24
|
|
23
|
-
|
25
|
+
```ruby
|
26
|
+
Strict::Data::Uri.encode "string"
|
27
|
+
# => data:text/plain;base64,c3RyaW5n
|
28
|
+
```
|
24
29
|
|
25
|
-
|
30
|
+
Decode a data URI:
|
26
31
|
|
27
|
-
|
32
|
+
```ruby
|
33
|
+
Strict::Data::Uri.decode "data:text/plain;base64,c3RyaW5n"
|
34
|
+
# => string
|
35
|
+
```
|
28
36
|
|
29
|
-
|
37
|
+
## Testing
|
30
38
|
|
31
|
-
To
|
39
|
+
To run the tests:
|
40
|
+
|
41
|
+
```bash
|
42
|
+
bundle exec rake
|
43
|
+
```
|
32
44
|
|
33
45
|
## Contributing
|
34
46
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strict-data-uri
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emil Kampp
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.2.
|
56
|
+
rubygems_version: 3.2.32
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Strict Data-URI en/decoding
|