kin 1.0.0
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/.document +5 -0
 - data/Gemfile +15 -0
 - data/LICENSE.txt +20 -0
 - data/README.rdoc +27 -0
 - data/Rakefile +53 -0
 - data/VERSION +1 -0
 - data/kin.gemspec +68 -0
 - data/lib/image.rb +23 -0
 - data/lib/kin.rb +83 -0
 - data/lib/product.rb +36 -0
 - data/lib/sale.rb +29 -0
 - data/lib/sku.rb +24 -0
 - data/test/helper.rb +18 -0
 - data/test/test_kin.rb +59 -0
 - metadata +169 -0
 
    
        data/.document
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    | 
         @@ -0,0 +1,15 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            source "http://rubygems.org"
         
     | 
| 
      
 2 
     | 
    
         
            +
            # Add dependencies required to use your gem here.
         
     | 
| 
      
 3 
     | 
    
         
            +
            # Example:
         
     | 
| 
      
 4 
     | 
    
         
            +
            #   gem "activesupport", ">= 2.3.5"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            # Add dependencies to develop your gem here.
         
     | 
| 
      
 7 
     | 
    
         
            +
            # Include everything needed to run rake, tests, features, etc.
         
     | 
| 
      
 8 
     | 
    
         
            +
            group :development do
         
     | 
| 
      
 9 
     | 
    
         
            +
              gem "shoulda", ">= 0"
         
     | 
| 
      
 10 
     | 
    
         
            +
              gem "rdoc", "~> 3.12"
         
     | 
| 
      
 11 
     | 
    
         
            +
              gem "bundler", "~> 1.0.0"
         
     | 
| 
      
 12 
     | 
    
         
            +
              gem "jeweler", "~> 1.8.3"
         
     | 
| 
      
 13 
     | 
    
         
            +
              gem "rcov", ">= 0"
         
     | 
| 
      
 14 
     | 
    
         
            +
              gem "json", ">= 1.6.5"
         
     | 
| 
      
 15 
     | 
    
         
            +
            end
         
     | 
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            Copyright (c) 2012 Vivek Bhagwat
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining
         
     | 
| 
      
 4 
     | 
    
         
            +
            a copy of this software and associated documentation files (the
         
     | 
| 
      
 5 
     | 
    
         
            +
            "Software"), to deal in the Software without restriction, including
         
     | 
| 
      
 6 
     | 
    
         
            +
            without limitation the rights to use, copy, modify, merge, publish,
         
     | 
| 
      
 7 
     | 
    
         
            +
            distribute, sublicense, and/or sell copies of the Software, and to
         
     | 
| 
      
 8 
     | 
    
         
            +
            permit persons to whom the Software is furnished to do so, subject to
         
     | 
| 
      
 9 
     | 
    
         
            +
            the following conditions:
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be
         
     | 
| 
      
 12 
     | 
    
         
            +
            included in all copies or substantial portions of the Software.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
         
     | 
| 
      
 15 
     | 
    
         
            +
            EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
         
     | 
| 
      
 16 
     | 
    
         
            +
            MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
         
     | 
| 
      
 17 
     | 
    
         
            +
            NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
         
     | 
| 
      
 18 
     | 
    
         
            +
            LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
         
     | 
| 
      
 19 
     | 
    
         
            +
            OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
         
     | 
| 
      
 20 
     | 
    
         
            +
            WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
         
     | 
    
        data/README.rdoc
    ADDED
    
    | 
         @@ -0,0 +1,27 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            = kin
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            ==Install
         
     | 
| 
      
 5 
     | 
    
         
            +
              gem install kin
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            ==Use
         
     | 
| 
      
 8 
     | 
    
         
            +
              gilt = Kin::Client.new(Secret.password)
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            == About
         
     | 
| 
      
 11 
     | 
    
         
            +
            In case you're wondering about the name, kin means gold in japanese
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            == Contributing to kin
         
     | 
| 
      
 14 
     | 
    
         
            +
             
         
     | 
| 
      
 15 
     | 
    
         
            +
            * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
         
     | 
| 
      
 16 
     | 
    
         
            +
            * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
         
     | 
| 
      
 17 
     | 
    
         
            +
            * Fork the project.
         
     | 
| 
      
 18 
     | 
    
         
            +
            * Start a feature/bugfix branch.
         
     | 
| 
      
 19 
     | 
    
         
            +
            * Commit and push until you are happy with your contribution.
         
     | 
| 
      
 20 
     | 
    
         
            +
            * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
         
     | 
| 
      
 21 
     | 
    
         
            +
            * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            == Copyright
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
            Copyright (c) 2012 Vivek Bhagwat. See LICENSE.txt for
         
     | 
| 
      
 26 
     | 
    
         
            +
            further details.
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
    
        data/Rakefile
    ADDED
    
    | 
         @@ -0,0 +1,53 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # encoding: utf-8
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            require 'rubygems'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'bundler'
         
     | 
| 
      
 5 
     | 
    
         
            +
            begin
         
     | 
| 
      
 6 
     | 
    
         
            +
              Bundler.setup(:default, :development)
         
     | 
| 
      
 7 
     | 
    
         
            +
            rescue Bundler::BundlerError => e
         
     | 
| 
      
 8 
     | 
    
         
            +
              $stderr.puts e.message
         
     | 
| 
      
 9 
     | 
    
         
            +
              $stderr.puts "Run `bundle install` to install missing gems"
         
     | 
| 
      
 10 
     | 
    
         
            +
              exit e.status_code
         
     | 
| 
      
 11 
     | 
    
         
            +
            end
         
     | 
