acts_as_shopping_cart 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f09938fd8e7495c32243f0cb4a69d70fe5aff445
4
- data.tar.gz: 7c8104c31546c9e5c01f3e4679139877acb5965b
3
+ metadata.gz: f4f7ed62db4ed5b247d005dcafc10eb7ebdb3773
4
+ data.tar.gz: 68c2a98c28d253d7077e1d0b93d1054f9c3c0820
5
5
  SHA512:
6
- metadata.gz: 3d13a26996a653514f856f2b5ae21f36f880406404abbd2de4c22771139c3439b702d634f6d7a4c2750f570312d17b32c9bd82b70d32298ea32cc012b926eb5e
7
- data.tar.gz: 468552fcf3518fbfc9ffb6f2db9d1a8efed4ca28d5aa0e9e44385e441a4aa06a977163b5b91a8680dce88abce76623c1473249ea04b9e8123234a7deb715513e
6
+ metadata.gz: 4d841c20dcd7cd9344422fb99b95248dd1f92bb02ab0b8335de1b97f4b4d6b43ba6329332f04d7423d0ec7123ffebb5066a9db547a8f332476ec1fecb00748b0
7
+ data.tar.gz: 63e9b2b8e4e2df46e1efd4db8afe96933336c51d57ee7136e251a184eff66b438080d9618f72624bbdbc869c83fbc3b922bc5c9399715cfcc6df17f03f3b4979
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,11 @@
1
+ AllCops:
2
+ RunRailsCops: true
3
+ DisplayCopNames: true
4
+ DisplayStyleGuide: true
5
+ StyleGuideCopsOnly: true
6
+
7
+ Style/StringLiterals:
8
+ EnforcedStyle: double_quotes
9
+
10
+ Metrics/LineLength:
11
+ Max: 110
data/.travis.yml CHANGED
@@ -1,8 +1,12 @@
1
+ language: ruby
2
+ cache: bundler
3
+
1
4
  rvm:
2
- - 2.0.0
3
- - 2.1.5
5
+ - 2.2.4
6
+ - 2.3.0
4
7
 
5
8
  gemfile:
6
9
  - Gemfile.4.0
7
10
  - Gemfile.4.1
8
11
  - Gemfile.4.2
12
+ - Gemfile.5.0
data/CHANGELOG.md ADDED
@@ -0,0 +1,10 @@
1
+ # CHANGELOG
2
+
3
+ ## 0.4.0
4
+
5
+ - Updated dependencies to use it on Rails 5
6
+
7
+ ### Breaking changes
8
+
9
+ - Remove the `empty?` method and add `has_items?` and `has_no_items?`.
10
+ - Updated money-rails dependency to at least 1.5 which can potentially break your app.
data/Gemfile.4.0 CHANGED
@@ -3,4 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in acts_as_shopping_cart.gemspec
4
4
  gemspec
5
5
 
6
+ gem 'rails', '~> 4.0.0'
6
7
  gem 'activerecord', '~> 4.0.0'
data/Gemfile.4.1 CHANGED
@@ -3,4 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in acts_as_shopping_cart.gemspec
4
4
  gemspec
5
5
 
6
+ gem 'rails', '~> 4.1.0'
6
7
  gem 'activerecord', '~> 4.1.0'
data/Gemfile.4.2 CHANGED
@@ -3,4 +3,5 @@ source "https://rubygems.org"
3
3
  # Specify your gem's dependencies in acts_as_shopping_cart.gemspec
4
4
  gemspec
5
5
 
6
+ gem 'rails', '~> 4.2.0'
6
7
  gem 'activerecord', '~> 4.2.0'
data/Gemfile.5.0 ADDED
@@ -0,0 +1,7 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in acts_as_shopping_cart.gemspec
4
+ gemspec
5
+
6
+ gem 'rails', '5.0.0.beta3'
7
+ gem 'activerecord', '5.0.0.beta3'
data/README.markdown CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  A simple shopping cart implementation.
4
4
 
5
- [![Build Status](https://secure.travis-ci.org/crowdint/acts_as_shopping_cart.png?branch=master)](http://travis-ci.org/crowdint/acts_as_shopping_cart)
5
+ [![Build Status](https://secure.travis-ci.org/dabit/acts_as_shopping_cart.png?branch=master)](http://travis-ci.org/dabit/acts_as_shopping_cart)
6
+ [![Code Climate](https://codeclimate.com/github/dabit/acts_as_shopping_cart/badges/gpa.svg)](https://codeclimate.com/github/dabit/acts_as_shopping_cart)
7
+ [![Test Coverage](https://codeclimate.com/github/dabit/acts_as_shopping_cart/badges/coverage.svg)](https://codeclimate.com/github/dabit/acts_as_shopping_cart/coverage)
6
8
 
7
- You can find an example application [here](https://github.com/crowdint/acts_as_shopping_cart_app).
9
+ You can find an example application [here](https://github.com/dabit/acts_as_shopping_cart_app).
8
10
 
9
11
  ## Install
10
12
 
@@ -15,7 +17,7 @@ if you still need to implement this gem in a Rails 3 app**
15
17
 
16
18
  Include it in your Gemfile
17
19
 
18
- gem 'acts_as_shopping_cart', :github => 'crowdint/acts_as_shopping_cart', :branch => '0-1-x'
20
+ gem 'acts_as_shopping_cart', :github => 'dabit/acts_as_shopping_cart', :branch => '0-1-x'
19
21
 
20
22
  And run bundler
21
23
 
@@ -190,11 +192,3 @@ Run cucumber features
190
192
  Both:
191
193
 
192
194
  rake
193
-
194
- # About the author
195
-
196
- [Crowd Interactive](http://www.crowdint.com) is a leading Ruby and Rails
197
- consultancy firm based in Mexico currently doing business with startups in the
198
- United States. We specialize in building and growing Rails applications, by increasing
199
- your IT crew onsite or offsite. We pick our projects carefully, as we only work
200
- with companies we believe in.
data/Rakefile CHANGED
@@ -1,13 +1,13 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
- require 'cucumber/rake/task'
3
+ require "cucumber/rake/task"
4
4
  Cucumber::Rake::Task.new do |t|
5
- t.cucumber_opts = %w{--format progress}
5
+ t.cucumber_opts = "--format progress"
6
6
  end
7
7
 
8
- require 'rspec/core/rake_task'
8
+ require "rspec/core/rake_task"
9
9
  RSpec::Core::RakeTask.new do |t|
10
10
  t.fail_on_error = true
11
11
  end
12
12
 
13
- task :default => [:spec, :cucumber]
13
+ task default: [:spec, :cucumber]
@@ -1,15 +1,16 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
3
+
3
4
  require "acts_as_shopping_cart/version"
4
5
 
5
6
  Gem::Specification.new do |s|
6
7
  s.name = "acts_as_shopping_cart"
7
8
  s.version = ActsAsShoppingCart::VERSION
8
9
  s.authors = ["David Padilla"]
9
- s.email = ["david@crowdint.com"]
10
+ s.email = ["david@padilla.io"]
10
11
  s.homepage = ""
11
- s.summary = %q{Simple Shopping Cart implementation}
12
- s.description = %q{Simple Shopping Cart implementation}
12
+ s.summary = "Simple Shopping Cart implementation"
13
+ s.description = "Simple Shopping Cart implementation"
13
14
 
14
15
  s.rubyforge_project = "acts_as_shopping_cart"
15
16
 
@@ -18,13 +19,15 @@ Gem::Specification.new do |s|
18
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
20
  s.require_paths = ["lib"]
20
21
 
21
- s.add_dependency 'rails', '~> 4'
22
- s.add_dependency 'money-rails', '~> 1.3'
22
+ s.add_dependency "rails", "> 4"
23
+ s.add_dependency "money-rails", "~> 1.5"
23
24
 
24
- s.add_development_dependency "cucumber", '~> 1.3.14'
25
+ s.add_development_dependency "cucumber"
25
26
  s.add_development_dependency "database_cleaner"
26
- s.add_development_dependency "rake", "~> 10.0.0"
27
- s.add_development_dependency "rspec", "~> 2.12.0"
28
- s.add_development_dependency "sqlite3", "~> 1.3.0"
27
+ s.add_development_dependency "rake"
28
+ s.add_development_dependency "rspec"
29
+ s.add_development_dependency "sqlite3"
29
30
  s.add_development_dependency "simplecov"
31
+ s.add_development_dependency "rubocop"
32
+ s.add_development_dependency "codeclimate-test-reporter"
30
33
  end
@@ -1,3 +1,3 @@
1
1
  Given /^a product "([^"]*)" exists$/ do |name|
2
- Product.create(:name => name)
2
+ Product.create(name: name)
3
3
  end
@@ -4,12 +4,12 @@ end
4
4
 
5
5
  Then /^the total for the cart should be "([^"]*)"$/ do |total|
6
6
  @cart.reload
7
- @cart.total.should eq(Money.new(total.to_f * 100))
7
+ expect(@cart.total).to eq(Money.new(total.to_f * 100))
8
8
  end
9
9
 
10
10
  Then /^the subtotal for the cart should be "([^"]*)"$/ do |subtotal|
11
11
  @cart.reload
12
- @cart.subtotal.should eq(Money.new(subtotal.to_f * 100))
12
+ expect(@cart.subtotal).to eq(Money.new(subtotal.to_f * 100))
13
13
  end
14
14
 
15
15
  When /^I add product "([^"]*)" to cart with price "([^"]*)"$/ do |product_name, price|
@@ -24,10 +24,10 @@ end
24
24
 
25
25
  Then /^the total unique items on the cart should be "([^"]*)"$/ do |total|
26
26
  @cart.reload
27
- @cart.total_unique_items.should eq(total.to_i)
27
+ expect(@cart.total_unique_items).to eq(total.to_i)
28
28
  end
29
29
 
30
- When /^I remove (\d+) "([^"]*)" unit(s?) from cart$/ do |quantity, product_name, plural|
30
+ When /^I remove (\d+) "([^"]*)" unit(s?) from cart$/ do |quantity, product_name, _|
31
31
  @cart.reload
32
32
  product = Product.find_by_name(product_name)
33
33
  @cart.remove(product, quantity.to_i)
@@ -39,7 +39,7 @@ end
39
39
 
40
40
  Then /^cart should be empty$/ do
41
41
  @cart.reload
42
- @cart.should be_empty
42
+ expect(@cart.has_no_items?).to be true
43
43
  end
44
44
 
