forest_liana 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/forest_liana/apimaps_controller.rb +0 -2
- data/app/controllers/forest_liana/application_controller.rb +5 -0
- data/app/controllers/forest_liana/stripe_controller.rb +52 -0
- data/app/serializers/forest_liana/serializer_factory.rb +15 -7
- data/app/serializers/forest_liana/stripe_card_serializer.rb +46 -0
- data/app/serializers/forest_liana/stripe_invoice_serializer.rb +47 -0
- data/app/serializers/forest_liana/stripe_payment_serializer.rb +38 -0
- data/app/services/forest_liana/stripe_cards_getter.rb +73 -0
- data/app/services/forest_liana/stripe_invoices_getter.rb +84 -0
- data/app/services/forest_liana/stripe_payment_refunder.rb +17 -0
- data/app/services/forest_liana/stripe_payments_getter.rb +82 -0
- data/config/routes.rb +5 -0
- data/lib/forest_liana/engine.rb +1 -0
- data/lib/forest_liana/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +237 -0
- metadata +24 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a97913520a95aedb4cb945b87ffe30f3d36749fe
|
4
|
+
data.tar.gz: 40f46b92dc07352eb45f224a5a45bf3e06e2980a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67bb87afe2d47d6ee407506c5f64a64d1291ce7d4a251d358d8fb29a305a082f4c993500ef14a8e62719f9004a7d262c47533c9f39f4907fa8bccdd13f0a3ac3
|
7
|
+
data.tar.gz: 0c4ec0a92d1635e2142ef2c9329d57b4655eee8a582fbce261c13e64c87e346411234ceecd7d42de90ce64f18e7d4dc83fb1cdb5f0026053a06577da7823ee05
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
class StripeController < ForestLiana::ApplicationController
|
3
|
+
|
4
|
+
def payments
|
5
|
+
getter = StripePaymentsGetter.new(params,
|
6
|
+
request.headers['Stripe-Secret-Key'],
|
7
|
+
request.headers['Stripe-Reference'])
|
8
|
+
getter.perform
|
9
|
+
|
10
|
+
render json: serialize_models(getter.records, {
|
11
|
+
count: getter.count,
|
12
|
+
include: ['customer']
|
13
|
+
})
|
14
|
+
end
|
15
|
+
|
16
|
+
def refund
|
17
|
+
begin
|
18
|
+
refunder = StripePaymentRefunder.new(params)
|
19
|
+
refunder.perform
|
20
|
+
|
21
|
+
render json: {}
|
22
|
+
rescue Stripe::InvalidRequestError => err
|
23
|
+
render json: { error: err.message }, status: 400
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def cards
|
28
|
+
getter = StripeCardsGetter.new(params,
|
29
|
+
request.headers['Stripe-Secret-Key'],
|
30
|
+
request.headers['Stripe-Reference'])
|
31
|
+
getter.perform
|
32
|
+
|
33
|
+
render json: serialize_models(getter.records, {
|
34
|
+
count: getter.count,
|
35
|
+
include: ['customer']
|
36
|
+
})
|
37
|
+
end
|
38
|
+
|
39
|
+
def invoices
|
40
|
+
getter = StripeInvoicesGetter.new(params,
|
41
|
+
request.headers['Stripe-Secret-Key'],
|
42
|
+
request.headers['Stripe-Reference'])
|
43
|
+
getter.perform
|
44
|
+
|
45
|
+
render json: serialize_models(getter.records, {
|
46
|
+
count: getter.count,
|
47
|
+
include: ['customer']
|
48
|
+
})
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
@@ -14,13 +14,21 @@ module ForestLiana
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.get_serializer_name(active_record_class)
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
if active_record_class == Stripe::Charge
|
18
|
+
"ForestLiana::StripePaymentSerializer"
|
19
|
+
elsif active_record_class == Stripe::Card
|
20
|
+
"ForestLiana::StripeCardSerializer"
|
21
|
+
elsif active_record_class == Stripe::Invoice
|
22
|
+
"ForestLiana::StripeInvoiceSerializer"
|
23
|
+
else
|
24
|
+
class_name = active_record_class.table_name.classify
|
25
|
+
module_name = class_name.deconstantize
|
26
|
+
|
27
|
+
name = module_name if module_name
|
28
|
+
name += class_name.demodulize
|
29
|
+
|
30
|
+
"ForestLiana::#{name}Serializer"
|
31
|
+
end
|
24
32
|
end
|
25
33
|
|
26
34
|
def serializer_for(active_record_class)
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
class StripeCardSerializer
|
3
|
+
include JSONAPI::Serializer
|
4
|
+
|
5
|
+
attribute :last4
|
6
|
+
attribute :brand
|
7
|
+
attribute :funding
|
8
|
+
attribute :exp_month
|
9
|
+
attribute :exp_year
|
10
|
+
attribute :country
|
11
|
+
attribute :name
|
12
|
+
attribute :address_line1
|
13
|
+
attribute :address_line2
|
14
|
+
attribute :address_city
|
15
|
+
attribute :address_state
|
16
|
+
attribute :address_zip
|
17
|
+
attribute :address_country
|
18
|
+
attribute :cvc_check
|
19
|
+
|
20
|
+
has_one :customer
|
21
|
+
|
22
|
+
def self_link
|
23
|
+
"/forest#{super}"
|
24
|
+
end
|
25
|
+
|
26
|
+
def type
|
27
|
+
'stripe-cards'
|
28
|
+
end
|
29
|
+
|
30
|
+
def format_name(attribute_name)
|
31
|
+
attribute_name.to_s
|
32
|
+
end
|
33
|
+
|
34
|
+
def unformat_name(attribute_name)
|
35
|
+
attribute_name.to_s.underscore
|
36
|
+
end
|
37
|
+
|
38
|
+
def relationship_self_link(attribute_name)
|
39
|
+
nil
|
40
|
+
end
|
41
|
+
|
42
|
+
def relationship_related_link(attribute_name)
|
43
|
+
nil
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
class StripeInvoiceSerializer
|
3
|
+
include JSONAPI::Serializer
|
4
|
+
|
5
|
+
attribute :amount_due
|
6
|
+
attribute :attempt_count
|
7
|
+
attribute :attempted
|
8
|
+
attribute :closed
|
9
|
+
attribute :currency
|
10
|
+
attribute :date
|
11
|
+
attribute :forgiven
|
12
|
+
attribute :paid
|
13
|
+
attribute :period_end
|
14
|
+
attribute :period_start
|
15
|
+
attribute :subtotal
|
16
|
+
attribute :total
|
17
|
+
attribute :application_fee
|
18
|
+
attribute :tax
|
19
|
+
attribute :tax_percent
|
20
|
+
|
21
|
+
has_one :customer
|
22
|
+
|
23
|
+
def self_link
|
24
|
+
"/forest#{super}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def type
|
28
|
+
'stripe-invoices'
|
29
|
+
end
|
30
|
+
|
31
|
+
def format_name(attribute_name)
|
32
|
+
attribute_name.to_s
|
33
|
+
end
|
34
|
+
|
35
|
+
def unformat_name(attribute_name)
|
36
|
+
attribute_name.to_s.underscore
|
37
|
+
end
|
38
|
+
|
39
|
+
def relationship_self_link(attribute_name)
|
40
|
+
nil
|
41
|
+
end
|
42
|
+
|
43
|
+
def relationship_related_link(attribute_name)
|
44
|
+
nil
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
class StripePaymentSerializer
|
3
|
+
include JSONAPI::Serializer
|
4
|
+
|
5
|
+
attribute :description
|
6
|
+
attribute :refunded
|
7
|
+
attribute :currency
|
8
|
+
attribute :status
|
9
|
+
attribute :amount
|
10
|
+
attribute :created
|
11
|
+
|
12
|
+
has_one :customer
|
13
|
+
|
14
|
+
def self_link
|
15
|
+
"/forest#{super}"
|
16
|
+
end
|
17
|
+
|
18
|
+
def type
|
19
|
+
'stripe-payments'
|
20
|
+
end
|
21
|
+
|
22
|
+
def format_name(attribute_name)
|
23
|
+
attribute_name.to_s
|
24
|
+
end
|
25
|
+
|
26
|
+
def unformat_name(attribute_name)
|
27
|
+
attribute_name.to_s.underscore
|
28
|
+
end
|
29
|
+
|
30
|
+
def relationship_self_link(attribute_name)
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
def relationship_related_link(attribute_name)
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
class StripeCardsGetter
|
3
|
+
attr_accessor :records
|
4
|
+
|
5
|
+
def initialize(params, secret_key, reference)
|
6
|
+
@params = params
|
7
|
+
@reference_model, @reference_field = reference_model(reference)
|
8
|
+
Stripe.api_key = secret_key
|
9
|
+
end
|
10
|
+
|
11
|
+
def count
|
12
|
+
@cards.try(:total_count) || 0
|
13
|
+
end
|
14
|
+
|
15
|
+
def perform
|
16
|
+
params = { limit: limit, offset: offset, object: 'card' }
|
17
|
+
params['include[]'] = 'total_count'
|
18
|
+
|
19
|
+
resource = @reference_model.find(reference_model_id)
|
20
|
+
customer = resource[@reference_field]
|
21
|
+
|
22
|
+
fetch_cards(customer, params)
|
23
|
+
end
|
24
|
+
|
25
|
+
def fetch_cards(customer, params)
|
26
|
+
@cards = Stripe::Customer.retrieve(customer).sources.all(params)
|
27
|
+
|
28
|
+
@records = @cards.data.map do |d|
|
29
|
+
query = {}
|
30
|
+
query[@reference_field] = d.customer
|
31
|
+
d.customer = @reference_model.find_by(query)
|
32
|
+
|
33
|
+
d
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def reference_model(reference)
|
38
|
+
resource_name, reference_field = reference.split('.')
|
39
|
+
reference_model = SchemaUtils.find_model_from_table_name(resource_name)
|
40
|
+
|
41
|
+
[reference_model, reference_field]
|
42
|
+
end
|
43
|
+
|
44
|
+
def reference_model_id
|
45
|
+
@params["#{@reference_model.table_name.singularize()}Id"]
|
46
|
+
end
|
47
|
+
|
48
|
+
def offset
|
49
|
+
return 0 unless pagination?
|
50
|
+
|
51
|
+
number = @params[:page][:number]
|
52
|
+
if number && number.to_i > 0
|
53
|
+
(number.to_i - 1) * limit
|
54
|
+
else
|
55
|
+
0
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def limit
|
60
|
+
return 10 unless pagination?
|
61
|
+
|
62
|
+
if @params[:page][:size]
|
63
|
+
@params[:page][:size].to_i
|
64
|
+
else
|
65
|
+
10
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def pagination?
|
70
|
+
@params[:page] && @params[:page][:number]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
class StripeInvoicesGetter
|
3
|
+
attr_accessor :records
|
4
|
+
|
5
|
+
def initialize(params, secret_key, reference)
|
6
|
+
@params = params
|
7
|
+
@reference_model, @reference_field = reference_model(reference)
|
8
|
+
Stripe.api_key = secret_key
|
9
|
+
end
|
10
|
+
|
11
|
+
def count
|
12
|
+
@invoices.try(:total_count) || 0
|
13
|
+
end
|
14
|
+
|
15
|
+
def perform
|
16
|
+
query = { limit: limit, offset: offset }
|
17
|
+
|
18
|
+
if reference_model_id
|
19
|
+
resource = @reference_model.find(reference_model_id)
|
20
|
+
query[:customer] = resource[@reference_field]
|
21
|
+
end
|
22
|
+
|
23
|
+
query['include[]'] = 'total_count'
|
24
|
+
@invoices = fetch_invoices(query)
|
25
|
+
|
26
|
+
@records = @invoices.data.map do |d|
|
27
|
+
d.date = Time.at(d.date).to_datetime
|
28
|
+
d.period_start = Time.at(d.period_start).to_datetime
|
29
|
+
d.period_end = Time.at(d.period_end).to_datetime
|
30
|
+
d.subtotal /= 100
|
31
|
+
d.total /= 100
|
32
|
+
|
33
|
+
query = {}
|
34
|
+
query[@reference_field] = d.customer
|
35
|
+
d.customer = @reference_model.find_by(query)
|
36
|
+
|
37
|
+
d
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
def fetch_invoices(params)
|
42
|
+
return if reference_model_id && params[:customer].blank?
|
43
|
+
Stripe::Invoice.all(params)
|
44
|
+
end
|
45
|
+
|
46
|
+
def reference_model(reference)
|
47
|
+
resource_name, reference_field = reference.split('.')
|
48
|
+
reference_model = SchemaUtils.find_model_from_table_name(resource_name)
|
49
|
+
|
50
|
+
[reference_model, reference_field]
|
51
|
+
end
|
52
|
+
|
53
|
+
def reference_model_id
|
54
|
+
@params["#{@reference_model.table_name.singularize()}Id"]
|
55
|
+
end
|
56
|
+
|
57
|
+
def offset
|
58
|
+
return 0 unless pagination?
|
59
|
+
|
60
|
+
number = @params[:page][:number]
|
61
|
+
if number && number.to_i > 0
|
62
|
+
(number.to_i - 1) * limit
|
63
|
+
else
|
64
|
+
0
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def limit
|
69
|
+
return 10 unless pagination?
|
70
|
+
|
71
|
+
if @params[:page][:size]
|
72
|
+
@params[:page][:size].to_i
|
73
|
+
else
|
74
|
+
10
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def pagination?
|
79
|
+
@params[:page] && @params[:page][:number]
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
class StripePaymentRefunder
|
3
|
+
def initialize(params)
|
4
|
+
@params = params
|
5
|
+
Stripe.api_key = params[:parameters][:stripeSecretKey]
|
6
|
+
end
|
7
|
+
|
8
|
+
def perform
|
9
|
+
return unless @params[:jsonapis]
|
10
|
+
|
11
|
+
@params[:jsonapis].each do |jsonapi|
|
12
|
+
ch = Stripe::Charge.retrieve(jsonapi[:data][:id])
|
13
|
+
ch.refunds.create
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
module ForestLiana
|
2
|
+
class StripePaymentsGetter
|
3
|
+
attr_accessor :records
|
4
|
+
|
5
|
+
def initialize(params, secret_key, reference)
|
6
|
+
@params = params
|
7
|
+
@reference_model, @reference_field = reference_model(reference)
|
8
|
+
Stripe.api_key = secret_key
|
9
|
+
end
|
10
|
+
|
11
|
+
def count
|
12
|
+
@charges.try(:total_count) || 0
|
13
|
+
end
|
14
|
+
|
15
|
+
def perform
|
16
|
+
query = { limit: limit, offset: offset }
|
17
|
+
|
18
|
+
if reference_model_id
|
19
|
+
resource = @reference_model.find(reference_model_id)
|
20
|
+
query[:customer] = resource[@reference_field]
|
21
|
+
end
|
22
|
+
|
23
|
+
query['source'] = { object: :card }
|
24
|
+
query['include[]'] = 'total_count'
|
25
|
+
|
26
|
+
@charges = fetch_charges(query)
|
27
|
+
|
28
|
+
@records = @charges.data.map do |d|
|
29
|
+
d.created = Time.at(d.created).to_datetime
|
30
|
+
d.amount /= 100
|
31
|
+
|
32
|
+
query = {}
|
33
|
+
query[@reference_field] = d.customer
|
34
|
+
d.customer = @reference_model.find_by(query)
|
35
|
+
|
36
|
+
d
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def fetch_charges(params)
|
41
|
+
return if reference_model_id && params[:customer].blank?
|
42
|
+
Stripe::Charge.all(params)
|
43
|
+
end
|
44
|
+
|
45
|
+
def reference_model(reference)
|
46
|
+
resource_name, reference_field = reference.split('.')
|
47
|
+
reference_model = SchemaUtils.find_model_from_table_name(resource_name)
|
48
|
+
|
49
|
+
[reference_model, reference_field]
|
50
|
+
end
|
51
|
+
|
52
|
+
def reference_model_id
|
53
|
+
@params["#{@reference_model.table_name.singularize()}Id"]
|
54
|
+
end
|
55
|
+
|
56
|
+
def offset
|
57
|
+
return 0 unless pagination?
|
58
|
+
|
59
|
+
number = @params[:page][:number]
|
60
|
+
if number && number.to_i > 0
|
61
|
+
(number.to_i - 1) * limit
|
62
|
+
else
|
63
|
+
0
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def limit
|
68
|
+
return 10 unless pagination?
|
69
|
+
|
70
|
+
if @params[:page][:size]
|
71
|
+
@params[:page][:size].to_i
|
72
|
+
else
|
73
|
+
10
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def pagination?
|
78
|
+
@params[:page] && @params[:page][:number]
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
data/config/routes.rb
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
ForestLiana::Engine.routes.draw do
|
2
|
+
get 'stripe_payments' => 'stripe#payments'
|
3
|
+
post 'stripe_payments/refunds' => 'stripe#refund'
|
4
|
+
get 'stripe_cards' => 'stripe#cards'
|
5
|
+
get 'stripe_invoices' => 'stripe#invoices'
|
6
|
+
|
2
7
|
get '/' => 'apimaps#index'
|
3
8
|
get ':collection' => 'resources#index'
|
4
9
|
get ':collection/:id' => 'resources#show'
|
data/lib/forest_liana/engine.rb
CHANGED
data/lib/forest_liana/version.rb
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -35730,5 +35730,242 @@ ForestLiana::ResourcesGetterTest: test_StringField_sort_by_field
|
|
35730
35730
|
[1m[35m (0.2ms)[0m begin transaction
|
35731
35731
|
---------------------------
|
35732
35732
|
ForestLianaTest: test_truth
|
35733
|
+
---------------------------
|
35734
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
35735
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
35736
|
+
[1m[35m (0.2ms)[0m begin transaction
|
35737
|
+
[1m[36mFixture Delete (1.5ms)[0m [1mDELETE FROM "belongs_to_fields"[0m
|
35738
|
+
[1m[35mFixture Insert (0.7ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (1, 1, 1)
|
35739
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (2, 2, 1)[0m
|
35740
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (3, 3, 1)
|
35741
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (4, 4, 2)[0m
|
35742
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (5, 5, 2)
|
35743
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (6, 6, 2)[0m
|
35744
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (7, 7, 3)
|
35745
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (8, 8, 3)[0m
|
35746
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (9, 9, 3)
|
35747
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (10, 10, 4)[0m
|
35748
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (11, 11, 4)
|
35749
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (12, 12, 4)[0m
|
35750
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (13, 13, 5)
|
35751
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (14, 14, 5)[0m
|
35752
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (15, 15, 5)
|
35753
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (16, 16, 6)[0m
|
35754
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (17, 17, 6)
|
35755
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (18, 18, 6)[0m
|
35756
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (19, 19, 7)
|
35757
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (20, 20, 7)[0m
|
35758
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (21, 21, 7)
|
35759
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (22, 22, 7)[0m
|
35760
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (23, 23, 8)
|
35761
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (24, 24, 8)[0m
|
35762
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (25, 25, 9)
|
35763
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (26, 26, 9)[0m
|
35764
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (27, 27, 9)
|
35765
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (28, 28, 10)[0m
|
35766
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (29, 29, 10)
|
35767
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "belongs_to_fields" ("id", "has_one_field_id", "has_many_field_id") VALUES (30, 30, 10)[0m
|
35768
|
+
[1m[35mFixture Delete (1.0ms)[0m DELETE FROM "has_many_fields"
|
35769
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_many_fields" ("id") VALUES (1)[0m
|
35770
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_many_fields" ("id") VALUES (2)
|
35771
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_many_fields" ("id") VALUES (3)[0m
|
35772
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_many_fields" ("id") VALUES (4)
|
35773
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (5, 3)[0m
|
35774
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (6, 2)
|
35775
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_many_fields" ("id") VALUES (7)[0m
|
35776
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_many_fields" ("id", "has_many_through_field_id") VALUES (8, 2)
|
35777
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "has_many_fields" ("id") VALUES (9)[0m
|
35778
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "has_many_fields" ("id") VALUES (10)
|
35779
|
+
[1m[36mFixture Delete (0.5ms)[0m [1mDELETE FROM "has_many_through_fields"[0m
|
35780
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_many_through_fields" ("id") VALUES (1)
|
35781
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "has_many_through_fields" ("id") VALUES (2)[0m
|
35782
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_many_through_fields" ("id") VALUES (3)
|
35783
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "has_many_through_fields" ("id") VALUES (4)[0m
|
35784
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_many_through_fields" ("id") VALUES (5)
|
35785
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "has_many_through_fields" ("id") VALUES (6)[0m
|
35786
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "has_many_through_fields" ("id") VALUES (7)
|
35787
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "has_many_through_fields" ("id") VALUES (8)[0m
|
35788
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "has_many_through_fields" ("id") VALUES (9)
|
35789
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "has_many_through_fields" ("id") VALUES (10)[0m
|
35790
|
+
[1m[35mFixture Delete (0.4ms)[0m DELETE FROM "has_one_fields"
|
35791
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (1)[0m
|
35792
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (2)
|
35793
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (3)[0m
|
35794
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (4)
|
35795
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (5)[0m
|
35796
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (6)
|
35797
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (7)[0m
|
35798
|
+
[1m[35mFixture Insert (0.2ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (8)
|
35799
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (9)[0m
|
35800
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (10)
|
35801
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (11)[0m
|
35802
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (12)
|
35803
|
+
[1m[36mFixture Insert (0.2ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (13)[0m
|
35804
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (14)
|
35805
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (15)[0m
|
35806
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (16)
|
35807
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (17)[0m
|
35808
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (18)
|
35809
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (19)[0m
|
35810
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (20)
|
35811
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (21)[0m
|
35812
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (22)
|
35813
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (23)[0m
|
35814
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (24)
|
35815
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (25)[0m
|
35816
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (26)
|
35817
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (27)[0m
|
35818
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (28)
|
35819
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "has_one_fields" ("id") VALUES (29)[0m
|
35820
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "has_one_fields" ("id") VALUES (30)
|
35821
|
+
[1m[36mFixture Delete (0.5ms)[0m [1mDELETE FROM "string_fields"[0m
|
35822
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (1, 'Test 1')
|
35823
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (2, 'Test 2')[0m
|
35824
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (3, 'Test 3')
|
35825
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (4, 'Test 4')[0m
|
35826
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (5, 'Test 5')
|
35827
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (6, 'Test 6')[0m
|
35828
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (7, 'Test 7')
|
35829
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (8, 'Test 8')[0m
|
35830
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (9, 'Test 9')
|
35831
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (10, 'Test 10')[0m
|
35832
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (11, 'Test 11')
|
35833
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (12, 'Test 12')[0m
|
35834
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (13, 'Test 13')
|
35835
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (14, 'Test 14')[0m
|
35836
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (15, 'Test 15')
|
35837
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (16, 'Test 16')[0m
|
35838
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (17, 'Test 17')
|
35839
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (18, 'Test 18')[0m
|
35840
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (19, 'Test 19')
|
35841
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (20, 'Test 20')[0m
|
35842
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (21, 'Test 21')
|
35843
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (22, 'Test 22')[0m
|
35844
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (23, 'Test 23')
|
35845
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (24, 'Test 24')[0m
|
35846
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (25, 'Test 25')
|
35847
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (26, 'Test 26')[0m
|
35848
|
+
[1m[35mFixture Insert (0.0ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (27, 'Test 27')
|
35849
|
+
[1m[36mFixture Insert (0.1ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (28, 'Test 28')[0m
|
35850
|
+
[1m[35mFixture Insert (0.1ms)[0m INSERT INTO "string_fields" ("id", "field") VALUES (29, 'Test 29')
|
35851
|
+
[1m[36mFixture Insert (0.0ms)[0m [1mINSERT INTO "string_fields" ("id", "field") VALUES (30, 'Test 30')[0m
|
35852
|
+
[1m[35m (1.0ms)[0m commit transaction
|
35853
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
35854
|
+
--------------------------------------------------------------------------
|
35855
|
+
ForestLiana::SchemaAdapterTest: test_Integer_should_have_the_type_`Number`
|
35856
|
+
--------------------------------------------------------------------------
|
35857
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35858
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35859
|
+
------------------------------------------------------------------------
|
35860
|
+
ForestLiana::SchemaAdapterTest: test_Float_should_have_the_type_`Number`
|
35861
|
+
------------------------------------------------------------------------
|
35862
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35863
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35864
|
+
---------------------------------------------------------------------
|
35865
|
+
ForestLiana::SchemaAdapterTest: test_Date_should_have_the_type_`Date`
|
35866
|
+
---------------------------------------------------------------------
|
35867
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35868
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
35869
|
+
---------------------------------------------------------------------------
|
35870
|
+
ForestLiana::SchemaAdapterTest: test_Boolean_should_have_the_type_`Boolean`
|
35871
|
+
---------------------------------------------------------------------------
|
35872
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35873
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35874
|
+
------------------------------------------------------------------------------------
|
35875
|
+
ForestLiana::SchemaAdapterTest: test_belongsTo_relationhip_with_specified_class_name
|
35876
|
+
------------------------------------------------------------------------------------
|
35877
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35878
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35879
|
+
-----------------------------------------------------------
|
35880
|
+
ForestLiana::SchemaAdapterTest: test_belongsTo_relationship
|
35881
|
+
-----------------------------------------------------------
|
35882
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35883
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35884
|
+
-------------------------------------------------------------------------
|
35885
|
+
ForestLiana::SchemaAdapterTest: test_DateTime_should_have_the_type_`Date`
|
35886
|
+
-------------------------------------------------------------------------
|
35887
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35888
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35889
|
+
--------------------------------------------------------------------------
|
35890
|
+
ForestLiana::SchemaAdapterTest: test_Decimal_should_have_the_type_`Number`
|
35891
|
+
--------------------------------------------------------------------------
|
35892
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35893
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35894
|
+
----------------------------------------------------------------------------------
|
35895
|
+
ForestLiana::SchemaAdapterTest: test_hasMany_relationhip_with_specified_class_name
|
35896
|
+
----------------------------------------------------------------------------------
|
35897
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
35898
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35899
|
+
--------------------------------------------------------
|
35900
|
+
ForestLiana::SchemaAdapterTest: test_hasOne_relationship
|
35901
|
+
--------------------------------------------------------
|
35902
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35903
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35904
|
+
---------------------------------------------------------
|
35905
|
+
ForestLiana::SchemaAdapterTest: test_hasMany_relationship
|
35906
|
+
---------------------------------------------------------
|
35907
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35908
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35909
|
+
-------------------------------------------------------------------------
|
35910
|
+
ForestLiana::SchemaAdapterTest: test_String_should_have_the_type_`String`
|
35911
|
+
-------------------------------------------------------------------------
|
35912
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35913
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
35914
|
+
-----------------------------------------------------------------
|
35915
|
+
ForestLiana::ResourcesGetterTest: test_StringField_page_2_size_10
|
35916
|
+
-----------------------------------------------------------------
|
35917
|
+
[1m[35mStringField Load (0.3ms)[0m SELECT "string_fields".* FROM "string_fields" ORDER BY string_fields.id DESC LIMIT 10 OFFSET 10
|
35918
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "string_fields"[0m
|
35919
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35920
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
35921
|
+
-----------------------------------------------------------------------
|
35922
|
+
ForestLiana::ResourcesGetterTest: test_Sort_by_a_belongs_to_association
|
35923
|
+
-----------------------------------------------------------------------
|
35924
|
+
[1m[35mSQL (0.3ms)[0m SELECT "belongs_to_fields"."id" AS t0_r0, "belongs_to_fields"."has_one_field_id" AS t0_r1, "belongs_to_fields"."has_many_class_name_field_id" AS t0_r2, "belongs_to_fields"."has_many_field_id" AS t0_r3, "has_one_fields"."id" AS t1_r0, "has_many_fields"."id" AS t2_r0, "has_many_fields"."has_many_through_field_id" AS t2_r1, "has_many_class_name_fields"."id" AS t3_r0 FROM "belongs_to_fields" LEFT OUTER JOIN "has_one_fields" ON "has_one_fields"."id" = "belongs_to_fields"."has_one_field_id" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."id" = "belongs_to_fields"."has_many_field_id" LEFT OUTER JOIN "has_many_class_name_fields" ON "has_many_class_name_fields"."id" = "belongs_to_fields"."has_many_class_name_field_id" ORDER BY has_one_fields.id ASC LIMIT 10 OFFSET 0
|
35925
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "belongs_to_fields"[0m
|
35926
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35927
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
35928
|
+
--------------------------------------------------------------------
|
35929
|
+
ForestLiana::ResourcesGetterTest: test_Sort_by_a_has_one_association
|
35930
|
+
--------------------------------------------------------------------
|
35931
|
+
[1m[35mSQL (0.6ms)[0m SELECT "has_one_fields"."id" AS t0_r0, "belongs_to_fields"."id" AS t1_r0, "belongs_to_fields"."has_one_field_id" AS t1_r1, "belongs_to_fields"."has_many_class_name_field_id" AS t1_r2, "belongs_to_fields"."has_many_field_id" AS t1_r3, "belongs_to_class_name_fields"."id" AS t2_r0, "belongs_to_class_name_fields"."foo_id" AS t2_r1 FROM "has_one_fields" LEFT OUTER JOIN "belongs_to_fields" ON "belongs_to_fields"."has_one_field_id" = "has_one_fields"."id" LEFT OUTER JOIN "belongs_to_class_name_fields" ON "belongs_to_class_name_fields"."foo_id" = "has_one_fields"."id" ORDER BY belongs_to_fields.id DESC LIMIT 10 OFFSET 0
|
35932
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "has_one_fields"[0m
|
35933
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
35934
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
35935
|
+
-----------------------------------------------------------------------------
|
35936
|
+
ForestLiana::ResourcesGetterTest: test_Sort_by_a_has_many_through_association
|
35937
|
+
-----------------------------------------------------------------------------
|
35938
|
+
[1m[35mHasManyThroughField Load (0.3ms)[0m SELECT has_many_through_fields.*,
|
35939
|
+
COUNT(belongs_to_fields.id) has_many_count FROM "has_many_through_fields" LEFT OUTER JOIN "has_many_fields" ON "has_many_fields"."has_many_through_field_id" = "has_many_through_fields"."id" LEFT OUTER JOIN "belongs_to_fields" ON "belongs_to_fields"."has_many_field_id" = "has_many_fields"."id" GROUP BY has_many_through_fields.id ORDER BY has_many_count DESC LIMIT 10 OFFSET 0
|
35940
|
+
[1m[36mHasManyField Load (0.2ms)[0m [1mSELECT "has_many_fields".* FROM "has_many_fields" WHERE "has_many_fields"."has_many_through_field_id" IN (2, 3, 1, 4, 5, 6, 7, 8, 9, 10)[0m
|
35941
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "has_many_through_fields"
|
35942
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
35943
|
+
[1m[35m (0.1ms)[0m begin transaction
|
35944
|
+
-----------------------------------------------------------------
|
35945
|
+
ForestLiana::ResourcesGetterTest: test_StringField_page_1_size_15
|
35946
|
+
-----------------------------------------------------------------
|
35947
|
+
[1m[36mStringField Load (0.1ms)[0m [1mSELECT "string_fields".* FROM "string_fields" ORDER BY string_fields.id DESC LIMIT 15 OFFSET 0[0m
|
35948
|
+
[1m[35m (0.0ms)[0m SELECT COUNT(*) FROM "string_fields"
|
35949
|
+
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
35950
|
+
[1m[35m (0.1ms)[0m begin transaction
|
35951
|
+
---------------------------------------------------------------------
|
35952
|
+
ForestLiana::ResourcesGetterTest: test_Sort_by_a_has_many_association
|
35953
|
+
---------------------------------------------------------------------
|
35954
|
+
[1m[36mHasManyField Load (0.3ms)[0m [1mSELECT has_many_fields.*,
|
35955
|
+
COUNT(belongs_to_fields.id) has_many_count FROM "has_many_fields" LEFT OUTER JOIN "belongs_to_fields" ON "belongs_to_fields"."has_many_field_id" = "has_many_fields"."id" GROUP BY has_many_fields.id ORDER BY has_many_count DESC LIMIT 10 OFFSET 0[0m
|
35956
|
+
[1m[35mBelongsToField Load (0.2ms)[0m SELECT "belongs_to_fields".* FROM "belongs_to_fields" WHERE "belongs_to_fields"."has_many_field_id" IN (7, 1, 2, 3, 4, 5, 6, 9, 10, 8)
|
35957
|
+
[1m[36mHasManyThroughField Load (0.3ms)[0m [1mSELECT "has_many_through_fields".* FROM "has_many_through_fields" WHERE "has_many_through_fields"."id" IN (3, 2)[0m
|
35958
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "has_many_fields"
|
35959
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
35960
|
+
[1m[35m (0.1ms)[0m begin transaction
|
35961
|
+
----------------------------------------------------------------
|
35962
|
+
ForestLiana::ResourcesGetterTest: test_StringField_sort_by_field
|
35963
|
+
----------------------------------------------------------------
|
35964
|
+
[1m[36mStringField Load (0.3ms)[0m [1mSELECT "string_fields".* FROM "string_fields" ORDER BY field DESC LIMIT 10 OFFSET 0[0m
|
35965
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "string_fields"
|
35966
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
35967
|
+
[1m[35m (0.1ms)[0m begin transaction
|
35968
|
+
---------------------------
|
35969
|
+
ForestLianaTest: test_truth
|
35733
35970
|
---------------------------
|
35734
35971
|
[1m[36m (0.0ms)[0m [1mrollback transaction[0m
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forest_liana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Munda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: stripe
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: Forest Rails Liana
|
84
98
|
email:
|
85
99
|
- sandro@munda.me
|
@@ -96,16 +110,24 @@ files:
|
|
96
110
|
- app/controllers/forest_liana/apimaps_controller.rb
|
97
111
|
- app/controllers/forest_liana/application_controller.rb
|
98
112
|
- app/controllers/forest_liana/resources_controller.rb
|
113
|
+
- app/controllers/forest_liana/stripe_controller.rb
|
99
114
|
- app/deserializers/forest_liana/resource_deserializer.rb
|
100
115
|
- app/helpers/forest_liana/application_helper.rb
|
101
116
|
- app/models/forest_liana/collection.rb
|
102
117
|
- app/serializers/forest_liana/apimap_serializer.rb
|
103
118
|
- app/serializers/forest_liana/serializer_factory.rb
|
119
|
+
- app/serializers/forest_liana/stripe_card_serializer.rb
|
120
|
+
- app/serializers/forest_liana/stripe_invoice_serializer.rb
|
121
|
+
- app/serializers/forest_liana/stripe_payment_serializer.rb
|
104
122
|
- app/services/forest_liana/resource_getter.rb
|
105
123
|
- app/services/forest_liana/resources_getter.rb
|
106
124
|
- app/services/forest_liana/schema_adapter.rb
|
107
125
|
- app/services/forest_liana/schema_utils.rb
|
108
126
|
- app/services/forest_liana/search_query_builder.rb
|
127
|
+
- app/services/forest_liana/stripe_cards_getter.rb
|
128
|
+
- app/services/forest_liana/stripe_invoices_getter.rb
|
129
|
+
- app/services/forest_liana/stripe_payment_refunder.rb
|
130
|
+
- app/services/forest_liana/stripe_payments_getter.rb
|
109
131
|
- app/views/layouts/forest_liana/application.html.erb
|
110
132
|
- config/initializers/arel-helpers.rb
|
111
133
|
- config/initializers/mimetype.rb
|