waylon-core 0.1.8 → 0.1.9

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: 4d396f88fe34083537cabbe245d1063ecd1b8c0d15e5391c80eb0a9f4902aa39
4
- data.tar.gz: bc7d2a6b5da80e36508032d3bcfaa59f91395d016e0fb69e65a24c56366f26e3
3
+ metadata.gz: 628f00817729895a327ec3adff832ba15fdb071da3762a061eb637b0492b2953
4
+ data.tar.gz: 17276d8b5acbdaf2b5c90766329d53ec8fe42d0afae64f7aa062ad0a4cb1a381
5
5
  SHA512:
6
- metadata.gz: 229980e2a8c719c57baa00a26d137a10c6677fe1081adfc3aa73f4bfd13c83ee74c1f8b10933ba43688a9d40fa8e0c71c264cbbe7dec40ec202192ade05e4b1c
7
- data.tar.gz: 82814e648a191b886619f8e15bf6b934b8c1cbc6112d77f39a1bbcf96f0b5def15267260609a45b46c3c8252a98d569e454c07f754c4baa39b1ee0aba8923c92
6
+ metadata.gz: 6724d7e8ee142b43534ca17fd53d729272d83ab0f6e5f3ef0cf1b07ac63a552bc8393a167b1d6f324cf809fd27bb88f6379375929f130481a16b1ef69f24068e
7
+ data.tar.gz: 800fa36240abe3b85afc58951efa01c519fa6802d74d9fe92a67eb5719e3d25dfc2348f6d38dc347be7ccf9d6c7c1a6e4f4ca92d3117c04775a67ed151295a3e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- waylon-core (0.1.8)
4
+ waylon-core (0.1.9)
5
5
  addressable (~> 2.8)
6
6
  faraday (~> 1.8)
7
7
  i18n (~> 1.8)
@@ -50,7 +50,7 @@ GEM
50
50
  moneta (1.5.1)
51
51
  mono_logger (1.1.1)
52
52
  multi_json (1.15.0)
53
- multipart-post (2.2.0)
53
+ multipart-post (2.2.3)
54
54
  mustermann (1.1.1)
55
55
  ruby2_keywords (~> 0.0.1)
56
56
  nio4r (2.5.8)
data/lib/waylon/config.rb CHANGED
@@ -32,11 +32,10 @@ module Waylon
32
32
 
33
33
  # Load in the config from env variables
34
34
  # @return [Boolean] Was the configuration loaded?
35
- def load_env # rubocop:disable Metrics/AbcSize
35
+ def load_env
36
36
  @schema ||= {}
37
37
  self["global.log.level"] = ENV.fetch("LOG_LEVEL", "info")
38
- self["global.redis.host"] = ENV.fetch("REDIS_HOST", "redis")
39
- self["global.redis.port"] = ENV.fetch("REDIS_PORT", "6379")
38
+ self["global.redis"] = ENV.fetch("REDIS", "localhost:6379")
40
39
  self["global.admins"] = ENV.fetch("GLOBAL_ADMINS", "")
41
40
  ENV.keys.grep(/CONF_/).each do |env_key|
42
41
  conf_key = env_key.downcase.split("_")[1..].join(".")
@@ -49,13 +48,13 @@ module Waylon
49
48
  # Provides the redis host used for most of Waylon's brain
50
49
  # @return [String] The redis host
51
50
  def redis_host
52
- self["global.redis.host"]
51
+ self["global.redis"].split(":").first
53
52
  end
54
53
 
55
54
  # Provides the redis port used for most of Waylon's brain
56
55
  # @return [String] The redis host
57
56
  def redis_port
58
- self["global.redis.port"]
57
+ self["global.redis"].split(":").last
59
58
  end
60
59
 
61
60
  # Clear the configuration
@@ -1,11 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ Waylon::Cache = Moneta.new(
4
+ :Redis,
5
+ url: "redis://#{ENV.fetch("REDIS", "localhost:6379")}/1"
6
+ )
7
+
3
8
  module Waylon
4
9
  # Used for working with the Moneta store
5
10
  module Storage
6
11
  Store = Moneta.new(
7
12
  :Redis,
8
- url: "redis://#{ENV.fetch("REDIS", "localhost:6379")}/1"
13
+ url: "redis://#{ENV.fetch("REDIS", "localhost:6379")}/2"
9
14
  )
10
15
 
11
16
  def self.cipher
@@ -6,7 +6,7 @@ module Waylon
6
6
  VERSION = [
7
7
  0, # Major
8
8
  1, # Minor
9
- 8 # Patch
9
+ 9 # Patch
10
10
  ].join(".")
11
11
  end
12
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waylon-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Gnagy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-17 00:00:00.000000000 Z
11
+ date: 2022-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable