discourse_subscription_client 0.1.0.pre14 → 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.
- checksums.yaml +4 -4
- data/app/controllers/discourse_subscription_client/suppliers_controller.rb +7 -1
- data/app/models/subscription_client_notice.rb +0 -5
- data/app/models/subscription_client_request.rb +14 -0
- data/app/models/subscription_client_resource.rb +0 -9
- data/app/models/subscription_client_subscription.rb +0 -9
- data/app/models/subscription_client_supplier.rb +1 -5
- data/lib/discourse_subscription_client/engine.rb +1 -1
- data/lib/discourse_subscription_client/version.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3750d66a3de88f59b270847293b0ded796268e3b3cd9953ed2dfee929b0799dd
|
4
|
+
data.tar.gz: a40360ba776ce0478877662ca1f001ed0bf156dff8c23d7e5b2f1ce4aa263299
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d7e939a6f795d8363025defeea70551d59ffbd86754ba56691ec0fa85a01ae9d35b2cc9fb667b77f689663c7d43998fb443773c32c67ad8b2ea37a6622417cc
|
7
|
+
data.tar.gz: 4c2cdc67e91ce4b727afc46c30ac8232c0a3da85f7db8bce14d650f4246bdfe19f5bc0d3bbd1f09f6a42b5416bd5b7ece3613be4a71a9e88966f2365a53c9eea
|
@@ -11,6 +11,8 @@ module DiscourseSubscriptionClient
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def authorize
|
14
|
+
session[:final_landing_path] = params[:final_landing_path]
|
15
|
+
|
14
16
|
request_id = DiscourseSubscriptionClient::Authorization.request_id(@supplier.id)
|
15
17
|
cookies[:user_api_request_id] = request_id
|
16
18
|
redirect_to DiscourseSubscriptionClient::Authorization.url(current_user, @supplier, request_id).to_s,
|
@@ -36,7 +38,11 @@ module DiscourseSubscriptionClient
|
|
36
38
|
|
37
39
|
DiscourseSubscriptionClient::Subscriptions.update
|
38
40
|
|
39
|
-
|
41
|
+
if !session[:final_landing_path].blank?
|
42
|
+
redirect_to session[:final_landing_path]
|
43
|
+
else
|
44
|
+
redirect_to "/admin/plugins"
|
45
|
+
end
|
40
46
|
end
|
41
47
|
|
42
48
|
def destroy
|
@@ -215,8 +215,3 @@ end
|
|
215
215
|
# created_at :datetime not null
|
216
216
|
# updated_at :datetime not null
|
217
217
|
#
|
218
|
-
# Indexes
|
219
|
-
#
|
220
|
-
# index_subscription_client_notices_on_notice_subject (notice_subject_type,notice_subject_id)
|
221
|
-
# sc_unique_notices (notice_type,notice_subject_type,notice_subject_id,changed_at) UNIQUE
|
222
|
-
#
|
@@ -1,4 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# == Schema Information
|
4
|
+
#
|
5
|
+
# Table name: subscription_client_requests
|
6
|
+
#
|
7
|
+
# id :bigint not null, primary key
|
8
|
+
# request_id :bigint
|
9
|
+
# request_type :string
|
10
|
+
# expired_at :datetime
|
11
|
+
# message :string
|
12
|
+
# count :integer
|
13
|
+
# response :json
|
14
|
+
# created_at :datetime not null
|
15
|
+
# updated_at :datetime not null
|
16
|
+
#
|
3
17
|
class SubscriptionClientRequest < ActiveRecord::Base
|
4
18
|
end
|
@@ -16,12 +16,3 @@ end
|
|
16
16
|
# created_at :datetime not null
|
17
17
|
# updated_at :datetime not null
|
18
18
|
#
|
19
|
-
# Indexes
|
20
|
-
#
|
21
|
-
# index_subscription_client_resources_on_supplier_id (supplier_id)
|
22
|
-
# index_subscription_client_resources_on_supplier_id_and_name (supplier_id,name) UNIQUE
|
23
|
-
#
|
24
|
-
# Foreign Keys
|
25
|
-
#
|
26
|
-
# fk_rails_... (supplier_id => subscription_client_suppliers.id)
|
27
|
-
#
|
@@ -48,12 +48,3 @@ end
|
|
48
48
|
# created_at :datetime not null
|
49
49
|
# updated_at :datetime not null
|
50
50
|
#
|
51
|
-
# Indexes
|
52
|
-
#
|
53
|
-
# index_subscription_client_subscriptions_on_resource_id (resource_id)
|
54
|
-
# sc_unique_subscriptions (resource_id,product_id,price_id) UNIQUE
|
55
|
-
#
|
56
|
-
# Foreign Keys
|
57
|
-
#
|
58
|
-
# fk_rails_... (resource_id => subscription_client_resources.id)
|
59
|
-
#
|
@@ -50,9 +50,5 @@ end
|
|
50
50
|
# authorized_at :datetime
|
51
51
|
# created_at :datetime not null
|
52
52
|
# updated_at :datetime not null
|
53
|
-
#
|
54
|
-
# Indexes
|
55
|
-
#
|
56
|
-
# index_subscription_client_suppliers_on_url (url) UNIQUE
|
57
|
-
# index_subscription_client_suppliers_on_user_id (user_id)
|
53
|
+
# products :json
|
58
54
|
#
|
@@ -24,7 +24,7 @@ module DiscourseSubscriptionClient
|
|
24
24
|
config.after_initialize do
|
25
25
|
gem_root = File.expand_path("../..", __dir__)
|
26
26
|
|
27
|
-
ActiveRecord::Tasks::DatabaseTasks.migrations_paths << "#{gem_root}/db/migrate"
|
27
|
+
ActiveRecord::Tasks::DatabaseTasks.migrations_paths << "#{gem_root}/db/migrate"
|
28
28
|
|
29
29
|
%w[
|
30
30
|
./request
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: discourse_subscription_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angus McLeod
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_model_serializers
|
@@ -126,14 +126,14 @@ dependencies:
|
|
126
126
|
name: rails
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 7.0.4.1
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 7.0.4.1
|
139
139
|
- !ruby/object:Gem::Dependency
|
@@ -278,7 +278,7 @@ metadata:
|
|
278
278
|
homepage_uri: https://github.com/paviliondev/discourse_subscription_client
|
279
279
|
source_code_uri: https://github.com/paviliondev/discourse_subscription_client
|
280
280
|
changelog_uri: https://github.com/paviliondev/discourse_subscription_client
|
281
|
-
post_install_message:
|
281
|
+
post_install_message:
|
282
282
|
rdoc_options: []
|
283
283
|
require_paths:
|
284
284
|
- lib
|
@@ -289,12 +289,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
289
289
|
version: 2.6.0
|
290
290
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
291
291
|
requirements:
|
292
|
-
- - "
|
292
|
+
- - ">="
|
293
293
|
- !ruby/object:Gem::Version
|
294
|
-
version:
|
294
|
+
version: '0'
|
295
295
|
requirements: []
|
296
|
-
rubygems_version: 3.
|
297
|
-
signing_key:
|
296
|
+
rubygems_version: 3.3.26
|
297
|
+
signing_key:
|
298
298
|
specification_version: 4
|
299
299
|
summary: Discourse plugin subscription client.
|
300
300
|
test_files: []
|