barf 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/barf.gemspec +1 -0
- data/lib/barf.rb +4 -4
- data/lib/barf/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7c208a39e1e1cbd5be435c9cd3ba3e3df1dea3d1e2957ebad7be33040575226
|
4
|
+
data.tar.gz: 57c6ae8ab04aa8554f9b8aac7795c9c651237a73c6c980dabf16d50dfd0a12a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f90f7241a8e99c168c180e437191ee68047ca76253704308833fd67c1ea9dcc8d033c1fba520ed967c9c64ee82f9888dd653a2c97806bfc4538a3ff3ca0a84c3
|
7
|
+
data.tar.gz: f50c1452bbdf4cf8440a23a656c120b85a7519813889706e9bb6b57abba29292b596536649d31a86979f93b16d49aa0d648b592fe686e55793ab2ae244f011f3
|
data/barf.gemspec
CHANGED
data/lib/barf.rb
CHANGED
@@ -2,6 +2,7 @@ require_relative "./barf/version"
|
|
2
2
|
|
3
3
|
require "mini_magick"
|
4
4
|
require "tco"
|
5
|
+
require "parallel"
|
5
6
|
|
6
7
|
module Barf
|
7
8
|
|
@@ -23,10 +24,9 @@ module Barf
|
|
23
24
|
|
24
25
|
# Two dimensional array of pixels:
|
25
26
|
image.get_pixels.each_slice(2) do |top, bottom|
|
26
|
-
out =
|
27
|
-
|
28
|
-
|
29
|
-
end
|
27
|
+
out = Parallel.map_with_index(top) do |pixel, index|
|
28
|
+
"\u2584".bg(pixel).fg(bottom[index])
|
29
|
+
end.join
|
30
30
|
puts out
|
31
31
|
end
|
32
32
|
return nil
|
data/lib/barf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jacob Duffy
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: parallel
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: tco
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|