okpublished 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 89f5f8bc31f4d283c0bcfa7b87045f327a3a64a5
4
- data.tar.gz: 72eb988ad0d12be745730b3b502016bb0bdb0116
3
+ metadata.gz: 3fc10e29a7649168681b216c095a423e3bdf88e2
4
+ data.tar.gz: 9c36a828e3708d3a987de6a640efa84c78f3a408
5
5
  SHA512:
6
- metadata.gz: 02c1e840537906d4fb87926d161e0f2989e64e14af2cff696287193391f3b35db0cab996c7e1854dc7484b2fc2707db98777e3b719bcb8e7948add60aaee69a8
7
- data.tar.gz: ee7b4cef9143d95ec9e943ff13ea81e7df684ad2bfd562e707a024282436e7fcce9695088875356044bf598cf0b481921af0b08bf7d847c05d96bc7d865b6194
6
+ metadata.gz: 48b74af37ffc38a9d1cae053cb3f248b87ee89b8ae41537ce454b392f4bba8d470ec7bc18f60d2d4e52c8157bae4ceec56aec3b5263e4e4c6bfe250fbeb6dfc9
7
+ data.tar.gz: 332159d6ded103b5539cf4221aa6d84d042ae465e03605fcecf91675d1c87db6bb0484207794762aaf7ea15d194af1428fa27d255a0d28f68473d8b62149e152
@@ -7,15 +7,11 @@ module Okpublished
7
7
  @config = config
8
8
  end
9
9
 
10
- def publicate_facebook(text, image, debug=false)
10
+ def publicate_facebook(text, image)
11
11
  url_to_file(image)
12
12
  graph = Koala::Facebook::API.new(@config[:facebook][:access_token])
13
13
  page_token = graph.get_page_access_token(@config[:facebook][:page_id])
14
14
 
15
- if debug
16
- puts "#{text} - #{image}"
17
- end
18
-
19
15
  @page = Koala::Facebook::API.new(page_token)
20
16
  @page.put_picture(File.new("/tmp/image.jpg"), { :message => text})
21
17
  end
@@ -47,8 +43,11 @@ module Okpublished
47
43
  end
48
44
 
49
45
 
50
- def publicate(text, image)
51
-
46
+ def publicate(text, image,debug=false)
47
+ if debug
48
+ puts "#{text} - #{image}"
49
+ end
50
+
52
51
  if validate_facebook?
53
52
  publicate_facebook(text, image)
54
53
  end
@@ -1,3 +1,3 @@
1
1
  module Okpublished
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okpublished
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel Botto