selfiegram 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/background_images/downloader.rb +9 -4
- data/lib/selfiegram.rb +0 -1
- data/selfiegram.gemspec +2 -2
- 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: fa1d87a6e7d2d54b04c371b627492d6e5bd31e2b
|
4
|
+
data.tar.gz: 6d73b3c24160401b5e693e11a8769a8b1e708c42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a074763cfa329e5e50330f8de4d8f73e0c125040763aba7c6d957655b15532a4258b402fe26f3bf0f5ed4187983c90cdd614b3f777d31c5fbd88fc5ec1ffb791
|
7
|
+
data.tar.gz: 059312e8c2d02d251115b46678cfdd37ac2d1b67af1e70198909956ea98d7371c96f47d94590027e348182cadd1a5fc9c36162d4f4485719ad9dbfb2add58c54
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
@@ -17,10 +17,15 @@ module BackgroundImages
|
|
17
17
|
|
18
18
|
`convert #{local_file}.#{file_extension} -resize '#{dimensions}^' -gravity 'center' -crop '#{dimensions}+0+0' #{local_file}.#{destination_extension}`
|
19
19
|
|
20
|
-
|
20
|
+
begin
|
21
|
+
image = Magick::Image.read("#{local_file}.#{destination_extension}")
|
22
|
+
rescue
|
23
|
+
end
|
24
|
+
|
25
|
+
if command_failed? || image.nil?
|
21
26
|
get_new_background_image
|
22
27
|
download
|
23
|
-
standardize
|
28
|
+
standardize(selfie_image)
|
24
29
|
end
|
25
30
|
|
26
31
|
self
|
@@ -44,7 +49,7 @@ module BackgroundImages
|
|
44
49
|
end
|
45
50
|
|
46
51
|
def acceptable_extensions
|
47
|
-
["png"]
|
52
|
+
["jpg", "png"]
|
48
53
|
end
|
49
54
|
|
50
55
|
def acceptable_extension?(extension)
|
@@ -52,7 +57,7 @@ module BackgroundImages
|
|
52
57
|
end
|
53
58
|
|
54
59
|
def file_extension(file=download_url)
|
55
|
-
"
|
60
|
+
file.split(".").last
|
56
61
|
end
|
57
62
|
|
58
63
|
def download_url
|
data/lib/selfiegram.rb
CHANGED
data/selfiegram.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: selfiegram 0.0.
|
5
|
+
# stub: selfiegram 0.0.10 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "selfiegram"
|
9
|
-
s.version = "0.0.
|
9
|
+
s.version = "0.0.10"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|