imaginary 0.0.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ["lib"]
19
19
 
20
20
  gem.add_dependency 'httmultiparty', '>= 0.3.8'
21
+ gem.add_dependency 'httparty', '>= 0.10.0'
21
22
 
22
23
  gem.add_development_dependency 'rspec'
23
24
  gem.add_development_dependency 'fakeweb'
@@ -18,7 +18,7 @@ module Imaginary
18
18
  end
19
19
 
20
20
  def add_image_from_file(file, name = nil)
21
- r = post("#{@base_url}/api/buckets/#{@bucket}/images.json", body: { image: {
21
+ r = post("#{@base_url}buckets/#{@bucket}/images.json", body: { image: {
22
22
  name: name,
23
23
  image: file
24
24
  }})
@@ -31,7 +31,7 @@ module Imaginary
31
31
  end
32
32
 
33
33
  def add_image_from_url(url, name = nil)
34
- r = post("#{@base_url}/api/buckets/#{@bucket}/images.json", body: { image: {
34
+ r = post("#{@base_url}buckets/#{@bucket}/images.json", body: { image: {
35
35
  name: name,
36
36
  image_url: url
37
37
  }})
@@ -1,3 +1,3 @@
1
1
  module Imaginary
2
- VERSION = "0.0.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -16,7 +16,7 @@ describe Imaginary::Client do
16
16
  describe '#add_image_from_url' do
17
17
  it "should add the image to the server and return its name" do
18
18
  FakeWeb.register_uri :post,
19
- "http://some_user:123secret@imaginary.test.org//api/buckets/some_bucket/images.json",
19
+ "http://some_user:123secret@imaginary.test.org/buckets/some_bucket/images.json",
20
20
  body: '{"name": "kitten"}',
21
21
  content_type: 'application/json; charset=utf-8'
22
22
 
@@ -27,7 +27,7 @@ describe Imaginary::Client do
27
27
  describe '#add_image_from_file' do
28
28
  it "should add the image to the server and return its name" do
29
29
  FakeWeb.register_uri :post,
30
- "http://some_user:123secret@imaginary.test.org//api/buckets/some_bucket/images.json",
30
+ "http://some_user:123secret@imaginary.test.org/buckets/some_bucket/images.json",
31
31
  body: '{"name": "hmans"}',
32
32
  content_type: 'application/json; charset=utf-8'
33
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imaginary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-12 00:00:00.000000000 Z
12
+ date: 2013-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httmultiparty
@@ -27,6 +27,22 @@ dependencies:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.3.8
30
+ - !ruby/object:Gem::Dependency
31
+ name: httparty
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.10.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.10.0
30
46
  - !ruby/object:Gem::Dependency
31
47
  name: rspec
32
48
  requirement: !ruby/object:Gem::Requirement
@@ -106,4 +122,3 @@ test_files:
106
122
  - spec/client_spec.rb
107
123
  - spec/files/hmans.jpg
108
124
  - spec/spec_helper.rb
109
- has_rdoc: