saucy 0.15.0 → 0.15.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ 0.15.1
2
+
3
+ * CanceledAccount now stores the subscription_token of the account it was canceled from.
4
+
1
5
  0.15.0
2
6
 
3
7
  * Signup accepts a "quick" flag that will cause existing users to sign in instead of creating a new account.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- saucy (0.15.0)
4
+ saucy (0.15.1)
5
5
  airbrake (~> 3.0.4)
6
6
  braintree (>= 2.6.2)
7
7
  clearance (~> 0.14.0)
@@ -8,11 +8,12 @@ class CanceledAccount < ActiveRecord::Base
8
8
  private
9
9
 
10
10
  def populate_from_account
11
- self.name = account.name
12
- self.keyword = account.keyword
13
- self.billing_email = account.customer.email
14
- self.memberships = account.memberships.to_json(:include => { :user => { :only => [:email, :name, :created_at]}}, :only => [:admin, :created_at])
15
- self.plan = account.plan
16
- self.started_at = account.created_at
11
+ self.name = account.name
12
+ self.keyword = account.keyword
13
+ self.billing_email = account.customer.email
14
+ self.memberships = account.memberships.to_json(:include => { :user => { :only => [:email, :name, :created_at]}}, :only => [:admin, :created_at])
15
+ self.plan = account.plan
16
+ self.started_at = account.created_at
17
+ self.subscription_token = account.subscription_token
17
18
  end
18
19
  end
@@ -0,0 +1,5 @@
1
+ class AddSubscriptionTokenToCanceledAccounts < ActiveRecord::Migration
2
+ def change
3
+ add_column :canceled_accounts, :subscription_token, :string
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Saucy
2
- VERSION = '0.15.0'
2
+ VERSION = '0.15.1'
3
3
  end
@@ -0,0 +1,5 @@
1
+ class AddSubscriptionTokenToCanceledAccounts < ActiveRecord::Migration
2
+ def change
3
+ add_column :canceled_accounts, :subscription_token, :string
4
+ end
5
+ end
@@ -12,7 +12,7 @@ describe CanceledAccount do
12
12
  end
13
13
 
14
14
  describe CanceledAccount, "given an account" do
15
- let(:account) { Factory(:account, :billing_email => "billing@example.com") }
15
+ let(:account) { Factory(:account, :billing_email => "billing@example.com", :subscription_token => "abc123") }
16
16
 
17
17
  before do
18
18
  Factory(:membership, :account => account)
@@ -30,6 +30,11 @@ describe CanceledAccount, "given an account" do
30
30
  subject.billing_email.should == account.customer.email
31
31
  end
32
32
 
33
+ it "populates its subscription_token from the given account" do
34
+ subject.subscription_token.should_not be_nil
35
+ subject.subscription_token.should == account.subscription_token
36
+ end
37
+
33
38
  it "saves the memberships and users as json from the given account" do
34
39
  memberships_json = account.memberships.to_json(:include => { :user => { :only => [:email, :name, :created_at]}}, :only => [:admin, :created_at])
35
40
  subject.memberships.should == memberships_json
metadata CHANGED
@@ -1,15 +1,10 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: saucy
3
- version: !ruby/object:Gem::Version
4
- hash: 35
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.15.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 15
9
- - 0
10
- version: 0.15.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - thoughtbot, inc.
14
9
  - Joe Ferris
15
10
  - Mike Burns
@@ -19,291 +14,213 @@ authors:
19
14
  autorequire:
20
15
  bindir: bin
21
16
  cert_chain: []
22
-
23
- date: 2012-01-28 00:00:00 Z
24
- dependencies:
25
- - !ruby/object:Gem::Dependency
26
- version_requirements: &id001 !ruby/object:Gem::Requirement
17
+ date: 2012-02-06 00:00:00.000000000Z
18
+ dependencies:
19
+ - !ruby/object:Gem::Dependency
20
+ name: clearance
21
+ requirement: &70306651251920 !ruby/object:Gem::Requirement
27
22
  none: false
