spree-wrap 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4e54151ebb7d63d07ea4f9fafb4d92116e443b57
4
+ data.tar.gz: d556fd469e84e944a5155cfda374364f1596fba0
5
+ SHA512:
6
+ metadata.gz: 67569dae2d511d5ed572078d5534f92ddd03740d4c6342e41e8bf61f510d1ee92013ca65ebb1a67e4e98f4769d70a01e3b77ef9cc5371ea4ec0b86dc5f74bb26
7
+ data.tar.gz: 18e6e17552afe7b83665cc442d085834d16d0ed7ed4af91e55a4e2d915ee2bba855f67e937e1d6a600258875e0c9357ef81edc4e0195bbe5b2fe443fa61e1155
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ build
data/.repl_history ADDED
@@ -0,0 +1,27 @@
1
+ File
2
+ File.open("spec/support/webstub/products.json")
3
+ File.open("./spec/support/webstub/products.json")
4
+ __FILE__
5
+ exit
6
+ File.expand_path("/Users/dab/spree/spree-wrap/spec/spree/api/product_spec.rb")
7
+ File.expand_path("/Users/dab/spree/spree-wrap/spec/spree/api/product_spec.rb", "..")
8
+ File.expand_path("/Users/dab/spree/spree-wrap/spec/spree/api/product_spec.rb", "..", "..")
9
+ File.expand_path("/Users/dab/spree/spree-wrap/spec/spree/api/product_spec.rb")
10
+ File.dir_name("/Users/dab/spree/spree-wrap/spec/spree/api/product_spec.rb")
11
+ File.dirname("/Users/dab/spree/spree-wrap/spec/spree/api/product_spec.rb")
12
+ APP_ROOT
13
+ APPLICATION_ROOT
14
+ APP_ROOT
15
+ ROOT
16
+ ROOT_PATH
17
+ Application
18
+ Motion
19
+ Motion::Project
20
+ BW
21
+ App
22
+ App.resources_path
23
+ App.document_path
24
+ exit
25
+ exit
26
+ exit
27
+ exit
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in spree-wrap.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 David Padilla
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # Spree-Wrap
2
+
3
+ Consume any compatible Spree API from Ruby Motion
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'spree-wrap'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install spree-wrap
18
+
19
+ ## Usage
20
+
21
+ Within your application delegate or before accessing the API set the url to the endpoint.
22
+
23
+ Spree.endpoint = "http://example.com/api"
24
+
25
+ You can now query the API by using blocks.
26
+
27
+ Example:
28
+
29
+ Spree.products do |products|
30
+ # Do something when products are received
31
+ end
32
+
33
+ ## Contributing
34
+
35
+ 1. Fork it
36
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
37
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
38
+ 4. Push to the branch (`git push origin my-new-feature`)
39
+ 5. Create new Pull Request
40
+
41
+ # About the Author
42
+
43
+ [Crowd Interactive](http://www.crowdint.com) is an American web design and development company that happens to work in Colima, Mexico.
44
+ We specialize in building and growing online retail stores. We don’t work with everyone – just companies we believe in. Call us today to see if there’s a fit.
45
+ Find more info [here](http://www.crowdint.com)!
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ $:.unshift("/Library/RubyMotion/lib")
2
+ require 'motion/project/template/ios'
3
+
4
+ # Bubblewrap
5
+ require 'bubble-wrap/core'
6
+ require 'bubble-wrap/http'
7
+
8
+ Bundler.setup
9
+ Bundler.require
10
+ require 'bubble-wrap/test'
11
+ require 'webstub'
12
+ require "bundler/gem_tasks"
@@ -0,0 +1,5 @@
1
+ module Spree
2
+ module Wrap
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
data/lib/spree/wrap.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "spree/wrap/version"
2
+ BubbleWrap.require 'motion/spree.rb'
3
+ BubbleWrap.require 'motion/spree/model.rb'
4
+ BubbleWrap.require 'motion/spree/product.rb'
5
+ BubbleWrap.require 'motion/spree/api/product.rb'
@@ -0,0 +1,30 @@
1
+ module Spree
2
+ module API
3
+ module Product
4
+ def self.included(base)
5
+ base.send(:extend, ClassMethods)
6
+ end
7
+
8
+ module ClassMethods
9
+ def products(&block)
10
+ json = []
11
+
12
+ BW::HTTP.get(Spree.products_uri) do |response|
13
+ json = BW::JSON.parse(response.body.to_str)
14
+ products = json["products"].map do |product_json|
15
+ Spree::Product.new(product_json)
16
+ end
17
+
18
+ block.call products
19
+ end
20
+
21
+ json
22
+ end
23
+
24
+ def products_uri
25
+ Spree.endpoint + "/products"
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,25 @@
1
+ module Spree
2
+ module Model
3
+ def self.included(base)
4
+ base.send(:extend, ClassMethods)
5
+ end
6
+
7
+ module ClassMethods
8
+ def define_model_attributes(*attrs)
9
+ define_method :attributes do
10
+ attrs
11
+ end
12
+
13
+ attrs.each do |attr|
14
+ attr_accessor attr
15
+ end
16
+ end
17
+ end
18
+
19
+ def initialize(attributes = {})
20
+ self.attributes.each do |attr|
21
+ send("#{attr}=", attributes[attr.to_s])
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,9 @@
1
+ module Spree
2
+ class Product
3
+ include Spree::Model
4
+
5
+ define_model_attributes :id, :taxon_ids, :permalink, :description, :option_types,
6
+ :product_properties, :meta_description, :price, :available_on, :reviews,
7
+ :name, :related_products, :meta_keywords, :variants
8
+ end
9
+ end
data/motion/spree.rb ADDED
@@ -0,0 +1,11 @@
1
+ module Spree
2
+ def self.endpoint
3
+ @endpoint
4
+ end
5
+
6
+ def self.endpoint=(uri)
7
+ @endpoint = uri
8
+ end
9
+
10
+ include Spree::API::Product
11
+ end
@@ -0,0 +1,12 @@
1
+ #
2
+ # spec_helper.rb
3
+ #
4
+ # Setup the tests, define global spec methods
5
+ #
6
+ #
7
+ Spree.endpoint = "http://example.com/api"
8
+
9
+ def load_webstub_response(stub_name)
10
+ file = File.open(File.join(File.dirname(__FILE__), "support", "webstub", stub_name))
11
+ BW::JSON.parse file.read
12
+ end
@@ -0,0 +1,31 @@
1
+ describe Spree::API::Product do
2
+ extend WebStub::SpecHelpers
3
+
4
+ describe ".products_uri" do
5
+ it "returns the endpoint path + the products path" do
6
+ Spree.products_uri.should == Spree.endpoint + "/products"
7
+ end
8
+ end
9
+
10
+ describe ".products" do
11
+ before do
12
+ disable_network_access!
13
+ stub_request(:get, Spree.products_uri).
14
+ to_return(json: load_webstub_response("products.json"))
15
+
16
+ @products = nil
17
+ Spree.products do |p|
18
+ @products = p
19
+ resume
20
+ end
21
+
22
+ wait_max 1 do
23
+ @products
24
+ end
25
+ end
26
+
27
+ it "returns an array of Spree::Product objects" do
28
+ @products.all? { |p| p.is_a?(Spree::Product) }.should == true
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,28 @@
1
+ describe Spree::Model do
2
+ before do
3
+ @klass = Class.new
4
+ @klass.send(:include, Spree::Model)
5
+ end
6
+
7
+ describe ".define_model_attributes" do
8
+ before do
9
+ @klass.define_model_attributes :id, :name
10
+ @object = @klass.new("id" => 1, "name" => "Theodore")
11
+ end
12
+
13
+ it "creates the attribute list" do
14
+ @object.attributes.should == [:id, :name]
15
+ end
16
+
17
+ it "creates accessors for all attributes" do
18
+ [:id, :"id=", :name, :"name="].each do |accessor|
19
+ @object.respond_to?(accessor).should == true
20
+ end
21
+ end
22
+
23
+ it "loads declared attributes on .new" do
24
+ @object.id.should == 1
25
+ @object.name.should == "Theodore"
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,2 @@
1
+ describe Spree::Product do
2
+ end
@@ -0,0 +1 @@
1
+ {"count":16,"total_count":16,"current_page":1,"per_page":25,"pages":1,"products":[{"id":1,"name":"Ruby on Rails Tote","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"15.99","available_on":"2013-06-12T04:09:25Z","permalink":"ruby-on-rails-tote","meta_description":null,"meta_keywords":null,"taxon_ids":[4],"variants":[{"id":1,"name":"Ruby on Rails Tote","sku":"ROR-00011","price":"15.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"ruby-on-rails-tote","count_on_hand":10,"option_values":[],"images":[{"id":21,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_tote.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:44Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":1,"attachment_url":"/spree/products/21/product/ror_tote.jpeg?1371010184"},{"id":22,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_tote_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:45Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":1,"attachment_url":"/spree/products/22/product/ror_tote_back.jpeg?1371010185"}]}],"option_types":[],"product_properties":[{"id":25,"product_id":1,"property_id":9,"value":"Tote","property_name":"Type"},{"id":26,"product_id":1,"property_id":10,"value":"15\" x 18\" x 6\"","property_name":"Size"},{"id":27,"product_id":1,"property_id":11,"value":"Canvas","property_name":"Material"}],"reviews":[],"related_products":[]},{"id":2,"name":"Ruby on Rails Bag","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"22.99","available_on":"2013-06-12T04:09:25Z","permalink":"ruby-on-rails-bag","meta_description":null,"meta_keywords":null,"taxon_ids":[4],"variants":[{"id":2,"name":"Ruby on Rails Bag","sku":"ROR-00012","price":"22.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"21.0","permalink":"ruby-on-rails-bag","count_on_hand":10,"option_values":[],"images":[{"id":23,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_bag.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:46Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":2,"attachment_url":"/spree/products/23/product/ror_bag.jpeg?1371010186"}]}],"option_types":[],"product_properties":[{"id":28,"product_id":2,"property_id":9,"value":"Messenger","property_name":"Type"},{"id":29,"product_id":2,"property_id":10,"value":"14 1/2\" x 12\" x 5\"","property_name":"Size"},{"id":30,"product_id":2,"property_id":11,"value":"600 Denier Polyester","property_name":"Material"}],"reviews":[],"related_products":[]},{"id":3,"name":"Ruby on Rails Baseball Jersey","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"19.99","available_on":"2013-06-12T04:09:25Z","permalink":"ruby-on-rails-baseball-jersey","meta_description":null,"meta_keywords":null,"taxon_ids":[8],"variants":[{"id":17,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00001","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":15,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":40,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":1,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_red.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:29Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":17,"attachment_url":"/spree/products/1/product/ror_baseball_jersey_red.png?1371010169"},{"id":2,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_red.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:30Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":17,"attachment_url":"/spree/products/2/product/ror_baseball_jersey_back_red.png?1371010170"}]},{"id":18,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00002","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":15,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":7,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":3,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_blue.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:31Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":18,"attachment_url":"/spree/products/3/product/ror_baseball_jersey_blue.png?1371010171"},{"id":4,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_blue.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:31Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":18,"attachment_url":"/spree/products/4/product/ror_baseball_jersey_back_blue.png?1371010171"}]},{"id":19,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00003","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":15,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":41,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":5,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_green.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:32Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":19,"attachment_url":"/spree/products/5/product/ror_baseball_jersey_green.png?1371010172"},{"id":6,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_green.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:33Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":19,"attachment_url":"/spree/products/6/product/ror_baseball_jersey_back_green.png?1371010173"}]},{"id":20,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00004","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":30,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":40,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":7,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_red.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:34Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":20,"attachment_url":"/spree/products/7/product/ror_baseball_jersey_red.png?1371010174"},{"id":8,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_red.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:34Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":20,"attachment_url":"/spree/products/8/product/ror_baseball_jersey_back_red.png?1371010174"}]},{"id":21,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00005","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":30,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":7,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":9,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_blue.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:35Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":21,"attachment_url":"/spree/products/9/product/ror_baseball_jersey_blue.png?1371010175"},{"id":10,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_blue.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:36Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":21,"attachment_url":"/spree/products/10/product/ror_baseball_jersey_back_blue.png?1371010176"}]},{"id":22,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00006","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":30,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":41,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":11,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_green.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:37Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":22,"attachment_url":"/spree/products/11/product/ror_baseball_jersey_green.png?1371010177"},{"id":12,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_green.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:37Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":22,"attachment_url":"/spree/products/12/product/ror_baseball_jersey_back_green.png?1371010177"}]},{"id":23,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00007","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":31,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":40,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":13,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_red.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:38Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":23,"attachment_url":"/spree/products/13/product/ror_baseball_jersey_red.png?1371010178"},{"id":14,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_red.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:39Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":23,"attachment_url":"/spree/products/14/product/ror_baseball_jersey_back_red.png?1371010179"}]},{"id":24,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00008","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":31,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":7,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":15,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_blue.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:40Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":24,"attachment_url":"/spree/products/15/product/ror_baseball_jersey_blue.png?1371010180"},{"id":16,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_blue.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:40Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":24,"attachment_url":"/spree/products/16/product/ror_baseball_jersey_back_blue.png?1371010180"}]},{"id":25,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00009","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":31,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":41,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":17,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_green.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:41Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":25,"attachment_url":"/spree/products/17/product/ror_baseball_jersey_green.png?1371010181"},{"id":18,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_green.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:42Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":25,"attachment_url":"/spree/products/18/product/ror_baseball_jersey_back_green.png?1371010182"}]},{"id":26,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-00012","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[{"id":4,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":41,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2}],"images":[{"id":19,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_green.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:43Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":26,"attachment_url":"/spree/products/19/product/ror_baseball_jersey_green.png?1371010183"},{"id":20,"position":2,"attachment_content_type":"image/png","attachment_file_name":"ror_baseball_jersey_back_green.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:43Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":26,"attachment_url":"/spree/products/20/product/ror_baseball_jersey_back_green.png?1371010183"}]},{"id":3,"name":"Ruby on Rails Baseball Jersey","sku":"ROR-001","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"ruby-on-rails-baseball-jersey","count_on_hand":10,"option_values":[],"images":[{"id":24,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_baseball.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:47Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":3,"attachment_url":"/spree/products/24/product/ror_baseball.jpeg?1371010187"},{"id":25,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_baseball_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:48Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":3,"attachment_url":"/spree/products/25/product/ror_baseball_back.jpeg?1371010188"}]}],"option_types":[{"id":1,"name":"tshirt-size","presentation":"Size","position":1,"option_values":[{"id":43,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":44,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":45,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":46,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":36,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":37,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":38,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":39,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":29,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":30,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":31,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":32,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":22,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":23,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":24,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":25,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":15,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":16,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":17,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":18,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":8,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":9,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":10,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":11,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":1,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":2,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":3,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":4,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1}]},{"id":2,"name":"tshirt-color","presentation":"Color","position":2,"option_values":[{"id":47,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":48,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":49,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":40,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":41,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":42,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":33,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":34,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":35,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":26,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":27,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":28,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":19,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":20,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":21,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":12,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":13,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":14,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":5,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":6,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":7,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2}]}],"product_properties":[{"id":1,"product_id":3,"property_id":1,"value":"Wilson","property_name":"Manufacturer"},{"id":2,"product_id":3,"property_id":2,"value":"Wannabe Sports","property_name":"Brand"},{"id":3,"product_id":3,"property_id":3,"value":"JK1002","property_name":"Model"},{"id":4,"product_id":3,"property_id":4,"value":"Baseball Jersey","property_name":"Shirt Type"},{"id":5,"product_id":3,"property_id":5,"value":"Long","property_name":"Sleeve Type"},{"id":6,"product_id":3,"property_id":6,"value":"100% cotton","property_name":"Made from"},{"id":7,"product_id":3,"property_id":7,"value":"Loose","property_name":"Fit"},{"id":8,"product_id":3,"property_id":8,"value":"Men's","property_name":"Gender"}],"reviews":[],"related_products":[]},{"id":4,"name":"Ruby on Rails Jr. Spaghetti","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"19.99","available_on":"2013-06-12T04:09:25Z","permalink":"ruby-on-rails-jr-spaghetti","meta_description":null,"meta_keywords":null,"taxon_ids":[7],"variants":[{"id":4,"name":"Ruby on Rails Jr. Spaghetti","sku":"ROR-00013","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"ruby-on-rails-jr-spaghetti","count_on_hand":10,"option_values":[],"images":[{"id":26,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_jr_spaghetti.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:49Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":4,"attachment_url":"/spree/products/26/product/ror_jr_spaghetti.jpeg?1371010189"}]}],"option_types":[],"product_properties":[{"id":9,"product_id":4,"property_id":1,"value":"Jerseys","property_name":"Manufacturer"},{"id":10,"product_id":4,"property_id":2,"value":"Resiliance","property_name":"Brand"},{"id":11,"product_id":4,"property_id":3,"value":"TL174","property_name":"Model"},{"id":12,"product_id":4,"property_id":4,"value":"Jr. Spaghetti T","property_name":"Shirt Type"},{"id":13,"product_id":4,"property_id":5,"value":"None","property_name":"Sleeve Type"},{"id":14,"product_id":4,"property_id":6,"value":"90% Cotton, 10% Nylon","property_name":"Made from"},{"id":15,"product_id":4,"property_id":7,"value":"Form","property_name":"Fit"},{"id":16,"product_id":4,"property_id":8,"value":"Women's","property_name":"Gender"}],"reviews":[],"related_products":[]},{"id":5,"name":"Ruby on Rails Ringer T-Shirt","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"19.99","available_on":"2013-06-12T04:09:25Z","permalink":"ruby-on-rails-ringer-t-shirt","meta_description":null,"meta_keywords":null,"taxon_ids":[8],"variants":[{"id":5,"name":"Ruby on Rails Ringer T-Shirt","sku":"ROR-00015","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"ruby-on-rails-ringer-t-shirt","count_on_hand":10,"option_values":[],"images":[{"id":29,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_ringer.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:51Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":5,"attachment_url":"/spree/products/29/product/ror_ringer.jpeg?1371010191"},{"id":30,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_ringer_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:52Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":5,"attachment_url":"/spree/products/30/product/ror_ringer_back.jpeg?1371010192"}]}],"option_types":[],"product_properties":[{"id":17,"product_id":5,"property_id":1,"value":"Jerseys","property_name":"Manufacturer"},{"id":18,"product_id":5,"property_id":2,"value":"Conditioned","property_name":"Brand"},{"id":19,"product_id":5,"property_id":3,"value":"TL9002","property_name":"Model"},{"id":20,"product_id":5,"property_id":4,"value":"Ringer T","property_name":"Shirt Type"},{"id":21,"product_id":5,"property_id":5,"value":"Short","property_name":"Sleeve Type"},{"id":22,"product_id":5,"property_id":6,"value":"100% Vellum","property_name":"Made from"},{"id":23,"product_id":5,"property_id":7,"value":"Loose","property_name":"Fit"},{"id":24,"product_id":5,"property_id":8,"value":"Men's","property_name":"Gender"}],"reviews":[],"related_products":[]},{"id":6,"name":"Ruby Baseball Jersey","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"19.99","available_on":"2013-06-12T04:09:25Z","permalink":"ruby-baseball-jersey","meta_description":null,"meta_keywords":null,"taxon_ids":[8],"variants":[{"id":6,"name":"Ruby Baseball Jersey","sku":"RUB-00001","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"ruby-baseball-jersey","count_on_hand":10,"option_values":[],"images":[{"id":34,"position":1,"attachment_content_type":"image/png","attachment_file_name":"ruby_baseball.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:55Z","attachment_width":495,"attachment_height":477,"alt":null,"viewable_type":"Spree::Variant","viewable_id":6,"attachment_url":"/spree/products/34/product/ruby_baseball.png?1371010195"}]}],"option_types":[],"product_properties":[],"reviews":[],"related_products":[]},{"id":7,"name":"Apache Baseball Jersey","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"19.99","available_on":"2013-06-12T04:09:25Z","permalink":"apache-baseball-jersey","meta_description":null,"meta_keywords":null,"taxon_ids":[8],"variants":[{"id":7,"name":"Apache Baseball Jersey","sku":"APC-00001","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"apache-baseball-jersey","count_on_hand":10,"option_values":[],"images":[{"id":33,"position":1,"attachment_content_type":"image/png","attachment_file_name":"apache_baseball.png","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:54Z","attachment_width":504,"attachment_height":484,"alt":null,"viewable_type":"Spree::Variant","viewable_id":7,"attachment_url":"/spree/products/33/product/apache_baseball.png?1371010194"}]}],"option_types":[],"product_properties":[],"reviews":[],"related_products":[]},{"id":8,"name":"Spree Baseball Jersey","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"19.99","available_on":"2013-06-12T04:09:25Z","permalink":"spree-baseball-jersey","meta_description":null,"meta_keywords":null,"taxon_ids":[8],"variants":[{"id":8,"name":"Spree Baseball Jersey","sku":"SPR-00001","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"spree-baseball-jersey","count_on_hand":10,"option_values":[],"images":[{"id":41,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_jersey.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:10:01Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":8,"attachment_url":"/spree/products/41/product/spree_jersey.jpeg?1371010201"},{"id":42,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_jersey_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:10:01Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":8,"attachment_url":"/spree/products/42/product/spree_jersey_back.jpeg?1371010201"}]}],"option_types":[{"id":1,"name":"tshirt-size","presentation":"Size","position":1,"option_values":[{"id":43,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":44,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":45,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":46,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":36,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":37,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":38,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":39,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":29,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":30,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":31,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":32,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":22,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":23,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":24,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":25,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":15,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":16,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":17,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":18,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":8,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":9,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":10,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":11,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1},{"id":1,"name":"Small","presentation":"S","option_type_name":"tshirt-size","option_type_id":1},{"id":2,"name":"Medium","presentation":"M","option_type_name":"tshirt-size","option_type_id":1},{"id":3,"name":"Large","presentation":"L","option_type_name":"tshirt-size","option_type_id":1},{"id":4,"name":"Extra Large","presentation":"XL","option_type_name":"tshirt-size","option_type_id":1}]},{"id":2,"name":"tshirt-color","presentation":"Color","position":2,"option_values":[{"id":47,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":48,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":49,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":40,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":41,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":42,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":33,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":34,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":35,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":26,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":27,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":28,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":19,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":20,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":21,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":12,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":13,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":14,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2},{"id":5,"name":"Red","presentation":"Red","option_type_name":"tshirt-color","option_type_id":2},{"id":6,"name":"Green","presentation":"Green","option_type_name":"tshirt-color","option_type_id":2},{"id":7,"name":"Blue","presentation":"Blue","option_type_name":"tshirt-color","option_type_id":2}]}],"product_properties":[{"id":43,"product_id":8,"property_id":1,"value":"Wilson","property_name":"Manufacturer"},{"id":44,"product_id":8,"property_id":2,"value":"Wannabe Sports","property_name":"Brand"},{"id":45,"product_id":8,"property_id":3,"value":"JK1002","property_name":"Model"},{"id":46,"product_id":8,"property_id":4,"value":"Baseball Jersey","property_name":"Shirt Type"},{"id":47,"product_id":8,"property_id":5,"value":"Long","property_name":"Sleeve Type"},{"id":48,"product_id":8,"property_id":6,"value":"100% cotton","property_name":"Made from"},{"id":49,"product_id":8,"property_id":7,"value":"Loose","property_name":"Fit"},{"id":50,"product_id":8,"property_id":8,"value":"Men's","property_name":"Gender"}],"reviews":[],"related_products":[]},{"id":9,"name":"Spree Jr. Spaghetti","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"19.99","available_on":"2013-06-12T04:09:25Z","permalink":"spree-jr-spaghetti","meta_description":null,"meta_keywords":null,"taxon_ids":[7],"variants":[{"id":9,"name":"Spree Jr. Spaghetti","sku":"SPR-00013","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"spree-jr-spaghetti","count_on_hand":10,"option_values":[],"images":[{"id":40,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_spaghetti.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:10:00Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":9,"attachment_url":"/spree/products/40/product/spree_spaghetti.jpeg?1371010200"}]}],"option_types":[],"product_properties":[{"id":51,"product_id":9,"property_id":1,"value":"Jerseys","property_name":"Manufacturer"},{"id":52,"product_id":9,"property_id":2,"value":"Resiliance","property_name":"Brand"},{"id":53,"product_id":9,"property_id":3,"value":"TL174","property_name":"Model"},{"id":54,"product_id":9,"property_id":4,"value":"Jr. Spaghetti T","property_name":"Shirt Type"},{"id":55,"product_id":9,"property_id":5,"value":"None","property_name":"Sleeve Type"},{"id":56,"product_id":9,"property_id":6,"value":"90% Cotton, 10% Nylon","property_name":"Made from"},{"id":57,"product_id":9,"property_id":7,"value":"Form","property_name":"Fit"},{"id":58,"product_id":9,"property_id":8,"value":"Women's","property_name":"Gender"}],"reviews":[],"related_products":[]},{"id":10,"name":"Spree Ringer T-Shirt","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"19.99","available_on":"2013-06-12T04:09:25Z","permalink":"spree-ringer-t-shirt","meta_description":null,"meta_keywords":null,"taxon_ids":[8],"variants":[{"id":10,"name":"Spree Ringer T-Shirt","sku":"SPR-00015","price":"19.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"17.0","permalink":"spree-ringer-t-shirt","count_on_hand":10,"option_values":[],"images":[{"id":38,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_ringer_t.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:58Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":10,"attachment_url":"/spree/products/38/product/spree_ringer_t.jpeg?1371010198"},{"id":39,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_ringer_t_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:59Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":10,"attachment_url":"/spree/products/39/product/spree_ringer_t_back.jpeg?1371010199"}]}],"option_types":[],"product_properties":[{"id":59,"product_id":10,"property_id":1,"value":"Jerseys","property_name":"Manufacturer"},{"id":60,"product_id":10,"property_id":2,"value":"Conditioned","property_name":"Brand"},{"id":61,"product_id":10,"property_id":3,"value":"TL9002","property_name":"Model"},{"id":62,"product_id":10,"property_id":4,"value":"Ringer T","property_name":"Shirt Type"},{"id":63,"product_id":10,"property_id":5,"value":"Short","property_name":"Sleeve Type"},{"id":64,"product_id":10,"property_id":6,"value":"100% Vellum","property_name":"Made from"},{"id":65,"product_id":10,"property_id":7,"value":"Loose","property_name":"Fit"},{"id":66,"product_id":10,"property_id":8,"value":"Men's","property_name":"Gender"}],"reviews":[],"related_products":[]},{"id":11,"name":"Spree Tote","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"15.99","available_on":"2013-06-12T04:09:25Z","permalink":"spree-tote","meta_description":null,"meta_keywords":null,"taxon_ids":[4],"variants":[{"id":11,"name":"Spree Tote","sku":"SPR-00011","price":"15.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"13.0","permalink":"spree-tote","count_on_hand":10,"option_values":[],"images":[{"id":36,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_tote_front.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:57Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":11,"attachment_url":"/spree/products/36/product/spree_tote_front.jpeg?1371010197"},{"id":37,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_tote_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:57Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":11,"attachment_url":"/spree/products/37/product/spree_tote_back.jpeg?1371010197"}]}],"option_types":[],"product_properties":[{"id":39,"product_id":11,"property_id":9,"value":"Tote","property_name":"Type"},{"id":40,"product_id":11,"property_id":10,"value":"15\" x 18\" x 6\"","property_name":"Size"}],"reviews":[],"related_products":[]},{"id":12,"name":"Spree Bag","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"22.99","available_on":"2013-06-12T04:09:25Z","permalink":"spree-bag","meta_description":null,"meta_keywords":null,"taxon_ids":[4],"variants":[{"id":12,"name":"Spree Bag","sku":"SPR-00012","price":"22.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"21.0","permalink":"spree-bag","count_on_hand":10,"option_values":[],"images":[{"id":35,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_bag.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:56Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":12,"attachment_url":"/spree/products/35/product/spree_bag.jpeg?1371010196"}]}],"option_types":[],"product_properties":[{"id":41,"product_id":12,"property_id":9,"value":"Messenger","property_name":"Type"},{"id":42,"product_id":12,"property_id":10,"value":"14 1/2\" x 12\" x 5\"","property_name":"Size"}],"reviews":[],"related_products":[]},{"id":13,"name":"Ruby on Rails Mug","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"13.99","available_on":"2013-06-12T04:09:25Z","permalink":"ruby-on-rails-mug","meta_description":null,"meta_keywords":null,"taxon_ids":[5],"variants":[{"id":13,"name":"Ruby on Rails Mug","sku":"ROR-00014","price":"13.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"11.0","permalink":"ruby-on-rails-mug","count_on_hand":10,"option_values":[],"images":[{"id":27,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_mug.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:49Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":13,"attachment_url":"/spree/products/27/product/ror_mug.jpeg?1371010189"},{"id":28,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_mug_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:50Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":13,"attachment_url":"/spree/products/28/product/ror_mug_back.jpeg?1371010190"}]}],"option_types":[],"product_properties":[{"id":31,"product_id":13,"property_id":9,"value":"Mug","property_name":"Type"},{"id":32,"product_id":13,"property_id":10,"value":"4.5\" tall, 3.25\" dia.","property_name":"Size"}],"reviews":[],"related_products":[]},{"id":14,"name":"Ruby on Rails Stein","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"16.99","available_on":"2013-06-12T04:09:25Z","permalink":"ruby-on-rails-stein","meta_description":null,"meta_keywords":null,"taxon_ids":[5],"variants":[{"id":14,"name":"Ruby on Rails Stein","sku":"ROR-00016","price":"16.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"15.0","permalink":"ruby-on-rails-stein","count_on_hand":10,"option_values":[],"images":[{"id":31,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_stein.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:52Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":14,"attachment_url":"/spree/products/31/product/ror_stein.jpeg?1371010192"},{"id":32,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"ror_stein_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:09:53Z","attachment_width":360,"attachment_height":360,"alt":null,"viewable_type":"Spree::Variant","viewable_id":14,"attachment_url":"/spree/products/32/product/ror_stein_back.jpeg?1371010193"}]}],"option_types":[],"product_properties":[{"id":33,"product_id":14,"property_id":9,"value":"Stein","property_name":"Type"},{"id":34,"product_id":14,"property_id":10,"value":"6.75\" tall, 3.75\" dia. base, 3\" dia. rim","property_name":"Size"}],"reviews":[],"related_products":[]},{"id":15,"name":"Spree Stein","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"16.99","available_on":"2013-06-12T04:09:25Z","permalink":"spree-stein","meta_description":null,"meta_keywords":null,"taxon_ids":[5],"variants":[{"id":15,"name":"Spree Stein","sku":"SPR-00016","price":"16.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"15.0","permalink":"spree-stein","count_on_hand":10,"option_values":[],"images":[{"id":43,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_stein.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:10:02Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":15,"attachment_url":"/spree/products/43/product/spree_stein.jpeg?1371010202"},{"id":44,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_stein_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:10:03Z","attachment_width":480,"attachment_height":480,"alt":null,"viewable_type":"Spree::Variant","viewable_id":15,"attachment_url":"/spree/products/44/product/spree_stein_back.jpeg?1371010203"}]}],"option_types":[],"product_properties":[{"id":35,"product_id":15,"property_id":9,"value":"Stein","property_name":"Type"},{"id":36,"product_id":15,"property_id":10,"value":"6.75\" tall, 3.75\" dia. base, 3\" dia. rim","property_name":"Size"}],"reviews":[],"related_products":[]},{"id":16,"name":"Spree Mug","description":"Molestias alias sed debitis labore optio. Veniam in exercitationem eaque aut. Quas deleniti omnis et vel cupiditate.","price":"13.99","available_on":"2013-06-12T04:09:25Z","permalink":"spree-mug","meta_description":null,"meta_keywords":null,"taxon_ids":[5],"variants":[{"id":16,"name":"Spree Mug","sku":"SPR-00014","price":"13.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"11.0","permalink":"spree-mug","count_on_hand":10,"option_values":[],"images":[{"id":45,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_mug.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:10:04Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":16,"attachment_url":"/spree/products/45/product/spree_mug.jpeg?1371010204"},{"id":46,"position":2,"attachment_content_type":"image/jpeg","attachment_file_name":"spree_mug_back.jpeg","type":"Spree::Image","attachment_updated_at":"2013-06-12T04:10:05Z","attachment_width":240,"attachment_height":240,"alt":null,"viewable_type":"Spree::Variant","viewable_id":16,"attachment_url":"/spree/products/46/product/spree_mug_back.jpeg?1371010205"}]}],"option_types":[],"product_properties":[{"id":37,"product_id":16,"property_id":9,"value":"Mug","property_name":"Type"},{"id":38,"product_id":16,"property_id":10,"value":"4.5\" tall, 3.25\" dia.","property_name":"Size"}],"reviews":[],"related_products":[{"id":15,"permalink":"spree-stein","name":"Spree Stein","image_url":"/spree/products/43/small/spree_stein.jpeg?1371010202"}]}]}
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'spree/wrap/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "spree-wrap"
8
+ spec.version = Spree::Wrap::VERSION
9
+ spec.authors = ["David Padilla"]
10
+ spec.email = ["david@crowdint.com"]
11
+ spec.description = %q{Consumer for Spree API on Rubymotion}
12
+ spec.summary = %q{Consumer for Spree API on Rubymotion}
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "bubble-wrap"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.3"
24
+ spec.add_development_dependency "rake"
25
+ spec.add_development_dependency "webstub", "~> 0.3.0"
26
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: spree-wrap
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - David Padilla
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-06-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bubble-wrap
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.3'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webstub
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: 0.3.0
69
+ description: Consumer for Spree API on Rubymotion
70
+ email:
71
+ - david@crowdint.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - .gitignore
77
+ - .repl_history
78
+ - Gemfile
79
+ - LICENSE.txt
80
+ - README.md
81
+ - Rakefile
82
+ - lib/spree/wrap.rb
83
+ - lib/spree/wrap/version.rb
84
+ - motion/spree.rb
85
+ - motion/spree/api/product.rb
86
+ - motion/spree/model.rb
87
+ - motion/spree/product.rb
88
+ - spec/spec_helper.rb
89
+ - spec/spree/api/product_spec.rb
90
+ - spec/spree/model_spec.rb
91
+ - spec/spree/product_spec.rb
92
+ - spec/support/webstub/products.json
93
+ - spree-wrap.gemspec
94
+ homepage: ''
95
+ licenses:
96
+ - MIT
97
+ metadata: {}
98
+ post_install_message:
99
+ rdoc_options: []
100
+ require_paths:
101
+ - lib
102
+ required_ruby_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - '>='
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
112
+ requirements: []
113
+ rubyforge_project:
114
+ rubygems_version: 2.0.2
115
+ signing_key:
116
+ specification_version: 4
117
+ summary: Consumer for Spree API on Rubymotion
118
+ test_files:
119
+ - spec/spec_helper.rb
120
+ - spec/spree/api/product_spec.rb
121
+ - spec/spree/model_spec.rb
122
+ - spec/spree/product_spec.rb
123
+ - spec/support/webstub/products.json