lilimg 0.1.0 → 0.2.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/ext/lilimg/lilimg.c +1 -1
- data/lilimg.gemspec +1 -1
- data/spec/lilimg_spec.rb +22 -0
- data/spec/spec_helper.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 900d7bd9c19efc86e18ee14f04c0085672a9f79e
|
4
|
+
data.tar.gz: ac8f159eb6161af5dc5032633462168d8a11a665
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63decb5a032f645892ff836208f5a0d8f51b18e93bf64cb994e5392832c17d2ada038efc950581a999f740f4215836911679fab31fb046e4ec7793dc6eea6ea9
|
7
|
+
data.tar.gz: 3d64f2099dc8a9b8f99d9c815992f030d352118c553eabf865e1680bd47b79fa769feb438ac7c0f765f6d12c03e2573f2397dc5b9e7a90866a340b2a6b0bfc88
|
data/ext/lilimg/lilimg.c
CHANGED
data/lilimg.gemspec
CHANGED
data/spec/lilimg_spec.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
$VERBOSE = '1'
|
2
|
+
require_relative('../ext/lilimg/lilimg.so')
|
3
|
+
|
4
|
+
describe 'Lilimg' do
|
5
|
+
|
6
|
+
it 'works in threads' do
|
7
|
+
threads = 10.times.map do
|
8
|
+
jpeg = IO.read('./example/label.jpg')
|
9
|
+
Thread.new do
|
10
|
+
# check for JPEG header
|
11
|
+
expect(jpeg[0]).to eql("\xFF")
|
12
|
+
expect(jpeg[1]).to eql("\xD8")
|
13
|
+
# convert to GIF
|
14
|
+
gif = Lilimg.jpeg_to_gif(jpeg, 4)
|
15
|
+
expect(gif.to_s[0..3]).to eql("GIF8")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
# puts "Waiting for processes to finish"
|
19
|
+
threads.each(&:join)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
spec_helper.rb
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lilimg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Pollak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -30,6 +30,8 @@ files:
|
|
30
30
|
- ext/lilimg/nanojpeg.h
|
31
31
|
- lib/lilimg.rb
|
32
32
|
- lilimg.gemspec
|
33
|
+
- spec/lilimg_spec.rb
|
34
|
+
- spec/spec_helper.rb
|
33
35
|
homepage: https://github.com/tomas/lilimg
|
34
36
|
licenses: []
|
35
37
|
metadata: {}
|