transactionable 0.1.0 → 0.2.0
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/models/transactionable/bank_account.rb +2 -0
- data/app/views/transactionable/shared/_bank_account_form.html.erb +29 -0
- data/app/views/transactionable/shared/_credit_card_form.html.erb +32 -0
- data/lib/generators/transactionable/USAGE +9 -0
- data/lib/generators/transactionable/views_generator.rb +10 -0
- data/lib/transactionable/version.rb +1 -1
- data/spec/dummy/log/test.log +11 -0
- metadata +6 -8
- data/spec/integration/models/bank_account_spec.rb +0 -0
- data/spec/integration/models/credit_spec.rb +0 -0
- data/spec/integration/models/debit_spec.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49728717552499cb35045ade8224c145099040f3
|
4
|
+
data.tar.gz: 7056ee5a0513ed6ad1082606aa3c88e00cb1aabc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3696cefdda68cddd497b223857ae07cf34ce12e2cbf2301fecd26ea7306be6547f13c2300c6b778d32b41058fc223d38aca84b0c2578fc424e8dbea084584d41
|
7
|
+
data.tar.gz: 55f9ac6f0da8748614f3819f70d798adb736c47aef48bf2c2602a8535d631b8358b59ea19f3916b257f99f8074a3a2c93a829746e17c8df229e809e983c3b2bc
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<% content_for :head do %>
|
2
|
+
<%= javascript_include_tag "https://js.balancedpayments.com/v1/balanced.js" %>
|
3
|
+
<%= javascript_include_tag "transactionable/add_bank_account.js" %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% javascript_tag do %>
|
7
|
+
$(document).ready(function() {
|
8
|
+
var marketplaceUri = "#{Balanced::Marketplace.my_marketplace.uri}";
|
9
|
+
balanced.init(marketplaceUri);
|
10
|
+
});
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= form_for :bank_account_info, url: action, html: { class: "acct-info-form" } do |f| %>
|
14
|
+
<%= f.label :name %>
|
15
|
+
<%= f.text_field :name, class: "acct-name" %>
|
16
|
+
|
17
|
+
<%= f.label :account_number, "Account Number" %>
|
18
|
+
<%= f.text_field :account_number, class: "acct-number" %>
|
19
|
+
|
20
|
+
<%= f.label :routing_number, "Routing Number" %>
|
21
|
+
<%= f.text_field :routing_number, class: "acct-routing-number" %>
|
22
|
+
|
23
|
+
<%= f.label :type %>
|
24
|
+
<%= f.select :type, Transactionable::BankAccount::TYPES, class: "acct-type" %>
|
25
|
+
|
26
|
+
<%= f.hidden_field :balanced_uri, class: "acct-balanced-uri" %>
|
27
|
+
|
28
|
+
<%= f.submit "Submit Bank Account Info", class: "submit-bank-acct-info" %>
|
29
|
+
<% end %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<% content_for :head do %>
|
2
|
+
<%= javascript_include_tag "https://js.balancedpayments.com/v1/balanced.js" %>
|
3
|
+
<%= javascript_include_tag "transactionable/add_credit_card.js" %>
|
4
|
+
<% end %>
|
5
|
+
|
6
|
+
<% javascript_tag do %>
|
7
|
+
$(document).ready(function() {
|
8
|
+
var marketplaceUri = "#{Balanced::Marketplace.my_marketplace.uri}";
|
9
|
+
balanced.init(marketplaceUri);
|
10
|
+
});
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= form_for :credit_card_info, url: action, html: { class: "cc-info-form" } do |f| %>
|
14
|
+
<%= f.label :name %>
|
15
|
+
<%= f.text_field :name, class: "cc-name" %>
|
16
|
+
|
17
|
+
<%= f.label :card_number, "Credit Card Number" %>
|
18
|
+
<%= f.text_field :card_number, class: "cc-number" %>
|
19
|
+
|
20
|
+
<%= f.label :expiration_date, "Expiration Date" %>
|
21
|
+
<%= f.text_field :expiration_date, class: "cc-exp-date", placeholder: "MM/YYYY" %>
|
22
|
+
|
23
|
+
<%= f.label :security_code %>
|
24
|
+
<%= f.text_field :security_code, class: "cc-csc" %>
|
25
|
+
|
26
|
+
<%= f.label :zip_code %>
|
27
|
+
<%= f.text_field :zip_code, class: "cc-postal-code" %>
|
28
|
+
|
29
|
+
<%= f.hidden_field :balanced_uri, class: "cc-balanced-uri" %>
|
30
|
+
|
31
|
+
<%= f.submit "Submit Credit Card Information", class: "submit-cc-info" %>
|
32
|
+
<% end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Description:
|
2
|
+
Writes basic credit card and bank account form partials to app/views
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate transactionable:views
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
app/views/transactionable/shared/_bank_account_form.html.erb
|
9
|
+
app/views/transactionable/shared/_credit_card_form.html.erb
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Transactionable
|
2
|
+
class ViewsGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path('../../../../app/views/transactionable/', __FILE__)
|
4
|
+
desc "Copies shared transactionable views to your application."
|
5
|
+
|
6
|
+
def copy_shared_partials
|
7
|
+
directory "shared/", "app/views/transactionable/shared/"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/spec/dummy/log/test.log
CHANGED
@@ -2873,3 +2873,14 @@
|
|
2873
2873
|
[1m[35mTransactionable::Transaction Load (0.1ms)[0m SELECT "transactionable_transactions".* FROM "transactionable_transactions" WHERE "transactionable_transactions"."transactionable_id" = ? AND "transactionable_transactions"."transactionable_type" = ? ORDER BY "transactionable_transactions"."id" ASC LIMIT 1 [["transactionable_id", 1], ["transactionable_type", "Transactionable::CreditCard"]]
|
2874
2874
|
[1m[36mTransactionable::RemoteTransaction Load (0.1ms)[0m [1mSELECT "transactionable_remote_entities".* FROM "transactionable_remote_entities" WHERE "transactionable_remote_entities"."type" IN ('Transactionable::RemoteTransaction') AND "transactionable_remote_entities"."local_entity_id" = ? AND "transactionable_remote_entities"."local_entity_type" = ? ORDER BY "transactionable_remote_entities"."id" ASC LIMIT 1[0m [["local_entity_id", 1], ["local_entity_type", "Transactionable::Transaction"]]
|
2875
2875
|
[1m[35m (2.2ms)[0m rollback transaction
|
2876
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2877
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2878
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2879
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2880
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2881
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2882
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2883
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2884
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2885
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2886
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transactionable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vadim Timoshpolsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -152,11 +152,15 @@ files:
|
|
152
152
|
- app/models/transactionable/reversal.rb
|
153
153
|
- app/models/transactionable/transaction.rb
|
154
154
|
- app/views/layouts/transactionable/application.html.erb
|
155
|
+
- app/views/transactionable/shared/_bank_account_form.html.erb
|
156
|
+
- app/views/transactionable/shared/_credit_card_form.html.erb
|
155
157
|
- config/routes.rb
|
156
158
|
- db/migrate/20140108145608_create_transactionable_remote_entities.rb
|
157
159
|
- db/migrate/20140108182203_create_transactionable_credit_cards.rb
|
158
160
|
- db/migrate/20140108190511_create_transactionable_transactions.rb
|
159
161
|
- db/migrate/20140108213120_create_transactionable_bank_accounts.rb
|
162
|
+
- lib/generators/transactionable/USAGE
|
163
|
+
- lib/generators/transactionable/views_generator.rb
|
160
164
|
- lib/tasks/transactionable_tasks.rake
|
161
165
|
- lib/transactionable.rb
|
162
166
|
- lib/transactionable/acts_as_transactionable.rb
|
@@ -212,10 +216,7 @@ files:
|
|
212
216
|
- spec/factories/transactionable_remote_transactions.rb
|
213
217
|
- spec/integration/acts_as_bank_account_transactionable_spec.rb
|
214
218
|
- spec/integration/acts_as_credit_card_transactionable_spec.rb
|
215
|
-
- spec/integration/models/bank_account_spec.rb
|
216
219
|
- spec/integration/models/credit_card_spec.rb
|
217
|
-
- spec/integration/models/credit_spec.rb
|
218
|
-
- spec/integration/models/debit_spec.rb
|
219
220
|
- spec/lib/transactionable_spec.rb
|
220
221
|
- spec/models/transactionable/bank_account_spec.rb
|
221
222
|
- spec/models/transactionable/credit_card_spec.rb
|
@@ -299,10 +300,7 @@ test_files:
|
|
299
300
|
- spec/factories/transactionable_remote_transactions.rb
|
300
301
|
- spec/integration/acts_as_bank_account_transactionable_spec.rb
|
301
302
|
- spec/integration/acts_as_credit_card_transactionable_spec.rb
|
302
|
-
- spec/integration/models/bank_account_spec.rb
|
303
303
|
- spec/integration/models/credit_card_spec.rb
|
304
|
-
- spec/integration/models/credit_spec.rb
|
305
|
-
- spec/integration/models/debit_spec.rb
|
306
304
|
- spec/lib/transactionable_spec.rb
|
307
305
|
- spec/models/transactionable/bank_account_spec.rb
|
308
306
|
- spec/models/transactionable/credit_card_spec.rb
|
File without changes
|
File without changes
|
File without changes
|