spree-api-client 0.0.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +9 -0
  3. data/LICENSE.txt +674 -0
  4. data/README.md +31 -38
  5. data/lib/spree_client/api/v1/products.rb +23 -0
  6. data/lib/spree_client/api/v1/properties.rb +12 -0
  7. data/lib/spree_client/api/v1/resources.rb +142 -0
  8. data/lib/spree_client/api/v1/stock_items.rb +27 -0
  9. data/lib/spree_client/api/v1/stock_locations.rb +33 -0
  10. data/lib/spree_client/api/v1/stock_movements.rb +16 -0
  11. data/lib/spree_client/api/v1/taxonomies.rb +12 -0
  12. data/lib/spree_client/api/v1/variants.rb +13 -0
  13. data/lib/spree_client/api/v1.rb +53 -0
  14. data/lib/spree_client/api.rb +1 -0
  15. data/lib/spree_client/attributes.rb +28 -0
  16. data/lib/spree_client/models/product.rb +7 -0
  17. data/lib/spree_client/models/property.rb +6 -0
  18. data/lib/spree_client/models/stock_item.rb +7 -0
  19. data/lib/spree_client/models/stock_location.rb +7 -0
  20. data/lib/spree_client/models/stock_movement.rb +7 -0
  21. data/lib/spree_client/models/store.rb +7 -0
  22. data/lib/spree_client/models/taxonomy.rb +5 -0
  23. data/lib/spree_client/models/variant.rb +7 -0
  24. data/lib/spree_client/models.rb +5 -0
  25. data/lib/spree_client.rb +3 -0
  26. data/lib/spree_client.rb~ +71 -0
  27. metadata +73 -192
  28. data/.gitignore +0 -17
  29. data/.ruby-version +0 -1
  30. data/.travis.yml +0 -11
  31. data/CONTRIBUTING.md +0 -8
  32. data/Gemfile +0 -9
  33. data/LICENSE +0 -22
  34. data/Rakefile +0 -7
  35. data/fixtures/cassette_library/addresss.yml +0 -46
  36. data/fixtures/cassette_library/countries.yml +0 -52
  37. data/fixtures/cassette_library/orders.yml +0 -48
  38. data/fixtures/cassette_library/payments.yml +0 -48
  39. data/fixtures/cassette_library/products.yml +0 -66
  40. data/fixtures/cassette_library/properties.yml +0 -48
  41. data/fixtures/cassette_library/request.yml +0 -46
  42. data/fixtures/cassette_library/return_authorizations.yml +0 -48
  43. data/fixtures/cassette_library/shipment_ready.yml +0 -46
  44. data/fixtures/cassette_library/taxonomies.yml +0 -48
  45. data/fixtures/cassette_library/taxons.yml +0 -48
  46. data/fixtures/cassette_library/variants.yml +0 -63
  47. data/fixtures/cassette_library/zones.yml +0 -49
  48. data/lib/spree-api-client/addresses.rb +0 -15
  49. data/lib/spree-api-client/connection.rb +0 -31
  50. data/lib/spree-api-client/countries.rb +0 -15
  51. data/lib/spree-api-client/error.rb +0 -47
  52. data/lib/spree-api-client/line_items.rb +0 -19
  53. data/lib/spree-api-client/orders.rb +0 -32
  54. data/lib/spree-api-client/payments.rb +0 -43
  55. data/lib/spree-api-client/products.rb +0 -31
  56. data/lib/spree-api-client/properties.rb +0 -31
  57. data/lib/spree-api-client/request.rb +0 -56
  58. data/lib/spree-api-client/return_authorizations.rb +0 -31
  59. data/lib/spree-api-client/shipments.rb +0 -15
  60. data/lib/spree-api-client/taxonomies.rb +0 -31
  61. data/lib/spree-api-client/taxons.rb +0 -27
  62. data/lib/spree-api-client/variants.rb +0 -31
  63. data/lib/spree-api-client/version.rb +0 -7
  64. data/lib/spree-api-client/zones.rb +0 -31
  65. data/lib/spree-api-client.rb +0 -49
  66. data/spec/addresses_spec.rb +0 -12
  67. data/spec/client_spec.rb +0 -32
  68. data/spec/countries_spec.rb +0 -12
  69. data/spec/orders_spec.rb +0 -12
  70. data/spec/payments_spec.rb +0 -12
  71. data/spec/products_spec.rb +0 -12
  72. data/spec/properties_spec.rb +0 -12
  73. data/spec/return_authorizations_spec.rb +0 -12
  74. data/spec/shipments_spec.rb +0 -12
  75. data/spec/spec_helper.rb +0 -10
  76. data/spec/support/vcr.rb +0 -9
  77. data/spec/taxonomies_spec.rb +0 -12
  78. data/spec/taxons_spec.rb +0 -12
  79. data/spec/variants_spec.rb +0 -12
  80. data/spec/zones_spec.rb +0 -12
  81. data/spree-api-client.gemspec +0 -29
data/spec/taxons_spec.rb DELETED
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Spree::API::Client::Taxons do
4
- use_vcr_cassette "taxons", :record => :new_episodes
5
- describe 'taxons' do
6
- it 'should load taxons' do
7
- client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
8
- taxons = client.taxons(1)
9
- taxons.should be_a(Array)
10
- end
11
- end
12
- end
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Spree::API::Client::Variants do
4
- use_vcr_cassette "variants", :record => :new_episodes
5
- describe 'variants' do
6
- it 'should load variants' do
7
- client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
8
- variants = client.variants(1)
9
- variants.should be_a(Array)
10
- end
11
- end
12
- end
data/spec/zones_spec.rb DELETED
@@ -1,12 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Spree::API::Client::Zones do
4
- use_vcr_cassette "zones", :record => :new_episodes
5
- describe 'zones' do
6
- it 'should load zones' do
7
- client = Spree::API::Client.new('http://localhost:4000/store/api', 'b56019f04b61a50553ee323f5ab68c6b435871971e79c987')
8
- zones = client.zones
9
- zones.should be_a(Array)
10
- end
11
- end
12
- end
@@ -1,29 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'spree-api-client/version'
5
-
6
- Gem::Specification.new do |gem|
7
- gem.name = "spree-api-client"
8
- gem.version = Spree::API::Client::VERSION
9
- gem.authors = ["Andrew Nesbitt"]
10
- gem.email = ["andrewnez@gmail.com"]
11
- gem.description = %q{A rubygem for interacting with the Spree API}
12
- gem.summary = %q{A rubygem for interacting with the Spree API}
13
- gem.homepage = "https://github.com/andrew/spree-api-client"
14
-
15
- gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ["lib"]
19
-
20
- gem.add_dependency 'faraday', '~> 0.8'
21
- gem.add_dependency 'faraday_middleware', '~> 0.9'
22
- gem.add_dependency 'hashie', '~> 1.2'
23
- gem.add_dependency 'multi_json', '~> 1.4'
24
-
25
- gem.add_development_dependency 'webmock'
26
- gem.add_development_dependency 'vcr'
27
- gem.add_development_dependency 'rake'
28
- gem.add_development_dependency 'rspec'
29
- end