surely 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/surely/daemon.rb +1 -1
- data/lib/surely/uploader.rb +3 -3
- data/lib/surely/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGNiNjlkY2UzZmE3NDNlNGI0YzNjMDU2YTY4ZDVhMTY1MDc1ZWE1Yw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzdkM2MzNmZlZDAwMjhjZWY5MWRhNDc1Yzc5NjA4MWRiNWU4ZDRlMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTI1ODI3NGRiZTAzZjNkZWI4OGRjODk1YjZhZDZjNWY3NDFlNzI4N2MzOTg0
|
10
|
+
MTk1NmY0OTk3MzQwYjZmNGE1NWM2NzAyOTQwNzY0N2M0NGEzYjhiN2RlMzdi
|
11
|
+
NGVkMDgwOWYwNTdlNGE2Zjk3YjFkY2Y1OWI3OGE0YzU5MzE3NjE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZWE2ZTk0NjJiN2ZmOWQ4NTg2OTg0OTJkNzlkMDUyYWJjZjc1YmY2ZTQ4YTJh
|
14
|
+
MGMyMDc5ZjNiMGY5YTkzNTIwM2MxY2NmNmExYzA3ZjdhNTg1MTY0ZmYzMTA2
|
15
|
+
NTY0OTVjYzc2MTVjYzQxNGQxMTQwOWEwNGEyYjJmYjMyYjQ5OTE=
|
data/lib/surely/daemon.rb
CHANGED
data/lib/surely/uploader.rb
CHANGED
@@ -15,7 +15,7 @@ module Surely
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def upload_file(file)
|
18
|
-
file = Faraday::UploadIO.new(file,
|
18
|
+
file = Faraday::UploadIO.new(file, "image/#{file.split(/\./).last}")
|
19
19
|
|
20
20
|
response = @imgur.post '/3/image' do |r|
|
21
21
|
r.headers['Authorization'] = "Bearer #{@access_token}"
|
@@ -67,11 +67,11 @@ module Surely
|
|
67
67
|
def callback
|
68
68
|
@callback ||= lambda do |modified, added, removed|
|
69
69
|
if added.any?
|
70
|
-
|
70
|
+
print 'Uploading... '
|
71
71
|
refresh_token!
|
72
72
|
|
73
73
|
if uploaded_file = upload_file(File.join(@directory, added.first))
|
74
|
-
puts "
|
74
|
+
puts "done! #{uploaded_file['link']}"
|
75
75
|
system "say -v 'Fred' 'Uploaded'"
|
76
76
|
system "echo #{uploaded_file['link']} | pbcopy"
|
77
77
|
end
|
data/lib/surely/version.rb
CHANGED