imash 0.0.1 → 0.1.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 +8 -8
- data/imash.gemspec +1 -1
- data/lib/imash/generator.rb +3 -10
- data/lib/imash/hash_data.rb +1 -2
- data/lib/imash/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWZhNTY2NDliYzQxYzVmOWI2NWFkYWZjMjY0YjYxZWEwMjM2ZWZmMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjExOTVkN2YwYzNmMzI0YTY1ODlhNTAyNTM2ZDI4N2FjMDkyMWFhOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDFiYWZiODE1ODFmZThlZDViODUwYmUwZjY5ZDVmZTk2ODQ5NjIzZTdhZDM2
|
10
|
+
Yjk5YTU4ZDY0YWI2NjA0ODMwN2ZiMGVmODFjNmU1ZDVlNWFkOWM3ZThmY2U1
|
11
|
+
Mzk2ZjlhYTQ0OTg0NjAwOTgxNTYxY2RjNjI3MDcxOGNkZTg1ODQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZDZjZjI4ZTEyMWE0ZjcwMTQ4NDYyMWJjNmQxZGU2NWJjMDA5YWMyNjM0NzQ1
|
14
|
+
YTQ1NGJhNGVhMDY2NTY2NDRjMGY1MmZjZGFmMDlmMGFlMDdkMTQwZjAzYjkz
|
15
|
+
MDE1OWFjMjQ4NWQwNDYwYmE3YTA5NTAxNjIwNjQxNDZiZDI3Zjc=
|
data/imash.gemspec
CHANGED
data/lib/imash/generator.rb
CHANGED
@@ -11,18 +11,11 @@ module Imash
|
|
11
11
|
(0...(divisions.to_f/2.0).round).each { |x|
|
12
12
|
data[y] << (prng.rand > 0.5)
|
13
13
|
}
|
14
|
+
rev = data[y].reverse
|
15
|
+
rev.shift if divisions % 2 != 0
|
16
|
+
data[y].push(*rev)
|
14
17
|
}
|
15
18
|
|
16
|
-
if false
|
17
|
-
|
18
|
-
else
|
19
|
-
data.map! {|row|
|
20
|
-
rev = row.reverse
|
21
|
-
rev.shift if divisions % 2 != 0
|
22
|
-
row.push(*rev)
|
23
|
-
}
|
24
|
-
end
|
25
|
-
|
26
19
|
fg = ChunkyPNG::Color.from_hsl(*hash_data.fg)
|
27
20
|
bg = ChunkyPNG::Color.from_hsl(*hash_data.bg)
|
28
21
|
|
data/lib/imash/hash_data.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Imash
|
2
2
|
class HashData
|
3
3
|
|
4
|
-
attr_reader :seed, :bg, :fg
|
4
|
+
attr_reader :seed, :bg, :fg
|
5
5
|
|
6
6
|
def initialize(hash)
|
7
7
|
|
@@ -15,7 +15,6 @@ module Imash
|
|
15
15
|
@seed = bytes.shift(8).each_with_index.inject(0) { |a, b|
|
16
16
|
a | ((b[0] & 0xFF) << b[1]*8)
|
17
17
|
}
|
18
|
-
@mirror_y = (bytes.shift.to_f / 255.0) > 0.25
|
19
18
|
|
20
19
|
end
|
21
20
|
|
data/lib/imash/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Tait
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: chunky_png
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.3'
|
55
55
|
description: An attempt at gravatar/identicon style images using strings in ruby
|
56
56
|
email:
|
57
57
|
- dantait91@gmail.com
|