paid_up 0.13.4 → 0.13.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed5cbcfee4f51c5a6c8e56e5c21c9d9ec8d0a3f29e7392d4f3c01943d1c76978
4
- data.tar.gz: 974b7d1cafd005f4e4169642243665e0a50e5216218d9d1bff54c55d581e51d9
3
+ metadata.gz: 771072f0a7877fd4d05487ecbf96da45af6f0b2cc40a279b45daa68eb8d5d445
4
+ data.tar.gz: d6b8d8e64c3377e5e5cfb62983ac319b82cdc9d0d5640eb6d6d1d865f1226789
5
5
  SHA512:
6
- metadata.gz: 6e555d71c53fe90e069565169d3f5ecaa6523504d9a810ac4657697e72237a9cb8f5a9c1f69d80c094136b96df0a3b2ebebc17f3a9e75cede55f3f0a2cc5631d
7
- data.tar.gz: 3505b1f701f3b3c321ccbc72a6c295cf6400a827cf62b31c4480897173a957fa4a78ad6a5402eb3d98ac6c201080482fbc3e7d5b47e4ddf5d3b3cc0a003cb444
6
+ metadata.gz: 3a7129b2b0de5d27094e977f64d39273d9e41240148f37c61fb77d3e542f6b4ac5c0e1f4d29585ed8601c31121e4789b41806b32c753be6af84150b1473ef8b0
7
+ data.tar.gz: 2523f6baf9b3d7eacd444d09ba04f60ab4661d688d6a64ed8a30c85ed768240cf790ebc6b1dff7adcaa957aa76aef1e6bf14851f7ee0f12cfd510596d15deb5b
data/README.md CHANGED
@@ -102,6 +102,14 @@ Abilities corresponding to features you have defined will be generated automatic
102
102
  end
103
103
  end
104
104
 
105
+ ## Speeding up User queries
106
+
107
+ If you try generating a list of users for display in a directory, you may find
108
+ that the Stripe checking code slows down your query.
109
+
110
+ To avoid this, add "select(:field_1, :field_2, :etc)" to your finder, being
111
+ sure to *omit* the :stripe_id column.
112
+
105
113
  ## Controller
106
114
 
107
115
  Your controller should inherit from PaidUp::PaidUpController, which in turn inherits from your own ApplicationController.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.13.4
1
+ 0.13.5
@@ -101,11 +101,13 @@ module PaidUp
101
101
  end
102
102
 
103
103
  def load_stripe_data
104
+ return unless attributes.has_key?('stripe_id')
105
+ my_working_stripe_id = working_stripe_id
104
106
  @customer_stripe_data = Rails.cache.fetch(
105
- "#{working_stripe_id}/stripe_data",
107
+ "#{my_working_stripe_id}/stripe_data",
106
108
  expires_in: 12.hours
107
109
  ) do
108
- Stripe::Customer.retrieve working_stripe_id
110
+ Stripe::Customer.retrieve my_working_stripe_id
109
111
  end
110
112
 
111
113
  @subscription = PaidUp::Subscription.new(user: self)
data/paid_up.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: paid_up 0.13.4 ruby lib
5
+ # stub: paid_up 0.13.5 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "paid_up".freeze
9
- s.version = "0.13.4"
9
+ s.version = "0.13.5"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Karen Lundgren".freeze]
14
- s.date = "2018-05-19"
14
+ s.date = "2018-05-31"
15
15
  s.description = "Allows a model of your choosing (such as users) to subscribe to a plan, which enables features.".freeze
16
16
  s.email = "karen.e.lundgren@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.4
4
+ version: 0.13.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-19 00:00:00.000000000 Z
11
+ date: 2018-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml-rails