45
45
  Given /^I add (\d+) "([^"]*)" products to cart with price "([^"]*)"$/ do |quantity, product_name, price|
@@ -50,19 +50,19 @@ end
50
50
  Then /^the subtotal for "([^"]*)" on the cart should be "([^"]*)"$/ do |product_name, subtotal|
51
51
  @cart.reload
52
52
  product = Product.find_by_name(product_name)
53
- @cart.subtotal_for(product).should eq(subtotal.to_f)
53
+ expect(@cart.subtotal_for(product)).to eq(subtotal.to_f)
54
54
  end
55
55
 
56
56
  Then /^the quantity for "([^"]*)" on the cart should be "([^"]*)"$/ do |product_name, quantity|
57
57
  @cart.reload
58
58
  product = Product.find_by_name(product_name)
59
- @cart.quantity_for(product).should eq(quantity.to_f)
59
+ expect(@cart.quantity_for(product)).to eq(quantity.to_f)
60
60
  end
61
61
 
62
62
  Then /^the price for "([^"]*)" on the cart should be "([^"]*)"$/ do |product_name, price|
63
63
  @cart.reload
64
64
  product = Product.find_by_name(product_name)
65
- @cart.price_for(product).should eq(price.to_f)
65
+ expect(@cart.price_for(product)).to eq(Money.from_amount(price.to_f))
66
66
  end
67
67
 
68
68
  When /^I update the "([^"]*)" quantity to "([^"]*)"$/ do |product_name, quantity|
@@ -77,9 +77,8 @@ When /^I update the "([^"]*)" price to "([^"]*)"$/ do |product_name, price|
77
77
  @cart.update_price_for(product, price.to_f)
78
78
  end
79
79
 
80
- Then /^shopping cart item "([^"]*)" should belong to cart$/ do |arg1|
80
+ Then /^shopping cart item "([^"]*)" should belong to cart$/ do |_|
81
81
  @cart.reload
82
82
  shopping_cart_item = ShoppingCartItem.last
83
- shopping_cart_item.owner.should == @cart
83
+ expect(shopping_cart_item.owner).to eq @cart
84
84
  end
85
-
@@ -1,18 +1,26 @@
1
- require 'bundler/setup'
1
+ require "bundler/setup"
2
2
 
3
- require 'active_record'
4
- require 'database_cleaner'
5
- require 'money-rails'
3
+ require "codeclimate-test-reporter"
4
+ CodeClimate::TestReporter.start
6
5
 
7
- $: << './lib'
6
+ require "active_record"
7
+ require "database_cleaner"
8
+ require "money-rails"
9
+ require "rspec"
8
10
 
9
- require 'acts_as_shopping_cart'
11
+ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
12
+
13
+ require "acts_as_shopping_cart"
10
14
 
11
15
  ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
12
16
 
13
17
  MoneyRails::Hooks.init
14
18
 
15
- require 'simplecov'
19
+ RSpec.configure do |config|
20
+ config.raise_errors_for_deprecations!
21
+ end
22
+
23
+ require "simplecov"
16
24
 
17
- SimpleCov.coverage_dir 'coverage.features'
25
+ SimpleCov.coverage_dir "coverage.features"
18
26
  SimpleCov.start
@@ -1,7 +1,7 @@
1
- ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
2
- #ActiveRecord::Base.logger = Logger.new(STDOUT)
1
+ ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
2
+ # ActiveRecord::Base.logger = Logger.new(STDOUT)
3
3
 
4
- ActiveRecord::Schema.define(:version => 1) do
4
+ ActiveRecord::Schema.define(version: 1) do
5
5
  create_table :shopping_carts
6
6
  create_table :shopping_cart_items do |t|
7
7
  t.shopping_cart_item_fields
@@ -17,10 +17,9 @@ module ActiveRecord
17
17
  #
18
18
  #
19
19
  def acts_as_shopping_cart_using(item_class)
20
- self.send :include, ActiveRecord::Acts::ShoppingCart::Collection
21
- self.send :include, ActiveRecord::Acts::ShoppingCart::Item
22
- has_many :shopping_cart_items, :class_name => item_class.to_s.classify,
23
- :as => :owner, :dependent => :destroy
20
+ send :include, ActiveRecord::Acts::ShoppingCart::Collection
21
+ send :include, ActiveRecord::Acts::ShoppingCart::Item
22
+ has_many :shopping_cart_items, class_name: item_class.to_s.classify, as: :owner, dependent: :destroy
24
23
  end
25
24
 
26
25
  #
@@ -25,24 +25,34 @@ module ActiveRecord
25
25
  shopping_cart_items.clear
26
26
  end
27
27
 
28
+ #
29
+ # Returns true when the cart has items
30
+ #
31
+ def has_items?
32
+ shopping_cart_items.any?
33
+ end
34
+
28
35
  #
29
36
  # Returns true when the cart is empty
30
37
  #
31
- def empty?
38
+ def has_no_items?
32
39
  shopping_cart_items.empty?
33
40
  end
34
41
 
42
+
35
43
  #
36
44
  # Remove an item from the cart
37
45
  #
38
46
  def remove(object, quantity = 1)
39
- if cart_item = item_for(object)
40
- if cart_item.quantity <= quantity
41
- cart_item.delete
42
- else
43
- cart_item.quantity = (cart_item.quantity - quantity)
44
- cart_item.save
45
- end
47
+ cart_item = item_for(object)
48
+
49
+ return unless cart_item
50
+
51
+ if cart_item.quantity <= quantity
52
+ cart_item.delete
53
+ else
54
+ cart_item.quantity = (cart_item.quantity - quantity)
55
+ cart_item.save
46
56
  end
47
57
  end
48
58
 
@@ -51,7 +61,7 @@ module ActiveRecord
51
61
  # items in the cart
52
62
  #
53
63
  def subtotal
54
- shopping_cart_items.inject(Money.new(0)) { |sum, item| sum += (item.price * item.quantity) }
64
+ shopping_cart_items.inject(Money.new(0)) { |a, e| a + (e.price * e.quantity) }
55
65
  end