28
- requirements:
23
+ requirements:
29
24
  - - ~>
30
- - !ruby/object:Gem::Version
31
- hash: 39
32
- segments:
33
- - 0
34
- - 14
35
- - 0
25
+ - !ruby/object:Gem::Version
36
26
  version: 0.14.0
37
- requirement: *id001
38
27
  type: :runtime
39
28
  prerelease: false
40
- name: clearance
41
- - !ruby/object:Gem::Dependency
42
- version_requirements: &id002 !ruby/object:Gem::Requirement
29
+ version_requirements: *70306651251920
30
+ - !ruby/object:Gem::Dependency
31
+ name: formtastic
32
+ requirement: &70306651251380 !ruby/object:Gem::Requirement
43
33
  none: false
44
- requirements:
34
+ requirements:
45
35
  - - ~>
46
- - !ruby/object:Gem::Version
47
- hash: 23
48
- segments:
49
- - 1
50
- - 2
51
- - 4
36
+ - !ruby/object:Gem::Version
52
37
  version: 1.2.4
53
- requirement: *id002
54
38
  type: :runtime
55
39
  prerelease: false
56
- name: formtastic
57
- - !ruby/object:Gem::Dependency
58
- version_requirements: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: *70306651251380
41
+ - !ruby/object:Gem::Dependency
42
+ name: railties
43
+ requirement: &70306651250900 !ruby/object:Gem::Requirement
59
44
  none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- hash: 1
64
- segments:
65
- - 3
66
- - 0
67
- - 3
45
+ requirements:
46
+ - - ! '>='
47
+ - !ruby/object:Gem::Version
68
48
  version: 3.0.3
69
- requirement: *id003
70
49
  type: :runtime
71
50
  prerelease: false
72
- name: railties
73
- - !ruby/object:Gem::Dependency
74
- version_requirements: &id004 !ruby/object:Gem::Requirement
51
+ version_requirements: *70306651250900
52
+ - !ruby/object:Gem::Dependency
53
+ name: braintree
54
+ requirement: &70306651250420 !ruby/object:Gem::Requirement
75
55
  none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- hash: 19
80
- segments:
81
- - 2
82
- - 6
83
- - 2
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
84
59
  version: 2.6.2
85
- requirement: *id004
86
60
  type: :runtime
87
61
  prerelease: false
88
- name: braintree
89
- - !ruby/object:Gem::Dependency
90
- version_requirements: &id005 !ruby/object:Gem::Requirement
62
+ version_requirements: *70306651250420
63
+ - !ruby/object:Gem::Dependency
64
+ name: sham_rack
65
+ requirement: &70306651249940 !ruby/object:Gem::Requirement
91
66
  none: false
92
- requirements:
93
- - - "="
94
- - !ruby/object:Gem::Version
95
- hash: 29
96
- segments:
97
- - 1
98
- - 3
99
- - 3
67
+ requirements:
68
+ - - =
69
+ - !ruby/object:Gem::Version
100
70
  version: 1.3.3
101
- requirement: *id005
102
71
  type: :runtime
103
72
  prerelease: false
104
- name: sham_rack
105
- - !ruby/object:Gem::Dependency
106
- version_requirements: &id006 !ruby/object:Gem::Requirement
73
+ version_requirements: *70306651249940
74
+ - !ruby/object:Gem::Dependency
75
+ name: sinatra
76
+ requirement: &70306651249420 !ruby/object:Gem::Requirement
107
77
  none: false
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- hash: 23
112
- segments:
113
- - 1
114
- - 1
115
- - 2
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
116
81
  version: 1.1.2
117
- requirement: *id006
118
82
  type: :runtime
119
83
  prerelease: false
120
- name: sinatra
121
- - !ruby/object:Gem::Dependency
122
- version_requirements: &id007 !ruby/object:Gem::Requirement
84
+ version_requirements: *70306651249420
85
+ - !ruby/object:Gem::Dependency
86
+ name: airbrake
87
+ requirement: &70306651248780 !ruby/object:Gem::Requirement
123
88
  none: false
