rhino_project_subscriptions 0.25.0.beta.1 → 0.30.0.alpha.1

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: 5dbd29053cc39389216a11ae9e4bf918dfb19351921b40b6cc616958762a0acd
4
- data.tar.gz: ed9d74d93d0a49b98527ed76b1c6b371fa78c98af03d3f4576b8aa791652b34f
3
+ metadata.gz: 2385d10e206ae6e2c9cfbb70b85d9aae8bac638110826977cd8f659591b4732e
4
+ data.tar.gz: 220016addcb425e95b49031eeb97245b205b327951f6cd22b192c6dcbe96146d
5
5
  SHA512:
6
- metadata.gz: 326b808875925144535866089f0ed37a3ae547cfe4ef92935d0d93185d05a60d890b9573ea115366914d2e10a28a8ea964b54b8a98310570c8bf058d67a51cee
7
- data.tar.gz: 5836b38a415a44ed39d869d8fb2ef7503ab65ea881f82598a06e50b0b8f3ac5bb3581d1000a15886050214f61055bb231e48cbfba4f4f8b8f6604dbf46304b84
6
+ metadata.gz: aa43d1f5b92e9a89fe61dcbc01007cd7d33dd06307dfc90928808dd11b9bd9c5e02e3afe3e1f527e462d0a489047c8bd098d7aed9367a13f2e23982aae54aa07
7
+ data.tar.gz: de53cd8b5f25a7aa495cf90ed17677c7c2e2781ee09fc51b43101a46284fe49190118b185f13ee63fc6d428db579fd21ccc9e93f3ee5470cbc766b6791f86abb
@@ -9,17 +9,8 @@ module Rhino
9
9
  include Rhino::Authenticated
10
10
 
11
11
  def prices
12
- # Unfortunately we can't use the search API here because you can't do AND and OR together
13
- # And parentheses don't work either https://docs.stripe.com/search#query-structure-and-terminology
14
- list = if RhinoSubscriptions.products == :all
15
- ::Stripe::Price.list({ active: true, limit: 5, expand: ["data.product"] })["data"]
16
- else
17
- RhinoSubscriptions.products.flat_map do |product|
18
- ::Stripe::Price.list({ product:, active: true, limit: 5, expand: ["data.product"] })["data"]
19
- end
20
- end
21
-
22
- render json: { prices: list }
12
+ list = ::Stripe::Price.list({ active: true, limit: 5, expand: ["data.product"] })
13
+ render json: { prices: list["data"] }
23
14
  end
24
15
 
25
16
  def create_checkout_session
@@ -89,8 +80,7 @@ module Rhino
89
80
  quantity: 1,
90
81
  price: args["price"]
91
82
  }],
92
- customer: customer_id,
93
- payment_method_collection: RhinoSubscriptions.payment_method_collection
83
+ customer: customer_id
94
84
  )
95
85
  end
96
86
 
@@ -6,7 +6,6 @@ module RhinoSubscriptions
6
6
  source_root File.expand_path('templates', __dir__)
7
7
 
8
8
  def install
9
- template "rhino_subscriptions.rb", "config//initializers/rhino_subscriptions.rb"
10
9
  end
11
10
  end
12
11
  end
@@ -4,21 +4,5 @@ require "rhino_subscriptions/engine"
4
4
  # require 'active_support'
5
5
 
6
6
  module RhinoSubscriptions
7
- # The list of products to show on the subscription page
8
- mattr_accessor :products, default: :all
9
-
10
- mattr_accessor :payment_method_collection, default: :always
11
-
12
- def self.products=(products)
13
- @@products = Array.wrap(products)
14
- end
15
-
16
- def self.payment_method_collection=(payment_method_collection)
17
- @@payment_method_collection = payment_method_collection
18
- end
19
-
20
- # Default way to set up Rhino Subscriptions
21
- def self.setup
22
- yield self
23
- end
7
+ # Your code goes here...
24
8
  end
