stripe_local 0.0.2 → 0.1.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.
@@ -19,21 +19,21 @@ describe StripeLocal::Balance do
19
19
 
20
20
  its( :previous_pending ) { should be 29900 }
21
21
 
22
- # describe "redundant `StripeLocal::balance.available` webhook is received" do
23
- # before do
24
- # @count = StripeLocal::Balance.count
25
- # @updated = StripeLocal::Balance.last.updated_at.to_i
26
- # end
27
- # before { Timecop.travel 1.day.from_now }
28
- # after { Timecop.return }
29
- #
30
- # it "keeps StripeLocal::Balance updated, but doesn't create redundant records" do
31
- # StripeLocal::Balance.event({ pending: 19900, available: 19900 })
32
- #
33
- # StripeLocal::Balance.count.should eq @count
34
- # StripeLocal::Balance.last.updated_at.to_i.should > @updated
35
- # end
36
- # end
22
+ describe "redundant `StripeLocal::balance.available` webhook is received" do
23
+ before do
24
+ @count = StripeLocal::Balance.count
25
+ @updated = StripeLocal::Balance.last.updated_at.to_i
26
+ end
27
+ before { Timecop.travel 1.day.from_now }
28
+ after { Timecop.return }
29
+
30
+ it "keeps StripeLocal::Balance updated, but doesn't create redundant records" do
31
+ StripeLocal::Balance.event({ pending: 19900, available: 19900 })
32
+
33
+ StripeLocal::Balance.count.should eq @count
34
+ StripeLocal::Balance.last.updated_at.to_i.should > @updated
35
+ end
36
+ end
37
37
 
38
38
  describe "`balance.available` webhook signifies a changed balance" do
39
39
  before { @count = StripeLocal::Balance.count }
@@ -14,4 +14,8 @@ describe StripeLocal::Customer do
14
14
  client.signup( card: "token", plan: "plan" )
15
15
  end
16
16
 
17
+ it "refers to StripeLocal mattr_accessor for application level model_class" do
18
+ StripeLocal::model_class.new.should be_a Client
19
+ end
20
+
17
21
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  ENV['RAILS_ENV'] ||= 'test'
2
2
  require File.expand_path('../../spec/dummy/config/environment', __FILE__)
3
3
  require 'rspec/rails'
4
+ require 'timecop'
4
5
  require 'database_cleaner'
5
6
 
6
7
  Dir[Rails.root.join('spec/support/**/*.rb')].each {|f| require f}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe_local
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Cohen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-25 00:00:00.000000000 Z
11
+ date: 2013-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: timecop
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '>='
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: coffee-rails
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -214,6 +200,7 @@ files:
214
200
  - app/models/stripe_local/subscription.rb
215
201
  - app/models/stripe_local/transaction.rb
216
202
  - app/models/stripe_local/transfer.rb
203
+ - app/services/stripe_local/job_queue.rb
217
204
  - app/validators/email_pattern_validator.rb
218
205
  - app/validators/full_name_pattern_validator.rb
219
206
  - app/validators/legal_name_pattern_validator.rb
@@ -264,7 +251,6 @@ files:
264
251
  - spec/dummy/config/routes.rb
265
252
  - spec/dummy/config.ru
266
253
  - spec/dummy/db/migrate/20131102200937_create_clients.rb
267
- - spec/dummy/db/migrate/20131122104223_add_stripe_customer_id_to_clients.rb
268
254
  - spec/dummy/db/schema.rb
269
255
  - spec/dummy/log/development.log
270
256
  - spec/dummy/log/test.log
@@ -359,7 +345,6 @@ test_files:
359
345
  - spec/dummy/config/routes.rb
360
346
  - spec/dummy/config.ru
361
347
  - spec/dummy/db/migrate/20131102200937_create_clients.rb
362
- - spec/dummy/db/migrate/20131122104223_add_stripe_customer_id_to_clients.rb
363
348
  - spec/dummy/db/schema.rb
364
349
  - spec/dummy/log/development.log
365
350
  - spec/dummy/log/test.log
@@ -1,5 +0,0 @@
1
- class AddStripeCustomerIdToClients < ActiveRecord::Migration
2
- def change
3
- add_column :clients, :stripe_customer_id, :string
4
- end
5
- end