56
66
 
57
67
  def shipping_cost
@@ -59,7 +69,7 @@ module ActiveRecord
59
69
  end
60
70
 
61
71
  def taxes
62
- subtotal * self.tax_pct * 0.01
72
+ subtotal * tax_pct * 0.01
63
73
  end
64
74
 
65
75
  def tax_pct
@@ -70,19 +80,21 @@ module ActiveRecord
70
80
  # Returns the total by summing the subtotal, taxes and shipping_cost
71
81
  #
72
82
  def total
73
- self.subtotal + self.taxes + self.shipping_cost
83
+ subtotal + taxes + shipping_cost
74
84
  end
75
85
 
76
86
  #
77
87
  # Return the number of unique items in the cart
78
88
  #
79
89
  def total_unique_items
80
- shopping_cart_items.inject(0) { |sum, item| sum += item.quantity }
90
+ shopping_cart_items.map(&:quantity).sum
81
91
  end
82
92
 
83
93
  def cart_items
84
- warn "ShoppingCart#cart_items WILL BE DEPRECATED IN LATER VERSIONS OF acts_as_shopping_cart, please use ShoppingCart#shopping_cart_items instead"
85
- self.shopping_cart_items
94
+ warn "ShoppingCart#cart_items WILL BE DEPRECATED IN LATER VERSIONS OF acts_as_shopping_cart," \
95
+ " please use ShoppingCart#shopping_cart_items instead"
96
+
97
+ shopping_cart_items
86
98
  end
87
99
  end
88
100
  end
@@ -7,7 +7,7 @@ module ActiveRecord
7
7
  # Returns the cart item for the specified object
8
8
  #
9
9
  def item_for(object)
10
- shopping_cart_items.where(:item => object).first
10
+ shopping_cart_items.where(item: object).first
11
11
  end
12
12
 
13
13
  #
@@ -16,10 +16,10 @@ module ActiveRecord
16
16
  # acts_as_shopping_cart_item :cart
17
17
  #
18
18
  #
19
- def acts_as_shopping_cart_item_for(cart_class)
20
- self.send :include, ActiveRecord::Acts::ShoppingCartItem::InstanceMethods
21
- belongs_to :owner, :polymorphic => true
22
- belongs_to :item, :polymorphic => true
19
+ def acts_as_shopping_cart_item_for(*)
20
+ send :include, ActiveRecord::Acts::ShoppingCartItem::InstanceMethods
21
+ belongs_to :owner, polymorphic: true
22
+ belongs_to :item, polymorphic: true
23
23
  monetize :price_cents
24
24
  end
25
25
 
@@ -6,23 +6,23 @@ module ActiveRecord
6
6
  # Returns the subtotal, multiplying the quantity times the price of the item.
7
7
  #
8
8
  def subtotal
9
- ("%.2f" % (self.quantity * self.price)).to_f
9
+ format("%.2f", quantity * price).to_f
10
10
  end
11
11
 
12
12
  #
13
13
  # Updates the quantity of the item
14
14
  #
15
15
  def update_quantity(new_quantity)
16
- self.quantity = new_quantity
17
- self.save
16
+ self.quantity = new_quantity
17
+ save
18
18
  end
19
19
 
20
20
  #
21
21
  # Updates the price of the item
22
22
  #
23
23
  def update_price(new_price)
24
- self.price = new_price
25
- self.save
24
+ self.price = new_price
25
+ save
26
26
  end
27
27
  end
28
28
  end
@@ -1,19 +1,19 @@
1
- require 'acts_as_shopping_cart/version'
2
- require 'rails'
3
- require 'money-rails'
4
- require 'active_record/acts/shopping_cart'
5
- require 'active_record/acts/shopping_cart_item'
6
- require 'acts_as_shopping_cart/schema'
1
+ require "acts_as_shopping_cart/version"
2
+ require "rails"
3
+ require "money-rails"
4
+ require "active_record/acts/shopping_cart"
5
+ require "active_record/acts/shopping_cart_item"
6
+ require "acts_as_shopping_cart/schema"
7
7
 
8
8
  module ActiveRecord
9
9
  module Acts
10
10
  module ShoppingCart
11
- autoload :Collection , 'active_record/acts/shopping_cart/collection'
12
- autoload :Item , 'active_record/acts/shopping_cart/item'
11
+ autoload :Collection , "active_record/acts/shopping_cart/collection"
12
+ autoload :Item , "active_record/acts/shopping_cart/item"
13
13
  end
14
14
 
15
15
  module ShoppingCartItem
16
- autoload :InstanceMethods, 'active_record/acts/shopping_cart_item/instance_methods'
16
+ autoload :InstanceMethods, "active_record/acts/shopping_cart_item/instance_methods"
17
17
  end
18
18
  end
19
19
  end
@@ -1,4 +1,4 @@
1
- require 'active_record/connection_adapters/abstract/schema_definitions'
1
+ require "active_record/connection_adapters/abstract/schema_definitions"
2
2
 
3
3
  module ActsAsShoppingCart
4
4
  module Schema
@@ -1,3 +1,3 @@
1
1
  module ActsAsShoppingCart
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -1,5 +1,5 @@
1
- require File.expand_path(File.dirname(__FILE__) + '../../../../spec_helper')
2
- # require 'spec_helper'
1
+ require File.expand_path(File.dirname(__FILE__) + "../../../../spec_helper")
2
+ # require "spec_helper"
3
3
 
