reddit_wallpaper 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reddit_wallpaper.rb +4 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f59e4c97092153ebdec0864c6219dc5fe13b83fd
|
4
|
+
data.tar.gz: 0478a417e076a5c9f439d5eccb26d7792bae2039
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cfc5b6d3060a1277ee7a60ba356d3be31aad9b4bf0e7dacc89a17f9c717ee8c3e1d1f0a87c45bad2a888ece041ad7cd2fd7e9b4c89d0d484b13e26f28b1a977
|
7
|
+
data.tar.gz: 16a44d81d5fd0df08bf5adcc7d69b3034e383bf70732042ffcc658c9bbfd74876b6aa8a9bb1d4525d2bfc45fdf60809515c034dcf1a22f946b08e500a64e7e73
|
data/lib/reddit_wallpaper.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'open-uri'
|
2
2
|
require 'ruby_reddit_api'
|
3
|
+
require 'open_uri_redirections'
|
3
4
|
|
4
5
|
class RedditWallpaper
|
5
6
|
def initialize(subreddit, destination_file)
|
@@ -30,7 +31,9 @@ class RedditWallpaper
|
|
30
31
|
|
31
32
|
def download_image(url)
|
32
33
|
# Append .jpg to ensure we are getting the image file
|
33
|
-
open(path, 'wb')
|
34
|
+
open(path, 'wb') do |file|
|
35
|
+
file << open(url + ".jpg", allow_redirections: :all).read
|
36
|
+
end
|
34
37
|
downloaded << url
|
35
38
|
end
|
36
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reddit_wallpaper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emad Elsaid
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - ~>
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0.2'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: open_uri_redirections
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0.1'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0.1'
|
28
42
|
description: Download the latest images from your favorite subreddit and set them
|
29
43
|
as your desktop background
|
30
44
|
email:
|
@@ -51,7 +65,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
51
65
|
requirements:
|
52
66
|
- - '>='
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
68
|
+
version: 1.9.3
|
55
69
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
70
|
requirements:
|
57
71
|
- - '>='
|