zooniverse_data 1.0.1 → 1.0.2
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/lib/zooniverse_data/projects/serengeti.rb +6 -5
- data/lib/zooniverse_data/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b840eb66062e6700cd29c4a415f624489394b6b
|
|
4
|
+
data.tar.gz: 93b791e0bafd44e04a61dc42f9d1e540066c785c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: feb9aace98d0f43e217d305cfa54869b819c896c6482bcb553e0446de4d9439ec6d2999bc21712ceff75e15c40bf41d4db300c37a956e4e7578c793b10dff9e7
|
|
7
|
+
data.tar.gz: b7b6329e5633c99d06f3ca24dedca47957b078a2f9bc5e675e270b1d1bee4a34e23ec4c9b139dc7570db22299b146f9ad8982ae18eaab080709381260664dae0
|
|
@@ -2,30 +2,31 @@ module ZooniverseData
|
|
|
2
2
|
module Projects
|
|
3
3
|
class Serengeti
|
|
4
4
|
include Helpers
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
def customize_subject
|
|
7
7
|
new_locations = {
|
|
8
8
|
'standard' => [],
|
|
9
9
|
'thumbnail' => [],
|
|
10
10
|
'large' => []
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
entry.location['standard'].each do |path|
|
|
14
14
|
large_image = large_converter path
|
|
15
15
|
new_locations['large'] << large_image
|
|
16
16
|
new_locations['standard'] << converter_for(large_image, type: 'standard', max_size: 600)
|
|
17
17
|
new_locations['thumbnail'] << converter_for(large_image, type: 'thumbnail', max_size: 300)
|
|
18
18
|
end
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
set_location new_locations
|
|
21
21
|
end
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
def large_converter(path)
|
|
24
24
|
convert_image(path)
|
|
25
|
+
.command('-gravity South -chop 0x100')
|
|
25
26
|
.write_to(prefix: 'large')
|
|
26
27
|
.path
|
|
27
28
|
end
|
|
28
|
-
|
|
29
|
+
|
|
29
30
|
def converter_for(path, type: nil, max_size: nil)
|
|
30
31
|
convert_image(path, remove_original: false)
|
|
31
32
|
.resize(width: max_size, height: max_size, force: false)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zooniverse_data
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Parrish
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|