From 971b9d9029c97164a118e8e14f7aaefa91f7b79e Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Tue, 6 Sep 2016 10:47:03 -0700 Subject: [PATCH 01/27] Created a crap-load of files and specs --- .gitignore | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 6 +++--- far_mar.rb | 9 +++++++++ lib/market.rb | 7 +++++++ lib/product.rb | 7 +++++++ lib/sale.rb | 7 +++++++ lib/vendor.rb | 7 +++++++ specs/market_spec.rb | 5 +++++ specs/product_spec.rb | 5 +++++ specs/sale_spec.rb | 5 +++++ specs/vendor_spec.rb | 5 +++++ 11 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 far_mar.rb create mode 100644 lib/market.rb create mode 100644 lib/product.rb create mode 100644 lib/sale.rb create mode 100644 lib/vendor.rb create mode 100644 specs/market_spec.rb create mode 100644 specs/product_spec.rb create mode 100644 specs/sale_spec.rb create mode 100644 specs/vendor_spec.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..216b3dbc --- /dev/null +++ b/.gitignore @@ -0,0 +1,38 @@ +*.gem +*.rbc +/.config +/coverage/ +/specs/coverage +/InstalledFiles +/pkg/ +/spec/reports/ +/test/tmp/ +/test/version_tmp/ +/tmp/ +/specs/.DS_Store +.DS_Store + +## Specific to RubyMotion: +.dat* +.repl_history +build/ + +## Documentation cache and generated files: +/.yardoc/ +/_yardoc/ +/doc/ +/rdoc/ + +## Environment normalisation: +/.bundle/ +/vendor/bundle +/lib/bundler/man/ + +# for a library or gem, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# Gemfile.lock +# .ruby-version +# .ruby-gemset + +# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: +.rvmrc diff --git a/README.md b/README.md index 576e36ae..7018b404 100644 --- a/README.md +++ b/README.md @@ -86,10 +86,10 @@ Each sale belongs to a vendor __AND__ a product. The `vendor_id` and `product_id 1. You'll be working as an individual on this project. 1. Fork the Ada-C6 repo to your Github account. 1. Clone your fork to your projects directory, and `cd` into the cloned repo. -1. Create a _gemset_ for your project + 1. Install necessary gems via Terminal: - `$ gem install minitest-reporters` - `$ gem install simplecov` @@ -154,4 +154,4 @@ Each sale belongs to a vendor __AND__ a product. The `vendor_id` and `product_id #### Try some inheritance or some composition - __Inheritance:__ Create a new _class_ that defines the shared/duplicated methods (i.e., `find`, `all`). Update your data classes to _inherit_ this _class_ . -- __Composition with a Mixin:__ Create a new _module_ that defines the duplicated methods (i.e., `find`, `all`). Update your data classes to _mixin_ this _module_. +- __Composition with a Mixin:__ Create a new _module_ that defines the duplicated methods (i.e., `find`, `all`). Update your data classes to _mixin_ this _module_. diff --git a/far_mar.rb b/far_mar.rb new file mode 100644 index 00000000..cac33d59 --- /dev/null +++ b/far_mar.rb @@ -0,0 +1,9 @@ +require 'csv' +require 'lib/market' +require 'lib/vendor' +require 'lib/product' +require 'lib/sale' + + +module FarMar +end diff --git a/lib/market.rb b/lib/market.rb new file mode 100644 index 00000000..6e2b8c0b --- /dev/null +++ b/lib/market.rb @@ -0,0 +1,7 @@ +module FarMar + class Market + + + end + +end diff --git a/lib/product.rb b/lib/product.rb new file mode 100644 index 00000000..62a79a55 --- /dev/null +++ b/lib/product.rb @@ -0,0 +1,7 @@ +module FarMar + class Product + + + end + +end diff --git a/lib/sale.rb b/lib/sale.rb new file mode 100644 index 00000000..ecd297d7 --- /dev/null +++ b/lib/sale.rb @@ -0,0 +1,7 @@ +module FarMar + class Sale + + + end + +end diff --git a/lib/vendor.rb b/lib/vendor.rb new file mode 100644 index 00000000..065c5fc0 --- /dev/null +++ b/lib/vendor.rb @@ -0,0 +1,7 @@ +module FarMar + class Vendor + + + end + +end diff --git a/specs/market_spec.rb b/specs/market_spec.rb new file mode 100644 index 00000000..417f1810 --- /dev/null +++ b/specs/market_spec.rb @@ -0,0 +1,5 @@ +require 'minitest' + +describe Market do + +end diff --git a/specs/product_spec.rb b/specs/product_spec.rb new file mode 100644 index 00000000..14744efd --- /dev/null +++ b/specs/product_spec.rb @@ -0,0 +1,5 @@ +require 'minitest' + +describe Product do + +end diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb new file mode 100644 index 00000000..f070df90 --- /dev/null +++ b/specs/sale_spec.rb @@ -0,0 +1,5 @@ +require 'minitest' + +describe Sale do + +end diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb new file mode 100644 index 00000000..4dcc06e9 --- /dev/null +++ b/specs/vendor_spec.rb @@ -0,0 +1,5 @@ +require 'minitest' + +describe Vendor do + +end From 55e662623a94547d6eb8c5f6c58e69d9bf86ec60 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Tue, 6 Sep 2016 11:06:52 -0700 Subject: [PATCH 02/27] baseline file creations complete for first pull request --- Rakefile | 7 +++++++ far_mar.rb | 2 ++ lib/market.rb | 6 ++++++ lib/product.rb | 5 +++++ lib/sale.rb | 8 +++++++- lib/vendor.rb | 6 ++++++ specs/market_spec.rb | 5 +++-- specs/product_spec.rb | 5 +++-- specs/sale_spec.rb | 6 ++++-- specs/spec_helper.rb | 10 ++++++++++ specs/vendor_spec.rb | 5 +++-- 11 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 Rakefile create mode 100644 specs/spec_helper.rb diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..16c27548 --- /dev/null +++ b/Rakefile @@ -0,0 +1,7 @@ +require 'rake/testtask' + +Rake::TestTask.new do |t| + t.test_files = FileList['specs/*_spec.rb'] + end + +task default: :test \ No newline at end of file diff --git a/far_mar.rb b/far_mar.rb index cac33d59..7bcf1cbe 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -1,4 +1,6 @@ require 'csv' +require 'minitest' + require 'lib/market' require 'lib/vendor' require 'lib/product' diff --git a/lib/market.rb b/lib/market.rb index 6e2b8c0b..c5ca47f4 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -1,6 +1,12 @@ +require 'csv' +require 'minitest' + module FarMar class Market + def initialize + + end end diff --git a/lib/product.rb b/lib/product.rb index 62a79a55..eafa2111 100644 --- a/lib/product.rb +++ b/lib/product.rb @@ -1,7 +1,12 @@ +require 'csv' +require 'minitest' + module FarMar class Product + def initialize + end end end diff --git a/lib/sale.rb b/lib/sale.rb index ecd297d7..92d36b4d 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -1,7 +1,13 @@ +require 'csv' +require 'minitest' + module FarMar class Sale + def initialize - end + end + end + end diff --git a/lib/vendor.rb b/lib/vendor.rb index 065c5fc0..0c09578c 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -1,6 +1,12 @@ +require 'csv' +require 'minitest' + module FarMar class Vendor + def initialize + + end end diff --git a/specs/market_spec.rb b/specs/market_spec.rb index 417f1810..40a9ea41 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -1,5 +1,6 @@ -require 'minitest' +require_relative 'spec_helper' +require_relative '../lib/market.rb' -describe Market do +describe FarMar::Market do end diff --git a/specs/product_spec.rb b/specs/product_spec.rb index 14744efd..eaec390e 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -1,5 +1,6 @@ -require 'minitest' +require_relative 'spec_helper' +require_relative '../lib/product.rb' -describe Product do +describe FarMar::Product do end diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index f070df90..f85b671e 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -1,5 +1,7 @@ -require 'minitest' +require_relative 'spec_helper' +require_relative '../lib/sale.rb' + +describe FarMar::Sale do -describe Sale do end diff --git a/specs/spec_helper.rb b/specs/spec_helper.rb new file mode 100644 index 00000000..ef5c926d --- /dev/null +++ b/specs/spec_helper.rb @@ -0,0 +1,10 @@ +require 'simplecov' +SimpleCov.start + +require 'minitest' +require 'minitest/spec' +require "minitest/autorun" +require "minitest/reporters" +require 'minitest/pride' + +Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index 4dcc06e9..e7554167 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -1,5 +1,6 @@ -require 'minitest' +require_relative 'spec_helper' +require_relative '../lib/vendor.rb' -describe Vendor do +describe FarMar::Vendor do end From d5e34cae30c6a69e1f8050446351cec82c2eb698 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Tue, 6 Sep 2016 12:32:10 -0700 Subject: [PATCH 03/27] WiP commit for lunchtime on Tuesday --- far_mar.rb | 10 +++++----- lib/market.rb | 27 +++++++++++++++++++++++++-- lib/product.rb | 14 ++++++++++++-- lib/sale.rb | 17 ++++++++++++++--- lib/vendor.rb | 14 ++++++++++++-- specs/market_spec.rb | 31 ++++++++++++++++++++++++++++++- specs/product_spec.rb | 14 +++++++++++++- specs/sale_spec.rb | 12 +++++++++++- specs/spec_helper.rb | 2 ++ specs/vendor_spec.rb | 13 ++++++++++++- 10 files changed, 136 insertions(+), 18 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 7bcf1cbe..3353dc8b 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -1,10 +1,10 @@ require 'csv' -require 'minitest' -require 'lib/market' -require 'lib/vendor' -require 'lib/product' -require 'lib/sale' + +require_relative 'lib/market' +require_relative 'lib/vendor' +require_relative 'lib/product' +require_relative 'lib/sale' module FarMar diff --git a/lib/market.rb b/lib/market.rb index c5ca47f4..7fc92927 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -1,11 +1,34 @@ require 'csv' -require 'minitest' module FarMar class Market - def initialize + def initialize(id, name, st_addy, city, county, st, zip) + @id = id + @name = name + @st_addy = st_addy + @city = city + @county = county + @st = st + @zip = zip + end + + def self.all + all_markets = {} + CSV.read("/Users/nurl/ada/homework/FarMar/support/markets.csv").each do |line| + all_markets[line[0].to_sym] = self.new(line[0].to_i,line[1],line[2],line[3],line[4],line[5],line[6]) + end + return all_markets + end + + def self.find(id) + all_markets = self.all + if all_markets.key?(id) + return all_markets[id] + else + raise ArgumentError.new("We do not have a market with that ID.") + end end end diff --git a/lib/product.rb b/lib/product.rb index eafa2111..109f8ead 100644 --- a/lib/product.rb +++ b/lib/product.rb @@ -1,12 +1,22 @@ require 'csv' -require 'minitest' module FarMar class Product - def initialize + def initialize(id, product, vendor_id) + @id = id + @product = product + @vendor_id = vendor_id + end + def self.all + all_products = {} + CSV.read("/Users/nurl/ada/homework/FarMar/support/products.csv").each do |line| + all_products[line[0]] = self.new(line[0].to_i,line[1],line[2].to_i) + end + return all_products end + end end diff --git a/lib/sale.rb b/lib/sale.rb index 92d36b4d..71815385 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -1,13 +1,24 @@ require 'csv' -require 'minitest' module FarMar class Sale - def initialize + def initialize(id, amount, purchase_time, vendor_id, product_id) + @id = id + @amount = amount / 100 # changes cents to dollars + @purchase_time = purchase_time + @vendor_id = vendor_id + @product_id = product_id + end + def self.all + all_sales = {} + CSV.read("/Users/nurl/ada/homework/FarMar/support/sales.csv").each do |line| + all_sales[line[0]] = self.new(line[0].to_i,line[1].to_i,line[2],line[3].to_i,line[4].to_i) + end + return all_sales end end - + end diff --git a/lib/vendor.rb b/lib/vendor.rb index 0c09578c..8757bcdc 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -1,11 +1,21 @@ require 'csv' -require 'minitest' module FarMar class Vendor - def initialize + def initialize(id, name, num_empls, market_id) + @id = id + @name = name + @num_empls = num_empls + @market_id = market_id + end + def self.all + all_vendors = {} + CSV.read("/Users/nurl/ada/homework/FarMar/support/vendors.csv").each do |line| + all_vendors[line[0].to_sym] = self.new(line[0].to_i,line[1],line[2],line[3].to_i) + end + return all_vendors end end diff --git a/specs/market_spec.rb b/specs/market_spec.rb index 40a9ea41..aebb27a2 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -1,6 +1,35 @@ require_relative 'spec_helper' -require_relative '../lib/market.rb' describe FarMar::Market do + market = FarMar::Market.new(0,"Test Market","123 Main St","King", "Seattle", "WA", "98125") + + it "should have an ID of fixnum type" do + FarMar::Market.id.should_be_kind_of Integer + end + + describe "#initialize" do + it "should create a new instance of Market" do + market.must_be_instance_of FarMar::Market + end + end + + describe "#self.all" do + it "should return a hash" do + FarMar::Market.all.must_be_kind_of Hash + end + + end + + describe "#self.find" do + it "should return an instance of Market" do + FarMar::Market.find(1).must_be_instance_of Market + end + + it "should raise an Argument Error if the ID provided isn't in the list" do + proc { FarMar::Market.find(0) }.must_raise(ArgumentError) + end + + + end end diff --git a/specs/product_spec.rb b/specs/product_spec.rb index eaec390e..d82b985b 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -1,6 +1,18 @@ require_relative 'spec_helper' -require_relative '../lib/product.rb' describe FarMar::Product do + product = FarMar::Product.new(0,"Test Product",1) + + describe "#initialize" do + it "should create a new instance of Product" do + product.must_be_instance_of FarMar::Product + end + end + + describe "#self.all" do + it "should return a hash" do + FarMar::Product.all.must_be_kind_of Hash + end + end end diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index f85b671e..6c90de6b 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -1,7 +1,17 @@ require_relative 'spec_helper' -require_relative '../lib/sale.rb' describe FarMar::Sale do + sale = FarMar::Sale.new(0,200,"1200",1,1) + describe "#initialize" do + it "should create a new instance of Sale" do + sale.must_be_instance_of FarMar::Sale + end + end + describe "#self.all" do + it "should return a hash" do + FarMar::Sale.all.must_be_kind_of Hash + end + end end diff --git a/specs/spec_helper.rb b/specs/spec_helper.rb index ef5c926d..453c60dc 100644 --- a/specs/spec_helper.rb +++ b/specs/spec_helper.rb @@ -7,4 +7,6 @@ require "minitest/reporters" require 'minitest/pride' +require_relative '../far_mar.rb' + Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index e7554167..4ca6deac 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -1,6 +1,17 @@ require_relative 'spec_helper' -require_relative '../lib/vendor.rb' describe FarMar::Vendor do + vendor = FarMar::Vendor.new(0,"Test Vendor",1,1) + describe "#initialize" do + it "should create a new instance of Vendor" do + vendor.must_be_instance_of FarMar::Vendor + end + end + + describe "#self.all" do + it "should return a hash" do + FarMar::Vendor.all.must_be_kind_of Hash + end + end end From 23c2ef50c04374925f0ea192f24f6f886bfe88dc Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Tue, 6 Sep 2016 14:47:00 -0700 Subject: [PATCH 04/27] Completed self.all and self.find methods for all classes --- lib/market.rb | 7 +++++-- lib/product.rb | 11 ++++++++++- lib/sale.rb | 11 ++++++++++- lib/vendor.rb | 11 ++++++++++- specs/market_spec.rb | 19 +++++++++++++------ specs/product_spec.rb | 16 +++++++++++++++- specs/sale_spec.rb | 17 ++++++++++++++++- specs/vendor_spec.rb | 18 +++++++++++++++++- 8 files changed, 96 insertions(+), 14 deletions(-) diff --git a/lib/market.rb b/lib/market.rb index 7fc92927..8033353a 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -2,6 +2,7 @@ module FarMar class Market + attr_reader :id, :name, :st_addy, :city, :county, :st, :zip def initialize(id, name, st_addy, city, county, st, zip) @id = id @@ -16,7 +17,7 @@ def initialize(id, name, st_addy, city, county, st, zip) def self.all all_markets = {} CSV.read("/Users/nurl/ada/homework/FarMar/support/markets.csv").each do |line| - all_markets[line[0].to_sym] = self.new(line[0].to_i,line[1],line[2],line[3],line[4],line[5],line[6]) + all_markets[line[0].to_i] = self.new(line[0].to_i,line[1],line[2],line[3],line[4],line[5],line[6]) end return all_markets end @@ -24,7 +25,7 @@ def self.all def self.find(id) all_markets = self.all - if all_markets.key?(id) + if all_markets.has_key?(id) return all_markets[id] else raise ArgumentError.new("We do not have a market with that ID.") @@ -34,3 +35,5 @@ def self.find(id) end end + +puts FarMar::Market.all diff --git a/lib/product.rb b/lib/product.rb index 109f8ead..5ad6dc12 100644 --- a/lib/product.rb +++ b/lib/product.rb @@ -12,11 +12,20 @@ def initialize(id, product, vendor_id) def self.all all_products = {} CSV.read("/Users/nurl/ada/homework/FarMar/support/products.csv").each do |line| - all_products[line[0]] = self.new(line[0].to_i,line[1],line[2].to_i) + all_products[line[0].to_i] = self.new(line[0].to_i,line[1],line[2].to_i) end return all_products end + def self.find(id) + all_products = self.all + + if all_products.has_key?(id) + return all_products[id] + else + raise ArgumentError.new("We do not have a product with that ID.") + end + end end end diff --git a/lib/sale.rb b/lib/sale.rb index 71815385..e3ab41db 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -14,11 +14,20 @@ def initialize(id, amount, purchase_time, vendor_id, product_id) def self.all all_sales = {} CSV.read("/Users/nurl/ada/homework/FarMar/support/sales.csv").each do |line| - all_sales[line[0]] = self.new(line[0].to_i,line[1].to_i,line[2],line[3].to_i,line[4].to_i) + all_sales[line[0].to_i] = self.new(line[0].to_i,line[1].to_i,line[2],line[3].to_i,line[4].to_i) end return all_sales end + def self.find(id) + all_sales = self.all + + if all_sales.has_key?(id) + return all_sales[id] + else + raise ArgumentError.new("We do not have a sale with that ID.") + end + end end end diff --git a/lib/vendor.rb b/lib/vendor.rb index 8757bcdc..9591b0e5 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -13,11 +13,20 @@ def initialize(id, name, num_empls, market_id) def self.all all_vendors = {} CSV.read("/Users/nurl/ada/homework/FarMar/support/vendors.csv").each do |line| - all_vendors[line[0].to_sym] = self.new(line[0].to_i,line[1],line[2],line[3].to_i) + all_vendors[line[0].to_i] = self.new(line[0].to_i,line[1],line[2].to_i,line[3].to_i) end return all_vendors end + def self.find(id) + all_vendors = self.all + + if all_vendors.has_key?(id) + return all_vendors[id] + else + raise ArgumentError.new("We do not have a vendor with that ID.") + end + end end end diff --git a/specs/market_spec.rb b/specs/market_spec.rb index aebb27a2..354a46b0 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -1,16 +1,20 @@ require_relative 'spec_helper' describe FarMar::Market do - market = FarMar::Market.new(0,"Test Market","123 Main St","King", "Seattle", "WA", "98125") + market = FarMar::Market.new(1,"Test Market","123 Main St","King", "Seattle", "WA", "98125") - it "should have an ID of fixnum type" do - FarMar::Market.id.should_be_kind_of Integer - end describe "#initialize" do it "should create a new instance of Market" do market.must_be_instance_of FarMar::Market end + + end + + describe "#id" do + it "should have an ID of fixnum type" do + market.id.must_be_kind_of Fixnum + end end describe "#self.all" do @@ -18,18 +22,21 @@ FarMar::Market.all.must_be_kind_of Hash end + it "should have a hash key of \"1\" (as a symbol)" do + hash = FarMar::Market.all + hash.has_key?(1).must_equal true + end end describe "#self.find" do it "should return an instance of Market" do - FarMar::Market.find(1).must_be_instance_of Market + FarMar::Market.find(1).must_be_instance_of FarMar::Market end it "should raise an Argument Error if the ID provided isn't in the list" do proc { FarMar::Market.find(0) }.must_raise(ArgumentError) end - end end diff --git a/specs/product_spec.rb b/specs/product_spec.rb index d82b985b..187a2bd6 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -1,7 +1,7 @@ require_relative 'spec_helper' describe FarMar::Product do - product = FarMar::Product.new(0,"Test Product",1) + product = FarMar::Product.new(1,"Test Product",1) describe "#initialize" do it "should create a new instance of Product" do @@ -13,6 +13,20 @@ it "should return a hash" do FarMar::Product.all.must_be_kind_of Hash end + + it "should have a hash key of \"1\" (as a symbol)" do + hash = FarMar::Product.all + hash.has_key?(1).must_equal true + end end + describe "#self.find" do + it "should return an instance of Product" do + FarMar::Product.find(1).must_be_instance_of FarMar::Product + end + + it "should raise an Argument Error if the ID provided isn't in the list" do + proc { FarMar::Product.find(0) }.must_raise(ArgumentError) + end + end end diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index 6c90de6b..aa61b66d 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -1,7 +1,7 @@ require_relative 'spec_helper' describe FarMar::Sale do - sale = FarMar::Sale.new(0,200,"1200",1,1) + sale = FarMar::Sale.new(1,200,"1200",1,1) describe "#initialize" do it "should create a new instance of Sale" do @@ -13,5 +13,20 @@ it "should return a hash" do FarMar::Sale.all.must_be_kind_of Hash end + + it "should have a hash key of \"1\" (as a symbol)" do + hash = FarMar::Product.all + hash.has_key?(1).must_equal true + end + end + + describe "#self.find" do + it "should return an instance of Product" do + FarMar::Product.find(1).must_be_instance_of FarMar::Product + end + + it "should raise an Argument Error if the ID provided isn't in the list" do + proc { FarMar::Product.find(0) }.must_raise(ArgumentError) + end end end diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index 4ca6deac..5ee432f3 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -1,7 +1,7 @@ require_relative 'spec_helper' describe FarMar::Vendor do - vendor = FarMar::Vendor.new(0,"Test Vendor",1,1) + vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) describe "#initialize" do it "should create a new instance of Vendor" do @@ -13,5 +13,21 @@ it "should return a hash" do FarMar::Vendor.all.must_be_kind_of Hash end + + it "should have a hash key of \"1\" (as a symbol)" do + hash = FarMar::Vendor.all + hash.has_key?(1).must_equal true + end + end + + describe "#self.find" do + it "should return an instance of Vendor" do + FarMar::Vendor.find(1).must_be_instance_of FarMar::Vendor + end + + it "should raise an Argument Error if the ID provided isn't in the list" do + proc { FarMar::Vendor.find(0) }.must_raise(ArgumentError) + end + end end From 3e1c37041a6dec0ed51d70648dcc7f082ba4e1bd Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Tue, 6 Sep 2016 14:49:20 -0700 Subject: [PATCH 05/27] some more language cleanup for self.all and self.find methods --- specs/market_spec.rb | 2 +- specs/product_spec.rb | 2 +- specs/sale_spec.rb | 2 +- specs/vendor_spec.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/market_spec.rb b/specs/market_spec.rb index 354a46b0..b0a2055e 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -22,7 +22,7 @@ FarMar::Market.all.must_be_kind_of Hash end - it "should have a hash key of \"1\" (as a symbol)" do + it "should have a hash key of \"1\" (as a fixnum)" do hash = FarMar::Market.all hash.has_key?(1).must_equal true end diff --git a/specs/product_spec.rb b/specs/product_spec.rb index 187a2bd6..aa12c8ac 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -14,7 +14,7 @@ FarMar::Product.all.must_be_kind_of Hash end - it "should have a hash key of \"1\" (as a symbol)" do + it "should have a hash key of \"1\" (as a fixnum)" do hash = FarMar::Product.all hash.has_key?(1).must_equal true end diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index aa61b66d..e04fcd91 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -14,7 +14,7 @@ FarMar::Sale.all.must_be_kind_of Hash end - it "should have a hash key of \"1\" (as a symbol)" do + it "should have a hash key of \"1\" (as a fixnumx)" do hash = FarMar::Product.all hash.has_key?(1).must_equal true end diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index 5ee432f3..59f837e6 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -14,7 +14,7 @@ FarMar::Vendor.all.must_be_kind_of Hash end - it "should have a hash key of \"1\" (as a symbol)" do + it "should have a hash key of \"1\" (as a fixnum)" do hash = FarMar::Vendor.all hash.has_key?(1).must_equal true end From ccd295efa56321607e0d2fa0284f53e496beece3 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Wed, 7 Sep 2016 13:50:12 -0700 Subject: [PATCH 06/27] Fixed all the require_relatives and NameErrors --- far_mar.rb | 12 ++++++++---- lib/market.rb | 12 ++++++++++-- lib/product.rb | 1 + lib/sale.rb | 1 + lib/vendor.rb | 12 ++++++++++++ specs/market_spec.rb | 19 +++++++++++++++---- specs/product_spec.rb | 6 ++++-- specs/vendor_spec.rb | 17 +++++++++++++++-- 8 files changed, 66 insertions(+), 14 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 3353dc8b..c3f86c8b 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -1,11 +1,15 @@ require 'csv' -require_relative 'lib/market' -require_relative 'lib/vendor' -require_relative 'lib/product' -require_relative 'lib/sale' +require_relative 'lib/market.rb' +require_relative 'lib/vendor.rb' +require_relative 'lib/product.rb' +require_relative 'lib/sale.rb' module FarMar end +# puts FarMar::Market.all +market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") + +puts market.vendors diff --git a/lib/market.rb b/lib/market.rb index 8033353a..0ee5515f 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -1,4 +1,5 @@ require 'csv' +# require_relative 'vendor.rb' module FarMar class Market @@ -32,8 +33,15 @@ def self.find(id) end end + def vendors + all_vendors = FarMar::Vendor.all + + all_vendors.delete_if do |k, v| + v.market_id != @id + end + + return all_vendors + end end end - -puts FarMar::Market.all diff --git a/lib/product.rb b/lib/product.rb index 5ad6dc12..749beeb2 100644 --- a/lib/product.rb +++ b/lib/product.rb @@ -2,6 +2,7 @@ module FarMar class Product + attr_reader :id, :product, :vendor_id def initialize(id, product, vendor_id) @id = id diff --git a/lib/sale.rb b/lib/sale.rb index e3ab41db..7f3d3546 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -2,6 +2,7 @@ module FarMar class Sale + attr_reader :id, :amount, :purchase_time, :vendor_id, :product_id def initialize(id, amount, purchase_time, vendor_id, product_id) @id = id diff --git a/lib/vendor.rb b/lib/vendor.rb index 9591b0e5..a0d797de 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -1,7 +1,9 @@ require 'csv' +# require_relative 'market.rb' module FarMar class Vendor + attr_reader :id, :name, :num_empls, :market_id def initialize(id, name, num_empls, market_id) @id = id @@ -27,6 +29,16 @@ def self.find(id) raise ArgumentError.new("We do not have a vendor with that ID.") end end + + def market + all_markets = FarMar::Market.all + + return all_markets[@id] + end end end + +vend = FarMar::Vendor.new(1,"Test Vendor",1,1) + +puts vend.market diff --git a/specs/market_spec.rb b/specs/market_spec.rb index b0a2055e..f6f5d55e 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -1,19 +1,20 @@ require_relative 'spec_helper' describe FarMar::Market do - market = FarMar::Market.new(1,"Test Market","123 Main St","King", "Seattle", "WA", "98125") - + before (:each) do + @market = FarMar::Market.new(1,"Test Market","123 Main St","King", "Seattle", "WA", "98125") + end describe "#initialize" do it "should create a new instance of Market" do - market.must_be_instance_of FarMar::Market + @market.must_be_instance_of FarMar::Market end end describe "#id" do it "should have an ID of fixnum type" do - market.id.must_be_kind_of Fixnum + @market.id.must_be_kind_of Fixnum end end @@ -39,4 +40,14 @@ end + describe "#vendors" do + it "should return a hash of vendors" do + @market.vendors.must_be_kind_of Hash + end + + it "should return a hash of six objects for @market_id 1" do + @market.vendors.length.must_equal 6 + end + + end end diff --git a/specs/product_spec.rb b/specs/product_spec.rb index aa12c8ac..1d5e3525 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -1,11 +1,13 @@ require_relative 'spec_helper' describe FarMar::Product do - product = FarMar::Product.new(1,"Test Product",1) + before (:each) do + @product = FarMar::Product.new(1,"Test Product",1) + end describe "#initialize" do it "should create a new instance of Product" do - product.must_be_instance_of FarMar::Product + @product.must_be_instance_of FarMar::Product end end diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index 59f837e6..0da09bce 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -1,11 +1,13 @@ require_relative 'spec_helper' describe FarMar::Vendor do - vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) + before (:each) do + @vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) + end describe "#initialize" do it "should create a new instance of Vendor" do - vendor.must_be_instance_of FarMar::Vendor + @vendor.must_be_instance_of FarMar::Vendor end end @@ -30,4 +32,15 @@ end end + + describe "#market" do + it "should return an instance of Market" do + @vendor.market.must_be_instance_of FarMar::Market + end + + it "should have the Market ID match the Vendor Market ID" do + @vendor.market.id.must_equal @vendor.id + end + end + end From 327fcb973ab012f76ad90a892ef81832ebba7f1e Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Wed, 7 Sep 2016 14:07:46 -0700 Subject: [PATCH 07/27] Added products method to Vendor class and copied tests from Market class vendor method --- far_mar.rb | 5 +++-- lib/market.rb | 1 - lib/vendor.rb | 15 +++++++++------ specs/market_spec.rb | 4 ++-- specs/vendor_spec.rb | 10 ++++++++++ 5 files changed, 24 insertions(+), 11 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index c3f86c8b..e9dbdfc5 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -10,6 +10,7 @@ module FarMar end # puts FarMar::Market.all -market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") +# market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") +vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) -puts market.vendors +puts vendor.market diff --git a/lib/market.rb b/lib/market.rb index 0ee5515f..002bbeae 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -1,5 +1,4 @@ require 'csv' -# require_relative 'vendor.rb' module FarMar class Market diff --git a/lib/vendor.rb b/lib/vendor.rb index a0d797de..9e8fe931 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -1,5 +1,4 @@ require 'csv' -# require_relative 'market.rb' module FarMar class Vendor @@ -32,13 +31,17 @@ def self.find(id) def market all_markets = FarMar::Market.all - return all_markets[@id] end - end -end + def products + all_products = FarMar::Product.all -vend = FarMar::Vendor.new(1,"Test Vendor",1,1) + all_products.delete_if do |k, v| + v.vendor_id != @id + end -puts vend.market + return all_products + end + end +end diff --git a/specs/market_spec.rb b/specs/market_spec.rb index f6f5d55e..99843986 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -45,9 +45,9 @@ @market.vendors.must_be_kind_of Hash end - it "should return a hash of six objects for @market_id 1" do + it "should return a hash of six objects for a market ID of 1" do @market.vendors.length.must_equal 6 end - + end end diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index 0da09bce..65120fc6 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -43,4 +43,14 @@ end end + describe "#products" do + it "should return a hash of products" do + @vendor.products.must_be_kind_of Hash + end + + it "should return a hash of one object for a vendor ID of 1" do + @vendor.products.length.must_equal 1 + end + end + end From bbf2391d35e035f6749f3ce4079487575fa65128 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Wed, 7 Sep 2016 14:38:26 -0700 Subject: [PATCH 08/27] Added Vendor methods sales and revenue. --- far_mar.rb | 2 +- lib/sale.rb | 2 +- lib/vendor.rb | 18 ++++++++++++++++++ specs/vendor_spec.rb | 24 ++++++++++++++++++++++-- 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index e9dbdfc5..fab44b75 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -13,4 +13,4 @@ module FarMar # market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) -puts vendor.market +puts vendor.revenue diff --git a/lib/sale.rb b/lib/sale.rb index 7f3d3546..d1041262 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -6,7 +6,7 @@ class Sale def initialize(id, amount, purchase_time, vendor_id, product_id) @id = id - @amount = amount / 100 # changes cents to dollars + @amount = amount @purchase_time = purchase_time @vendor_id = vendor_id @product_id = product_id diff --git a/lib/vendor.rb b/lib/vendor.rb index 9e8fe931..e3d264e2 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -43,5 +43,23 @@ def products return all_products end + + def sales + all_sales = FarMar::Sale.all + + all_sales.delete_if do |k, v| + v.vendor_id != @id + end + + return all_sales + end + + def revenue + sales_amounts = sales.map do |k, v| + v.amount + end + + sales_amounts.reduce(:+) + end end end diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index 65120fc6..d5bedd3d 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -49,8 +49,28 @@ end it "should return a hash of one object for a vendor ID of 1" do - @vendor.products.length.must_equal 1 + @vendor.products.length.must_equal 1 # because @vendor on top is set up for a vendor ID of 1, this works + end + end + + describe "#sales" do + it "should return a hash of products" do + @vendor.sales.must_be_kind_of Hash + end + + it "should return a hash of one object for a vendor ID of 2" do + vend_test = FarMar::Vendor.new(2,"Test Vendor",1,1) # because @vendor on the top is set up for vendor id 1, this test needs its own instance + vend_test.sales.length.must_equal 1 + end + end + + describe "#revenue" do + it "should return a fixnum" do + @vendor.revenue.must_be_kind_of Fixnum + end + + it "should only be a positive number" do + @vendor.revenue.must_be :>=, 0 end end - end From ad364b0a15a926554051ab3f1f87e4bf83131722 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Wed, 7 Sep 2016 14:43:26 -0700 Subject: [PATCH 09/27] Fixing the sales CSV so the unique identifiers are actually unique. Deleted all records after 12000 --- support/sales.csv | 797 ---------------------------------------------- 1 file changed, 797 deletions(-) diff --git a/support/sales.csv b/support/sales.csv index f038d94c..b41ca455 100644 --- a/support/sales.csv +++ b/support/sales.csv @@ -11999,800 +11999,3 @@ 11999,3793,2013-11-08 00:39:35 -0800,2689,8188 12000,7773,2013-11-10 12:15:19 -0800,2690,8193 12001,8923,2013-11-10 15:22:35 -0800,2690,8192 -00,2538,2013-11-08 19:38:09 -0800,, -11206,6256.0,2013-11-13 03:09:41 -0800,2538,7733 -11207,2744.0,2013-11-12 03:31:22 -0800,2538,7732 -11208,6667.0,2013-11-09 00:35:43 -0800,2538,7732 -11209,2915.0,2013-11-11 02:51:21 -0800,2538,7732 -11210,1129.0,2013-11-12 17:47:48 -0800,2538,7732 -11211,8957.0,2013-11-08 16:32:24 -0800,2538,7732 -11212,4124.0,2013-11-08 07:22:06 -0800,2538,7732 -11213,8367.0,2013-11-09 14:30:23 -0800,2538,7732 -11214,5767.0,2013-11-12 07:00:31 -0800,2539,7735 -11215,6823.999999999999,2013-11-07 18:09:49 -0800,2539,7736 -11216,6515.000000000001,2013-11-09 08:56:58 -0800,2539,7736 -11217,321.0,2013-11-06 12:42:25 -0800,2539,7735 -11218,745.0,2013-11-12 06:48:48 -0800,2539,7734 -11219,4192.0,2013-11-11 08:56:45 -0800,2540,7738 -11220,1648.9999999999998,2013-11-10 01:30:05 -0800,2540,7738 -11221,5148.0,2013-11-10 12:17:08 -0800,2540,7737 -11222,9515.0,2013-11-12 00:48:02 -0800,2540,7737 -11223,6584.0,2013-11-10 00:35:17 -0800,2540,7738 -11224,3075.0,2013-11-09 06:32:13 -0800,2540,7737 -11225,8084.0,2013-11-08 18:58:06 -0800,2540,7738 -11226,9266.0,2013-11-12 12:26:06 -0800,2541,7740 -11227,6422.0,2013-11-09 02:16:03 -0800,2541,7739 -11228,3010.0,2013-11-08 14:33:03 -0800,2541,7739 -11229,1789.9999999999998,2013-11-09 11:23:48 -0800,2541,7740 -11230,5510.0,2013-11-07 21:40:02 -0800,2541,7741 -11231,9172.0,2013-11-08 01:43:45 -0800,2541,7740 -11232,30.0,2013-11-07 11:27:02 -0800,2542,7744 -11233,7273.999999999999,2013-11-10 01:38:44 -0800,2542,7743 -11234,5725.0,2013-11-09 06:37:00 -0800,2542,7746 -11235,8162.0,2013-11-12 07:23:43 -0800,2542,7745 -11236,9822.0,2013-11-11 01:06:11 -0800,2542,7743 -11237,1196.0,2013-11-06 11:38:14 -0800,2542,7743 -11238,4313.0,2013-11-11 12:29:03 -0800,2542,7746 -11239,4270.0,2013-11-08 18:53:47 -0800,2543,7747 -11240,1720.0,2013-11-11 19:21:33 -0800,2543,7749 -11241,8031.0,2013-11-06 20:00:07 -0800,2543,7748 -11242,1994.0000000000002,2013-11-06 22:56:23 -0800,2543,7751 -11243,1469.0,2013-11-09 21:17:09 -0800,2544,7752 -11244,8677.0,2013-11-07 13:29:51 -0800,2544,7755 -11245,8291.0,2013-11-12 00:04:21 -0800,2544,7755 -11246,3052.0,2013-11-08 21:34:17 -0800,2544,7752 -11247,9213.0,2013-11-08 14:11:11 -0800,2544,7753 -11248,4663.0,2013-11-07 12:35:45 -0800,2544,7754 -11249,811.0,2013-11-10 23:29:08 -0800,2544,7752 -11250,9068.0,2013-11-10 11:37:48 -0800,2544,7754 -11251,2081.0,2013-11-11 08:36:30 -0800,2544,7754 -11252,7383.0,2013-11-07 02:11:00 -0800,2545,7759 -11253,6473.0,2013-11-12 23:53:51 -0800,2545,7757 -11254,1945.0,2013-11-11 17:08:14 -0800,2545,7758 -11255,894.0,2013-11-07 20:42:59 -0800,2545,7756 -11256,2228.0,2013-11-07 08:15:25 -0800,2545,7759 -11257,4129.0,2013-11-09 00:39:40 -0800,2545,7758 -11258,1494.0,2013-11-10 02:36:30 -0800,2545,7758 -11259,8247.0,2013-11-09 18:16:42 -0800,2546,7760 -11260,2629.0,2013-11-09 17:24:20 -0800,2546,7760 -11261,17.0,2013-11-06 19:25:42 -0800,2546,7760 -11262,1932.9999999999998,2013-11-11 22:25:47 -0800,2546,7760 -11263,8780.0,2013-11-11 06:35:33 -0800,2546,7760 -11264,3425.0,2013-11-13 07:17:47 -0800,2546,7760 -11265,5115.0,2013-11-07 18:27:16 -0800,2547,7763 -11266,7141.0,2013-11-10 02:53:58 -0800,2547,7762 -11267,2250.0,2013-11-13 03:29:21 -0800,2547,7761 -11268,4136.0,2013-11-12 06:49:12 -0800,2547,7765 -11269,6351.0,2013-11-13 02:03:16 -0800,2548,7767 -11270,7964.0,2013-11-06 13:32:30 -0800,2548,7766 -11271,5026.0,2013-11-08 23:15:33 -0800,2548,7766 -11272,6425.0,2013-11-08 19:34:02 -0800,2548,7766 -11273,3600.0,2013-11-10 05:27:22 -0800,2548,7766 -11274,4323.0,2013-11-08 07:04:31 -0800,2548,7767 -11275,4638.0,2013-11-08 19:44:48 -0800,2548,7767 -11276,1272.0,2013-11-09 03:54:09 -0800,2548,7766 -11277,1844.0000000000002,2013-11-11 12:19:23 -0800,2548,7767 -11278,5130.0,2013-11-12 22:21:36 -0800,2549,7768 -11279,2310.0,2013-11-09 02:29:46 -0800,2549,7768 -11280,6887.0,2013-11-12 08:39:41 -0800,2549,7768 -11281,480.99999999999994,2013-11-06 23:34:51 -0800,2549,7768 -11282,8080.0,2013-11-13 03:20:02 -0800,2549,7768 -11283,9041.0,2013-11-06 22:44:25 -0800,2549,7768 -11284,9890.0,2013-11-11 02:22:40 -0800,2550,7771 -11285,5430.0,2013-11-12 16:11:04 -0800,2550,7769 -11286,3115.0,2013-11-07 00:50:11 -0800,2550,7771 -11287,6333.0,2013-11-12 03:16:05 -0800,2551,7773 -11288,7716.0,2013-11-09 02:52:15 -0800,2551,7773 -11289,5593.0,2013-11-09 04:16:52 -0800,2551,7774 -11290,5941.0,2013-11-07 01:32:05 -0800,2551,7774 -11291,1661.0,2013-11-09 12:54:42 -0800,2551,7776 -11292,526.0,2013-11-10 12:53:13 -0800,2551,7774 -11293,6555.0,2013-11-13 07:19:46 -0800,2552,7780 -11294,8340.0,2013-11-12 20:42:25 -0800,2552,7780 -11295,2486.0,2013-11-11 06:28:44 -0800,2552,7778 -11296,3677.0000000000005,2013-11-10 01:56:34 -0800,2552,7778 -11297,749.0,2013-11-11 10:59:44 -0800,2552,7777 -11298,1841.0,2013-11-07 01:29:18 -0800,2552,7778 -11299,5589.0,2013-11-09 13:54:52 -0800,2552,7778 -11300,533.0,2013-11-11 23:14:10 -0800,2552,7778 -11301,3060.0,2013-11-09 13:47:16 -0800,2552,7777 -11302,8268.0,2013-11-10 14:44:18 -0800,2553,7782 -11303,9845.0,2013-11-09 15:18:14 -0800,2553,7782 -11304,9361.0,2013-11-13 03:02:36 -0800,2553,7782 -11305,5220.0,2013-11-12 20:05:27 -0800,2554,7787 -11306,5210.0,2013-11-12 14:18:53 -0800,2554,7788 -11307,3356.0,2013-11-08 18:37:51 -0800,2554,7786 -11308,9333.0,2013-11-06 17:23:52 -0800,2554,7790 -11309,8279.0,2013-11-08 23:42:30 -0800,2554,7790 -11310,2160.0,2013-11-12 03:40:49 -0800,2554,7786 -11311,4314.0,2013-11-08 09:01:55 -0800,2554,7787 -11312,3486.0,2013-11-11 02:15:30 -0800,2554,7790 -11313,1457.0,2013-11-09 06:52:34 -0800,2554,7790 -11314,3361.0,2013-11-07 12:12:58 -0800,2555,7791 -11315,9657.0,2013-11-08 05:57:16 -0800,2555,7791 -11316,983.0,2013-11-06 10:43:12 -0800,2555,7791 -11317,1922.0,2013-11-08 19:18:07 -0800,2555,7791 -11318,4238.0,2013-11-10 19:55:54 -0800,2555,7791 -11319,1011.9999999999999,2013-11-09 16:54:25 -0800,2555,7791 -11320,9658.0,2013-11-09 04:21:44 -0800,2555,7791 -11321,7311.0,2013-11-12 10:19:57 -0800,2555,7791 -11322,2668.0,2013-11-08 21:59:29 -0800,2555,7791 -11323,3957.0,2013-11-11 09:49:01 -0800,2556,7792 -11324,3800.0,2013-11-07 11:56:25 -0800,2556,7792 -11325,4797.0,2013-11-10 13:47:28 -0800,2556,7792 -11326,7684.0,2013-11-09 21:50:45 -0800,2556,7792 -11327,8935.0,2013-11-13 01:04:39 -0800,2556,7792 -11328,713.0,2013-11-07 14:05:28 -0800,2556,7792 -11329,9243.0,2013-11-12 20:27:51 -0800,2557,7794 -11330,3229.0,2013-11-09 03:06:07 -0800,2557,7794 -11331,6823.999999999999,2013-11-07 07:22:12 -0800,2557,7793 -11332,4579.0,2013-11-08 03:04:53 -0800,2557,7793 -11333,6062.0,2013-11-07 08:23:07 -0800,2557,7796 -11334,6650.0,2013-11-07 09:41:32 -0800,2557,7795 -11335,2470.0,2013-11-09 15:54:33 -0800,2557,7794 -11336,9061.0,2013-11-06 13:48:32 -0800,2557,7794 -11337,6158.0,2013-11-07 23:47:38 -0800,2557,7795 -11338,7092.0,2013-11-10 12:48:43 -0800,2558,7797 -11339,7991.0,2013-11-12 19:48:46 -0800,2558,7797 -11340,2094.0,2013-11-11 14:29:28 -0800,2559,7802 -11341,112.99999999999999,2013-11-07 15:25:47 -0800,2559,7801 -11342,2774.0,2013-11-07 17:46:24 -0800,2559,7801 -11343,2220.0,2013-11-13 00:18:46 -0800,2559,7799 -11344,1478.0,2013-11-09 21:07:54 -0800,2559,7800 -11345,2227.0,2013-11-08 15:45:47 -0800,2559,7799 -11346,2020.0,2013-11-10 16:40:02 -0800,2559,7800 -11347,614.0,2013-11-07 00:17:26 -0800,2559,7801 -11348,2070.0,2013-11-08 14:28:31 -0800,2559,7801 -11349,7058.0,2013-11-07 22:57:55 -0800,2560,7803 -11350,9067.0,2013-11-12 04:02:20 -0800,2560,7803 -11351,5549.0,2013-11-13 04:20:50 -0800,2561,7805 -11352,9189.0,2013-11-11 02:59:51 -0800,2561,7804 -11353,2648.0,2013-11-11 14:48:33 -0800,2561,7806 -11354,7423.0,2013-11-13 03:41:36 -0800,2561,7806 -11355,918.0,2013-11-06 09:58:47 -0800,2561,7805 -11356,8424.0,2013-11-10 22:51:05 -0800,2561,7805 -11357,5662.0,2013-11-12 14:18:36 -0800,2561,7804 -11358,5084.0,2013-11-06 15:45:08 -0800,2561,7806 -11359,8861.0,2013-11-11 09:14:30 -0800,2561,7805 -11360,2350.0,2013-11-12 21:29:27 -0800,2562,7807 -11361,1739.9999999999998,2013-11-08 18:24:50 -0800,2562,7807 -11362,5888.0,2013-11-10 21:14:44 -0800,2562,7807 -11363,8811.0,2013-11-07 18:05:24 -0800,2562,7807 -11364,1967.0000000000002,2013-11-09 09:18:15 -0800,2562,7807 -11365,9055.0,2013-11-11 09:18:53 -0800,2562,7807 -11366,2491.0,2013-11-12 02:11:44 -0800,2562,7807 -11367,8451.0,2013-11-12 13:08:28 -0800,2562,7807 -11368,4169.0,2013-11-12 13:13:18 -0800,2562,7807 -11369,2032.0,2013-11-07 16:00:24 -0800,2563,7809 -11370,4615.0,2013-11-08 04:31:14 -0800,2563,7811 -11371,2475.0,2013-11-06 08:56:56 -0800,2563,7808 -11372,6071.0,2013-11-12 08:50:23 -0800,2563,7808 -11373,6477.0,2013-11-09 17:18:54 -0800,2563,7811 -11374,9779.0,2013-11-08 16:57:07 -0800,2563,7811 -11375,7955.0,2013-11-11 21:04:35 -0800,2563,7809 -11376,4050.0,2013-11-11 07:53:33 -0800,2564,7814 -11377,5234.0,2013-11-12 15:32:12 -0800,2564,7814 -11378,5090.0,2013-11-06 12:31:20 -0800,2564,7813 -11379,2375.0,2013-11-12 03:43:12 -0800,2564,7812 -11380,64.0,2013-11-08 20:51:27 -0800,2564,7813 -11381,7327.0,2013-11-13 02:09:44 -0800,2566,7818 -11382,6639.0,2013-11-08 05:56:33 -0800,2566,7818 -11383,4250.0,2013-11-10 02:21:28 -0800,2566,7818 -11384,2800.0,2013-11-07 22:26:36 -0800,2566,7819 -11385,670.0,2013-11-09 23:11:21 -0800,2566,7821 -11386,8683.0,2013-11-11 04:51:19 -0800,2568,7828 -11387,509.99999999999994,2013-11-07 18:16:38 -0800,2568,7827 -11388,661.0,2013-11-12 20:33:35 -0800,2568,7828 -11389,8880.0,2013-11-13 02:53:46 -0800,2568,7827 -11390,6756.999999999999,2013-11-11 08:53:38 -0800,2568,7827 -11391,7195.999999999999,2013-11-08 18:32:33 -0800,2568,7827 -11392,7788.0,2013-11-09 01:08:04 -0800,2569,7829 -11393,8298.0,2013-11-07 17:51:39 -0800,2569,7829 -11394,3799.0,2013-11-06 22:49:40 -0800,2569,7831 -11395,1636.0,2013-11-08 01:52:13 -0800,2569,7829 -11396,9152.0,2013-11-13 02:48:07 -0800,2569,7829 -11397,1340.0,2013-11-13 02:53:11 -0800,2570,7833 -11398,2620.0,2013-11-12 18:39:46 -0800,2570,7835 -11399,2676.0,2013-11-10 22:40:07 -0800,2570,7832 -11400,268.0,2013-11-12 07:57:27 -0800,2570,7832 -11401,9854.0,2013-11-12 10:37:57 -0800,2571,7836 -11402,8847.0,2013-11-10 09:04:37 -0800,2571,7836 -11403,6934.0,2013-11-11 02:55:03 -0800,2571,7836 -11404,2647.0,2013-11-10 10:15:24 -0800,2572,7839 -11405,4938.0,2013-11-06 19:26:21 -0800,2572,7840 -11406,3110.0,2013-11-09 10:25:59 -0800,2572,7838 -11407,2976.0,2013-11-08 20:23:46 -0800,2572,7837 -11408,3415.0,2013-11-10 08:52:00 -0800,2572,7838 -11409,700.0,2013-11-10 21:45:55 -0800,2572,7839 -11410,710.0,2013-11-06 20:47:45 -0800,2573,7842 -11411,4726.0,2013-11-11 12:41:12 -0800,2574,7845 -11412,3084.0,2013-11-08 02:08:14 -0800,2574,7847 -11413,6445.0,2013-11-08 01:48:56 -0800,2575,7848 -11414,7556.0,2013-11-07 03:48:12 -0800,2575,7848 -11415,6736.0,2013-11-06 19:25:57 -0800,2575,7848 -11416,6190.0,2013-11-07 08:43:05 -0800,2575,7848 -11417,8871.0,2013-11-11 17:10:08 -0800,2575,7848 -11418,3560.0,2013-11-08 09:34:24 -0800,2575,7848 -11419,4865.0,2013-11-06 22:29:30 -0800,2575,7848 -11420,7397.0,2013-11-13 00:09:39 -0800,2575,7848 -11421,7638.0,2013-11-12 21:00:31 -0800,2575,7848 -11422,1920.0,2013-11-10 18:45:02 -0800,2576,7851 -11423,5561.0,2013-11-09 02:11:52 -0800,2576,7851 -11424,8428.0,2013-11-08 02:55:10 -0800,2576,7851 -11425,6716.0,2013-11-10 16:31:19 -0800,2576,7850 -11426,6343.0,2013-11-10 19:11:02 -0800,2576,7849 -11427,3149.0,2013-11-11 10:20:13 -0800,2576,7850 -11428,5046.0,2013-11-08 10:21:16 -0800,2577,7853 -11429,4221.0,2013-11-09 22:05:37 -0800,2577,7852 -11430,2080.0,2013-11-07 14:02:47 -0800,2578,7859 -11431,8354.0,2013-11-13 06:14:06 -0800,2578,7857 -11432,2225.0,2013-11-12 09:46:21 -0800,2578,7855 -11433,1696.0,2013-11-09 00:56:28 -0800,2578,7855 -11434,2393.0,2013-11-08 16:06:49 -0800,2579,7862 -11435,9186.0,2013-11-06 13:07:12 -0800,2579,7863 -11436,498.00000000000006,2013-11-09 00:09:27 -0800,2579,7863 -11437,293.0,2013-11-07 10:37:48 -0800,2579,7860 -11438,5367.0,2013-11-10 03:16:18 -0800,2579,7862 -11439,1225.0,2013-11-06 11:21:09 -0800,2579,7862 -11440,3163.0,2013-11-11 23:26:22 -0800,2579,7862 -11441,4744.0,2013-11-11 18:03:14 -0800,2579,7861 -11442,4389.0,2013-11-09 02:07:51 -0800,2580,7864 -11443,8581.0,2013-11-08 12:10:33 -0800,2580,7864 -11444,8233.0,2013-11-09 14:26:41 -0800,2580,7864 -11445,3531.0,2013-11-08 20:41:50 -0800,2580,7864 -11446,6978.0,2013-11-09 05:15:41 -0800,2580,7864 -11447,5873.0,2013-11-08 18:52:53 -0800,2580,7864 -11448,190.0,2013-11-10 08:23:01 -0800,2581,7867 -11449,4547.0,2013-11-06 08:54:46 -0800,2581,7867 -11450,7947.0,2013-11-11 01:38:37 -0800,2581,7867 -11451,7990.000000000001,2013-11-08 01:07:28 -0800,2581,7866 -11452,789.0,2013-11-06 12:00:02 -0800,2581,7869 -11453,3869.0,2013-11-07 17:40:21 -0800,2582,7870 -11454,1226.0,2013-11-09 12:30:12 -0800,2582,7870 -11455,6840.000000000001,2013-11-09 21:37:19 -0800,2582,7871 -11456,3038.0,2013-11-10 01:43:07 -0800,2582,7871 -11457,9332.0,2013-11-09 18:47:18 -0800,2582,7871 -11458,6020.0,2013-11-11 07:09:08 -0800,2583,7872 -11459,7718.000000000001,2013-11-06 21:01:20 -0800,2583,7873 -11460,2684.0,2013-11-07 03:03:44 -0800,2583,7872 -11461,7554.000000000001,2013-11-11 14:13:53 -0800,2583,7873 -11462,5789.0,2013-11-11 19:04:53 -0800,2583,7873 -11463,8857.0,2013-11-06 16:20:30 -0800,2583,7873 -11464,4376.0,2013-11-13 02:45:23 -0800,2583,7873 -11465,777.0,2013-11-07 19:35:30 -0800,2583,7873 -11466,7840.000000000001,2013-11-13 03:28:34 -0800,2583,7872 -11467,5422.0,2013-11-07 08:25:40 -0800,2584,7874 -11468,4138.0,2013-11-09 02:23:21 -0800,2584,7877 -11469,2146.0,2013-11-11 03:38:08 -0800,2584,7874 -11470,3661.0,2013-11-12 22:36:07 -0800,2584,7876 -11471,5030.0,2013-11-08 14:51:16 -0800,2584,7876 -11472,8183.0,2013-11-12 06:18:52 -0800,2584,7874 -11473,1241.0,2013-11-12 11:02:27 -0800,2585,7878 -11474,273.0,2013-11-10 10:51:44 -0800,2585,7879 -11475,5784.0,2013-11-10 14:39:04 -0800,2585,7879 -11476,1937.0,2013-11-10 06:40:27 -0800,2585,7879 -11477,3611.9999999999995,2013-11-08 04:11:35 -0800,2585,7880 -11478,5536.0,2013-11-12 03:17:07 -0800,2585,7880 -11479,3534.0000000000005,2013-11-07 21:27:42 -0800,2585,7879 -11480,6372.0,2013-11-12 21:58:41 -0800,2586,7882 -11481,7192.0,2013-11-13 02:27:16 -0800,2587,7887 -11482,8217.0,2013-11-12 03:16:14 -0800,2587,7886 -11483,2678.0,2013-11-07 14:08:57 -0800,2587,7887 -11484,7948.999999999999,2013-11-09 09:55:19 -0800,2587,7888 -11485,7651.000000000001,2013-11-08 12:35:20 -0800,2587,7886 -11486,7028.0,2013-11-08 15:50:19 -0800,2587,7888 -11487,1786.0,2013-11-10 11:21:36 -0800,2587,7886 -11488,2227.0,2013-11-13 01:14:44 -0800,2587,7887 -11489,1299.0,2013-11-08 22:59:26 -0800,2587,7888 -11490,8788.0,2013-11-10 22:34:55 -0800,2588,7889 -11491,5217.0,2013-11-06 17:31:47 -0800,2588,7891 -11492,8683.0,2013-11-12 09:31:45 -0800,2588,7891 -11493,9352.0,2013-11-06 21:03:47 -0800,2588,7890 -11494,7066.0,2013-11-08 05:46:37 -0800,2588,7891 -11495,8276.0,2013-11-13 01:27:48 -0800,2590,7895 -11496,5979.0,2013-11-11 18:14:32 -0800,2590,7895 -11497,3421.0,2013-11-12 06:51:34 -0800,2590,7895 -11498,2472.0,2013-11-09 08:46:04 -0800,2590,7896 -11499,8298.0,2013-11-10 03:04:56 -0800,2590,7895 -11500,9784.0,2013-11-07 11:57:07 -0800,2590,7895 -11501,7873.999999999999,2013-11-12 10:27:19 -0800,2590,7895 -11502,8744.0,2013-11-07 12:22:33 -0800,2590,7895 -11503,6890.000000000001,2013-11-08 17:59:49 -0800,2590,7896 -11504,1273.0,2013-11-07 00:48:43 -0800,2591,7898 -11505,5948.0,2013-11-11 08:33:43 -0800,2591,7901 -11506,4953.0,2013-11-10 19:00:21 -0800,2591,7901 -11507,4190.0,2013-11-12 15:25:08 -0800,2591,7897 -11508,9135.0,2013-11-11 14:26:13 -0800,2592,7902 -11509,5714.0,2013-11-10 23:58:39 -0800,2592,7902 -11510,369.0,2013-11-11 18:44:46 -0800,2592,7902 -11511,9164.0,2013-11-11 13:01:55 -0800,2592,7902 -11512,3185.0,2013-11-06 12:11:22 -0800,2592,7902 -11513,4776.0,2013-11-12 00:11:57 -0800,2592,7902 -11514,811.9999999999999,2013-11-12 06:11:26 -0800,2592,7902 -11515,9470.0,2013-11-06 16:04:48 -0800,2592,7902 -11516,7948.999999999999,2013-11-08 04:44:34 -0800,2592,7902 -11517,6368.0,2013-11-11 13:39:45 -0800,2593,7903 -11518,6296.0,2013-11-11 14:53:23 -0800,2593,7906 -11519,6297.0,2013-11-09 18:58:13 -0800,2593,7906 -11520,4581.0,2013-11-12 23:42:28 -0800,2593,7904 -11521,1796.0,2013-11-07 12:08:23 -0800,2594,7909 -11522,7816.0,2013-11-12 11:43:06 -0800,2594,7909 -11523,6980.0,2013-11-08 15:46:59 -0800,2594,7909 -11524,2544.0,2013-11-12 07:31:28 -0800,2594,7908 -11525,9163.0,2013-11-06 15:55:47 -0800,2594,7908 -11526,788.0,2013-11-13 00:06:39 -0800,2594,7908 -11527,6222.0,2013-11-11 02:47:10 -0800,2594,7907 -11528,9766.0,2013-11-06 16:50:15 -0800,2594,7908 -11529,3059.0,2013-11-11 06:43:57 -0800,2595,7911 -11530,5558.0,2013-11-06 09:49:15 -0800,2595,7911 -11531,1889.9999999999998,2013-11-11 12:51:36 -0800,2596,7916 -11532,4740.0,2013-11-08 03:47:23 -0800,2596,7914 -11533,4568.0,2013-11-07 18:35:59 -0800,2596,7913 -11534,4146.0,2013-11-11 02:27:51 -0800,2596,7912 -11535,5397.0,2013-11-08 21:41:40 -0800,2596,7913 -11536,5819.0,2013-11-11 03:08:55 -0800,2597,7917 -11537,1638.0,2013-11-11 12:14:00 -0800,2597,7917 -11538,7877.0,2013-11-10 03:10:11 -0800,2597,7917 -11539,7990.000000000001,2013-11-10 17:55:05 -0800,2597,7918 -11540,1067.0,2013-11-07 13:05:56 -0800,2597,7917 -11541,8648.0,2013-11-10 11:55:39 -0800,2597,7917 -11542,1160.0,2013-11-07 00:20:56 -0800,2598,7921 -11543,6664.0,2013-11-12 19:43:28 -0800,2598,7921 -11544,1224.0,2013-11-08 06:26:53 -0800,2598,7921 -11545,5881.0,2013-11-11 23:53:20 -0800,2598,7921 -11546,7279.000000000001,2013-11-09 19:13:52 -0800,2599,7922 -11547,8421.0,2013-11-10 12:28:59 -0800,2599,7922 -11548,9833.0,2013-11-07 07:43:19 -0800,2599,7922 -11549,4766.0,2013-11-08 08:22:10 -0800,2599,7922 -11550,651.0,2013-11-10 19:12:04 -0800,2599,7924 -11551,2461.0,2013-11-09 14:05:49 -0800,2599,7923 -11552,650.0,2013-11-10 22:00:51 -0800,2599,7924 -11553,3700.0,2013-11-07 12:07:22 -0800,2600,7926 -11554,266.0,2013-11-06 18:31:17 -0800,2600,7927 -11555,499.0,2013-11-06 11:00:25 -0800,2600,7926 -11556,5082.0,2013-11-07 00:07:00 -0800,2600,7927 -11557,8221.0,2013-11-10 14:58:09 -0800,2600,7927 -11558,4766.0,2013-11-09 00:53:20 -0800,2600,7927 -11559,5431.0,2013-11-08 11:06:21 -0800,2600,7926 -11560,3582.0,2013-11-12 18:26:36 -0800,2600,7926 -11561,1033.0,2013-11-12 18:52:17 -0800,2601,7928 -11562,8452.0,2013-11-11 05:58:31 -0800,2601,7928 -11563,8462.0,2013-11-10 02:21:09 -0800,2601,7928 -11564,5754.0,2013-11-08 19:08:58 -0800,2601,7928 -11565,8897.0,2013-11-12 01:38:01 -0800,2601,7928 -11566,8087.0,2013-11-11 15:03:18 -0800,2601,7928 -11567,7286.0,2013-11-13 07:20:59 -0800,2601,7928 -11568,4290.0,2013-11-09 08:46:07 -0800,2601,7928 -11569,950.0,2013-11-08 07:45:15 -0800,2601,7928 -11570,9481.0,2013-11-06 08:58:49 -0800,2602,7930 -11571,3497.9999999999995,2013-11-09 09:46:10 -0800,2602,7929 -11572,2511.0,2013-11-13 06:46:54 -0800,2602,7930 -11573,7690.000000000001,2013-11-13 03:43:02 -0800,2602,7929 -11574,3149.0,2013-11-08 20:01:33 -0800,2604,7934 -11575,1610.0000000000002,2013-11-11 16:47:21 -0800,2604,7934 -11576,8692.0,2013-11-09 17:06:49 -0800,2604,7934 -11577,3577.0000000000005,2013-11-11 13:38:50 -0800,2605,7938 -11578,9777.0,2013-11-08 02:36:22 -0800,2605,7936 -11579,7064.0,2013-11-07 13:35:52 -0800,2605,7937 -11580,2090.0,2013-11-10 07:26:11 -0800,2606,7943 -11581,3635.0,2013-11-10 09:25:45 -0800,2606,7943 -11582,7726.000000000001,2013-11-13 06:43:29 -0800,2606,7940 -11583,6989.0,2013-11-10 09:23:15 -0800,2606,7941 -11584,5744.0,2013-11-11 05:00:05 -0800,2606,7942 -11585,179.0,2013-11-10 17:34:52 -0800,2607,7946 -11586,328.0,2013-11-10 14:25:28 -0800,2607,7944 -11587,4627.0,2013-11-08 17:14:09 -0800,2607,7944 -11588,4279.0,2013-11-11 07:12:12 -0800,2607,7945 -11589,5834.0,2013-11-08 20:22:46 -0800,2607,7944 -11590,3482.0,2013-11-09 16:04:32 -0800,2607,7945 -11591,570.0,2013-11-11 12:40:28 -0800,2607,7944 -11592,3365.9999999999995,2013-11-12 14:26:21 -0800,2608,7948 -11593,30.0,2013-11-09 02:34:21 -0800,2608,7947 -11594,6994.0,2013-11-06 09:14:03 -0800,2608,7948 -11595,5298.0,2013-11-08 04:52:26 -0800,2608,7947 -11596,9655.0,2013-11-09 16:54:30 -0800,2610,7954 -11597,5626.0,2013-11-09 13:59:37 -0800,2610,7957 -11598,592.0,2013-11-08 16:46:57 -0800,2610,7954 -11599,7073.999999999999,2013-11-11 01:22:31 -0800,2611,7959 -11600,2198.0,2013-11-07 17:46:06 -0800,2611,7960 -11601,434.99999999999994,2013-11-11 04:04:20 -0800,2611,7960 -11602,5364.0,2013-11-10 21:58:10 -0800,2611,7961 -11603,550.0,2013-11-12 04:12:31 -0800,2611,7960 -11604,4811.0,2013-11-07 20:26:45 -0800,2611,7961 -11605,5162.0,2013-11-10 12:21:10 -0800,2611,7959 -11606,4110.0,2013-11-07 02:02:07 -0800,2611,7959 -11607,2540.0,2013-11-10 23:56:17 -0800,2612,7962 -11608,4240.0,2013-11-08 12:15:03 -0800,2612,7963 -11609,1360.0,2013-11-07 05:52:17 -0800,2612,7962 -11610,2872.0,2013-11-13 02:53:34 -0800,2612,7963 -11611,5083.0,2013-11-10 11:36:30 -0800,2612,7963 -11612,2862.0,2013-11-10 01:51:40 -0800,2612,7963 -11613,1739.9999999999998,2013-11-09 17:12:16 -0800,2613,7964 -11614,1040.0,2013-11-06 23:42:46 -0800,2613,7965 -11615,5912.0,2013-11-07 11:07:27 -0800,2613,7964 -11616,988.0000000000001,2013-11-11 21:50:24 -0800,2613,7965 -11617,4341.0,2013-11-07 06:37:36 -0800,2613,7965 -11618,4297.0,2013-11-07 21:50:45 -0800,2613,7964 -11619,279.0,2013-11-12 19:50:38 -0800,2613,7965 -11620,2983.0,2013-11-09 01:25:08 -0800,2613,7965 -11621,6567.0,2013-11-10 02:39:51 -0800,2614,7969 -11622,1061.0,2013-11-11 16:47:04 -0800,2614,7968 -11623,5636.0,2013-11-07 09:42:08 -0800,2614,7968 -11624,3799.0,2013-11-13 05:38:18 -0800,2614,7969 -11625,3974.0,2013-11-08 11:44:09 -0800,2614,7970 -11626,1515.0,2013-11-06 13:18:57 -0800,2614,7967 -11627,4134.0,2013-11-07 13:46:52 -0800,2615,7971 -11628,4581.0,2013-11-11 15:50:54 -0800,2615,7971 -11629,1197.0,2013-11-12 22:22:54 -0800,2615,7971 -11630,9540.0,2013-11-08 05:02:14 -0800,2615,7971 -11631,6842.0,2013-11-12 04:34:01 -0800,2615,7971 -11632,6062.0,2013-11-09 08:04:21 -0800,2616,7972 -11633,4899.0,2013-11-09 17:55:35 -0800,2616,7974 -11634,5183.0,2013-11-12 08:51:25 -0800,2617,7976 -11635,5178.0,2013-11-08 04:32:04 -0800,2617,7976 -11636,5180.0,2013-11-12 16:32:34 -0800,2617,7976 -11637,5938.0,2013-11-08 21:26:39 -0800,2617,7976 -11638,6598.999999999999,2013-11-12 20:57:46 -0800,2618,7978 -11639,1943.0,2013-11-12 11:54:31 -0800,2618,7978 -11640,8490.0,2013-11-10 16:49:45 -0800,2618,7980 -11641,8935.0,2013-11-08 14:28:10 -0800,2618,7979 -11642,941.0,2013-11-11 03:46:22 -0800,2618,7978 -11643,1766.0,2013-11-06 14:21:43 -0800,2618,7977 -11644,8386.0,2013-11-10 09:24:57 -0800,2618,7979 -11645,6181.0,2013-11-09 17:58:04 -0800,2618,7980 -11646,6959.999999999999,2013-11-09 10:59:32 -0800,2618,7978 -11647,5860.0,2013-11-12 12:32:28 -0800,2619,7981 -11648,9469.0,2013-11-06 11:22:31 -0800,2619,7981 -11649,5691.0,2013-11-09 22:00:10 -0800,2619,7981 -11650,9527.0,2013-11-08 22:08:09 -0800,2619,7981 -11651,3258.0,2013-11-10 11:23:40 -0800,2619,7981 -11652,725.0,2013-11-09 03:07:34 -0800,2619,7981 -11653,3196.0,2013-11-10 03:49:27 -0800,2619,7981 -11654,8670.0,2013-11-12 07:55:39 -0800,2619,7981 -11655,3153.0,2013-11-08 14:14:17 -0800,2619,7981 -11656,2225.0,2013-11-12 00:31:27 -0800,2620,7983 -11657,7388.0,2013-11-07 02:48:13 -0800,2620,7985 -11658,6913.0,2013-11-13 03:01:34 -0800,2620,7982 -11659,5891.0,2013-11-09 18:35:18 -0800,2620,7984 -11660,3459.0000000000005,2013-11-11 21:53:08 -0800,2620,7983 -11661,8370.0,2013-11-11 05:35:18 -0800,2620,7985 -11662,3959.0000000000005,2013-11-12 15:07:03 -0800,2620,7983 -11663,1789.9999999999998,2013-11-06 16:05:27 -0800,2620,7985 -11664,9155.0,2013-11-10 06:05:41 -0800,2622,7992 -11665,3484.0000000000005,2013-11-08 03:50:48 -0800,2622,7992 -11666,5893.0,2013-11-09 21:59:32 -0800,2622,7991 -11667,9786.0,2013-11-09 14:06:01 -0800,2622,7991 -11668,3351.0,2013-11-12 22:38:43 -0800,2623,7997 -11669,6274.0,2013-11-11 16:07:37 -0800,2623,7996 -11670,5946.0,2013-11-06 13:54:54 -0800,2623,7995 -11671,5410.0,2013-11-08 21:21:46 -0800,2623,7996 -11672,2256.0,2013-11-07 06:04:08 -0800,2623,7994 -11673,1283.0,2013-11-09 19:58:54 -0800,2623,7994 -11674,3175.0,2013-11-10 14:14:04 -0800,2623,7997 -11675,3210.0,2013-11-07 08:51:38 -0800,2623,7995 -11676,4580.0,2013-11-12 08:23:09 -0800,2623,7997 -11677,7809.999999999999,2013-11-08 16:43:01 -0800,2624,7998 -11678,238.0,2013-11-08 15:20:34 -0800,2624,7998 -11679,9055.0,2013-11-12 06:11:08 -0800,2624,7999 -11680,1485.0,2013-11-08 16:24:59 -0800,2624,7999 -11681,571.0,2013-11-11 18:27:51 -0800,2624,8000 -11682,4116.0,2013-11-06 20:03:44 -0800,2624,7999 -11683,3489.0,2013-11-09 23:41:48 -0800,2624,8000 -11684,8783.0,2013-11-13 04:39:48 -0800,2625,8001 -11685,5198.0,2013-11-07 23:19:32 -0800,2626,8003 -11686,4934.0,2013-11-11 12:55:55 -0800,2626,8004 -11687,840.0,2013-11-08 06:41:46 -0800,2626,8002 -11688,8778.0,2013-11-11 18:47:59 -0800,2627,8009 -11689,6244.0,2013-11-12 10:10:05 -0800,2627,8009 -11690,2340.0,2013-11-08 18:40:59 -0800,2627,8009 -11691,2172.0,2013-11-06 17:46:58 -0800,2627,8009 -11692,5190.0,2013-11-09 04:13:22 -0800,2627,8006 -11693,9220.0,2013-11-08 16:43:21 -0800,2628,8010 -11694,6467.0,2013-11-08 19:40:48 -0800,2628,8010 -11695,2644.0,2013-11-09 17:10:23 -0800,2628,8010 -11696,4141.0,2013-11-12 11:34:33 -0800,2628,8012 -11697,2593.0,2013-11-09 10:33:04 -0800,2628,8011 -11698,3127.0,2013-11-12 11:10:37 -0800,2629,8015 -11699,2782.0,2013-11-08 19:10:23 -0800,2629,8015 -11700,3119.0,2013-11-12 22:01:04 -0800,2629,8013 -11701,6540.000000000001,2013-11-08 10:26:17 -0800,2629,8014 -11702,3934.0000000000005,2013-11-08 14:19:00 -0800,2629,8015 -11703,6127.0,2013-11-12 21:22:02 -0800,2629,8015 -11704,7737.0,2013-11-07 15:15:03 -0800,2630,8016 -11705,4560.0,2013-11-11 11:45:42 -0800,2630,8016 -11706,5183.0,2013-11-06 11:40:59 -0800,2631,8017 -11707,3411.9999999999995,2013-11-07 13:57:41 -0800,2631,8017 -11708,9645.0,2013-11-13 02:25:44 -0800,2631,8017 -11709,384.0,2013-11-10 12:03:02 -0800,2631,8017 -11710,8050.0,2013-11-13 00:31:05 -0800,2631,8018 -11711,9213.0,2013-11-11 06:52:59 -0800,2631,8017 -11712,4332.0,2013-11-08 05:26:07 -0800,2631,8018 -11713,430.0,2013-11-07 20:13:01 -0800,2631,8018 -11714,8265.0,2013-11-13 02:17:03 -0800,2631,8018 -11715,469.00000000000006,2013-11-08 06:55:36 -0800,2632,8019 -11716,9485.0,2013-11-08 19:07:10 -0800,2632,8020 -11717,9272.0,2013-11-12 19:52:35 -0800,2632,8019 -11718,1755.0,2013-11-10 18:06:07 -0800,2632,8020 -11719,6944.0,2013-11-08 04:35:27 -0800,2632,8021 -11720,3368.0,2013-11-09 14:40:30 -0800,2632,8019 -11721,1776.0000000000002,2013-11-10 06:00:42 -0800,2633,8022 -11722,4539.0,2013-11-08 07:54:56 -0800,2633,8022 -11723,5737.0,2013-11-10 19:43:13 -0800,2633,8022 -11724,9616.0,2013-11-06 13:20:25 -0800,2633,8022 -11725,1177.0,2013-11-08 03:39:07 -0800,2633,8022 -11726,6583.0,2013-11-08 03:53:32 -0800,2633,8022 -11727,4090.9999999999995,2013-11-11 20:39:36 -0800,2633,8022 -11728,1788.0,2013-11-09 05:51:05 -0800,2633,8022 -11729,7584.0,2013-11-07 01:24:08 -0800,2633,8022 -11730,1132.0,2013-11-06 18:04:49 -0800,2634,8027 -11731,6100.0,2013-11-08 07:43:09 -0800,2634,8026 -11732,8783.0,2013-11-06 19:28:45 -0800,2634,8027 -11733,7897.0,2013-11-06 10:20:13 -0800,2634,8027 -11734,8118.000000000001,2013-11-09 10:40:20 -0800,2635,8028 -11735,4789.0,2013-11-09 09:40:18 -0800,2635,8028 -11736,2455.0,2013-11-10 21:58:50 -0800,2635,8028 -11737,9219.0,2013-11-13 01:50:10 -0800,2635,8028 -11738,9120.0,2013-11-09 18:17:40 -0800,2635,8028 -11739,5926.0,2013-11-12 23:46:48 -0800,2635,8028 -11740,1793.0,2013-11-09 10:00:56 -0800,2635,8028 -11741,7529.000000000001,2013-11-10 21:48:32 -0800,2635,8028 -11742,317.0,2013-11-06 09:53:01 -0800,2636,8029 -11743,4378.0,2013-11-08 16:34:41 -0800,2636,8029 -11744,2263.0,2013-11-06 14:08:47 -0800,2636,8029 -11745,3770.0000000000005,2013-11-06 17:58:27 -0800,2636,8029 -11746,8255.0,2013-11-08 23:20:39 -0800,2636,8029 -11747,3729.9999999999995,2013-11-13 06:23:23 -0800,2636,8029 -11748,7091.0,2013-11-11 00:15:59 -0800,2637,8030 -11749,1242.0,2013-11-07 07:07:26 -0800,2637,8030 -11750,543.0,2013-11-08 07:19:18 -0800,2637,8032 -11751,5656.0,2013-11-11 21:12:35 -0800,2637,8032 -11752,3485.0,2013-11-09 13:43:47 -0800,2637,8033 -11753,2711.0,2013-11-09 00:23:06 -0800,2637,8032 -11754,4648.0,2013-11-12 21:02:36 -0800,2637,8032 -11755,7719.0,2013-11-11 18:57:36 -0800,2637,8030 -11756,297.0,2013-11-12 21:55:19 -0800,2637,8033 -11757,3220.0000000000005,2013-11-06 09:48:58 -0800,2638,8038 -11758,1278.0,2013-11-11 07:03:25 -0800,2638,8037 -11759,1240.0,2013-11-10 00:21:59 -0800,2638,8038 -11760,5634.0,2013-11-10 01:26:00 -0800,2638,8035 -11761,9274.0,2013-11-13 00:29:47 -0800,2638,8037 -11762,6364.0,2013-11-08 21:54:14 -0800,2638,8034 -11763,9664.0,2013-11-11 23:03:37 -0800,2638,8035 -11764,3338.0000000000005,2013-11-06 17:22:16 -0800,2640,8041 -11765,6021.0,2013-11-11 02:13:29 -0800,2640,8041 -11766,4631.0,2013-11-08 03:13:33 -0800,2640,8041 -11767,3888.0000000000005,2013-11-11 21:14:35 -0800,2640,8041 -11768,9328.0,2013-11-09 09:38:57 -0800,2640,8041 -11769,9562.0,2013-11-11 21:03:07 -0800,2640,8041 -11770,3875.0,2013-11-11 16:47:40 -0800,2642,8045 -11771,5693.0,2013-11-11 01:13:42 -0800,2642,8045 -11772,9195.0,2013-11-08 04:40:34 -0800,2642,8044 -11773,1332.0,2013-11-11 11:50:27 -0800,2642,8044 -11774,4119.0,2013-11-09 09:22:42 -0800,2642,8045 -11775,1454.0,2013-11-07 10:43:26 -0800,2642,8044 -11776,4475.0,2013-11-12 08:59:56 -0800,2642,8043 -11777,1854.0,2013-11-12 09:41:30 -0800,2643,8047 -11778,3365.0,2013-11-09 00:17:50 -0800,2643,8049 -11779,742.0,2013-11-09 05:34:16 -0800,2643,8050 -11780,3122.0,2013-11-11 20:24:54 -0800,2644,8052 -11781,6550.0,2013-11-11 09:10:13 -0800,2644,8051 -11782,6513.0,2013-11-10 02:04:57 -0800,2644,8053 -11783,9422.0,2013-11-06 13:25:56 -0800,2644,8055 -11784,1667.0000000000002,2013-11-10 07:56:13 -0800,2645,8056 -11785,7075.0,2013-11-12 07:20:14 -0800,2645,8056 -11786,8843.0,2013-11-08 08:41:30 -0800,2645,8057 -11787,725.0,2013-11-12 05:12:34 -0800,2645,8057 -11788,5091.0,2013-11-11 13:25:35 -0800,2646,8060 -11789,6353.0,2013-11-07 20:33:02 -0800,2646,8059 -11790,6189.0,2013-11-10 11:03:59 -0800,2646,8058 -11791,3081.0,2013-11-12 21:57:07 -0800,2646,8060 -11792,2592.0,2013-11-10 05:21:28 -0800,2646,8058 -11793,231.99999999999997,2013-11-10 06:06:35 -0800,2646,8059 -11794,3385.0,2013-11-10 02:58:07 -0800,2647,8061 -11795,8030.0,2013-11-07 06:05:58 -0800,2647,8061 -11796,5540.0,2013-11-13 05:04:24 -0800,2647,8062 -11797,5566.0,2013-11-08 20:16:17 -0800,2647,8062 -11798,3695.0000000000005,2013-11-09 08:26:18 -0800,2647,8061 -11799,8039.0,2013-11-12 18:37:28 -0800,2647,8061 -11800,2767.0,2013-11-08 19:39:54 -0800,2648,8065 -11801,5945.0,2013-11-13 06:00:16 -0800,2648,8063 -11802,1710.0000000000002,2013-11-09 12:57:15 -0800,2648,8066 -11803,3831.0,2013-11-12 00:01:30 -0800,2648,8063 -11804,44.0,2013-11-07 22:43:21 -0800,2648,8065 -11805,2550.0,2013-11-11 13:37:28 -0800,2648,8065 -11806,9867.0,2013-11-09 19:05:28 -0800,2648,8066 -11807,6823.999999999999,2013-11-12 10:55:26 -0800,2648,8067 -11808,3250.0,2013-11-12 21:14:44 -0800,2648,8065 -11809,9148.0,2013-11-06 20:44:45 -0800,2649,8070 -11810,6543.000000000001,2013-11-10 20:45:58 -0800,2649,8070 -11811,32.0,2013-11-07 00:44:27 -0800,2649,8068 -11812,8314.0,2013-11-07 04:07:22 -0800,2649,8068 -11813,2464.0,2013-11-11 10:03:33 -0800,2649,8068 -11814,4237.0,2013-11-12 16:25:29 -0800,2649,8068 -11815,6553.0,2013-11-11 21:11:09 -0800,2649,8068 -11816,3159.0,2013-11-13 07:40:42 -0800,2650,8073 -11817,3954.0,2013-11-12 11:57:52 -0800,2650,8071 -11818,7392.0,2013-11-06 18:55:29 -0800,2650,8071 -11819,2446.0,2013-11-09 09:34:27 -0800,2650,8075 -11820,9544.0,2013-11-08 16:35:20 -0800,2650,8075 -11821,4665.0,2013-11-10 05:00:34 -0800,2650,8072 -11822,5260.0,2013-11-08 05:14:32 -0800,2650,8074 -11823,3842.0,2013-11-06 23:34:09 -0800,2651,8076 -11824,6634.0,2013-11-10 10:20:50 -0800,2651,8076 -11825,3219.0,2013-11-08 22:59:44 -0800,2651,8076 -11826,8664.0,2013-11-06 18:34:24 -0800,2652,8078 -11827,6918.000000000001,2013-11-12 09:21:48 -0800,2652,8078 -11828,2851.0,2013-11-10 10:34:05 -0800,2652,8077 -11829,3970.0000000000005,2013-11-08 03:29:36 -0800,2652,8078 -11830,8869.0,2013-11-11 07:26:37 -0800,2652,8078 -11831,6866.0,2013-11-11 14:59:00 -0800,2652,8077 -11832,5650.0,2013-11-11 06:49:11 -0800,2653,8080 -11833,4511.0,2013-11-09 12:08:15 -0800,2653,8079 -11834,7068.000000000001,2013-11-12 06:27:48 -0800,2654,8082 -11835,4195.0,2013-11-09 09:04:50 -0800,2654,8084 -11836,7481.0,2013-11-09 10:54:47 -0800,2654,8081 -11837,4556.0,2013-11-06 20:09:08 -0800,2654,8084 -11838,549.0,2013-11-12 10:47:42 -0800,2654,8082 -11839,1425.0,2013-11-09 20:14:10 -0800,2655,8085 -11840,5394.0,2013-11-06 13:47:03 -0800,2655,8086 -11841,2650.0,2013-11-11 17:14:17 -0800,2655,8086 -11842,5369.0,2013-11-07 15:05:07 -0800,2655,8086 -11843,1486.0,2013-11-07 13:39:24 -0800,2655,8086 -11844,8162.0,2013-11-09 08:18:18 -0800,2655,8086 -11845,1169.0,2013-11-12 14:31:55 -0800,2655,8086 -11846,2122.0,2013-11-09 00:45:24 -0800,2655,8085 -11847,8450.0,2013-11-07 16:01:46 -0800,2655,8086 -11848,5054.0,2013-11-07 02:14:41 -0800,2656,8087 -11849,5249.0,2013-11-08 16:17:59 -0800,2656,8087 -11850,2926.0,2013-11-09 17:53:15 -0800,2656,8089 -11851,248.0,2013-11-11 16:50:53 -0800,2656,8087 -11852,6045.0,2013-11-13 07:01:02 -0800,2656,8089 -11853,811.0,2013-11-09 21:15:42 -0800,2656,8087 -11854,118.0,2013-11-10 03:51:00 -0800,2656,8087 -11855,3996.0,2013-11-11 05:47:17 -0800,2657,8090 -11856,896.0000000000001,2013-11-07 08:36:40 -0800,2657,8091 -11857,6013.0,2013-11-08 11:40:10 -0800,2657,8091 -11858,1378.0,2013-11-07 08:18:57 -0800,2657,8090 -11859,8888.0,2013-11-08 03:35:43 -0800,2657,8091 -11860,2575.0,2013-11-07 22:39:50 -0800,2657,8091 -11861,1778.0,2013-11-11 22:50:09 -0800,2657,8090 -11862,1563.0,2013-11-08 02:44:02 -0800,2657,8091 -11863,4940.0,2013-11-07 09:52:58 -0800,2657,8091 -11864,3050.0,2013-11-10 08:45:20 -0800,2658,8092 -11865,772.0,2013-11-12 04:11:18 -0800,2658,8092 -11866,9578.0,2013-11-09 04:30:37 -0800,2658,8092 -11867,5797.0,2013-11-10 20:50:51 -0800,2658,8092 -11868,7145.999999999999,2013-11-09 20:58:32 -0800,2658,8092 -11869,4987.0,2013-11-11 15:37:28 -0800,2658,8092 -11870,8250.0,2013-11-12 00:07:41 -0800,2658,8092 -11871,222.00000000000003,2013-11-12 20:47:51 -0800,2658,8092 -11872,56.00000000000001,2013-11-10 07:48:56 -0800,2658,8092 -11873,1384.0,2013-11-09 12:42:01 -0800,2659,8093 -11874,4891.0,2013-11-12 21:44:04 -0800,2660,8097 -11875,1620.0,2013-11-12 02:08:38 -0800,2660,8097 -11876,9285.0,2013-11-10 19:52:52 -0800,2660,8098 -11877,5343.0,2013-11-10 02:41:11 -0800,2660,8097 -11878,6396.0,2013-11-10 04:24:29 -0800,2660,8099 -11879,9430.0,2013-11-08 12:27:10 -0800,2660,8096 -11880,7840.000000000001,2013-11-07 12:16:56 -0800,2660,8099 -11881,9290.0,2013-11-12 18:06:13 -0800,2661,8100 -11882,4932.0,2013-11-13 01:43:03 -0800,2661,8102 -11883,3697.0,2013-11-09 19:40:31 -0800,2662,8103 -11884,9268.0,2013-11-10 02:17:52 -0800,2662,8103 -11885,1227.0,2013-11-12 14:39:51 -0800,2663,8106 -11886,1360.0,2013-11-13 05:40:10 -0800,2663,8104 -11887,4480.0,2013-11-10 13:49:56 -0800,2663,8105 -11888,7328.0,2013-11-12 02:22:44 -0800,2665,8113 -11889,1392.0,2013-11-11 15:24:28 -0800,2666,8117 -11890,1469.0,2013-11-12 07:58:33 -0800,2666,8117 -11891,543.0,2013-11-07 10:58:23 -0800,2667,8118 -11892,3264.0,2013-11-08 17:59:35 -0800,2667,8120 -11893,5581.0,2013-11-07 07:40:49 -0800,2667,8118 -11894,3023.0,2013-11-10 09:07:24 -0800,2667,8119 -11895,7923.999999999999,2013-11-08 14:56:29 -0800,2667,8120 -11896,4064.0,2013-11-12 01:00:40 -0800,2667,8119 -11897,4112.0,2013-11-07 12:33:10 -0800,2668,8122 -11898,7089.0,2013-11-12 01:04:51 -0800,2669,8126 -11899,1836.0,2013-11-08 09:28:37 -0800,2669,8124 -11900,741.0,2013-11-13 07:13:59 -0800,2669,8125 -11901,6512.0,2013-11-06 14:18:59 -0800,2669,8126 -11902,6374.0,2013-11-08 12:38:53 -0800,2669,8124 -11903,9636.0,2013-11-13 03:11:06 -0800,2669,8124 -11904,275.0,2013-11-12 20:50:32 -0800,2669,8128 -11905,7934.0,2013-11-11 18:56:01 -0800,2670,8129 -11906,1426.0,2013-11-09 21:12:11 -0800,2670,8129 -11907,519.0,2013-11-06 23:56:08 -0800,2670,8129 -11908,7373.0,2013-11-09 15:30:51 -0800,2670,8129 -11909,56.99999999999999,2013-11-07 10:49:25 -0800,2670,8129 -11910,5930.0,2013-11-11 18:11:17 -0800,2670,8129 -11911,6323.0,2013-11-09 17:18:25 -0800,2670,8129 -11912,3684.0000000000005,2013-11-07 14:31:39 -0800,2670,8129 -11913,9894.0,2013-11-07 16:20:35 -0800,2670,8129 -11914,770.0,2013-11-12 16:35:35 -0800,2671,8130 -11915,942.0,2013-11-06 10:15:34 -0800,2671,8130 -11916,7937.0,2013-11-07 07:51:13 -0800,2671,8130 -11917,4470.0,2013-11-10 21:29:05 -0800,2672,8131 -11918,7875.0,2013-11-11 10:37:22 -0800,2672,8133 -11919,9718.0,2013-11-07 07:39:14 -0800,2672,8133 -11920,9777.0,2013-11-12 21:11:52 -0800,2672,8131 -11921,4035.0,2013-11-07 18:18:00 -0800,2672,8131 -11922,8279.0,2013-11-08 01:46:03 -0800,2672,8131 -11923,5582.0,2013-11-07 23:13:02 -0800,2672,8131 -11924,9500.0,2013-11-07 08:19:25 -0800,2672,8133 -11925,7247.0,2013-11-09 23:28:12 -0800,2673,8136 -11926,7243.000000000001,2013-11-07 21:01:27 -0800,2673,8136 -11927,1398.0,2013-11-06 20:31:05 -0800,2673,8136 -11928,1976.0000000000002,2013-11-06 19:52:58 -0800,2673,8136 -11929,5817.0,2013-11-07 20:36:43 -0800,2673,8136 -11930,3384.0000000000005,2013-11-10 07:01:13 -0800,2673,8136 -11931,4470.0,2013-11-10 14:36:17 -0800,2673,8135 -11932,6177.0,2013-11-10 13:33:05 -0800,2674,8139 -11933,3997.9999999999995,2013-11-08 08:55:40 -0800,2675,8140 -11934,6728.0,2013-11-10 14:10:14 -0800,2676,8144 -11935,8954.0,2013-11-06 08:37:48 -0800,2676,8144 -11936,7361.0,2013-11-08 15:51:28 -0800,2676,8141 -11937,7378.0,2013-11-12 08:41:09 -0800,2676,8141 -11938,2947.0,2013-11-06 21:45:29 -0800,2676,8144 -11939,2496.0,2013-11-09 12:40:39 -0800,2676,8142 -11940,1294.0,2013-11-08 04:28:50 -0800,2677,8146 -11941,413.99999999999994,2013-11-09 18:54:08 -0800,2677,8146 -11942,4310.0,2013-11-07 00:52:44 -0800,2677,8147 -11943,1584.0,2013-11-08 23:56:22 -0800,2677,8145 -11944,8685.0,2013-11-07 00:53:55 -0800,2677,8145 -11945,180.0,2013-11-13 04:07:42 -0800,2678,8150 -11946,8353.0,2013-11-13 01:54:30 -0800,2679,8153 -11947,6839.0,2013-11-08 13:22:10 -0800,2679,8153 -11948,6880.0,2013-11-12 01:20:36 -0800,2680,8157 -11949,2656.0,2013-11-11 11:11:53 -0800,2680,8159 -11950,7190.000000000001,2013-11-09 06:56:49 -0800,2680,8156 -11951,1721.0,2013-11-07 00:05:57 -0800,2680,8157 -11952,9419.0,2013-11-10 20:33:33 -0800,2680,8157 -11953,3794.0,2013-11-10 12:57:44 -0800,2680,8157 -11954,199.0,2013-11-13 07:47:58 -0800,2680,8158 -11955,2535.0,2013-11-10 20:06:28 -0800,2680,8159 -11956,4833.0,2013-11-11 15:22:21 -0800,2680,8158 -11957,8998.0,2013-11-11 18:35:08 -0800,2681,8161 -11958,4260.0,2013-11-07 12:36:17 -0800,2681,8161 -11959,2455.0,2013-11-08 19:55:09 -0800,2683,8168 -11960,3071.0,2013-11-07 00:32:21 -0800,2683,8169 -11961,3954.9999999999995,2013-11-09 10:50:58 -0800,2683,8167 -11962,1670.0,2013-11-10 01:18:52 -0800,2683,8169 -11963,2225.0,2013-11-11 19:04:43 -0800,2683,8166 -11964,3690.0,2013-11-08 06:32:45 -0800,2683,8167 -11965,3198.0,2013-11-12 19:19:25 -0800,2683,8166 -11966,419.00000000000006,2013-11-09 20:35:48 -0800,2683,8168 -11967,5050.0,2013-11-10 19:26:51 -0800,2683,8166 -11968,8031.0,2013-11-09 11:25:11 -0800,2684,8170 -11969,8660.0,2013-11-12 02:33:57 -0800,2684,8171 -11970,9264.0,2013-11-13 03:48:40 -0800,2684,8171 -11971,3219.0,2013-11-10 23:32:55 -0800,2684,8171 -11972,153.0,2013-11-13 06:41:44 -0800,2684,8170 -11973,1669.0000000000002,2013-11-06 22:57:35 -0800,2684,8170 -11974,4231.0,2013-11-07 12:52:04 -0800,2684,8170 -11975,4950.0,2013-11-06 13:32:09 -0800,2684,8170 -11976,6028.0,2013-11-12 16:03:57 -0800,2684,8170 -11977,7338.0,2013-11-08 10:17:41 -0800,2685,8174 -11978,3815.9999999999995,2013-11-10 12:01:17 -0800,2685,8173 -11979,2836.0,2013-11-12 10:47:19 -0800,2685,8173 -11980,8951.0,2013-11-06 20:30:41 -0800,2686,8178 -11981,7994.0,2013-11-13 03:26:16 -0800,2686,8177 -11982,7718.000000000001,2013-11-08 16:46:07 -0800,2686,8178 -11983,3000.0,2013-11-09 11:57:46 -0800,2686,8177 -11984,5200.0,2013-11-07 02:05:10 -0800,2686,8178 -11985,1816.0,2013-11-08 19:06:17 -0800,2686,8177 -11986,2362.0,2013-11-11 09:59:17 -0800,2687,8179 -11987,6113.0,2013-11-07 14:41:55 -0800,2687,8179 -11988,5419.0,2013-11-13 05:44:27 -0800,2687,8179 -11989,4751.0,2013-11-09 14:50:31 -0800,2687,8179 -11990,6291.0,2013-11-12 10:45:52 -0800,2687,8179 -11991,7440.000000000001,2013-11-07 06:41:43 -0800,2687,8179 -11992,7050.0,2013-11-09 06:09:13 -0800,2687,8179 -11993,5127.0,2013-11-13 04:40:49 -0800,2688,8182 -11994,222.00000000000003,2013-11-07 18:21:32 -0800,2688,8182 -11995,6321.0,2013-11-10 07:40:43 -0800,2688,8181 -11996,5139.0,2013-11-11 12:03:31 -0800,2688,8182 -11997,3184.0,2013-11-11 11:44:40 -0800,2688,8180 -11998,1572.0,2013-11-12 22:23:49 -0800,2688,8180 -11999,3793.0,2013-11-10 00:44:52 -0800,2689,8188 -12000,7773.999999999999,2013-11-10 22:35:57 -0800,2690,8193 -12001,8923.0,2013-11-12 02:03:31 -0800,2690,8192 From 0731d0fc578ba6c892a2d28fae0f86fe51f4a0fb Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Wed, 7 Sep 2016 14:53:26 -0700 Subject: [PATCH 10/27] Added self method by_market into Vendor class --- far_mar.rb | 6 ++++-- lib/vendor.rb | 7 +++++++ specs/vendor_spec.rb | 12 ++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index fab44b75..08d96b8a 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -11,6 +11,8 @@ module FarMar end # puts FarMar::Market.all # market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") -vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) -puts vendor.revenue +# vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) #testing an instance method +# puts vendor.revenue + +puts FarMar::Vendor.by_market(1).length # testing class methods diff --git a/lib/vendor.rb b/lib/vendor.rb index e3d264e2..020b853b 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -29,6 +29,12 @@ def self.find(id) end end + def self.by_market(market_id) + all.delete_if do |k, v| + v.market_id != market_id + end + end + def market all_markets = FarMar::Market.all return all_markets[@id] @@ -61,5 +67,6 @@ def revenue sales_amounts.reduce(:+) end + end end diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index d5bedd3d..c93dd5c5 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -33,6 +33,17 @@ end + describe "#self.by_market" do + it "should return a hash" do + FarMar::Vendor.by_market(1).must_be_kind_of Hash + end + + it "should return a hash of six objects with a market id of 1" do + FarMar::Vendor.by_market(1).length.must_equal 6 + end + + end + describe "#market" do it "should return an instance of Market" do @vendor.market.must_be_instance_of FarMar::Market @@ -73,4 +84,5 @@ @vendor.revenue.must_be :>=, 0 end end + end From 8369fc3559e74b38bcb743164400708ececcf437 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Wed, 7 Sep 2016 15:55:47 -0700 Subject: [PATCH 11/27] Fixing a little thing on by_market self method in Vendor class --- far_mar.rb | 2 +- lib/vendor.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 08d96b8a..35d697d8 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -15,4 +15,4 @@ module FarMar # vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) #testing an instance method # puts vendor.revenue -puts FarMar::Vendor.by_market(1).length # testing class methods +puts FarMar::Vendor.by_market(1) # testing class methods diff --git a/lib/vendor.rb b/lib/vendor.rb index 020b853b..7cd2ba38 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -20,10 +20,10 @@ def self.all end def self.find(id) - all_vendors = self.all + # all_vendors = self.all - if all_vendors.has_key?(id) - return all_vendors[id] + if all.has_key?(id) + return all[id] else raise ArgumentError.new("We do not have a vendor with that ID.") end From b901dcea1f6abc5fc4a57e155fc762cef5f8c609 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Wed, 7 Sep 2016 16:12:08 -0700 Subject: [PATCH 12/27] Tiny fixins of language before moving onto Product class --- lib/product.rb | 6 ++---- lib/vendor.rb | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/product.rb b/lib/product.rb index 749beeb2..072d32d4 100644 --- a/lib/product.rb +++ b/lib/product.rb @@ -19,14 +19,12 @@ def self.all end def self.find(id) - all_products = self.all - - if all_products.has_key?(id) + if all.has_key?(id) return all_products[id] else raise ArgumentError.new("We do not have a product with that ID.") end end + end - end diff --git a/lib/vendor.rb b/lib/vendor.rb index 7cd2ba38..c3d384e2 100644 --- a/lib/vendor.rb +++ b/lib/vendor.rb @@ -20,8 +20,6 @@ def self.all end def self.find(id) - # all_vendors = self.all - if all.has_key?(id) return all[id] else From fda2ab75066770eb9cdf117cf581d2a14dc8b1a0 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Wed, 7 Sep 2016 16:30:39 -0700 Subject: [PATCH 13/27] Added vendor method to Product class --- far_mar.rb | 6 +++--- lib/product.rb | 8 ++++++-- specs/product_spec.rb | 11 +++++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 35d697d8..2ca72c64 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -12,7 +12,7 @@ module FarMar # puts FarMar::Market.all # market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") -# vendor = FarMar::Vendor.new(1,"Test Vendor",1,1) #testing an instance method -# puts vendor.revenue +product = FarMar::Product.new(1,"Test Product",1) #testing an instance method +puts product.vendor -puts FarMar::Vendor.by_market(1) # testing class methods +# puts FarMar::Vendor.by_market(1) # testing class methods diff --git a/lib/product.rb b/lib/product.rb index 072d32d4..56a5e4c4 100644 --- a/lib/product.rb +++ b/lib/product.rb @@ -20,11 +20,15 @@ def self.all def self.find(id) if all.has_key?(id) - return all_products[id] + return all[id] else raise ArgumentError.new("We do not have a product with that ID.") end end - + + def vendor + all_vendors = FarMar::Vendor.all + return all_vendors[@id] + end end end diff --git a/specs/product_spec.rb b/specs/product_spec.rb index 1d5e3525..b18cc5d5 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -31,4 +31,15 @@ proc { FarMar::Product.find(0) }.must_raise(ArgumentError) end end + + describe "#vendor" do + it "should return an instance of Vendor" do + @product.vendor.must_be_instance_of FarMar::Vendor + end + + it "should return only one instance, not a collection" do + @product.vendor.wont_be_kind_of Hash, Array + end + end + end From c0f51a9f2200460f6f326a8e0c6efd891cfd93da Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 11:10:22 -0700 Subject: [PATCH 14/27] Added sales and number_of_sales methods to Product class --- far_mar.rb | 2 +- lib/product.rb | 14 ++++++++++++++ specs/product_spec.rb | 19 +++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/far_mar.rb b/far_mar.rb index 2ca72c64..7f560a3e 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -13,6 +13,6 @@ module FarMar # market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") product = FarMar::Product.new(1,"Test Product",1) #testing an instance method -puts product.vendor +puts product.number_of_sales # puts FarMar::Vendor.by_market(1) # testing class methods diff --git a/lib/product.rb b/lib/product.rb index 56a5e4c4..7b287f14 100644 --- a/lib/product.rb +++ b/lib/product.rb @@ -30,5 +30,19 @@ def vendor all_vendors = FarMar::Vendor.all return all_vendors[@id] end + + def sales + all_sales = FarMar::Sale.all + + all_sales.delete_if do |k, v| + v.product_id != @id + end + + return all_sales + end + + def number_of_sales + return sales.length + end end end diff --git a/specs/product_spec.rb b/specs/product_spec.rb index b18cc5d5..53aa94ed 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -42,4 +42,23 @@ end end + describe "#sales" do + it "should return a hash" do + @product.sales.must_be_kind_of Hash + end + + it "should return a hash with length of 7 for product ID of 1" do + @product.sales.length.must_equal 7 + end + end + + describe "#number_of_sales" do + it "should return a single fixnum" do + @product.number_of_sales.must_be_kind_of Fixnum + end + + it "should return 7 for amount of product id 1s sold" do + @product.number_of_sales.must_equal 7 + end + end end From cbc5b965f12a13cb5587ca86a6dbee4bc6d3231a Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 11:17:32 -0700 Subject: [PATCH 15/27] Added self.by_vendor method to the Product class --- far_mar.rb | 6 +++--- lib/product.rb | 6 ++++++ specs/product_spec.rb | 11 +++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 7f560a3e..a1ce1140 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -12,7 +12,7 @@ module FarMar # puts FarMar::Market.all # market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") -product = FarMar::Product.new(1,"Test Product",1) #testing an instance method -puts product.number_of_sales +# product = FarMar::Product.new(1,"Test Product",1) #testing an instance method +# puts product.number_of_sale -# puts FarMar::Vendor.by_market(1) # testing class methods +puts FarMar::Product.by_vendor(1) # testing class methods diff --git a/lib/product.rb b/lib/product.rb index 7b287f14..33645073 100644 --- a/lib/product.rb +++ b/lib/product.rb @@ -26,6 +26,12 @@ def self.find(id) end end + def self.by_vendor(vendor_id) + all.delete_if do |k, v| + v.vendor_id != vendor_id + end + end + def vendor all_vendors = FarMar::Vendor.all return all_vendors[@id] diff --git a/specs/product_spec.rb b/specs/product_spec.rb index 53aa94ed..b51daf18 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -32,6 +32,17 @@ end end + describe "#self.by_vendor" do + it "should return a hash" do + FarMar::Product.by_vendor(1).must_be_kind_of Hash + end + + it "should return a hash of one Product Instance object when given a vendor_id of 1" do + FarMar::Product.by_vendor(1).length.must_equal 1 + FarMar::Product.by_vendor(1).values[0].must_be_instance_of FarMar::Product + end + end + describe "#vendor" do it "should return an instance of Vendor" do @product.vendor.must_be_instance_of FarMar::Vendor From 4b97b97529df5e9acb4aa6d090f18962b7d0bec8 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 11:27:58 -0700 Subject: [PATCH 16/27] Added vendor method to Sale class --- far_mar.rb | 6 +++--- lib/sale.rb | 6 +++++- specs/sale_spec.rb | 22 ++++++++++++++++++++-- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index a1ce1140..3dc241b3 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -12,7 +12,7 @@ module FarMar # puts FarMar::Market.all # market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") -# product = FarMar::Product.new(1,"Test Product",1) #testing an instance method -# puts product.number_of_sale +sale = FarMar::Sale.new(1,200,"12:00",1,1) #testing an instance method +puts sale.vendor.id -puts FarMar::Product.by_vendor(1) # testing class methods +# puts FarMar::Product.by_vendor(1) # testing class methods diff --git a/lib/sale.rb b/lib/sale.rb index d1041262..e4c72cb6 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -29,6 +29,10 @@ def self.find(id) raise ArgumentError.new("We do not have a sale with that ID.") end end - end + def vendor + all_vendors = FarMar::Vendor.all + return all_vendors[@id] + end + end end diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index e04fcd91..056b5ddf 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -1,11 +1,13 @@ require_relative 'spec_helper' describe FarMar::Sale do - sale = FarMar::Sale.new(1,200,"1200",1,1) + before (:each) do + @sale = FarMar::Sale.new(1,200,"12:00",1,1) + end describe "#initialize" do it "should create a new instance of Sale" do - sale.must_be_instance_of FarMar::Sale + @sale.must_be_instance_of FarMar::Sale end end @@ -29,4 +31,20 @@ proc { FarMar::Product.find(0) }.must_raise(ArgumentError) end end + + describe "#vendor" do + it "should return an instance of vendor" do + @sale.vendor.must_be_instance_of FarMar::Vendor + end + + it "should return only one instance, not a collection" do + @sale.vendor.wont_be_kind_of Hash, Array + end + + it "should return a vendor_id of 1 with a sale_id of 1" do + @sale.vendor.id.must_equal 1 + end + end + + end From dc1464f14ce846a2578b28665d57509a4ec443cd Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 12:02:17 -0700 Subject: [PATCH 17/27] Added product method and self.between(time1,time2) methods to Sale class --- far_mar.rb | 8 ++++---- lib/sale.rb | 11 +++++++++++ specs/sale_spec.rb | 25 +++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 3dc241b3..8079eddd 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -11,8 +11,8 @@ module FarMar end # puts FarMar::Market.all # market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") +# +# sale = FarMar::Sale.new(1,200,"12:00",1,1) #testing an instance method +# puts sale. -sale = FarMar::Sale.new(1,200,"12:00",1,1) #testing an instance method -puts sale.vendor.id - -# puts FarMar::Product.by_vendor(1) # testing class methods +# puts FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800") # testing class methods diff --git a/lib/sale.rb b/lib/sale.rb index e4c72cb6..f8e5fae6 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -30,9 +30,20 @@ def self.find(id) end end + def self.between(beginning_time, end_time) + all.delete_if do |k, v| + v.purchase_time >= beginning_time && v.purchase_time <= end_time + end + end + def vendor all_vendors = FarMar::Vendor.all return all_vendors[@id] end + + def product + all_products = FarMar::Product.all + return all_products[@id] + end end end diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index 056b5ddf..36136404 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -32,6 +32,19 @@ end end + describe "#self.between" do + + it "should return an array" do + FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800").must_be_kind_of Hash + end + + it "should return something of an instance of Sale" do + between_test = FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800") + + between_test.values.first.must_be_instance_of FarMar::Sale + end + end + describe "#vendor" do it "should return an instance of vendor" do @sale.vendor.must_be_instance_of FarMar::Vendor @@ -46,5 +59,17 @@ end end + describe "#product" do + it "should return an instance of Product" do + @sale.product.must_be_instance_of FarMar::Product + end + it "should return only one instance, not a collection" do + @sale.product.wont_be_kind_of Hash, Array + end + + it "should return a product_id of 1 with a sale_id of 1" do + @sale.product.id.must_equal 1 + end + end end From a4799f30bebb54ea75ce17459d4325d5fe1dedb5 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 12:16:09 -0700 Subject: [PATCH 18/27] Fixed calculation for self.between method bc it was very wrong also added more tests --- far_mar.rb | 2 +- lib/sale.rb | 2 +- specs/sale_spec.rb | 11 ++++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 8079eddd..c2b298a7 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -15,4 +15,4 @@ module FarMar # sale = FarMar::Sale.new(1,200,"12:00",1,1) #testing an instance method # puts sale. -# puts FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800") # testing class methods +puts FarMar::Sale.between("2013-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800").length # testing class methods diff --git a/lib/sale.rb b/lib/sale.rb index f8e5fae6..27cb002f 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -32,7 +32,7 @@ def self.find(id) def self.between(beginning_time, end_time) all.delete_if do |k, v| - v.purchase_time >= beginning_time && v.purchase_time <= end_time + v.purchase_time < beginning_time || v.purchase_time > end_time end end diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index 36136404..7fab28e0 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -33,16 +33,21 @@ end describe "#self.between" do - - it "should return an array" do + it "should return a hash" do FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800").must_be_kind_of Hash end - it "should return something of an instance of Sale" do + it "should return an instance of Sale" do between_test = FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800") between_test.values.first.must_be_instance_of FarMar::Sale end + + it "should return a 911 sales for given time range" do + between_test2 = FarMar::Sale.between("2013-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800") + + between_test2.length.must_equal 911 + end end describe "#vendor" do From 17b184d4730d5a82bc694789763b3461ed934f32 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 15:09:09 -0700 Subject: [PATCH 19/27] Added ArgumentError to self.between Sale class --- far_mar.rb | 2 +- lib/sale.rb | 12 ++++++++---- specs/product_spec.rb | 6 ++++++ specs/sale_spec.rb | 10 ++++++++++ specs/vendor_spec.rb | 6 ++++++ 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index c2b298a7..9bee959a 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -15,4 +15,4 @@ module FarMar # sale = FarMar::Sale.new(1,200,"12:00",1,1) #testing an instance method # puts sale. -puts FarMar::Sale.between("2013-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800").length # testing class methods +# puts FarMar::Sale.between("2013-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800") # testing class methods diff --git a/lib/sale.rb b/lib/sale.rb index 27cb002f..6264a661 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -21,16 +21,20 @@ def self.all end def self.find(id) - all_sales = self.all - - if all_sales.has_key?(id) - return all_sales[id] + if all.has_key?(id) + return all[id] else raise ArgumentError.new("We do not have a sale with that ID.") end end def self.between(beginning_time, end_time) + all_purchase_times = all.map do |k, v| + v.purchase_time + end + + raise ArgumentError.new("These dates are beyond the date range in our database") if beginning_time < all_purchase_times.min || end_time > all_purchase_times.max + all.delete_if do |k, v| v.purchase_time < beginning_time || v.purchase_time > end_time end diff --git a/specs/product_spec.rb b/specs/product_spec.rb index b51daf18..41b57326 100644 --- a/specs/product_spec.rb +++ b/specs/product_spec.rb @@ -11,6 +11,12 @@ end end + describe "#id" do + it "should have an ID of fixnum type" do + @product.id.must_be_kind_of Fixnum + end + end + describe "#self.all" do it "should return a hash" do FarMar::Product.all.must_be_kind_of Hash diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index 7fab28e0..a4c1f742 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -11,6 +11,12 @@ end end + describe "#id" do + it "should have an ID of fixnum type" do + @sale.id.must_be_kind_of Fixnum + end + end + describe "#self.all" do it "should return a hash" do FarMar::Sale.all.must_be_kind_of Hash @@ -48,6 +54,10 @@ between_test2.length.must_equal 911 end + + it "should raise an ArgumentError if the times provided are outside the databases range" do + proc { FarMar::Sale.between("1999-11-08 04:31:41 -0800","1999-11-08 16:36:03 -0800") }.must_raise ArgumentError + end end describe "#vendor" do diff --git a/specs/vendor_spec.rb b/specs/vendor_spec.rb index c93dd5c5..7ad2630a 100644 --- a/specs/vendor_spec.rb +++ b/specs/vendor_spec.rb @@ -11,6 +11,12 @@ end end + describe "#id" do + it "should have an ID of fixnum type" do + @vendor.id.must_be_kind_of Fixnum + end + end + describe "#self.all" do it "should return a hash" do FarMar::Vendor.all.must_be_kind_of Hash From 82d931b524cfe989c4dc718f85a90261c4551f9d Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 15:30:14 -0700 Subject: [PATCH 20/27] Fixed ArgumentError in self.between Sale class so if provided date overlapped at all with the range, it would still work --- far_mar.rb | 2 +- lib/sale.rb | 2 +- specs/sale_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 9bee959a..389f93bf 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -15,4 +15,4 @@ module FarMar # sale = FarMar::Sale.new(1,200,"12:00",1,1) #testing an instance method # puts sale. -# puts FarMar::Sale.between("2013-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800") # testing class methods +puts FarMar::Sale.between("14-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800").length # testing class methods diff --git a/lib/sale.rb b/lib/sale.rb index 6264a661..b9b872d4 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -33,7 +33,7 @@ def self.between(beginning_time, end_time) v.purchase_time end - raise ArgumentError.new("These dates are beyond the date range in our database") if beginning_time < all_purchase_times.min || end_time > all_purchase_times.max + raise ArgumentError.new("These dates are beyond the date range in our database") if (beginning_time < all_purchase_times.min && end_time < all_purchase_times.min ) || (beginning_time > all_purchase_times.max && end_time > all_purchase_times.max) all.delete_if do |k, v| v.purchase_time < beginning_time || v.purchase_time > end_time diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index a4c1f742..f9883dbb 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -55,7 +55,7 @@ between_test2.length.must_equal 911 end - it "should raise an ArgumentError if the times provided are outside the databases range" do + it "should raise an ArgumentError if the time range provided is outside the sales overall date range" do proc { FarMar::Sale.between("1999-11-08 04:31:41 -0800","1999-11-08 16:36:03 -0800") }.must_raise ArgumentError end end From 7f96574eeb97823b3bc8219f82bce7e373290fc0 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 16:26:43 -0700 Subject: [PATCH 21/27] Changed all date/time comparisons to DateTime objects because Kari forced me to --- far_mar.rb | 12 +++++++++++- lib/sale.rb | 20 +++++++++++++++----- specs/sale_spec.rb | 6 +++--- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 389f93bf..50d862f0 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -15,4 +15,14 @@ module FarMar # sale = FarMar::Sale.new(1,200,"12:00",1,1) #testing an instance method # puts sale. -puts FarMar::Sale.between("14-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800").length # testing class methods +# date = DateTime.parse("2013-11-08 04:31:41 -0800") +# +# puts date.class + +puts FarMar::Sale.between("1001-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800").length + +# all = FarMar::Sale.all.map do |k, v| +# v.purchase_time +# end +# +# puts all.sort diff --git a/lib/sale.rb b/lib/sale.rb index b9b872d4..6b816348 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -28,16 +28,26 @@ def self.find(id) end end + def self.string_to_date(time) + DateTime.parse(time) + end + def self.between(beginning_time, end_time) - all_purchase_times = all.map do |k, v| - v.purchase_time + beginning_time = string_to_date(beginning_time) + end_time = string_to_date(end_time) + hash = {} + + all.each do |k, v| + hash[v] = string_to_date(v.purchase_time) end - raise ArgumentError.new("These dates are beyond the date range in our database") if (beginning_time < all_purchase_times.min && end_time < all_purchase_times.min ) || (beginning_time > all_purchase_times.max && end_time > all_purchase_times.max) + raise ArgumentError.new("These dates are beyond the date range in our database") if (beginning_time < hash.values.min && end_time < hash.values.min ) || (beginning_time > hash.values.max && end_time > hash.values.max) - all.delete_if do |k, v| - v.purchase_time < beginning_time || v.purchase_time > end_time + hash.delete_if do |k, v| + v < beginning_time || v > end_time end + + return hash.keys end def vendor diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index f9883dbb..f23a176e 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -39,14 +39,14 @@ end describe "#self.between" do - it "should return a hash" do - FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800").must_be_kind_of Hash + it "should return an Array" do + FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800").must_be_kind_of Array end it "should return an instance of Sale" do between_test = FarMar::Sale.between("2013-11-07 04:34:56 -0800","2013-11-10 02:44:56 -0800") - between_test.values.first.must_be_instance_of FarMar::Sale + between_test.first.must_be_instance_of FarMar::Sale end it "should return a 911 sales for given time range" do From cd2735fc072197218f61a97e7e5fa2a98d63941f Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Thu, 8 Sep 2016 16:37:26 -0700 Subject: [PATCH 22/27] Fixed sales_spec because I forgot to change class names when I copied the self.find test from Product --- specs/sale_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index f23a176e..13a8a66b 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -23,18 +23,18 @@ end it "should have a hash key of \"1\" (as a fixnumx)" do - hash = FarMar::Product.all + hash = FarMar::Sale.all hash.has_key?(1).must_equal true end end describe "#self.find" do it "should return an instance of Product" do - FarMar::Product.find(1).must_be_instance_of FarMar::Product + FarMar::Sale.find(1).must_be_instance_of FarMar::Sale end it "should raise an Argument Error if the ID provided isn't in the list" do - proc { FarMar::Product.find(0) }.must_raise(ArgumentError) + proc { FarMar::Sale.find(0) }.must_raise(ArgumentError) end end From d72cdadad8f1f16dcfcccafe0dd8f2d595d16a64 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Fri, 9 Sep 2016 10:09:07 -0700 Subject: [PATCH 23/27] Added another ArgError to self.between in Sale class to guarantee begin_time > end time --- lib/sale.rb | 4 +++- specs/sale_spec.rb | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/sale.rb b/lib/sale.rb index 6b816348..c9aab1be 100644 --- a/lib/sale.rb +++ b/lib/sale.rb @@ -35,12 +35,14 @@ def self.string_to_date(time) def self.between(beginning_time, end_time) beginning_time = string_to_date(beginning_time) end_time = string_to_date(end_time) - hash = {} + hash = {} all.each do |k, v| hash[v] = string_to_date(v.purchase_time) end + raise ArgumentError.new("You must give a beginning time that is earlier than an end time") if beginning_time > end_time + raise ArgumentError.new("These dates are beyond the date range in our database") if (beginning_time < hash.values.min && end_time < hash.values.min ) || (beginning_time > hash.values.max && end_time > hash.values.max) hash.delete_if do |k, v| diff --git a/specs/sale_spec.rb b/specs/sale_spec.rb index 13a8a66b..f18b1052 100644 --- a/specs/sale_spec.rb +++ b/specs/sale_spec.rb @@ -55,9 +55,13 @@ between_test2.length.must_equal 911 end - it "should raise an ArgumentError if the time range provided is outside the sales overall date range" do + it "should raise an ArgumentError if the time range provided never overlaps with the data's range" do proc { FarMar::Sale.between("1999-11-08 04:31:41 -0800","1999-11-08 16:36:03 -0800") }.must_raise ArgumentError end + + it "should raise an ArgumentError if the first parameter is > the second" do + proc { FarMar::Sale.between("3000-11-08 04:31:41 -0800","1999-11-08 16:36:03 -0800") }.must_raise ArgumentError + end end describe "#vendor" do From 1b477a17d4948715fb4fe6c200c6aefd5cd32173 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Fri, 9 Sep 2016 11:49:40 -0700 Subject: [PATCH 24/27] Added self.search enhancement method to Market class --- far_mar.rb | 38 +++++++++++++++++++++----------------- lib/market.rb | 7 +++++++ specs/market_spec.rb | 8 +++++++- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 50d862f0..daf49b8a 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -8,21 +8,25 @@ module FarMar -end -# puts FarMar::Market.all -# market = FarMar::Market.new(2,"Test Market","123 Main St","King", "Seattle", "WA", "98125") -# -# sale = FarMar::Sale.new(1,200,"12:00",1,1) #testing an instance method -# puts sale. - -# date = DateTime.parse("2013-11-08 04:31:41 -0800") -# -# puts date.class + ##### Testing self methods + puts Market.search("and") + # + ##### Testing instance methods + # sale = Sale.new(1,200,"12:00",1,1) #testing an instance method + # puts sale. + # + ##### Testing DateTime craziness + # date = DateTime.parse("2013-11-08 04:31:41 -0800") + # + # puts date.class + # + # puts Sale.between("1001-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800").length + # + ##### Sales sorted by date for my own info + # all = Sale.all.map do |k, v| + # v.purchase_time + # end + # + # puts all.sort -puts FarMar::Sale.between("1001-11-08 04:31:41 -0800","2013-11-08 16:36:03 -0800").length - -# all = FarMar::Sale.all.map do |k, v| -# v.purchase_time -# end -# -# puts all.sort +end diff --git a/lib/market.rb b/lib/market.rb index 002bbeae..6acaedf6 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -32,6 +32,12 @@ def self.find(id) end end + def self.search(search_term) + all.keep_if do |k, v| + v.name.downcase.include?(" " + search_term.downcase + " ") + end + end + def vendors all_vendors = FarMar::Vendor.all @@ -41,6 +47,7 @@ def vendors return all_vendors end + end end diff --git a/specs/market_spec.rb b/specs/market_spec.rb index 99843986..a2320b36 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -40,6 +40,12 @@ end + describe "#self.search" do + it "should return a hash" do + FarMar::Market.search("and").must_be_kind_of Hash + end + end + describe "#vendors" do it "should return a hash of vendors" do @market.vendors.must_be_kind_of Hash @@ -48,6 +54,6 @@ it "should return a hash of six objects for a market ID of 1" do @market.vendors.length.must_equal 6 end - + end end From 0930ff072b526256afccd19bf09f079d22845afd Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Fri, 9 Sep 2016 11:59:15 -0700 Subject: [PATCH 25/27] Added an Argument Error to self.search method in Market class --- far_mar.rb | 2 +- lib/market.rb | 8 +++++++- specs/market_spec.rb | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index daf49b8a..440e5638 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -9,7 +9,7 @@ module FarMar ##### Testing self methods - puts Market.search("and") + # puts Market.search("and") # ##### Testing instance methods # sale = Sale.new(1,200,"12:00",1,1) #testing an instance method diff --git a/lib/market.rb b/lib/market.rb index 6acaedf6..f084e3b1 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -33,9 +33,15 @@ def self.find(id) end def self.search(search_term) - all.keep_if do |k, v| + search_results = all.keep_if do |k, v| v.name.downcase.include?(" " + search_term.downcase + " ") end + + if search_results.length > 1 + return search_results + else + raise ArgumentError.new("There are no markets with \"#{search_term}\" in their name") + end end def vendors diff --git a/specs/market_spec.rb b/specs/market_spec.rb index a2320b36..97a2bbf5 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -44,6 +44,10 @@ it "should return a hash" do FarMar::Market.search("and").must_be_kind_of Hash end + + it "should raise an error if the search word cannot be found" do + proc { FarMar::Market.search("sdlfjasdlkfj")}.must_raise ArgumentError + end end describe "#vendors" do From 7f4fe8b9e61500bdbb330218d879530c07c2c220 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Fri, 9 Sep 2016 14:44:54 -0700 Subject: [PATCH 26/27] Added products method to Market class (optional) --- far_mar.rb | 4 ++-- lib/market.rb | 10 +++++++++- specs/market_spec.rb | 11 +++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index 440e5638..ca0afef3 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -12,8 +12,8 @@ module FarMar # puts Market.search("and") # ##### Testing instance methods - # sale = Sale.new(1,200,"12:00",1,1) #testing an instance method - # puts sale. + market = FarMar::Market.new(1,"Test Market","123 Main St","King", "Seattle", "WA", "98125") + puts market.products # ##### Testing DateTime craziness # date = DateTime.parse("2013-11-08 04:31:41 -0800") diff --git a/lib/market.rb b/lib/market.rb index f084e3b1..76224cdd 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -50,8 +50,16 @@ def vendors all_vendors.delete_if do |k, v| v.market_id != @id end + end - return all_vendors + def products + ary = vendors.map do |k, v| + v.products.map do |ke, va| + va + end + end + + ary.flatten end end diff --git a/specs/market_spec.rb b/specs/market_spec.rb index 97a2bbf5..b388eba8 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -60,4 +60,15 @@ end end + + describe "#products" do + it "should return an array" do + @market.products.must_be_kind_of Array + end + + it "should return an instance(s) of Product" do + @market.products.first.must_be_instance_of FarMar::Product + end + end + end From 25b993d013c8b6b4579546f96355cdf7f8eab435 Mon Sep 17 00:00:00 2001 From: Nicole Url Date: Fri, 9 Sep 2016 15:52:14 -0700 Subject: [PATCH 27/27] Added preferred_vendor method to Market class (optional --- far_mar.rb | 2 +- lib/market.rb | 18 +++++++++++++++--- specs/market_spec.rb | 6 ++++++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/far_mar.rb b/far_mar.rb index ca0afef3..5b671c99 100644 --- a/far_mar.rb +++ b/far_mar.rb @@ -13,7 +13,7 @@ module FarMar # ##### Testing instance methods market = FarMar::Market.new(1,"Test Market","123 Main St","King", "Seattle", "WA", "98125") - puts market.products + puts market.preferred_vendor # ##### Testing DateTime craziness # date = DateTime.parse("2013-11-08 04:31:41 -0800") diff --git a/lib/market.rb b/lib/market.rb index 76224cdd..69a70ab6 100644 --- a/lib/market.rb +++ b/lib/market.rb @@ -53,13 +53,25 @@ def vendors end def products - ary = vendors.map do |k, v| + prdts_ary = vendors.map do |k, v| v.products.map do |ke, va| va end end - - ary.flatten + + prdts_ary.flatten + end + + def preferred_vendor + all_revenues = vendors.map do |k, v| + v.revenue + end + + max_value = all_revenues.max + + vendors.keep_if do |k, v| + return v if v.revenue == max_value + end end end diff --git a/specs/market_spec.rb b/specs/market_spec.rb index b388eba8..6c3f4bbd 100644 --- a/specs/market_spec.rb +++ b/specs/market_spec.rb @@ -71,4 +71,10 @@ end end + describe "#preferred_vendor" do + it "should return an instance of Vendor" do + @market.preferred_vendor.must_be_instance_of FarMar::Vendor + end + end + end