piggybak 0.6.24 → 0.6.25

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- piggybak (0.6.24)
4
+ piggybak (0.6.25)
5
5
  activemerchant
6
6
  countries
7
7
  devise
data/README.md CHANGED
@@ -44,14 +44,9 @@ Installation
44
44
 
45
45
  (NOTE: If you run into an error saying that piggybak gem is missing, use bundle exec piggybak install)
46
46
 
47
- * Piggybak is now installed and ready to be added to whatever model class will be sold.
48
-
49
- class Product < ActiveRecord::Base
50
- acts_as_sellable
51
- end
52
-
53
- * Piggybak checkout is located at /checkout
47
+ * Follow the instructions [here][documentation] to read more about the integration points and product configuration in Piggybak.
54
48
 
49
+ [documentation]: http://www.piggybak.org/documentation.html#integration
55
50
 
56
51
  More Details
57
52
  ========
@@ -63,11 +58,9 @@ Visit the project website [here][project-website] to see more documentation and
63
58
  TODO
64
59
  ========
65
60
 
66
- * Fix tax calculation when coupon / discounts applied.
67
-
68
61
  * Ensure that changes in nested addresses are recorded on order notes.
69
62
 
70
63
  Copyright
71
64
  ========
72
65
 
73
- Copyright (c) 2011 End Point & Steph Skardal. See LICENSE.txt for further details.
66
+ Copyright (c) 2013 End Point & Steph Skardal. See LICENSE.txt for further details.
@@ -26,7 +26,7 @@ module Piggybak
26
26
  end
27
27
  logger.info "#{request.remote_ip}:#{Time.now.strftime("%Y-%m-%d %H:%M")} Order received with params #{clean_params.inspect}"
28
28
  end
29
- @order.initialize_user(current_user, true)
29
+ @order.initialize_user(current_user)
30
30
 
31
31
  @order.ip_address = request.remote_ip
32
32
  @order.user_agent = request.user_agent
@@ -62,7 +62,7 @@ module Piggybak
62
62
  else
63
63
  @order = Piggybak::Order.new
64
64
  @order.create_payment_shipment
65
- @order.initialize_user(current_user, false)
65
+ @order.initialize_user(current_user)
66
66
  end
67
67
  end
68
68
 
@@ -1,9 +1,9 @@
1
1
  module PiggybakHelper
2
- def cart_form(object)
3
- render "piggybak/cart/form", :object => object
2
+ def cart_form(object, options = {})
3
+ render "piggybak/cart/form", :object => object, :locals => { :options => options }
4
4
  end
5
5
  def cart_link
6
- cart = Piggybak::Cart.new(request.cookies["cart"])
6
+ cart = Piggybak::Cart.new(request.cookies["cart"])
7
7
  nitems = cart.sellables.inject(0) { |nitems, item| nitems + item[:quantity] }
8
8
  if nitems > 0 && !["piggybak/orders", "piggybak/cart"].include?(params[:controller])
9
9
  link_to "#{pluralize(nitems, 'item')}: #{number_to_currency(cart.total)}", piggybak.cart_url
@@ -60,7 +60,7 @@ module Piggybak
60
60
  end
61
61
  end
62
62
 
63
- def initialize_user(user, on_post)
63
+ def initialize_user(user)
64
64
  if user
65
65
  self.user = user
66
66
  self.email = user.email
@@ -1,7 +1,7 @@
1
1
  <% if object.reflections.keys.include?(:piggybak_sellable) -%>
2
2
  <% if object.piggybak_sellable && object.piggybak_sellable.active -%>
3
3
  <% if object.piggybak_sellable.quantity > 0 || object.piggybak_sellable.unlimited_inventory -%>
4
- <%= form_tag piggybak.cart_add_url do -%>
4
+ <%= form_tag piggybak.cart_add_url, locals[:options] do -%>
5
5
  <div id="sellable_details">
6
6
  <span id="title"><%= object.piggybak_sellable.description %></span>
7
7
  <span id="price"><%= number_to_currency object.piggybak_sellable.price %></span>
@@ -0,0 +1,9 @@
1
+ class ChangeUserAgentType < ActiveRecord::Migration
2
+ def up
3
+ change_column :orders, :user_agent, :text
4
+ end
5
+
6
+ def down
7
+ change_column :orders, :user_agent, :string
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Piggybak
2
- VERSION = "0.6.24"
2
+ VERSION = "0.6.25"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piggybak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.24
4
+ version: 0.6.25
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-12-03 00:00:00.000000000 Z
14
+ date: 2013-01-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -191,6 +191,7 @@ files:
191
191
  - db/migrate/20111228231806_create_payment_methods.rb
192
192
  - db/migrate/20121018213421_drop_sort_from_line_items.rb
193
193
  - db/migrate/20121022164235_convert_all_decimal_fields.rb
194
+ - db/migrate/20121210211600_change_user_agent_type.rb
194
195
  - db/migrate/20111228231838_create_shipments.rb
195
196
  - db/migrate/20120104020930_populate_countries_and_states.rb
196
197
  - db/migrate/20111227213558_create_variants.rb
@@ -234,7 +235,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
234
235
  version: '0'
235
236
  segments:
236
237
  - 0
237
- hash: 2460413229810788537
238
+ hash: 1469996782340380432
238
239
  required_rubygems_version: !ruby/object:Gem::Requirement
239
240
  none: false
240
241
  requirements:
@@ -243,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
244
  version: '0'
244
245
  segments:
245
246
  - 0
246
- hash: 2460413229810788537
247
+ hash: 1469996782340380432
247
248
  requirements: []
248
249
  rubyforge_project:
249
250
  rubygems_version: 1.8.23