4
4
  describe ActiveRecord::Acts::ShoppingCart::Collection do
5
5
  let(:klass) do
@@ -9,62 +9,62 @@ describe ActiveRecord::Acts::ShoppingCart::Collection do
9
9
 
10
10
  let(:subject) do
11
11
  subject = klass.new
12
- subject.stub(:shopping_cart_items).and_return([])
12
+ allow(subject).to receive(:shopping_cart_items).and_return([])
13
13
  subject
14
14
  end
15
15
 
16
- let(:object) { stub }
16
+ let(:object) { double }
17
17
 
18
18
  let(:shopping_cart_item) do
19
- stub(:quantity => 2, :save => true)
19
+ instance_double("shopping_cart_item", quantity: 2, save: true)
20
20
  end
21
21
 
22
22
  describe :add do
23
23
  context "item is not on cart" do
24
24
  before do
25
- subject.stub(:item_for).with(object)
25
+ allow(subject).to receive(:item_for).with(object)
26
26
  end
27
27
 
28
28
  it "creates a new shopping cart item" do
29
- created_object = mock
30
- subject.shopping_cart_items.should_receive(:create).
31
- with(:item => object, :price => 19.99, :quantity => 3).
32
- and_return(created_object)
29
+ created_object = double
30
+ expect(subject.shopping_cart_items).to receive(:create)
31
+ .with(item: object, price: 19.99, quantity: 3)
32
+ .and_return(created_object)
33
33
  item = subject.add(object, 19.99, 3)
34
- item.should be created_object
34
+ expect(item).to be created_object
35
35
  end
36
36
  end
37
37
 
38
38
  context "item is not in cart" do
39
39
  before do
40
- subject.stub(:item_for).with(object)
40
+ allow(subject).to receive(:item_for).with(object)
41
41
  end
42
42
 
43
43
  it "creates a new shopping cart item non-cumulatively" do
44
- subject.shopping_cart_items.should_receive(:create).with(:item => object, :price => 19.99, :quantity => 3)
44
+ expect(subject.shopping_cart_items).to receive(:create).with(item: object, price: 19.99, quantity: 3)
45
45
  subject.add(object, 19.99, 3, false)
46
46
  end
47
47
  end
48
48
 
49
49
  context "item is already on cart" do
50
50
  before do
51
- subject.stub(:item_for).with(object).and_return(shopping_cart_item)
51
+ allow(subject).to receive(:item_for).with(object).and_return(shopping_cart_item)
52
52
  end
53
53
 
54
54
  it "updates the quantity for the item" do
55
- shopping_cart_item.should_receive(:quantity=).with(5)
55
+ expect(shopping_cart_item).to receive(:quantity=).with(5)
56
56
  item = subject.add(object, 19.99, 3)
57
- item.should be shopping_cart_item
57
+ expect(item).to be shopping_cart_item
58
58
  end
59
59
  end
60
60
 
61
61
  context "item is already in cart" do
62
62
  before do
63
- subject.stub(:item_for).with(object).and_return(shopping_cart_item)
63
+ allow(subject).to receive(:item_for).with(object).and_return(shopping_cart_item)
64
64
  end
65
65
 
66
66
  it "updates the quantity for the item non-cumulatively" do
67
- shopping_cart_item.should_receive(:quantity=).with(3) # not 5
67
+ expect(shopping_cart_item).to receive(:quantity=).with(3) # not 5
68
68
  subject.add(object, 19.99, 3, false)
69
69
  end
70
70
  end
@@ -72,29 +72,47 @@ describe ActiveRecord::Acts::ShoppingCart::Collection do
72
72
 
73
73
  describe :clear do
74
74
  before do
75
- subject.shopping_cart_items.should_receive(:clear)
75
+ expect(subject.shopping_cart_items).to receive(:clear)
76
76
  end
77
77
 
78
78
  it "clears all the items in the cart" do
79
79
  subject.clear
80
- subject.empty?.should be_true
80
+ expect(subject.has_no_items?).to be true
81
81
  end
82
82
  end
83
83
 
84
- describe "empty?" do
84
+ describe "has_items?" do
85
85
  context "cart has items" do
86
86
  before do
87
- subject.shopping_cart_items << mock
87
+ subject.shopping_cart_items << double
88
+ end
89
+
90
+ it "returns true" do
91
+ expect(subject.has_items?).to be true
92
+ end
93
+ end
94
+
95
+ context "cart is empty" do
96
+ it "returns false" do
97
+ expect(subject.has_items?).to be false
98
+ end
99
+ end
100
+ end
101
+
102
+ describe "has_no_items?" do
103
+ context "cart has items" do
104
+ before do
105
+ subject.shopping_cart_items << double
88
106
  end
89
107
 
90
108
  it "returns false" do
91
- subject.empty?.should be_false
109
+ expect(subject.has_no_items?).to be false
92
110
  end
93
111
  end
94
112
 
95
113
  context "cart is empty" do
96
114
  it "returns true" do
97
- subject.empty?.should be_true
115
+ expect(subject.has_no_items?).to be true
98
116
  end
99
117
  end
100
118
  end
@@ -102,7 +120,7 @@ describe ActiveRecord::Acts::ShoppingCart::Collection do
102
120
  describe :remove do
103
121
  context "item is not on cart" do
104
122
  before do
105
- subject.stub(:item_for).with(object)
123
+ allow(subject).to receive(:item_for).with(object)
106
124
  end
107
125
 
108
126
  it "does nothing" do
@@ -112,19 +130,19 @@ describe ActiveRecord::Acts::ShoppingCart::Collection do
112
130
 
113
131
  context "item is on cart" do
114
132
  before do
115
- subject.stub(:item_for).with(object).and_return(shopping_cart_item)
133
+ allow(subject).to receive(:item_for).with(object).and_return(shopping_cart_item)
116
134
  end
117
135
 
118
136
  context "remove less items than those on cart" do
119
137
  it "just updates the shopping cart item quantity" do
120
- shopping_cart_item.should_receive(:quantity=).with(1)
138
+ expect(shopping_cart_item).to receive(:quantity=).with(1)
121
139
  subject.remove(object, 1)
122
140
  end
123
141
  end
124
142
 
125
143
  context "remove more items than those on cart" do
126
144
  it "removes the shopping cart item object completely" do
127
- shopping_cart_item.should_receive(:delete)
145
+ expect(shopping_cart_item).to receive(:delete)
128
146
  subject.remove(object, 99)
129
147
  end
130
148
  end
@@ -134,82 +152,86 @@ describe ActiveRecord::Acts::ShoppingCart::Collection do
134
152
  describe :subtotal do
135
153
  context "cart has no items" do
136
154
  before do
137
- subject.stub(:shopping_cart_items).and_return([])
155
+ allow(subject).to receive(:shopping_cart_items).and_return([])
138
156
  end
139
157
 
140
158
  it "returns 0" do
141
- subject.subtotal.should be_an_instance_of(Money)
142
- subject.subtotal.should eq(Money.new(0))
159
+ expect(subject.subtotal).to be_an_instance_of(Money)
160
+ expect(subject.subtotal).to eq(Money.new(0))
143
161
  end
144
162
  end
145
163
 
146
164
  context "cart has items" do
147
165
  before do
148
- items = [stub(:quantity => 2, :price => Money.new(3399)), stub(:quantity => 1, :price => Money.new(4599))]
149
- subject.stub(:shopping_cart_items).and_return(items)
166
+ items = [instance_double("item 1", quantity: 2, price: Money.new(3399)),
167
+ instance_double("item 2", quantity: 1, price: Money.new(4599))]
168
+ allow(subject).to receive(:shopping_cart_items).and_return(items)
150
169
  end
151
170
 
152
171
  it "returns the sum of the price * quantity for all items" do
153
- subject.subtotal.should be_an_instance_of(Money)
154
- subject.subtotal.should eq(113.97)
172
+ expect(subject.subtotal).to be_an_instance_of(Money)
173
+ expect(subject.subtotal).to eq(Money.new(11397))
155
174
  end
156
175
  end
157
176
  end
158
177
 
159
178
  describe :shipping_cost do
160
179
  it "returns 0" do
161
- subject.shipping_cost.should be_an_instance_of Money
162
- subject.shipping_cost.should eq(0)
180
+ expect(subject.shipping_cost).to be_an_instance_of Money
181
+ expect(subject.shipping_cost).to eq(Money.new(0))
163
182
  end
164
183
  end
165
184
 
166
185
  describe :taxes do
167
186
  context "subtotal is 100" do
168
187
  before do
169
- subject.stub(:subtotal).and_return(Money.new(10000))
188
+ allow(subject).to receive(:subtotal).and_return(Money.new(10_000))
170
189
  end
171
190
 
172
191
  it "returns 8.25" do
173
- subject.taxes.should be_an_instance_of Money
174
- subject.taxes.should eq(8.25)
192
+ expect(subject.taxes).to be_an_instance_of Money
193
+ expect(subject.taxes).to eq(Money.new(825))
175
194
  end
176
195
  end
177
196
  end
178
197
 
179
198
  describe :tax_pct do
180
199
  it "returns 8.25" do
181
- subject.tax_pct.should eq(8.25)
200
+ expect(subject.tax_pct).to eq(8.25)
182
201
  end
183
202
  end
184
203
 
185
204
  describe :total do
186
205
  before do
187
- subject.stub(:subtotal).and_return(Money.new(1099))
188
- subject.stub(:taxes).and_return(Money.new(1399))
189
- subject.stub(:shipping_cost).and_return(Money.new(1299))
206
+ allow(subject).to receive_messages(
207
+ subtotal: Money.new(1099),
208
+ taxes: Money.new(1399),
209
+ shipping_cost: Money.new(1299)
210
+ )
190
211
  end
191
212
 
192
213
  it "returns subtotal + taxes + shipping_cost" do
193
- subject.total.should be_an_instance_of Money
194
- subject.total.should eq(37.97)
214
+ expect(subject.total).to be_an_instance_of Money
215
+ expect(subject.total).to eq(Money.new(3797))
195
216
  end
196
217
  end
197
218
 
198
219
  describe :total_unique_items do
199
220
  context "cart has no items" do
200
221
  it "returns 0" do
201
- subject.total_unique_items.should eq(0)
222
+ expect(subject.total_unique_items).to eq(0)
202
223
  end
203
224
  end
204
225
 
205
226
  context "cart has some items" do
206
227
  before do
207
- items = [stub(:quantity => 2, :price => 33.99), stub(:quantity => 1, :price => 45.99)]
208
- subject.stub(:shopping_cart_items).and_return(items)
228
+ items = [instance_double("item 1", quantity: 2, price: 33.99),
229
+ instance_double("item 2", quantity: 1, price: 45.99)]
230
+ allow(subject).to receive(:shopping_cart_items).and_return(items)
209
231
  end
210
232
 
211
233
  it "returns the sum of the quantities of all shopping cart items" do
212
- subject.total_unique_items.should eq(3)
234
+ expect(subject.total_unique_items).to eq(3)
213
235
  end
214
236
  end
215
237
  end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '../../../../spec_helper')
1
+ require File.expand_path(File.dirname(__FILE__) + "../../../../spec_helper")
2
2
 
3
3
  describe ActiveRecord::Acts::ShoppingCart::Item do
4
4
  let(:klass) do
@@ -7,35 +7,35 @@ describe ActiveRecord::Acts::ShoppingCart::Item do
7
7
  klass
8
8
  end
9
9
 
10
- let(:shopping_cart_items) { stub }
10
+ let(:shopping_cart_items) { double }
11
11
 
12
12
  let(:subject) do
13
13
  subject = klass.new
14
- subject.stub(:shopping_cart_items).and_return(shopping_cart_items)
14
+ allow(subject).to receive(:shopping_cart_items).and_return(shopping_cart_items)
15
15
  subject
16
16
  end
17
17
 
18
- let(:object) { stub(:id => 1) }
19
- let(:item) { stub(:subtotal => 47.98, :price => 23.99, :quantity => 2, :save => true)}
18
+ let(:object) { instance_double("object", id: 1) }
19
+ let(:item) { instance_double("item", subtotal: 47.98, price: 23.99, quantity: 2, save: true)}
20
20
 
21
21
  describe :item_for do
22
22
  context "no cart item exists for the object" do
23
23
  before do
24
- shopping_cart_items.should_receive(:where).with(:item => object).and_return([])
24
+ expect(shopping_cart_items).to receive(:where).with(item: object).and_return([])
25
25
  end
26
26
 
27
27
  it "returns the shopping cart item object for the requested object" do
28
- subject.item_for(object).should be_nil
28
+ expect(subject.item_for(object)).to be_nil
29
29
  end
30
30
  end
31
31
 
32
32
  context "a cart item exists for the object" do
33
33
  before do
34
- shopping_cart_items.should_receive(:where).with(:item => object).and_return([ item ])
34
+ expect(shopping_cart_items).to receive(:where).with(item: object).and_return([item])
35
35
  end
36
36
 
37
37
  it "returns that item" do
38
- subject.item_for(object).should be(item)
38
+ expect(subject.item_for(object)).to be(item)
39
39
  end
40
40
  end
41
41
  end
@@ -43,21 +43,21 @@ describe ActiveRecord::Acts::ShoppingCart::Item do
43
43
  describe :subtotal_for do
44
44
  context "no cart item exists for the object" do
45
45
  before do
46
- subject.should_receive(:item_for).with(object)
46
+ expect(subject).to receive(:item_for).with(object)
47
47
  end
48
48
 
49
49
  it "returns 0" do
50
- subject.subtotal_for(object).should eq(0.0)
50
+ expect(subject.subtotal_for(object)).to eq(0.0)
51
51
  end
52
52
  end
53
53
 
54
54
  context "the cart item exists for the object" do
55
55
  before do
56
- subject.should_receive(:item_for).with(object).and_return(item)
56
+ expect(subject).to receive(:item_for).with(object).and_return(item)
57
57
  end
58
58
 
59
59
  it "returns the subtotal for the item" do
60
- subject.subtotal_for(object).should eq(47.98)
60
+ expect(subject.subtotal_for(object)).to eq(47.98)
61
61
  end
62
62
  end
63
63
  end
@@ -65,21 +65,21 @@ describe ActiveRecord::Acts::ShoppingCart::Item do
65
65
  describe :quantity_for do
66
66
  context "no cart item exists for the object" do
67
67
  before do
68
- subject.should_receive(:item_for).with(object)
68
+ expect(subject).to receive(:item_for).with(object)
69
69
  end
70
70
 
71
71
  it "returns 0" do
72
- subject.quantity_for(object).should eq(0)
72
+ expect(subject.quantity_for(object)).to eq(0)
73
73
  end
74
74
  end
75
75
 
76
76
  context "the cart item exists for the object" do
77
77
  before do
78
- subject.should_receive(:item_for).with(object).and_return(item)
78
+ expect(subject).to receive(:item_for).with(object).and_return(item)
79
79
  end
80
80
 
81
81
  it "returns the quantity for the object" do
82
- subject.quantity_for(object).should eq(2)
82
+ expect(subject.quantity_for(object)).to eq(2)
83
83
  end
84
84
  end
85
85
  end
@@ -87,11 +87,11 @@ describe ActiveRecord::Acts::ShoppingCart::Item do
87
87
  describe :update_quantity_for do
88
88
  context "the cart item exists for the object" do
89
89
  before do
90
- subject.should_receive(:item_for).with(object).and_return(item)
90
+ expect(subject).to receive(:item_for).with(object).and_return(item)
91
91
  end
92
92
 
93
93
  it "updates the item quantity to the specified quantity" do
94
- item.should_receive(:update_quantity).with(3)
94
+ expect(item).to receive(:update_quantity).with(3)
95
95
  subject.update_quantity_for(object, 3)
96
96
  end
97
97
  end
@@ -100,21 +100,21 @@ describe ActiveRecord::Acts::ShoppingCart::Item do
100
100
  describe :price_for do
101
101
  context "no cart item exists for the object" do
102
102
  before do
103
- subject.should_receive(:item_for).with(object)
103
+ expect(subject).to receive(:item_for).with(object)
104
104
  end
105
105
 
106
106
  it "returns 0" do