| 
      
 12 
     | 
    
         
            +
            require 'rake'
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            require 'jeweler'
         
     | 
| 
      
 15 
     | 
    
         
            +
            Jeweler::Tasks.new do |gem|
         
     | 
| 
      
 16 
     | 
    
         
            +
              # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
         
     | 
| 
      
 17 
     | 
    
         
            +
              gem.name = "kin"
         
     | 
| 
      
 18 
     | 
    
         
            +
              gem.homepage = "http://github.com/vivekbhagwat/kin"
         
     | 
| 
      
 19 
     | 
    
         
            +
              gem.license = "MIT"
         
     | 
| 
      
 20 
     | 
    
         
            +
              gem.summary = "A simple ruby wrapper for the Gilt API"
         
     | 
| 
      
 21 
     | 
    
         
            +
              gem.description = "A simple ruby wrapper for the Gilt API, based on the scala wrapper at github.com/mnn2104/Aurum"
         
     | 
| 
      
 22 
     | 
    
         
            +
              gem.email = "bhagwat.vivek@gmail.com"
         
     | 
| 
      
 23 
     | 
    
         
            +
              gem.authors = ["Vivek Bhagwat"]
         
     | 
| 
      
 24 
     | 
    
         
            +
              # dependencies defined in Gemfile
         
     | 
| 
      
 25 
     | 
    
         
            +
            end
         
     | 
| 
      
 26 
     | 
    
         
            +
            Jeweler::RubygemsDotOrgTasks.new
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            require 'rake/testtask'
         
     | 
| 
      
 29 
     | 
    
         
            +
            Rake::TestTask.new(:test) do |test|
         
     | 
| 
      
 30 
     | 
    
         
            +
              test.libs << 'lib' << 'test'
         
     | 
| 
      
 31 
     | 
    
         
            +
              test.pattern = 'test/**/test_*.rb'
         
     | 
| 
      
 32 
     | 
    
         
            +
              test.verbose = true
         
     | 
| 
      
 33 
     | 
    
         
            +
            end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            require 'rcov/rcovtask'
         
     | 
| 
      
 36 
     | 
    
         
            +
            Rcov::RcovTask.new do |test|
         
     | 
| 
      
 37 
     | 
    
         
            +
              test.libs << 'test'
         
     | 
| 
      
 38 
     | 
    
         
            +
              test.pattern = 'test/**/test_*.rb'
         
     | 
| 
      
 39 
     | 
    
         
            +
              test.verbose = true
         
     | 
| 
      
 40 
     | 
    
         
            +
              test.rcov_opts << '--exclude "gems/*"'
         
     | 
| 
      
 41 
     | 
    
         
            +
            end
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
            task :default => :test
         
     | 
| 
      
 44 
     | 
    
         
            +
             
     | 
| 
      
 45 
     | 
    
         
            +
            require 'rdoc/task'
         
     | 
| 
      
 46 
     | 
    
         
            +
            Rake::RDocTask.new do |rdoc|
         
     | 
| 
      
 47 
     | 
    
         
            +
              version = File.exist?('VERSION') ? File.read('VERSION') : ""
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
              rdoc.rdoc_dir = 'rdoc'
         
     | 
| 
      
 50 
     | 
    
         
            +
              rdoc.title = "kin #{version}"
         
     | 
| 
      
 51 
     | 
    
         
            +
              rdoc.rdoc_files.include('README*')
         
     | 
| 
      
 52 
     | 
    
         
            +
              rdoc.rdoc_files.include('lib/**/*.rb')
         
     | 
| 
      
 53 
     | 
    
         
            +
            end
         
     | 
    
        data/VERSION
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            1.0.0
         
     | 
    
        data/kin.gemspec
    ADDED
    
    | 
         @@ -0,0 +1,68 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Generated by jeweler
         
     | 
| 
      
 2 
     | 
    
         
            +
            # DO NOT EDIT THIS FILE DIRECTLY
         
     | 
| 
      
 3 
     | 
    
         
            +
            # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
         
     | 
| 
      
 4 
     | 
    
         
            +
            # -*- encoding: utf-8 -*-
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            Gem::Specification.new do |s|
         
     | 
| 
      
 7 
     | 
    
         
            +
              s.name = %q{kin}
         
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "1.0.0"
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
      
 11 
     | 
    
         
            +
              s.authors = [%q{Vivek Bhagwat}]
         
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = %q{2012-02-11}
         
     | 
| 
      
 13 
     | 
    
         
            +
              s.description = %q{A simple ruby wrapper for the Gilt API, based on the scala wrapper at github.com/mnn2104/Aurum}
         
     | 
| 
      
 14 
     | 
    
         
            +
              s.email = %q{bhagwat.vivek@gmail.com}
         
     | 
| 
      
 15 
     | 
    
         
            +
              s.extra_rdoc_files = [
         
     | 
| 
      
 16 
     | 
    
         
            +
                "LICENSE.txt",
         
     | 
| 
      
 17 
     | 
    
         
            +
                "README.rdoc"
         
     | 
| 
      
 18 
     | 
    
         
            +
              ]
         
     | 