@@ -8,9 +8,9 @@ module RhinoSubscriptions
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 0
11
- MINOR = 25
11
+ MINOR = 30
12
12
  TINY = 0
13
- PRE = "beta.1"
13
+ PRE = "alpha.1"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhino_project_subscriptions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0.beta.1
4
+ version: 0.30.0.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Rosevear
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 2025-01-28 00:00:00.000000000 Z
11
+ date: 2024-12-08 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: rails
@@ -15,48 +16,48 @@ dependencies:
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: 8.0.0
19
+ version: 7.2.0
19
20
  - - ">="
20
21
  - !ruby/object:Gem::Version
21
- version: 8.0.0
22
+ version: 7.2.0
22
23
  type: :runtime
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
26
  requirements:
26
27
  - - "~>"
27
28
  - !ruby/object:Gem::Version
28
- version: 8.0.0
29
+ version: 7.2.0
29
30
  - - ">="
30
31
  - !ruby/object:Gem::Version
31
- version: 8.0.0
32
+ version: 7.2.0
32
33
  - !ruby/object:Gem::Dependency
33
34
  name: rhino_project_core
34
35
  requirement: !ruby/object:Gem::Requirement
35
36
  requirements:
36
37
  - - '='
37
38
  - !ruby/object:Gem::Version
38
- version: 0.25.0.beta.1
39
+ version: 0.30.0.alpha.1
39
40
  type: :runtime
40
41
  prerelease: false
41
42
  version_requirements: !ruby/object:Gem::Requirement
42
43
  requirements:
43
44
  - - '='
44
45
  - !ruby/object:Gem::Version
45
- version: 0.25.0.beta.1
46
+ version: 0.30.0.alpha.1
46
47
  - !ruby/object:Gem::Dependency
47
48
  name: stripe
48
49
  requirement: !ruby/object:Gem::Requirement
49
50
  requirements:
50
51
  - - '='
51
52
  - !ruby/object:Gem::Version
52
- version: 13.3.1
53
+ version: 5.28.0
53
54
  type: :runtime
54
55
  prerelease: false
55
56
  version_requirements: !ruby/object:Gem::Requirement
56
57
  requirements:
57
58
  - - '='
58
59
  - !ruby/object:Gem::Version
59
- version: 13.3.1
60
+ version: 5.28.0
60
61
  description: ''
61
62
  email:
62
63
  - jp@codalio.com
@@ -76,7 +77,6 @@ files:
76
77
  - db/migrate/20210302208003_rhino_create_stripe_customers.rb
77
78
  - db/migrate/20210302299092_rhino_alter_stripe_customers.rb
78
79
  - lib/generators/rhino_subscriptions/install/install_generator.rb
79
- - lib/generators/rhino_subscriptions/install/templates/rhino_subscriptions.rb.tt
80
80
  - lib/rhino_project_subscriptions.rb
81
81
  - lib/rhino_subscriptions/engine.rb
82
82
  - lib/rhino_subscriptions/version.rb
@@ -85,6 +85,7 @@ homepage: ''
85
85
  licenses:
86
86
  - MIT
87
87
  metadata: {}
88
+ post_install_message:
88
89
  rdoc_options: []
89
90
  require_paths:
90
91
  - lib
@@ -99,7 +100,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
100
  - !ruby/object:Gem::Version
100
101
  version: '0'
101
102
  requirements: []
102
- rubygems_version: 3.6.2
103
+ rubygems_version: 3.5.22
104
+ signing_key:
103
105
  specification_version: 4
104
106
  summary: ''
105
107
  test_files: []
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- RhinoSubscriptions.setup do |config|
4
- # Products to show pricing for
5
- # config.products = ["prod_3893aadf", "prod_33aa44adf"]
6
-
7
- # https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-payment_method_collection
8
- # config.payment_method_collection = :if_required
9
- end