discourse_subscription_client 0.1.0.pre6 → 0.1.0.pre8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3449957ada14519fd11be48009e904a8fbfc06d6f12f2ede952a1b7e426c2b53
4
- data.tar.gz: 3befbc23e94b37dfcf7f9f7ecef9aa07d7bba851d2c9a0395a990af7adbcc501
3
+ metadata.gz: 9f0f41208625ee7dae4b1fac9ca417face2e5315022bcfee6a2cb833c95d6a71
4
+ data.tar.gz: 57e366e12e511c7b9645b8bcd8477086746271f8ed5de32bde240b9042f5aa28
5
5
  SHA512:
6
- metadata.gz: 057bd00307d2c7f8a9d5aec6e71871efee9fa5ffe52bddee16ca4a3c2373cf21f7d9dfa18ea16be62435184c5112c4f4b2d9366f740189a8bddb293fbdfa404e
7
- data.tar.gz: 9d2a38b104215c347bc51caa6725c0f1c5123de9cd9d0c916c825814cda2b9c3586c52332f1485c37858a073c0aad5258f6ab86055910b104a55ce2d47c215c5
6
+ metadata.gz: 332fbf8b9062de3f2b3a2363ea8986b8f95cd4365920822f55c8820dba8c3ff12aa66b384ff340cd2f80697469a3fbfc3bd9ff604d9ba5d7f1ed7bb0e3eb41ae
7
+ data.tar.gz: 8fde036341f92aa573c9a646963afe5ee1c7f3f520a3692fd4ad5c80e9d840829e831debfd9ca42806284f5386e440e31c759bd823133aae318fc55ec414fa59
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DiscourseSubscriptionClient
4
+ class FindResources < ::Jobs::Base
5
+ def execute(_args = {})
6
+ Resources.find_all unless Rails.env.test?
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DiscourseSubscriptionClient
4
+ class UpdateNotices < ::Jobs::Scheduled
5
+ every 5.minutes
6
+
7
+ def execute(_args = {})
8
+ Notices.update
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DiscourseSubscriptionClient
4
+ class UpdateSubscriptions < ::Jobs::Scheduled
5
+ every 1.day
6
+
7
+ def execute(_args = {})
8
+ Subscriptions.update
9
+ end
10
+ end
11
+ end
@@ -9,6 +9,7 @@ module DiscourseSubscriptionClient
9
9
 
10
10
  config.before_initialize do
11
11
  config.i18n.load_path += Dir["#{config.root}/config/locales/**/*.yml"]
12
+ Rails.autoloaders.main.ignore(config.root) if defined?(Rails) == "constant"
12
13
  end
13
14
 
14
15
  config.after_initialize do
@@ -36,9 +37,9 @@ module DiscourseSubscriptionClient
36
37
  ../../app/serializers/discourse_subscription_client/resource_serializer
37
38
  ../../app/serializers/discourse_subscription_client/notice_serializer
38
39
  ../../app/serializers/discourse_subscription_client/subscription_serializer
39
- ../../app/jobs/discourse_subscription_client_find_resources
40
- ../../app/jobs/discourse_subscription_client_update_subscriptions
41
- ../../app/jobs/discourse_subscription_client_update_notices
40
+ ../../app/jobs/discourse_subscription_client/find_resources
41
+ ../../app/jobs/discourse_subscription_client/update_subscriptions
42
+ ../../app/jobs/discourse_subscription_client/update_notices
42
43
  ../../extensions/discourse_subscription_client/current_user_serializer
43
44
  ../../extensions/discourse_subscription_client/site_serializer
44
45
  ../../extensions/discourse_subscription_client/guardian
@@ -46,7 +47,7 @@ module DiscourseSubscriptionClient
46
47
  require_relative path
47
48
  end
48
49
 
49
- Jobs.enqueue(:discourse_subscription_client_find_resources) if !Rails.env.test? && DiscourseSubscriptionClient.database_exists?
50
+ Jobs.enqueue(DiscourseSubscriptionClient::FindResources) if !Rails.env.test? && DiscourseSubscriptionClient.database_exists?
50
51
 
51
52
  Rails.application.routes.append do
52
53
  mount DiscourseSubscriptionClient::Engine, at: "/admin/plugins/subscription-client"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DiscourseSubscriptionClient
4
- VERSION = "0.1.0.pre6"
4
+ VERSION = "0.1.0.pre8"
5
5
  end
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.pre6
4
+ version: 0.1.0.pre8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers
@@ -236,9 +236,9 @@ files:
236
236
  - app/controllers/discourse_subscription_client/notices_controller.rb
237
237
  - app/controllers/discourse_subscription_client/subscriptions_controller.rb
238
238
  - app/controllers/discourse_subscription_client/suppliers_controller.rb
239
- - app/jobs/discourse_subscription_client_find_resources.rb
240
- - app/jobs/discourse_subscription_client_update_notices.rb
241
- - app/jobs/discourse_subscription_client_update_subscriptions.rb
239
+ - app/jobs/discourse_subscription_client/find_resources.rb
240
+ - app/jobs/discourse_subscription_client/update_notices.rb
241
+ - app/jobs/discourse_subscription_client/update_subscriptions.rb
242
242
  - app/models/subscription_client_notice.rb
243
243
  - app/models/subscription_client_request.rb
244
244
  - app/models/subscription_client_resource.rb
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Jobs
4
- class DiscourseSubscriptionClientFindResources < ::Jobs::Base
5
- def execute(_args = {})
6
- ::DiscourseSubscriptionClient::Resources.find_all unless Rails.env.test?
7
- end
8
- end
9
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Jobs
4
- class DiscourseSubscriptionClientUpdateNotices < ::Jobs::Scheduled
5
- every 5.minutes
6
-
7
- def execute(_args = {})
8
- ::DiscourseSubscriptionClient::Notices.update
9
- end
10
- end
11
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Jobs
4
- class DiscourseSubscriptionClientUpdateSubscriptions < ::Jobs::Scheduled
5
- every 1.day
6
-
7
- def execute(_args = {})
8
- ::DiscourseSubscriptionClient::Subscriptions.update
9
- end
10
- end
11
- end