| 
      
 19 
     | 
    
         
            +
              s.files = [
         
     | 
| 
      
 20 
     | 
    
         
            +
                ".document",
         
     | 
| 
      
 21 
     | 
    
         
            +
                "Gemfile",
         
     | 
| 
      
 22 
     | 
    
         
            +
                "LICENSE.txt",
         
     | 
| 
      
 23 
     | 
    
         
            +
                "README.rdoc",
         
     | 
| 
      
 24 
     | 
    
         
            +
                "Rakefile",
         
     | 
| 
      
 25 
     | 
    
         
            +
                "VERSION",
         
     | 
| 
      
 26 
     | 
    
         
            +
                "kin.gemspec",
         
     | 
| 
      
 27 
     | 
    
         
            +
                "lib/image.rb",
         
     | 
| 
      
 28 
     | 
    
         
            +
                "lib/kin.rb",
         
     | 
| 
      
 29 
     | 
    
         
            +
                "lib/product.rb",
         
     | 
| 
      
 30 
     | 
    
         
            +
                "lib/sale.rb",
         
     | 
| 
      
 31 
     | 
    
         
            +
                "lib/sku.rb",
         
     | 
| 
      
 32 
     | 
    
         
            +
                "test/helper.rb",
         
     | 
| 
      
 33 
     | 
    
         
            +
                "test/test_kin.rb"
         
     | 
| 
      
 34 
     | 
    
         
            +
              ]
         
     | 
