happo 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/happo/uploader.rb +6 -6
- data/lib/happo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be27b4eeb9508f8a6886ce3f030bc7f9d8598faa
|
4
|
+
data.tar.gz: 54adb00c4d569281e0bf0f6f4485d03a15e99c28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be8404dfc4c159f7c58860c4fe22dbce9e0f000b348c670a9940153fc43339881ad610b50484c27ef3745fd83816de8f9dc4e5598c203fb5a54b7000f31e9f76
|
7
|
+
data.tar.gz: 7d4518cd0cbf90d98c2c4a5f01f0095a8102c6edf66d44fa0f15093624960047c40e06ff7e27ed2d51071ece9fe50420fef0337e569d3813b47290371dcd0936
|
data/lib/happo/uploader.rb
CHANGED
@@ -25,26 +25,26 @@ module Happo
|
|
25
25
|
end
|
26
26
|
|
27
27
|
diff_images = result_summary[:diff_examples].map do |diff|
|
28
|
-
|
29
|
-
image = bucket.objects.build(
|
28
|
+
img_name = "#{diff[:description]}_#{diff[:viewport]}.png"
|
29
|
+
image = bucket.objects.build("#{dir}/#{img_name}")
|
30
30
|
image.content = open(Happo::Utils.path_to(diff[:description],
|
31
31
|
diff[:viewport],
|
32
32
|
'diff.png'))
|
33
33
|
image.content_type = 'image/png'
|
34
34
|
image.save
|
35
|
-
diff[:url] =
|
35
|
+
diff[:url] = img_name
|
36
36
|
diff
|
37
37
|
end
|
38
38
|
|
39
39
|
new_images = result_summary[:new_examples].map do |example|
|
40
|
-
|
41
|
-
image = bucket.objects.build(
|
40
|
+
img_name = "#{example[:description]}_#{example[:viewport]}.png"
|
41
|
+
image = bucket.objects.build("#{dir}/#{img_name}")
|
42
42
|
image.content = open(Happo::Utils.path_to(example[:description],
|
43
43
|
example[:viewport],
|
44
44
|
'previous.png'))
|
45
45
|
image.content_type = 'image/png'
|
46
46
|
image.save
|
47
|
-
example[:url] =
|
47
|
+
example[:url] = img_name
|
48
48
|
example
|
49
49
|
end
|
50
50
|
|
data/lib/happo/version.rb
CHANGED