twimage 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/twimage/base.rb CHANGED
@@ -1,14 +1,14 @@
1
1
  module Twimage
2
2
  class Base
3
3
 
4
- attr_accessor :image, :image_url, :service_url
4
+ attr_accessor :tempfile, :image_url, :service_url
5
5
 
6
6
  def initialize(service_url)
7
7
  response = HTTParty.get(@image_url)
8
8
  puts response.code
9
9
  if response.code == 200
10
- @image = Tempfile.new(['twimage','.jpg'])
11
- @image << response.body.force_encoding('utf-8')
10
+ @tempfile = Tempfile.new(['twimage','.jpg'])
11
+ @tempfile << response.body.force_encoding('utf-8')
12
12
  else
13
13
  raise ImageURLInvalid, "The image_url #{@image_url} was not found (returned a 404)"
14
14
  end
@@ -1,3 +1,3 @@
1
1
  module Twimage
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: twimage
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rob Cameron