| 
      
 35 
     | 
    
         
            +
              s.homepage = %q{http://github.com/vivekbhagwat/kin}
         
     | 
| 
      
 36 
     | 
    
         
            +
              s.licenses = [%q{MIT}]
         
     | 
| 
      
 37 
     | 
    
         
            +
              s.require_paths = [%q{lib}]
         
     | 
| 
      
 38 
     | 
    
         
            +
              s.rubygems_version = %q{1.8.6}
         
     | 
| 
      
 39 
     | 
    
         
            +
              s.summary = %q{A simple ruby wrapper for the Gilt API}
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
              if s.respond_to? :specification_version then
         
     | 
| 
      
 42 
     | 
    
         
            +
                s.specification_version = 3
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
         
     | 
| 
      
 45 
     | 
    
         
            +
                  s.add_development_dependency(%q<shoulda>, [">= 0"])
         
     | 
| 
      
 46 
     | 
    
         
            +
                  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
         
     | 
| 
      
 47 
     | 
    
         
            +
                  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
         
     | 
| 
      
 48 
     | 
    
         
            +
                  s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
         
     | 
| 
      
 49 
     | 
    
         
            +
                  s.add_development_dependency(%q<rcov>, [">= 0"])
         
     | 
| 
      
 50 
     | 
    
         
            +
                  s.add_development_dependency(%q<json>, [">= 1.6.5"])
         
     | 
| 
      
 51 
     | 
    
         
            +
                else
         
     | 
| 
      
 52 
     | 
    
         
            +
                  s.add_dependency(%q<shoulda>, [">= 0"])
         
     | 
| 
      
 53 
     | 
    
         
            +
                  s.add_dependency(%q<rdoc>, ["~> 3.12"])
         
     | 
| 
      
 54 
     | 
    
         
            +
                  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
         
     | 
| 
      
 55 
     | 
    
         
            +
                  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
         
     | 
| 
      
 56 
     | 
    
         
            +
                  s.add_dependency(%q<rcov>, [">= 0"])
         
     | 
| 
      
 57 
     | 
    
         
            +
                  s.add_dependency(%q<json>, [">= 1.6.5"])
         
     | 
| 
      
 58 
     | 
    
         
            +
                end
         
     | 
| 
      
 59 
     | 
    
         
            +
              else
         
     | 
| 
      
 60 
     | 
    
         
            +
                s.add_dependency(%q<shoulda>, [">= 0"])
         
     | 
| 
      
 61 
     | 
    
         
            +
                s.add_dependency(%q<rdoc>, ["~> 3.12"])
         
     | 
| 
      
 62 
     | 
    
         
            +
                s.add_dependency(%q<bundler>, ["~> 1.0.0"])
         
     | 
| 
      
 63 
     | 
    
         
            +
                s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
         
     | 
| 
      
 64 
     | 
    
         
            +
                s.add_dependency(%q<rcov>, [">= 0"])
         
     | 
| 
      
 65 
     | 
    
         
            +
                s.add_dependency(%q<json>, [">= 1.6.5"])
         
     | 
| 
      
 66 
     | 
    
         
            +
              end
         
     | 
| 
      
 67 
     | 
    
         
            +
            end
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
    
        data/lib/image.rb
    ADDED
    
    | 
         @@ -0,0 +1,23 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'uri'
         
     | 
| 
      
 2 
     | 
    
         
            +
            module Kin
         
     | 
| 
      
 3 
     | 
    
         
            +
              class Image
         
     | 
| 
      
 4 
     | 
    
         
            +
                attr_accessor :url, :width, :height
         
     | 
| 
      
 5 
     | 
    
         
            +
                
         
     | 
| 
      
 6 
     | 
    
         
            +
                def initialize(obj={})
         
     | 
| 
      
 7 
     | 
    
         
            +
                  raise "Invalid Argument" unless obj.is_a?(Hash)
         
     | 
| 
      
 8 
     | 
    
         
            +
                  initialize(obj['url'], obj['width'], obj['height'])
         
     | 
| 
      
 9 
     | 
    
         
            +
                end
         
     | 
| 
      
 10 
     | 
    
         
            +
                
         
     | 
| 
      
 11 
     | 
    
         
            +
                def initialize(url='',width=0,height=0)
         
     | 
| 
      
 12 
     | 
    
         
            +
                  @url = URI.parse(url.to_s)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  @width = width.to_i
         
     | 
| 
      
 14 
     | 
    
         
            +
                  @height = height.to_i
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
      
 16 
     | 
    
         
            +
                
         
     | 
| 
      
 17 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 18 
     | 
    
         
            +
                  vars = {}
         
     | 
| 
      
 19 
     | 
    
         
            +
                  self.instance_variables.map {|v| vars[v.to_sym] = self.instance_variable_get(v)}
         
     | 
| 
      
 20 
     | 
    
         
            +
                  vars
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/kin.rb
    ADDED
    
    | 
         @@ -0,0 +1,83 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'sale'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'net/http'
         
     | 
| 
      
 3 
     | 
    
         
            +
            require 'net/https'
         
     | 
| 
      
 4 
     | 
    
         
            +
            require 'rubygems'
         
     | 
| 
      
 5 
     | 
    
         
            +
            require 'json'
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            module Kin
         
     | 
| 
      
 9 
     | 
    
         
            +
              def Kin.stores
         
     | 
| 
      
 10 
     | 
    
         
            +
                ["women", 'men', 'kids', 'home']
         
     | 
| 
      
 11 
     | 
    
         
            +
              end
         
     | 
| 
      
 12 
     | 
    
         
            +
              
         
     | 
| 
      
 13 
     | 
    
         
            +
              def Kin.domain
         
     | 
| 
      
 14 
     | 
    
         
            +
                "https://api.gilt.com/v1/"
         
     | 
| 
      
 15 
     | 
    
         
            +
              end
         
     | 
| 
      
 16 
     | 
    
         
            +
              
         
     | 
| 
      
 17 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 18 
     | 
    
         
            +
                attr_accessor :apikey
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              
         
     | 
| 
      
 21 
     | 
    
         
            +
                def initialize(apikey)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @apikey = apikey.to_s
         
     | 
| 
      
 23 
     | 
    
         
            +
                end
         
     | 
| 
      
 24 
     | 
    
         
            +
                
         
     | 
| 
      
 25 
     | 
    
         
            +
                def active_sales
         
     | 
| 
      
 26 
     | 
    
         
            +
                  sales = make_request(Kin.domain + "sales/active.json")['sales']
         
     | 
| 
      
 27 
     | 
    
         
            +
                  sales.each_with_index do |sale, i|
         
     | 
| 
      
 28 
     | 
    
         
            +
                    sales[i] = Kin::Sale.new(sale)
         
     | 
| 
      
 29 
     | 
    
         
            +
                  end
         
     | 
| 
      
 30 
     | 
    
         
            +
                  sales
         
     | 
| 
      
 31 
     | 
    
         
            +
                end
         
     | 
| 
      
 32 
     | 
    
         
            +
                
         
     | 
| 
      
 33 
     | 
    
         
            +
                def active_sales_in_store(store_key)
         
     | 
| 
      
 34 
     | 
    
         
            +
                  raise "Invalid Store Key" unless validate_store_key(store_key)
         
     | 
| 
      
 35 
     | 
    
         
            +
                  make_request(Kin.domain + "sales/" + store_key + "/active.json")
         
     | 
| 
      
 36 
     | 
    
         
            +
                end
         
     | 
| 
      
 37 
     | 
    
         
            +
                
         
     | 
| 
      
 38 
     | 
    
         
            +
                def upcoming_sales
         
     | 
| 
      
 39 
     | 
    
         
            +
                  make_request(Kin.domain + "sales/upcoming.json")
         
     | 
| 
      
 40 
     | 
    
         
            +
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
                
         
     | 
| 
      
 42 
     | 
    
         
            +
                def upcoming_sales_in_store(store_key)
         
     | 
| 
      
 43 
     | 
    
         
            +
                  raise "Invalid Store Key" unless validate_store_key(store_key)
         
     | 
| 
      
 44 
     | 
    
         
            +
                  make_request(Kin.domain + "sales/" + store_key + "/upcoming.json")
         
     | 
| 
      
 45 
     | 
    
         
            +
                end
         
     | 
| 
      
 46 
     | 
    
         
            +
                
         
     | 
| 
      
 47 
     | 
    
         
            +
                def sale_detail(store_key, sale_key)
         
     | 
| 
      
 48 
     | 
    
         
            +
                  raise "Invalid Store Key" unless validate_store_key(store_key)
         
     | 
| 
      
 49 
     | 
    
         
            +
                  make_request(Kin.domain + "sales/" + store_key + "/" + sale_key + "/detail.json")
         
     | 
| 
      
 50 
     | 
    
         
            +
                end
         
     | 
| 
      
 51 
     | 
    
         
            +
                
         
     | 
| 
      
 52 
     | 
    
         
            +
                def product_detail(product_id)
         
     | 
| 
      
 53 
     | 
    
         
            +
                  make_request(Kin.domain + "products/" + product_id.to_s + "/detail.json")
         
     | 
| 
      
 54 
     | 
    
         
            +
                end
         
     | 
| 
      
 55 
     | 
    
         
            +
                
         
     | 
| 
      
 56 
     | 
    
         
            +
                def product_detail_from_url(url)
         
     | 
| 
      
 57 
     | 
    
         
            +
                  raise 'Invalid URL' unless validate_url(url)
         
     | 
| 
      
 58 
     | 
    
         
            +
                  make_request(url)
         
     | 
| 
      
 59 
     | 
    
         
            +
                end
         
     | 
| 
      
 60 
     | 
    
         
            +
                
         
     | 
| 
      
 61 
     | 
    
         
            +
                private 
         
     | 
| 
      
 62 
     | 
    
         
            +
                
         
     | 
| 
      
 63 
     | 
    
         
            +
                def make_request(url_string)
         
     | 
| 
      
 64 
     | 
    
         
            +
                  url = URI.parse(url_string)
         
     | 
| 
      
 65 
     | 
    
         
            +
                  
         
     | 
| 
      
 66 
     | 
    
         
            +
                  http = Net::HTTP.new(url.host, url.port)
         
     | 
| 
      
 67 
     | 
    
         
            +
                  http.use_ssl = true if url.scheme == 'https'
         
     | 
| 
      
 68 
     | 
    
         
            +
                  
         
     | 
| 
      
 69 
     | 
    
         
            +
                  request = Net::HTTP::Get.new(url.path + '?apikey=' + @apikey)
         
     | 
| 
      
 70 
     | 
    
         
            +
                  # request.set_form_data(params)
         
     | 
| 
      
 71 
     | 
    
         
            +
                  JSON.parse(http.request(request).body)
         
     | 
| 
      
 72 
     | 
    
         
            +
                end
         
     | 
| 
      
 73 
     | 
    
         
            +
                
         
     | 
| 
      
 74 
     | 
    
         
            +
                def validate_store_key(store_key) 
         
     | 
| 
      
 75 
     | 
    
         
            +
                  Kin.stores.include?(store_key) 
         
     | 
| 
      
 76 
     | 
    
         
            +
                end
         
     | 
| 
      
 77 
     | 
    
         
            +
                
         
     | 
| 
      
 78 
     | 
    
         
            +
                def validate_url(url)
         
     | 
| 
      
 79 
     | 
    
         
            +
                  url =~ /^#{Regexp.quote(Kin.domain + "products/")}\w+#{Regexp.quote('/detail.json')}$/
         
     | 
| 
      
 80 
     | 
    
         
            +
                end
         
     | 
| 
      
 81 
     | 
    
         
            +
                
         
     | 
| 
      
 82 
     | 
    
         
            +
              end
         
     | 
| 
      
 83 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/product.rb
    ADDED
    
    | 
         @@ -0,0 +1,36 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'image'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'sku'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module Kin
         
     | 
| 
      
 5 
     | 
    
         
            +
              class Product
         
     | 
| 
      
 6 
     | 
    
         
            +
                attr_accessor :name, :product, :id, :brand, :url, :image_urls, :skus,
         
     | 
| 
      
 7 
     | 
    
         
            +
                  :description, :fit_notes, :material, :care_instructions, :origin #optional
         
     | 
| 
      
 8 
     | 
    
         
            +
                
         
     | 
| 
      
 9 
     | 
    
         
            +
                def initialize(obj={})
         
     | 
| 
      
 10 
     | 
    
         
            +
                  raise "Invalid Argument" unless obj.is_a?(Hash)
         
     | 
| 
      
 11 
     | 
    
         
            +
                  initialize(obj['name'], obj['product'], obj['id'], obj['url'], obj['image_urls'], obj['skus'],
         
     | 
| 
      
 12 
     | 
    
         
            +
                    obj['description'], obj['fit_notes'], obj['material'], obj['care_instructions'], obj['origin'])
         
     | 
| 
      
 13 
     | 
    
         
            +
                end
         
     | 
| 
      
 14 
     | 
    
         
            +
                
         
     | 
| 
      
 15 
     | 
    
         
            +
                def initialize(name='',product='',id=0, brand='',url='',image_urls={},skus=[],
         
     | 
| 
      
 16 
     | 
    
         
            +
                              description='',fit_notes='',material='', care_instructions='',origin='')
         
     | 
| 
      
 17 
     | 
    
         
            +
                  @name = name.to_s
         
     | 
| 
      
 18 
     | 
    
         
            +
                  @product = product.to_s
         
     | 
| 
      
 19 
     | 
    
         
            +
                  @id = id.to_i
         
     | 
| 
      
 20 
     | 
    
         
            +
                  @brand = brand.to_i
         
     | 
| 
      
 21 
     | 
    
         
            +
                  @url = URI.parse(url.to_s)
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @image_urls = image_urls
         
     | 
| 
      
 23 
     | 
    
         
            +
                  @skus = skus
         
     | 
| 
      
 24 
     | 
    
         
            +
                  @description = description.to_s
         
     | 
| 
      
 25 
     | 
    
         
            +
                  @fit_notes = fit_notes.to_s
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @material = material.to_s 
         
     | 
| 
      
 27 
     | 
    
         
            +
                  @care_instructions = care_instructions.to_s
         
     | 
| 
      
 28 
     | 
    
         
            +
                  @origin = origin.to_s
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
              
         
     | 
| 
      
 31 
     | 
    
         
            +
                def get_images
         
     | 
| 
      
 32 
     | 
    
         
            +
                  @image_urls.values.flatten if image_urls.is_a?(Hash)
         
     | 
| 
      
 33 
     | 
    
         
            +
                end
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
              end  
         
     | 
| 
      
 36 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/sale.rb
    ADDED
    
    | 
         @@ -0,0 +1,29 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'product'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'image'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module Kin
         
     | 
| 
      
 5 
     | 
    
         
            +
              class Sale
         
     | 
| 
      
 6 
     | 
    
         
            +
                attr_accessor :name, :sale, :sale_key, :store, :sale_url, :begins, :image_urls, :description, :ends, :products
         
     | 
| 
      
 7 
     | 
    
         
            +
                
         
     | 
| 
      
 8 
     | 
    
         
            +
                def initialize(obj={})
         
     | 
| 
      
 9 
     | 
    
         
            +
                  raise 'Invalid Argument' unless obj.is_a?(Hash)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  init_with_values(obj['name'], obj['sale'], obj['sale_key'], obj['store'], obj['sale_url'], obj['begins'], 
         
     | 
| 
      
 11 
     | 
    
         
            +
                    obj['image_urls'], obj['description'], obj['ends'], obj['products'])
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
                
         
     | 
| 
      
 14 
     | 
    
         
            +
                private 
         
     | 
| 
      
 15 
     | 
    
         
            +
                
         
     | 
| 
      
 16 
     | 
    
         
            +
                def init_with_values(name,sale,sale_key,store,sale_url,begins,image_urls, description='', ends='',products=[])
         
     | 
| 
      
 17 
     | 
    
         
            +
                  @name = name.to_s
         
     | 
| 
      
 18 
     | 
    
         
            +
                  @sale = sale.to_s
         
     | 
| 
      
 19 
     | 
    
         
            +
                  @sale_key = sale_key.to_s
         
     | 
| 
      
 20 
     | 
    
         
            +
                  @store = store.to_s
         
     | 
| 
      
 21 
     | 
    
         
            +
                  @sale_url = sale_url.to_s
         
     | 
| 
      
 22 
     | 
    
         
            +
                  @begins = begins.to_s
         
     | 
| 
      
 23 
     | 
    
         
            +
                  @image_urls = image_urls
         
     | 
| 
      
 24 
     | 
    
         
            +
                  @description = description.to_s
         
     | 
| 
      
 25 
     | 
    
         
            +
                  @ends = ends.to_s
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @products = products
         
     | 
| 
      
 27 
     | 
    
         
            +
                end
         
     | 
| 
      
 28 
     | 
    
         
            +
              end
         
     | 
| 
      
 29 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/sku.rb
    ADDED
    
    | 
         @@ -0,0 +1,24 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Kin
         
     | 
| 
      
 2 
     | 
    
         
            +
              class SKU
         
     | 
| 
      
 3 
     | 
    
         
            +
                attr_accessor :id, :inventory_status, :msrp_price, :sale_price, :shipping_surcharge, :attributes
         
     | 
| 
      
 4 
     | 
    
         
            +
                
         
     | 
| 
      
 5 
     | 
    
         
            +
                def initalize(obj={})
         
     | 
| 
      
 6 
     | 
    
         
            +
                  raise "Invalid Argument" unless obj.is_a?(Hash)
         
     | 
| 
      
 7 
     | 
    
         
            +
                  initialize(obj['id'], obj['inventory_status'], obj['sale_price'], obj['shipping_surcharge'], obj['attributes'])
         
     | 
| 
      
 8 
     | 
    
         
            +
                end
         
     | 
| 
      
 9 
     | 
    
         
            +
                
         
     | 
| 
      
 10 
     | 
    
         
            +
                def initialize(id=0,inventory_status='',sale_price='',shipping_surcharge='',attributes={})
         
     | 
| 
      
 11 
     | 
    
         
            +
                  @id = id.to_i
         
     | 
| 
      
 12 
     | 
    
         
            +
                  @inventory_status = inventory_status.to_s
         
     | 
| 
      
 13 
     | 
    
         
            +
                  @sale_price = sale_price.to_s
         
     | 
| 
      
 14 
     | 
    
         
            +
                  @shipping_surcharge = shipping_surcharge.to_s
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @attributes = attributes
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
                
         
     | 
| 
      
 18 
     | 
    
         
            +
                def to_s
         
     | 
| 
      
 19 
     | 
    
         
            +
                  vars = {}
         
     | 
| 
      
 20 
     | 
    
         
            +
                  self.instance_variables.map {|v| vars[v.to_sym] = self.instance_variable_get(v)}
         
     | 
| 
      
 21 
     | 
    
         
            +
                  vars
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
    
        data/test/helper.rb
    ADDED
    
    | 
         @@ -0,0 +1,18 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'rubygems'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'bundler'
         
     | 
| 
      
 3 
     | 
    
         
            +
            begin
         
     | 
| 
      
 4 
     | 
    
         
            +
              Bundler.setup(:default, :development)
         
     | 
| 
      
 5 
     | 
    
         
            +
            rescue Bundler::BundlerError => e
         
     | 
| 
      
 6 
     | 
    
         
            +
              $stderr.puts e.message
         
     | 
| 
      
 7 
     | 
    
         
            +
              $stderr.puts "Run `bundle install` to install missing gems"
         
     | 
| 
      
 8 
     | 
    
         
            +
              exit e.status_code
         
     | 
| 
      
 9 
     | 
    
         
            +
            end
         
     | 
| 
      
 10 
     | 
    
         
            +
            require 'test/unit'
         
     | 
| 
      
 11 
     | 
    
         
            +
            require 'shoulda'
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
         
     | 
| 
      
 14 
     | 
    
         
            +
            $LOAD_PATH.unshift(File.dirname(__FILE__))
         
     | 
| 
      
 15 
     | 
    
         
            +
            require 'kin'
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            class Test::Unit::TestCase
         
     | 
| 
      
 18 
     | 
    
         
            +
            end
         
     | 
    
        data/test/test_kin.rb
    ADDED
    
    | 
         @@ -0,0 +1,59 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'secret'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            class TestKin < Test::Unit::TestCase
         
     | 
| 
      
 5 
     | 
    
         
            +
              should "Return a list of active sales" do
         
     | 
| 
      
 6 
     | 
    
         
            +
                gilt = Kin::Client.new(Secret.password)
         
     | 
| 
      
 7 
     | 
    
         
            +
                actives = gilt.active_sales
         
     | 
| 
      
 8 
     | 
    
         
            +
                assert(!actives.empty?)
         
     | 
| 
      
 9 
     | 
    
         
            +
                # assert(!(actives.name.empty? || actives.sale.empty? || actives.sale_key.empty?
         
     | 
| 
      
 10 
     | 
    
         
            +
                      # || actives.store.empty? || actives.sale_url.empty? || actives.begins.empty? || actives.image_urls.empty?))    
         
     | 
| 
      
 11 
     | 
    
         
            +
              end
         
     | 
| 
      
 12 
     | 
    
         
            +
              
         
     | 
| 
      
 13 
     | 
    
         
            +
              should "Return a list of active sales for this store" do
         
     | 
| 
      
 14 
     | 
    
         
            +
                gilt = Kin::Client.new(Secret.password)
         
     | 
| 
      
 15 
     | 
    
         
            +
                Kin.stores.each do |store|
         
     | 
| 
      
 16 
     | 
    
         
            +
                  active = gilt.active_sales_in_store(store)
         
     | 
| 
      
 17 
     | 
    
         
            +
                  assert(!active.empty?)
         
     | 
| 
      
 18 
     | 
    
         
            +
                end
         
     | 
| 
      
 19 
     | 
    
         
            +
              end
         
     | 
| 
      
 20 
     | 
    
         
            +
              
         
     | 
| 
      
 21 
     | 
    
         
            +
              should "Return a list of upcoming sales" do
         
     | 
| 
      
 22 
     | 
    
         
            +
                gilt = Kin::Client.new(Secret.password)
         
     | 
| 
      
 23 
     | 
    
         
            +
                upcomings = gilt.upcoming_sales
         
     | 
| 
      
 24 
     | 
    
         
            +
                assert(!upcomings.empty?)
         
     | 
| 
      
 25 
     | 
    
         
            +
                # assert(!(actives.name.empty? || actives.sale.empty? || actives.sale_key.empty?
         
     | 
| 
      
 26 
     | 
    
         
            +
                      # || actives.store.empty? || actives.sale_url.empty? || actives.begins.empty? || actives.image_urls.empty?))    
         
     | 
| 
      
 27 
     | 
    
         
            +
              end
         
     | 
| 
      
 28 
     | 
    
         
            +
              
         
     | 
| 
      
 29 
     | 
    
         
            +
              should "Return a list of upcoming sales for this store" do
         
     | 
| 
      
 30 
     | 
    
         
            +
                gilt = Kin::Client.new(Secret.password)
         
     | 
| 
      
 31 
     | 
    
         
            +
                Kin.stores.each do |store|
         
     | 
| 
      
 32 
     | 
    
         
            +
                  upcomings = gilt.upcoming_sales_in_store(store)
         
     | 
| 
      
 33 
     | 
    
         
            +
                  assert(!upcomings.empty?)
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
      
 36 
     | 
    
         
            +
              
         
     | 
| 
      
 37 
     | 
    
         
            +
              should "Return details about a sale" do
         
     | 
| 
      
 38 
     | 
    
         
            +
                gilt = Kin::Client.new(Secret.password)
         
     | 
| 
      
 39 
     | 
    
         
            +
                sales = gilt.active_sales
         
     | 
| 
      
 40 
     | 
    
         
            +
                list = []
         
     | 
| 
      
 41 
     | 
    
         
            +
                sales.each do |sale|
         
     | 
| 
      
 42 
     | 
    
         
            +
                  list << gilt.sale_detail(sale.store, sale.sale_key)
         
     | 
| 
      
 43 
     | 
    
         
            +
                end
         
     | 
| 
      
 44 
     | 
    
         
            +
                assert(!list.empty?)
         
     | 
| 
      
 45 
     | 
    
         
            +
              end
         
     | 
| 
      
 46 
     | 
    
         
            +
              
         
     | 
| 
      
 47 
     | 
    
         
            +
              should "Return details about a product" do
         
     | 
| 
      
 48 
     | 
    
         
            +
                gilt = Kin::Client.new(Secret.password)
         
     | 
| 
      
 49 
     | 
    
         
            +
                sales = gilt.active_sales
         
     | 
| 
      
 50 
     | 
    
         
            +
                list = []
         
     | 
| 
      
 51 
     | 
    
         
            +
                sales.each do |sale|
         
     | 
| 
      
 52 
     | 
    
         
            +
                  sale.products.each do |product|
         
     | 
| 
      
 53 
     | 
    
         
            +
                    list << gilt.product_detail_from_url(product)
         
     | 
| 
      
 54 
     | 
    
         
            +
                  end
         
     | 
| 
      
 55 
     | 
    
         
            +
                end
         
     | 
| 
      
 56 
     | 
    
         
            +
                assert(!list.empty?)
         
     | 
| 
      
 57 
     | 
    
         
            +
              end
         
     | 
| 
      
 58 
     | 
    
         
            +
              
         
     | 
| 
      
 59 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,169 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification 
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: kin
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 23
         
     | 
| 
      
 5 
     | 
    
         
            +
              prerelease: 
         
     | 
| 
      
 6 
     | 
    
         
            +
              segments: 
         
     | 
| 
      
 7 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 9 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 1.0.0
         
     | 
| 
      
 11 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 12 
     | 
    
         
            +
            authors: 
         
     | 
| 
      
 13 
     | 
    
         
            +
            - Vivek Bhagwat
         
     | 
| 
      
 14 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 15 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 16 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2012-02-11 00:00:00 Z
         
     | 
| 
      
 19 
     | 
    
         
            +
            dependencies: 
         
     | 
| 
      
 20 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 21 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 22 
     | 
    
         
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 23 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 24 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 25 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 27 
     | 
    
         
            +
                    hash: 3
         
     | 
| 
      
 28 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 29 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 30 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 31 
     | 
    
         
            +
              version_requirements: *id001
         
     | 
| 
      
 32 
     | 
    
         
            +
              name: shoulda
         
     | 
| 
      
 33 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 34 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 35 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 36 
     | 
    
         
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 37 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 38 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 39 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 40 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 41 
     | 
    
         
            +
                    hash: 31
         
     | 
| 
      
 42 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 43 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 44 
     | 
    
         
            +
                    - 12
         
     | 
| 
      
 45 
     | 
    
         
            +
                    version: "3.12"
         
     | 
| 
      
 46 
     | 
    
         
            +
              version_requirements: *id002
         
     | 
| 
      
 47 
     | 
    
         
            +
              name: rdoc
         
     | 
| 
      
 48 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 49 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 50 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 51 
     | 
    
         
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 52 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 53 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 54 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 55 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 56 
     | 
    
         
            +
                    hash: 23
         
     | 
| 
      
 57 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 58 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 59 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 60 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: 1.0.0
         
     | 
| 
      
 62 
     | 
    
         
            +
              version_requirements: *id003
         
     | 
| 
      
 63 
     | 
    
         
            +
              name: bundler
         
     | 
| 
      
 64 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 65 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 66 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 67 
     | 
    
         
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 68 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 69 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 70 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 71 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 72 
     | 
    
         
            +
                    hash: 49
         
     | 
| 
      
 73 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 74 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 75 
     | 
    
         
            +
                    - 8
         
     | 
| 
      
 76 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 77 
     | 
    
         
            +
                    version: 1.8.3
         
     | 
| 
      
 78 
     | 
    
         
            +
              version_requirements: *id004
         
     | 
| 
      
 79 
     | 
    
         
            +
              name: jeweler
         
     | 
| 
      
 80 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 81 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 82 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 83 
     | 
    
         
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 84 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 85 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 86 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 87 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 88 
     | 
    
         
            +
                    hash: 3
         
     | 
| 
      
 89 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 90 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 91 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 92 
     | 
    
         
            +
              version_requirements: *id005
         
     | 
| 
      
 93 
     | 
    
         
            +
              name: rcov
         
     | 
| 
      
 94 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 95 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 96 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 97 
     | 
    
         
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 98 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 99 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 100 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 101 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 102 
     | 
    
         
            +
                    hash: 5
         
     | 
| 
      
 103 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 104 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 105 
     | 
    
         
            +
                    - 6
         
     | 
| 
      
 106 
     | 
    
         
            +
                    - 5
         
     | 
| 
      
 107 
     | 
    
         
            +
                    version: 1.6.5
         
     | 
| 
      
 108 
     | 
    
         
            +
              version_requirements: *id006
         
     | 
| 
      
 109 
     | 
    
         
            +
              name: json
         
     | 
| 
      
 110 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 111 
     | 
    
         
            +
            description: A simple ruby wrapper for the Gilt API, based on the scala wrapper at github.com/mnn2104/Aurum
         
     | 
| 
      
 112 
     | 
    
         
            +
            email: bhagwat.vivek@gmail.com
         
     | 
| 
      
 113 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 114 
     | 
    
         
            +
             
     | 
| 
      
 115 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
            extra_rdoc_files: 
         
     | 
| 
      
 118 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 119 
     | 
    
         
            +
            - README.rdoc
         
     | 
| 
      
 120 
     | 
    
         
            +
            files: 
         
     | 
| 
      
 121 
     | 
    
         
            +
            - .document
         
     | 
| 
      
 122 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 123 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 124 
     | 
    
         
            +
            - README.rdoc
         
     | 
| 
      
 125 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 126 
     | 
    
         
            +
            - VERSION
         
     | 
| 
      
 127 
     | 
    
         
            +
            - kin.gemspec
         
     | 
| 
      
 128 
     | 
    
         
            +
            - lib/image.rb
         
     | 
| 
      
 129 
     | 
    
         
            +
            - lib/kin.rb
         
     | 
| 
      
 130 
     | 
    
         
            +
            - lib/product.rb
         
     | 
| 
      
 131 
     | 
    
         
            +
            - lib/sale.rb
         
     | 
| 
      
 132 
     | 
    
         
            +
            - lib/sku.rb
         
     | 
| 
      
 133 
     | 
    
         
            +
            - test/helper.rb
         
     | 
| 
      
 134 
     | 
    
         
            +
            - test/test_kin.rb
         
     | 
| 
      
 135 
     | 
    
         
            +
            homepage: http://github.com/vivekbhagwat/kin
         
     | 
| 
      
 136 
     | 
    
         
            +
            licenses: 
         
     | 
| 
      
 137 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 138 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 139 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 140 
     | 
    
         
            +
             
     | 
| 
      
 141 
     | 
    
         
            +
            require_paths: 
         
     | 
| 
      
 142 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 143 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 144 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 145 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 146 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 147 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 148 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
      
 149 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 150 
     | 
    
         
            +
                  - 0
         
     | 
| 
      
 151 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 152 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 153 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 154 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 155 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 156 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 157 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
      
 158 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 159 
     | 
    
         
            +
                  - 0
         
     | 
| 
      
 160 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 161 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 162 
     | 
    
         
            +
             
     | 
| 
      
 163 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 164 
     | 
    
         
            +
            rubygems_version: 1.8.6
         
     | 
| 
      
 165 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 166 
     | 
    
         
            +
            specification_version: 3
         
     | 
| 
      
 167 
     | 
    
         
            +
            summary: A simple ruby wrapper for the Gilt API
         
     | 
| 
      
 168 
     | 
    
         
            +
            test_files: []
         
     | 
| 
      
 169 
     | 
    
         
            +
             
     |