pixallent-fetchapi-ruby 0.2.2 → 0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +2 -0
- data/Manifest +0 -5
- data/Rakefile +2 -2
- data/fetchapi-ruby.gemspec +2 -2
- metadata +1 -6
- data/spec/account_spec.rb +0 -9
- data/spec/base_spec.rb +0 -14
- data/spec/download_spec.rb +0 -20
- data/spec/item_spec.rb +0 -17
- data/spec/order_spec.rb +0 -50
data/CHANGELOG
CHANGED
data/Manifest
CHANGED
data/Rakefile
CHANGED
@@ -2,12 +2,12 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('fetchapi-ruby', '0.
|
5
|
+
Echoe.new('fetchapi-ruby', '0.9') do |p|
|
6
6
|
p.description = "Integrate your site with http://fetchapp.com for seamless digital delivery."
|
7
7
|
p.url = "http://github.com/pixallent/fetchapi-ruby"
|
8
8
|
p.author = ["Thomas Reynolds, Michael Larkin"]
|
9
9
|
p.email = "mikelarkin@pixallent.com"
|
10
|
-
p.ignore_pattern = ["tmp/*", "script/*"]
|
10
|
+
p.ignore_pattern = ["tmp/*", "script/*", "spec/*"]
|
11
11
|
p.development_dependencies = []
|
12
12
|
p.runtime_dependencies = ["httparty"]
|
13
13
|
end
|
data/fetchapi-ruby.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{fetchapi-ruby}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.9"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Thomas Reynolds, Michael Larkin"]
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.description = %q{Integrate your site with http://fetchapp.com for seamless digital delivery.}
|
11
11
|
s.email = %q{mikelarkin@pixallent.com}
|
12
12
|
s.extra_rdoc_files = ["CHANGELOG", "lib/fetchapi/account.rb", "lib/fetchapi/base.rb", "lib/fetchapi/download.rb", "lib/fetchapi/item.rb", "lib/fetchapi/order.rb", "lib/fetchapi-ruby.rb", "LICENSE", "README"]
|
13
|
-
s.files = ["CHANGELOG", "fetchapi-ruby.gemspec", "init.rb", "lib/fetchapi/account.rb", "lib/fetchapi/base.rb", "lib/fetchapi/download.rb", "lib/fetchapi/item.rb", "lib/fetchapi/order.rb", "lib/fetchapi-ruby.rb", "LICENSE", "Manifest", "Rakefile", "README"
|
13
|
+
s.files = ["CHANGELOG", "fetchapi-ruby.gemspec", "init.rb", "lib/fetchapi/account.rb", "lib/fetchapi/base.rb", "lib/fetchapi/download.rb", "lib/fetchapi/item.rb", "lib/fetchapi/order.rb", "lib/fetchapi-ruby.rb", "LICENSE", "Manifest", "Rakefile", "README"]
|
14
14
|
s.has_rdoc = true
|
15
15
|
s.homepage = %q{http://github.com/pixallent/fetchapi-ruby}
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Fetchapi-ruby", "--main", "README"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixallent-fetchapi-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: "0.9"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Reynolds, Michael Larkin
|
@@ -52,11 +52,6 @@ files:
|
|
52
52
|
- Manifest
|
53
53
|
- Rakefile
|
54
54
|
- README
|
55
|
-
- spec/account_spec.rb
|
56
|
-
- spec/base_spec.rb
|
57
|
-
- spec/download_spec.rb
|
58
|
-
- spec/item_spec.rb
|
59
|
-
- spec/order_spec.rb
|
60
55
|
has_rdoc: true
|
61
56
|
homepage: http://github.com/pixallent/fetchapi-ruby
|
62
57
|
post_install_message:
|
data/spec/account_spec.rb
DELETED
data/spec/base_spec.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), "..", "lib", "fetchapi-ruby")
|
2
|
-
include FetchAPI
|
3
|
-
|
4
|
-
describe Base do
|
5
|
-
|
6
|
-
before do
|
7
|
-
Base.basic_auth('http://pixallent.myhost.dev:3000/api', 'pixallent', 'pixallent')
|
8
|
-
end
|
9
|
-
|
10
|
-
it "should catch invalid login" do
|
11
|
-
Base.basic_auth('http://pixallent.myhost.dev:3000/api', 'bad', 'login')
|
12
|
-
lambda {Account.details}.should raise_error("Unauthorized")
|
13
|
-
end
|
14
|
-
end
|
data/spec/download_spec.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), "..", "lib", "fetchapi-ruby")
|
2
|
-
include FetchAPI
|
3
|
-
|
4
|
-
|
5
|
-
describe Download do
|
6
|
-
before do
|
7
|
-
Base.basic_auth('http://pixallent.myhost.dev:3000/api', 'pixallent', 'pixallent')
|
8
|
-
end
|
9
|
-
|
10
|
-
|
11
|
-
it "should find by id" do
|
12
|
-
Download.find(37).id.to_s.should == "37"
|
13
|
-
end
|
14
|
-
|
15
|
-
|
16
|
-
it "should find all" do
|
17
|
-
d = Download.find(:all)
|
18
|
-
d.class.should == Array
|
19
|
-
end
|
20
|
-
end
|
data/spec/item_spec.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), "..", "lib", "fetchapi-ruby")
|
2
|
-
include FetchAPI
|
3
|
-
|
4
|
-
describe Item do
|
5
|
-
before do
|
6
|
-
Base.basic_auth('http://pixallent.myhost.dev:3000/api', 'pixallent', 'pixallent')
|
7
|
-
end
|
8
|
-
|
9
|
-
|
10
|
-
it "should find by id" do
|
11
|
-
i = Item.find('CATALOG').sku.should == "CATALOG"
|
12
|
-
end
|
13
|
-
|
14
|
-
it "should find all" do
|
15
|
-
Item.find(:all).length.should > 0
|
16
|
-
end
|
17
|
-
end
|
data/spec/order_spec.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), "..", "lib", "fetchapi-ruby")
|
2
|
-
include FetchAPI
|
3
|
-
|
4
|
-
describe Order do
|
5
|
-
before do
|
6
|
-
Base.basic_auth('http://pixallent.myhost.dev:3000/api', 'pixallent', 'pixallent')
|
7
|
-
end
|
8
|
-
|
9
|
-
it "should update title" do
|
10
|
-
order = Order.find('1001')
|
11
|
-
order.update(:first_name => "Daffy")
|
12
|
-
order = Order.find('1001')
|
13
|
-
order.first_name.should == "Daffy"
|
14
|
-
end
|
15
|
-
|
16
|
-
it "should create an order" do
|
17
|
-
begin
|
18
|
-
Order.find('1015').destroy
|
19
|
-
rescue
|
20
|
-
end
|
21
|
-
Order.create(:id => "1015", :title => "Test Order", :first_name => "Donald", :last_name => "Duck", :email => "donald@duck.com", :order_items => [{:sku => 'BIZCARD'}, {:sku => "CATALOG"}])
|
22
|
-
order = Order.find('1015')
|
23
|
-
order.id.to_s.should == "1015"
|
24
|
-
end
|
25
|
-
|
26
|
-
it "should delete an order" do
|
27
|
-
Order.create(:id => "1016", :title => "Test Order", :first_name => "Donald", :last_name => "Duck", :email => "donald@duck.com", :download_limit => "4")
|
28
|
-
order = Order.find('1016')
|
29
|
-
order.destroy
|
30
|
-
lambda {Order.find('1016')}.should raise_error("Not Found")
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should find all" do
|
34
|
-
Order.find(:all).length.should > 0
|
35
|
-
end
|
36
|
-
|
37
|
-
it "should find current" do
|
38
|
-
Order.find(:current).length.should > 0
|
39
|
-
end
|
40
|
-
|
41
|
-
it "should find manual" do
|
42
|
-
Order.find(:manual).length.should > 0
|
43
|
-
end
|
44
|
-
|
45
|
-
it "should find expired" do
|
46
|
-
Order.find(:expired).length.should > 0
|
47
|
-
end
|
48
|
-
|
49
|
-
|
50
|
-
end
|