124
- requirements:
89
+ requirements:
125
90
  - - ~>
126
- - !ruby/object:Gem::Version
127
- hash: 15
128
- segments:
129
- - 3
130
- - 0
131
- - 4
91
+ - !ruby/object:Gem::Version
132
92
  version: 3.0.4
133
- requirement: *id007
134
93
  type: :runtime
135
94
  prerelease: false
136
- name: airbrake
137
- - !ruby/object:Gem::Dependency
138
- version_requirements: &id008 !ruby/object:Gem::Requirement
139
- none: false
140
- requirements:
141
- - - ~>
142
- - !ruby/object:Gem::Version
143
- hash: 3
144
- segments:
145
- - 0
146
- - 4
147
- version: "0.4"
148
- requirement: *id008
149
- type: :development
150
- prerelease: false
95
+ version_requirements: *70306651248780
96
+ - !ruby/object:Gem::Dependency
151
97
  name: aruba
152
- - !ruby/object:Gem::Dependency
153
- version_requirements: &id009 !ruby/object:Gem::Requirement
98
+ requirement: &70306651248160 !ruby/object:Gem::Requirement
154
99
  none: false
155
- requirements:
100
+ requirements:
156
101
  - - ~>
157
- - !ruby/object:Gem::Version
158
- hash: 23
159
- segments:
160
- - 1
161
- - 0
162
- - 0
163
- version: 1.0.0
164
- requirement: *id009
102
+ - !ruby/object:Gem::Version
103
+ version: '0.4'
165
104
  type: :development
166
105
  prerelease: false
106
+ version_requirements: *70306651248160
107
+ - !ruby/object:Gem::Dependency
167
108
  name: shoulda-matchers
168
- - !ruby/object:Gem::Dependency
169
- version_requirements: &id010 !ruby/object:Gem::Requirement
109
+ requirement: &70306651247500 !ruby/object:Gem::Requirement
170
110
  none: false
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- hash: 3
175
- segments:
176
- - 0
177
- version: "0"
178
- requirement: *id010
111
+ requirements:
112
+ - - ~>
113
+ - !ruby/object:Gem::Version
114
+ version: 1.0.0
179
115
  type: :development
180
116
  prerelease: false
117
+ version_requirements: *70306651247500
118
+ - !ruby/object:Gem::Dependency
181
119
  name: bourne
182
- - !ruby/object:Gem::Dependency
183
- version_requirements: &id011 !ruby/object:Gem::Requirement
120
+ requirement: &70306651246920 !ruby/object:Gem::Requirement
184
121
  none: false
185
- requirements:
186
- - - ">="
187
- - !ruby/object:Gem::Version
188
- hash: 3
189
- segments:
190
- - 0
191
- version: "0"
192
- requirement: *id011
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
193
126
  type: :development
194
127
  prerelease: false
128
+ version_requirements: *70306651246920
129
+ - !ruby/object:Gem::Dependency
195
130
  name: sqlite3
196
- - !ruby/object:Gem::Dependency
197
- version_requirements: &id012 !ruby/object:Gem::Requirement
131
+ requirement: &70306651243800 !ruby/object:Gem::Requirement
198
132
  none: false
199
- requirements:
200
- - - ">="
201
- - !ruby/object:Gem::Version
202
- hash: 3
203
- segments:
204
- - 0
205
- version: "0"
206
- requirement: *id012
133
+ requirements:
134
+ - - ! '>='
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
207
137
  type: :development
208
138
  prerelease: false
139
+ version_requirements: *70306651243800
140
+ - !ruby/object:Gem::Dependency
209
141
  name: factory_girl
210
- - !ruby/object:Gem::Dependency
211
- version_requirements: &id013 !ruby/object:Gem::Requirement
142
+ requirement: &70306651243180 !ruby/object:Gem::Requirement
212
143
  none: false
