web47core 0.1.6 → 0.1.7

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: 6f885e38a17c5e8b301ef5c69e63463a683e9d11677403c1f6da47d64954127e
4
- data.tar.gz: 4cf3efb4ef1fa54c04452f04e075c4058a8f8dfe6c8ebedb6facfc1ddb268439
3
+ metadata.gz: 5cdb95aaba2ed98e4468110e887bcc5e13abcf6598325fbf005ed781b1ba5dee
4
+ data.tar.gz: 3eb8e09233e74f82e4d160f45552450e1a5463e9cd928a890ad57126d277f06c
5
5
  SHA512:
6
- metadata.gz: 9b33f919844b507f9b2378c396938539e8ca622a3066573c874d52d81a81dffbf406b9853099cf519dc50550382d864ad11e011b779b34dc08b9b4a1f222941f
7
- data.tar.gz: 7daa4ab8d25a20a00976c14562b9e8052d95da5440818f7928955eb00aeffafc018fc8a74b8cdcf6e01cec4fcbbb6dc72bb3bb2f9015d59d78615d4ac5ef9a21
6
+ metadata.gz: 7da97a1120b33d4f0d6b258923528f6582d13d6db7a0942e0eadc8d8de9b9533eac62df910fb84ae19d002a09a8635a33c7d8087c0effc9b0ee0407491bf46df
7
+ data.tar.gz: 20c869db09380345b77c02f29dbd609df65d3219e50a1544a04c10decb20b107491a972b420108e7205015fc34dc0c0477b9b52958dceed927e2770225aaaef9
@@ -12,14 +12,14 @@ module Cron
12
12
  # Only run in environments where switchboard is configured
13
13
  #
14
14
  def self.valid_environment?
15
- SystemConfiguration.switchboard_configured? && Web47core.config.switchboard_able_models.present?
15
+ SystemConfiguration.switchboard_configured? && Web47core::Config.switchboard_able_models.present?
16
16
  end
17
17
 
18
18
  #
19
19
  # Cycle through the collection and perform an upsert on it
20
20
  #
21
21
  def perform
22
- Web47core.config.switchboard_able_models.each { |model| model.each(&:switchboard_upsert) }
22
+ Web47core::Config.switchboard_able_models.each { |model| model.each(&:switchboard_upsert) }
23
23
  end
24
24
  end
25
25
  end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ #
4
+ # Configuration for the Web47Core platform
5
+ #
6
+ module Web47core
7
+ class Config
8
+ include Singleton
9
+ attr_accessor :email_able_models, :switchboard_able_models
10
+
11
+ def initialize
12
+ @email_able_models = []
13
+ @switchboard_able_models = []
14
+ end
15
+
16
+ #
17
+ # Provide access to the instance accessors through static methods
18
+ #
19
+ def self.method_missing(method, *args, &block)
20
+ if instance.respond_to?(method)
21
+ instance.send(method, *args)
22
+ else
23
+ super
24
+ end
25
+ end
26
+
27
+ def self.respond_to?(method_name, _include_private = false)
28
+ instance.respond_to?(method_name) || super
29
+ end
30
+
31
+ def self.respond_to_missing?(method_name, _include_private = false)
32
+ instance.respond_to?(method_name) || super
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Web47core
4
+ VERSION = '0.1.7'.freeze
5
+ end
data/lib/web47core.rb CHANGED
@@ -1,3 +1,5 @@
1
+ VERSION = '0.1.6'
2
+
1
3
  require 'app/models/concerns/app47_logger'
2
4
  require 'app/models/concerns/cdn_url'
3
5
  require 'app/models/concerns/email_able'
@@ -37,16 +39,4 @@ require 'app/jobs/cron/trim_failed_delayed_jobs'
37
39
  #
38
40
  require 'web47core/engine'
39
41
 
40
- class Web47core
41
- include Singleton
42
- attr_accessor :email_able_models, :switchboard_able_models
43
-
44
- def initialize
45
- @email_able_models = []
46
- @switchboard_able_models = []
47
- end
48
42
 
49
- def self.config
50
- instance
51
- end
52
- end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web47core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schroeder
@@ -552,7 +552,9 @@ files:
552
552
  - lib/templates/slack/error_message.liquid
553
553
  - lib/templates/slack/failed_delayed_job.liquid
554
554
  - lib/web47core.rb
555
+ - lib/web47core/config.rb
555
556
  - lib/web47core/engine.rb
557
+ - lib/web47core/version.rb
556
558
  homepage: https://app47.com
557
559
  licenses:
558
560
  - MIT