pig-media-server 100000 → 1000000
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pig-media-server/version.rb +1 -1
- data/lib/pig-media-server/web.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef0f8fb031c774ba1bd8a20c6c06fa3146825665
|
4
|
+
data.tar.gz: 8966f183428d1c76a1bf9a2fb78569ef081c1a40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366e4c23b85c025d32b876f9c3c88651386ff227a21f871352eae9fbb328ed64d9bac5c1e85d6edfa062f757520ba34f3eb4962fb686011daa783b52196a118f
|
7
|
+
data.tar.gz: d0f8961ce712fcd0f073031299d1b1036c9be38f7071d2d7747a473b0bc2b1fc08cc05bbd9b0c5641de312971b798d13175a3ce566921787f9ac3ec224245765
|
data/lib/pig-media-server/web.rb
CHANGED
@@ -38,6 +38,7 @@ module PigMediaServer
|
|
38
38
|
img = url.sub(/data:image\/png;base64,/, '').unpack('m').first
|
39
39
|
open(name, 'w'){|f| f.puts img}
|
40
40
|
system "gm", "convert", name, jpg
|
41
|
+
jpg = name unless File.exists? jpg
|
41
42
|
client = Twitter::REST::Client.new do |config|
|
42
43
|
config.consumer_key = key
|
43
44
|
config.consumer_secret = secret
|
@@ -46,8 +47,8 @@ module PigMediaServer
|
|
46
47
|
end
|
47
48
|
|
48
49
|
client.update_with_media(comment.to_s, open(jpg))# rescue nil
|
49
|
-
FileUtils.rm name
|
50
|
-
FileUtils.rm jpg
|
50
|
+
FileUtils.rm name rescue nil
|
51
|
+
FileUtils.rm jpg rescue nil
|
51
52
|
end
|
52
53
|
end
|
53
54
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pig-media-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '1000000'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ssig33
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rroonga
|
@@ -409,7 +409,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
409
409
|
version: '0'
|
410
410
|
requirements: []
|
411
411
|
rubyforge_project:
|
412
|
-
rubygems_version: 2.5.1
|
412
|
+
rubygems_version: 2.4.5.1
|
413
413
|
signing_key:
|
414
414
|
specification_version: 4
|
415
415
|
summary: Pig Media Server
|