213
- requirements:
214
- - - ">="
215
- - !ruby/object:Gem::Version
216
- hash: 3
217
- segments:
218
- - 0
219
- version: "0"
220
- requirement: *id013
144
+ requirements:
145
+ - - ! '>='
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
221
148
  type: :development
222
149
  prerelease: false
150
+ version_requirements: *70306651243180
151
+ - !ruby/object:Gem::Dependency
223
152
  name: timecop
224
- - !ruby/object:Gem::Dependency
225
- version_requirements: &id014 !ruby/object:Gem::Requirement
153
+ requirement: &70306651242300 !ruby/object:Gem::Requirement
226
154
  none: false
227
- requirements:
228
- - - ">="
229
- - !ruby/object:Gem::Version
230
- hash: 3
231
- segments:
232
- - 0
233
- version: "0"
234
- requirement: *id014
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
235
159
  type: :development
236
160
  prerelease: false
161
+ version_requirements: *70306651242300
162
+ - !ruby/object:Gem::Dependency
237
163
  name: rake
238
- - !ruby/object:Gem::Dependency
239
- version_requirements: &id015 !ruby/object:Gem::Requirement
164
+ requirement: &70306651241580 !ruby/object:Gem::Requirement
240
165
  none: false
241
- requirements:
242
- - - ~>
243
- - !ruby/object:Gem::Version
244
- hash: 27
245
- segments:
246
- - 1
247
- - 0
248
- - 6
249
- version: 1.0.6
250
- requirement: *id015
166
+ requirements:
167
+ - - ! '>='
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
251
170
  type: :development
252
171
  prerelease: false
172
+ version_requirements: *70306651241580
173
+ - !ruby/object:Gem::Dependency
253
174
  name: cucumber
254
- - !ruby/object:Gem::Dependency
255
- version_requirements: &id016 !ruby/object:Gem::Requirement
175
+ requirement: &70306651240980 !ruby/object:Gem::Requirement
256
176
  none: false
257
- requirements:
258
- - - ">="
259
- - !ruby/object:Gem::Version
260
- hash: 3
261
- segments:
262
- - 0
263
- version: "0"
264
- requirement: *id016
177
+ requirements:
178
+ - - ~>
179
+ - !ruby/object:Gem::Version
180
+ version: 1.0.6
265
181
  type: :development
266
182
  prerelease: false
183
+ version_requirements: *70306651240980
184
+ - !ruby/object:Gem::Dependency
267
185
  name: rspec-rails
268
- - !ruby/object:Gem::Dependency
269
- version_requirements: &id017 !ruby/object:Gem::Requirement
186
+ requirement: &70306651240440 !ruby/object:Gem::Requirement
270
187
  none: false
271
- requirements:
272
- - - ">="
273
- - !ruby/object:Gem::Version
274
- hash: 1
275
- segments:
276
- - 3
277
- - 0
278
- - 3
279
- version: 3.0.3
280
- requirement: *id017
188
+ requirements:
189
+ - - ! '>='
190
+ - !ruby/object:Gem::Version
191
+ version: '0'
281
192
  type: :development
282
193
  prerelease: false
194
+ version_requirements: *70306651240440
195
+ - !ruby/object:Gem::Dependency
283
196
  name: rails
284
- - !ruby/object:Gem::Dependency
285
- version_requirements: &id018 !ruby/object:Gem::Requirement
197
+ requirement: &70306651239860 !ruby/object:Gem::Requirement
286
198
  none: false
287
- requirements:
288
- - - ">="
289
- - !ruby/object:Gem::Version
290
- hash: 3
291
- segments:
292
- - 0
293
- version: "0"
294
- requirement: *id018
199
+ requirements:
200
+ - - ! '>='
201
+ - !ruby/object:Gem::Version
202
+ version: 3.0.3
295
203
  type: :development
296
204
  prerelease: false
205
+ version_requirements: *70306651239860
206
+ - !ruby/object:Gem::Dependency
297
207
  name: thin
