storesapp-rb 0.2.5 → 0.2.6

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.
@@ -1,5 +1,7 @@
1
+ require 'yaml'
1
2
  class Base < ActiveResource::Base
2
- self.site = ENV['STORESAPP_URL'] || "http://api.storesapp.com/v1"
3
- self.user = ENV['STORESAPP_SUBDOMAIN']
4
- self.password = ENV['STORESAPP_KEY']
3
+ CONFIG = YAML::load(File.open(File.join(Rails.root, 'config', 'storesapp.yml')))[Rails.env]
4
+ self.site = ENV['STORESAPP_URL'] || CONFIG['url'] || "http://api.storesapp.com/v1"
5
+ self.user = ENV['STORESAPP_SUBDOMAIN'] || CONFIG['subdomain']
6
+ self.password = ENV['STORESAPP_API_KEY'] || CONFIG['api_key']
5
7
  end
@@ -4,11 +4,11 @@ class Collection < Base
4
4
  end
5
5
 
6
6
  def add_product(options={})
7
- post(:add_product, :product_id => options[:product_id])
7
+ # post(:add_product, :product_id => options[:product_id])
8
8
  end
9
9
 
10
10
  def remove_product(options={})
11
- post(:remove_product, :product_id => options[:product_id])
11
+ # post(:remove_product, :product_id => options[:product_id])
12
12
  end
13
13
 
14
14
  def image
@@ -16,10 +16,10 @@ class Product < Base
16
16
  end
17
17
 
18
18
  def add_collection(options={})
19
- post(:add_collection, :collection_id => options[:collection_id])
19
+ # post(:add_collection, :collection_id => options[:collection_id])
20
20
  end
21
21
 
22
22
  def remove_collection(options={})
23
- post(:remove_collection, :collection_id => options[:collection_id])
23
+ # post(:remove_collection, :collection_id => options[:collection_id])
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: storesapp-rb
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 5
10
- version: 0.2.5
9
+ - 6
10
+ version: 0.2.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Next Feature
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-09-20 00:00:00 -04:00
19
+ date: 2010-09-21 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency