op_cart 0.0.4 → 0.0.5

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: 4723d50abb5120a0ecff9d043948e177cf0f82a2
4
- data.tar.gz: 7b80fed1820e1c2e0d94f05f6f6d152aa3136bdd
3
+ metadata.gz: f8c6daa72bf5c1ae1b15037e704ca40b6c070c69
4
+ data.tar.gz: 19d548fb5d558b1663fc6432718291dfde4f282a
5
5
  SHA512:
6
- metadata.gz: 3b00c7acf3af7d99ddd5313a217248d96d1ff4306f3e57c731b6855ac1be7d6d39f9ef18bbdacd7065413d40a7d7d35b99e4457851f7c1c9f60bf916a869e6b8
7
- data.tar.gz: 17a76a975a39f406d94a1a434e174b6e3ae6ddf435df2483efba61f39cf78f084988e38924650442ce40bc8c1f41a79cc167b24c0b102889a8c44ea40342bdba
6
+ metadata.gz: c53857655204b2f2d8424c89fbc8643e651b0d6041dfcae0d99ea352a1ef3aceba5278a1f9f2187286c26245ee3dc6713c93b4286cf1c76cc60e50a59f06113d
7
+ data.tar.gz: 36197dc79d531e0aa9e1db5dd896aec453fbf0a9abb9ccdff20e4a47fb0ecb461cf32164d96d2c69296c09cc955ef9e1a4dd4c0feb205f101f0952a6013e6aad
@@ -2,6 +2,7 @@ module OpCart
2
2
  class Order < ActiveRecord::Base
3
3
  belongs_to :user
4
4
 
5
+ validates :email, presence: true, format: { with: /@/ }
5
6
  validates :total, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
6
7
  validates :tax_amount, numericality:
7
8
  { only_integer: true, greater_than_or_equal_to: 0 } if :tax_amount?
@@ -1,6 +1,7 @@
1
1
  class CreateOpCartOrders < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :op_cart_orders do |t|
4
+ t.string :email, null: false
4
5
  t.integer :total, null: false
5
6
  t.integer :tax_amount, default: 0
6
7
  t.string :status, null: false
@@ -1,3 +1,3 @@
1
1
  module OpCart
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: op_cart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Boehs