298
- description: Clearance-based Rails engine for Software as a Service (Saas) that provides account and project management
208
+ requirement: &70306651239400 !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ type: :development
215
+ prerelease: false
216
+ version_requirements: *70306651239400
217
+ description: Clearance-based Rails engine for Software as a Service (Saas) that provides
218
+ account and project management
299
219
  email: support@thoughtbot.com
300
220
  executables: []
301
-
302
221
  extensions: []
303
-
304
222
  extra_rdoc_files: []
305
-
306
- files:
223
+ files:
307
224
  - .gitignore
308
225
  - .rspec
309
226
  - CHANGELOG.md
@@ -381,6 +298,7 @@ files:
381
298
  - config/locales/en.yml
382
299
  - config/routes.rb
383
300
  - db/migrate/20111014142613_create_canceled_accounts.rb
301
+ - db/migrate/20120206155222_add_subscription_token_to_canceled_accounts.rb
384
302
  - features/run_features.feature
385
303
  - features/step_definitions/clearance_steps.rb
386
304
  - features/step_definitions/rails_steps.rb
@@ -459,6 +377,7 @@ files:
459
377
  - spec/controllers/plans_controller_spec.rb
460
378
  - spec/controllers/profiles_controller_spec.rb
461
379
  - spec/controllers/projects_controller_spec.rb
380
+ - spec/dummy/db/migrate/20120206155222_add_subscription_token_to_canceled_accounts.rb
462
381
  - spec/environment.rb
463
382
  - spec/layouts_spec.rb
464
383
  - spec/mailers/billing_mailer_spec.rb
@@ -492,38 +411,35 @@ files:
492
411
  - spec/views/accounts/show.html.erb_spec.rb
493
412
  homepage: http://github.com/thoughtbot/saucy
494
413
  licenses: []
495
-
496
414
  post_install_message:
497
415
  rdoc_options: []
498
-
499
- require_paths:
416
+ require_paths:
500
417
  - lib
501
- required_ruby_version: !ruby/object:Gem::Requirement
418
+ required_ruby_version: !ruby/object:Gem::Requirement
502
419
  none: false
503
- requirements:
504
- - - ">="
505
- - !ruby/object:Gem::Version
506
- hash: 3
507
- segments:
420
+ requirements:
421
+ - - ! '>='
422
+ - !ruby/object:Gem::Version
423
+ version: '0'
424
+ segments:
508
425
  - 0
509
- version: "0"
510
- required_rubygems_version: !ruby/object:Gem::Requirement
426
+ hash: 4051501373235495230
427
+ required_rubygems_version: !ruby/object:Gem::Requirement
511
428
  none: false
512
- requirements:
513
- - - ">="
514
- - !ruby/object:Gem::Version
515
- hash: 3
516
- segments:
429
+ requirements:
430
+ - - ! '>='
431
+ - !ruby/object:Gem::Version
432
+ version: '0'
433
+ segments:
517
434
  - 0
518
- version: "0"
435
+ hash: 4051501373235495230
519
436
  requirements: []
520
-
521
437
  rubyforge_project:
522
438
  rubygems_version: 1.8.11
523
439
  signing_key:
524
440
  specification_version: 3
525
441
  summary: Clearance-based Rails engine for SaaS
526
- test_files:
442
+ test_files:
527
443
  - features/run_features.feature
528
444
  - features/step_definitions/clearance_steps.rb
529
445
  - features/step_definitions/rails_steps.rb
@@ -542,6 +458,7 @@ test_files:
542
458
  - spec/controllers/plans_controller_spec.rb
543
459
  - spec/controllers/profiles_controller_spec.rb
544
460
  - spec/controllers/projects_controller_spec.rb
461
+ - spec/dummy/db/migrate/20120206155222_add_subscription_token_to_canceled_accounts.rb
545
462
  - spec/environment.rb
546
463
  - spec/layouts_spec.rb
547
464
  - spec/mailers/billing_mailer_spec.rb