discourse_subscription_client 0.1.0.pre7 → 0.1.0.pre8

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: 0dbf2bec6a47be892f9c6d5adea08819c4fa26b604108e1ea6b2885b94993416
4
- data.tar.gz: 78bd74904236a78a94494481098f93a257dad5d9762f00866ece57b0a09258f9
3
+ metadata.gz: 9f0f41208625ee7dae4b1fac9ca417face2e5315022bcfee6a2cb833c95d6a71
4
+ data.tar.gz: 57e366e12e511c7b9645b8bcd8477086746271f8ed5de32bde240b9042f5aa28
5
5
  SHA512:
6
- metadata.gz: 8623d169bc5487f16bd3ffbd9e7f6f1b1573dbe3efc7d4353b6e59b5d465ed5fc65d0786b19be06cca045dce5bd52f8536cae266d7c9ae59949400ec87c397bd
7
- data.tar.gz: 6ccfa6917ddf19f82884a6c769b43670719c55a181a95ef5b690b8077f80c2ebed8225930aac0e450c788f22a7d53604f3dcb4ab2c676fcb7518537423c014ce
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,7 +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
+ Rails.autoloaders.main.ignore(config.root) if defined?(Rails) == "constant"
13
13
  end
14
14
 
15
15
  config.after_initialize do
@@ -37,9 +37,9 @@ module DiscourseSubscriptionClient
37
37
  ../../app/serializers/discourse_subscription_client/resource_serializer
38
38
  ../../app/serializers/discourse_subscription_client/notice_serializer
39
39
  ../../app/serializers/discourse_subscription_client/subscription_serializer
40
- ../../app/jobs/discourse_subscription_client_find_resources
41
- ../../app/jobs/discourse_subscription_client_update_subscriptions
42
- ../../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
43
43
  ../../extensions/discourse_subscription_client/current_user_serializer
44
44
  ../../extensions/discourse_subscription_client/site_serializer
45
45
  ../../extensions/discourse_subscription_client/guardian
@@ -47,7 +47,7 @@ module DiscourseSubscriptionClient
47
47
  require_relative path
48
48
  end
49
49
 
50
- 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?
51
51
 
52
52
  Rails.application.routes.append do
53
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.pre7"
4
+ VERSION = "0.1.0.pre8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_subscription_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre7
4
+ version: 0.1.0.pre8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod
@@ -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