107
- subject.price_for(object).should eq(0.0)
107
+ expect(subject.price_for(object)).to eq(0.0)
108
108
  end
109
109
  end
110
110
 
111
111
  context "the cart item exists for the object" do
112
112
  before do
113
- subject.should_receive(:item_for).with(object).and_return(item)
113
+ expect(subject).to receive(:item_for).with(object).and_return(item)
114
114
  end
115
115
 
116
116
  it "returns the price of the item" do
117
- subject.price_for(object).should eq(23.99)
117
+ expect(subject.price_for(object)).to eq(23.99)
118
118
  end
119
119
  end
120
120
  end
@@ -122,11 +122,11 @@ describe ActiveRecord::Acts::ShoppingCart::Item do
122
122
  describe :update_price_for do
123
123
  context "the cart item exists for the object" do
124
124
  before do
125
- subject.should_receive(:item_for).with(object).and_return(item)
125
+ expect(subject).to receive(:item_for).with(object).and_return(item)
126
126
  end
127
127
 
128
128
  it "updates the price on the item" do
129
- item.should_receive(:update_price).with(99.99)
129
+ expect(item).to receive(:update_price).with(99.99)
130
130
  subject.update_price_for(object, 99.99)
131
131
  end
132
132
  end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '../../../../spec_helper')
1
+ require File.expand_path(File.dirname(__FILE__) + "../../../../spec_helper")
2
2
 
3
3
  describe ActiveRecord::Acts::ShoppingCartItem::InstanceMethods do
4
4
  let(:klass) do
@@ -9,29 +9,29 @@ describe ActiveRecord::Acts::ShoppingCartItem::InstanceMethods do
9
9
 
10
10
  let(:subject) do
11
11
  subject = klass.new
12
- subject.stub(:save => true)
12
+ allow(subject).to receive(:save).and_return(true)
13
13
  subject
14
14
  end
15
15
 
16
16
  describe :subtotal do
17
17
  it "returns the quantity * price" do
18
- subject.stub(:quantity => 2, :price => 33.99)
19
- subject.subtotal.should eq(67.98)
18
+ allow(subject).to receive_messages(quantity: 2, price: 33.99)
19
+ expect(subject.subtotal).to eq(67.98)
20
20
  end
21
21
  end
22
22
 
23
23
  describe :update_quantity do
24
24
  it "updates the item quantity" do
25
- subject.should_receive(:quantity=).with(5)
26
- subject.should_receive(:save)
25
+ expect(subject).to receive(:quantity=).with(5)
26
+ expect(subject).to receive(:save)
27
27
  subject.update_quantity(5)
28
28
  end
29
29
  end
30
30
 
31
31
  describe :update_price do
32
32
  it "updates the item price" do
33
- subject.should_receive(:price=).with(55.99)
34
- subject.should_receive(:save)
33
+ expect(subject).to receive(:price=).with(55.99)
34
+ expect(subject).to receive(:save)
35
35
  subject.update_price(55.99)
36
36
  end
37
37
  end
data/spec/spec_helper.rb CHANGED
@@ -1,21 +1,25 @@
1
+ require "rubygems"
2
+ require "bundler/setup"
3
+
1
4
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
3
6
 
4
- require 'rubygems'
5
- require 'bundler/setup'
7
+ require "codeclimate-test-reporter"
8
+ CodeClimate::TestReporter.start
6
9
 
7
- require 'simplecov'
8
- require 'rails'
9
- require 'active_record'
10
- require 'money-rails'
10
+ require "simplecov"
11
+ require "rails"
12
+ require "active_record"
13
+ require "money-rails"
11
14
 
12
15
  ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
13
16
 
14
17
  MoneyRails::Hooks.init
15
- require 'acts_as_shopping_cart'
18
+ require "acts_as_shopping_cart"
16
19
 
17
20
  SimpleCov.start
18
21
 
19
22
  RSpec.configure do |config|
20
23
  config.mock_with :rspec
24
+ config.raise_errors_for_deprecations!
21
25
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_shopping_cart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Padilla
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2016-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4'
27
27
  - !ruby/object:Gem::Dependency
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.3'
33
+ version: '1.5'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.3'
40
+ version: '1.5'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cucumber
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3.14
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3.14
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: database_cleaner
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -70,44 +70,44 @@ dependencies:
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 10.0.0
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 10.0.0
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 2.12.0
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 2.12.0
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sqlite3
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3.0
103
+ version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
- version: 1.3.0
110
+ version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -122,20 +122,52 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: codeclimate-test-reporter
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
125
153
  description: Simple Shopping Cart implementation
126
154
  email:
127
- - david@crowdint.com
155
+ - david@padilla.io
128
156
  executables: []
129
157
  extensions: []
130
158
  extra_rdoc_files: []
131
159
  files:
132
160
  - ".document"
133
161
  - ".gitignore"
162
+ - ".rspec"
163
+ - ".rubocop.yml"
134
164
  - ".travis.yml"
165
+ - CHANGELOG.md
135
166
  - Gemfile
136
167
  - Gemfile.4.0
137
168
  - Gemfile.4.1
138
169
  - Gemfile.4.2
170
+ - Gemfile.5.0
139
171
  - LICENSE
140
172
  - README.markdown
141
173
  - Rakefile
@@ -178,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
210
  version: '0'
179
211
  requirements: []
180
212
  rubyforge_project: acts_as_shopping_cart
181
- rubygems_version: 2.2.2
213
+ rubygems_version: 2.5.1
182
214
  signing_key:
183
215
  specification_version: 4
184
216
  summary: Simple Shopping Cart implementation