mechanize_store 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/mechanize_store/orders_controller.rb +1 -0
- data/app/models/mechanize_store/freight.rb +2 -0
- data/app/models/mechanize_store/payment.rb +2 -0
- data/config/locales/mechanize_store.pt-BR.yml +3 -0
- data/lib/mechanize_store/version.rb +1 -1
- data/spec/controllers/mechanize_store/orders_controller_spec.rb +5 -2
- data/spec/dummy/db/migrate/{20140407144119_create_mechanize_store_freights.mechanize_store.rb → 20140424193635_create_mechanize_store_freights.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407144120_create_mechanize_store_order_statuses.mechanize_store.rb → 20140424193636_create_mechanize_store_order_statuses.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407144121_create_mechanize_store_payment_statuses.mechanize_store.rb → 20140424193637_create_mechanize_store_payment_statuses.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407144122_create_mechanize_store_payment_types.mechanize_store.rb → 20140424193638_create_mechanize_store_payment_types.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407144123_create_mechanize_store_payments.mechanize_store.rb → 20140424193639_create_mechanize_store_payments.mechanize_store.rb} +1 -2
- data/spec/dummy/db/migrate/{20140407144124_create_mechanize_store_flags.mechanize_store.rb → 20140424193640_create_mechanize_store_flags.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407144125_create_mechanize_store_products.mechanize_store.rb → 20140424193641_create_mechanize_store_products.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407144126_create_mechanize_store_product_photos.mechanize_store.rb → 20140424193642_create_mechanize_store_product_photos.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407144127_create_mechanize_store_orders.mechanize_store.rb → 20140424193643_create_mechanize_store_orders.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407144128_create_mechanize_store_product_categories.mechanize_store.rb → 20140424193644_create_mechanize_store_product_categories.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140407193949_add_width_to_mechanize_store_product.mechanize_store.rb → 20140424193645_add_width_to_mechanize_store_product.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/{20140409191457_create_mechanize_store_order_items.mechanize_store.rb → 20140424193646_create_mechanize_store_order_items.mechanize_store.rb} +0 -0
- data/spec/dummy/db/migrate/20140424193647_add_payment_type_id_to_payment.mechanize_store.rb +7 -0
- data/spec/dummy/db/migrate/20140424193648_add_time_to_freight.mechanize_store.rb +6 -0
- data/spec/dummy/db/schema.rb +5 -3
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +5234 -0
- data/spec/dummy/public/photos/1/medium.png +0 -0
- data/spec/dummy/public/photos/1/original.png +0 -0
- data/spec/dummy/public/photos/1/thumb.png +0 -0
- data/spec/factories/{store_orders.rb → mechanize_store_orders.rb} +1 -2
- data/spec/factories/{store_payment_types.rb → mechanize_store_payment_types.rb} +1 -1
- data/spec/factories/store_freights.rb +1 -2
- data/spec/factories/store_order_statuses.rb +1 -1
- data/spec/factories/store_payments.rb +0 -2
- metadata +40 -30
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODczNDdiMmIwZGU3MTAyNGIwODNkZmE3MjI3NDgwMjQ1ZjEyOWQ5MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjNlYzc5MDhlZDc5ZGRkYmY0OTY2MDRmMDFiMWVmM2E3MDhiOTA5Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjgxODE4ZmE5M2FmZDdlM2IxMzZhZjRlMmQ0MjhmZGM1MDE0NWNiZGU5NTVj
|
10
|
+
YWY0YjJkMzBjMGI1MzJlNzRiOWM4OWM4NjQyOThlMjg0MDIxODIxY2E4ZmE1
|
11
|
+
YjczOTZmM2ZlNjQ5MDU5NjY2YWQ4MjI3NjEwOTBlNTFjYjAxNmU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmU3MzBhNWM4YzUxYzc5YWEzOGZjMzBmNTI2ZjAxZTg1NTM1NzVkMzRlODQy
|
14
|
+
OWI3ZmM5NjM1NTQwNTBjMTk3YTk5NTFlMGEwN2QzYTlkNTM0ZTNkNzFmZjBi
|
15
|
+
ZjZmZGM5YzhjZGVhYmU3NjY5OTJhYzA3YzBiYjJhOTVkMmRiMjE=
|
@@ -35,6 +35,7 @@ pt-BR:
|
|
35
35
|
mechanize_store/order_status:
|
36
36
|
name: Nome
|
37
37
|
mechanize_store/payment:
|
38
|
+
payment_type_id: "Tipo de pagamento"
|
38
39
|
payment_status_id: "Status do pagamento"
|
39
40
|
mechanize_store/payment_status:
|
40
41
|
name: "Nome"
|
@@ -59,7 +60,9 @@ pt-BR:
|
|
59
60
|
flag: "Bandeira"
|
60
61
|
order: "Compra"
|
61
62
|
order_status: "Status de compra"
|
63
|
+
payment: "Pagamento"
|
62
64
|
payment_status: "Status de pagamento"
|
65
|
+
payment/payment_type: "Tipo de pagamento"
|
63
66
|
payment_type: "Tipo de pagamento"
|
64
67
|
product: "Produtos"
|
65
68
|
product_category: "Categoria de produto"
|
@@ -5,8 +5,10 @@ module MechanizeStore
|
|
5
5
|
routes { MechanizeStore::Engine.routes }
|
6
6
|
|
7
7
|
before do
|
8
|
-
|
9
|
-
|
8
|
+
@payment_type = FactoryGirl.create(:mechanize_store_payment_type)
|
9
|
+
@payment = FactoryGirl.create(:mechanize_store_payment, payment_type: @payment_type)
|
10
|
+
@order_status = FactoryGirl.create(:mechanize_store_order_status)
|
11
|
+
@order = FactoryGirl.create(:mechanize_store_order, payment: @payment, order_status: @order_status)
|
10
12
|
end
|
11
13
|
|
12
14
|
let(:valid_session) { {} }
|
@@ -14,6 +16,7 @@ module MechanizeStore
|
|
14
16
|
describe "GET index" do
|
15
17
|
it "assigns all order_statuses as @order_statuses" do
|
16
18
|
get :index, {}, valid_session
|
19
|
+
|
17
20
|
assigns(:orders).should eq([@order])
|
18
21
|
end
|
19
22
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,8 +2,7 @@
|
|
2
2
|
class CreateMechanizeStorePayments < ActiveRecord::Migration
|
3
3
|
def change
|
4
4
|
create_table :mechanize_store_payments do |t|
|
5
|
-
t.integer :
|
6
|
-
t.string :payable_type
|
5
|
+
t.integer :order_id, index: true
|
7
6
|
t.references :payment_status, index: true
|
8
7
|
t.float :value
|
9
8
|
t.float :paid_value
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from mechanize_store (originally 20140416123100)
|
2
|
+
class AddPaymentTypeIdToPayment < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :mechanize_store_payments, :payment_type_id, :integer
|
5
|
+
add_index :mechanize_store_payments, :payment_type_id
|
6
|
+
end
|
7
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20140424193648) do
|
15
15
|
|
16
16
|
create_table "mechanize_store_flags", force: true do |t|
|
17
17
|
t.string "name"
|
@@ -26,6 +26,7 @@ ActiveRecord::Schema.define(version: 20140409191457) do
|
|
26
26
|
t.string "zipcode"
|
27
27
|
t.datetime "created_at"
|
28
28
|
t.datetime "updated_at"
|
29
|
+
t.integer "delivery_time"
|
29
30
|
end
|
30
31
|
|
31
32
|
add_index "mechanize_store_freights", ["order_id"], name: "index_mechanize_store_freights_on_order_id"
|
@@ -72,8 +73,7 @@ ActiveRecord::Schema.define(version: 20140409191457) do
|
|
72
73
|
end
|
73
74
|
|
74
75
|
create_table "mechanize_store_payments", force: true do |t|
|
75
|
-
t.integer "
|
76
|
-
t.string "payable_type"
|
76
|
+
t.integer "order_id"
|
77
77
|
t.integer "payment_status_id"
|
78
78
|
t.float "value"
|
79
79
|
t.float "paid_value"
|
@@ -82,10 +82,12 @@ ActiveRecord::Schema.define(version: 20140409191457) do
|
|
82
82
|
t.integer "flag_id"
|
83
83
|
t.datetime "created_at"
|
84
84
|
t.datetime "updated_at"
|
85
|
+
t.integer "payment_type_id"
|
85
86
|
end
|
86
87
|
|
87
88
|
add_index "mechanize_store_payments", ["flag_id"], name: "index_mechanize_store_payments_on_flag_id"
|
88
89
|
add_index "mechanize_store_payments", ["payment_status_id"], name: "index_mechanize_store_payments_on_payment_status_id"
|
90
|
+
add_index "mechanize_store_payments", ["payment_type_id"], name: "index_mechanize_store_payments_on_payment_type_id"
|
89
91
|
|
90
92
|
create_table "mechanize_store_product_categories", force: true do |t|
|
91
93
|
t.string "name"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|