polyn-cli 0.1.4 → 0.1.6

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: a516676ead604b6dcfc242c75addef95ad9512f4c7a9b009369cb46d581f946e
4
- data.tar.gz: 9ebdfaec0ba3df014121d75d9903ee234dad27ba4444d45178cdf66fd132336d
3
+ metadata.gz: 760188610f6199c79fadad0e1197fc2b16f414000050045f61472a588162fb9a
4
+ data.tar.gz: e1870939e9963da2cb4bf42f8b9d0224635147486f99bb5df24fca46ce8e1a6a
5
5
  SHA512:
6
- metadata.gz: 545df32cdd3d928022e23798cbb08ee88521fc54248a1fd1911e80b88ff71d97987f092b2d73429942ec2fa66e818a8c0d88d11de30d7f5f77bd73ff3078e496
7
- data.tar.gz: 58f0c9aaa9348efdf8c4310c1c1e7376cfb57d43e2f662015cbc224d14df0306ffc6da439f0618a079d08f57aeb3b08391b61cfa622ea5d1f8843fbd07989623
6
+ metadata.gz: 86872aabe890ff8aa5877736f1f2f36ce0dbdd53f921a7556ee7cc929354c14e8e8ce28a1a62c42dafff017cfb73b0d654788979420c7533ed8e9cc1f2954fbb
7
+ data.tar.gz: 83860b0f6ae95a25a73b1f8993dfc5b413962a92f1f8f7c65b489ed64fdc3f016a6d3a03d5ca4007d62d23cd7ac2397cf2ba56ee0f3064647cf023562231d4bc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- polyn-cli (0.1.4)
4
+ polyn-cli (0.1.6)
5
5
  dotenv (~> 2.7.6)
6
6
  json_schemer (~> 0.2)
7
7
  nats-pure (~> 2.0.0)
data/README.md CHANGED
@@ -34,6 +34,7 @@ Run `polyn up` to update your NATS server with the latest configuration in your
34
34
 
35
35
  * `NATS_SERVERS` - locations of your servers (defaults to localhost)
36
36
  * `NATS_CREDENTIALS` - path to nats credentials file
37
+ * `NATS_CA_FILE` - Fully Qualified Path to a file containing Root CA (PEM format). Use when the server has certs signed by an unknown authority.
37
38
  * `POLYN_ENV` - type of environment (defaults to "development")
38
39
 
39
40
  ## Development
@@ -11,6 +11,7 @@ module Polyn
11
11
  @polyn_env = ENV["POLYN_ENV"] || "development"
12
12
  @nats_servers = ENV["NATS_SERVERS"] || "localhost:4222"
13
13
  @nats_credentials = ENV["NATS_CREDENTIALS"] || ""
14
+ @nats_ca_file = ENV["NATS_CA_FILE"] || ""
14
15
  end
15
16
  end
16
17
  end
@@ -113,7 +113,7 @@ module Polyn
113
113
 
114
114
  loop do
115
115
  msg = sub.next_msg
116
- existing_events[msg.subject.gsub("#{key_prefix}.", "")] = msg.data
116
+ existing_events[msg.subject.gsub("#{key_prefix}.", "")] = msg.data unless msg.data.empty?
117
117
  # A timeout is the only mechanism given to indicate there are no
118
118
  # more messages
119
119
  rescue NATS::IO::Timeout
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Polyn
4
4
  class Cli
5
- VERSION = "0.1.4"
5
+ VERSION = "0.1.6"
6
6
  end
7
7
  end
data/lib/polyn/cli.rb CHANGED
@@ -128,6 +128,10 @@ module Polyn
128
128
  Polyn::Cli.configuration.nats_credentials
129
129
  end
130
130
 
131
+ def nats_ca_file
132
+ Polyn::Cli.configuration.nats_ca_file
133
+ end
134
+
131
135
  def tf_apply
132
136
  if polyn_env == "development"
133
137
  %(terraform apply -auto-approve -input=false -var "jetstream_servers=#{nats_servers}")
@@ -135,6 +139,7 @@ module Polyn
135
139
  "terraform apply -auto-approve -input=false "\
136
140
  "-var \"jetstream_servers=#{nats_servers}\" "\
137
141
  "-var \"nats_credentials=#{nats_credentials}\" " \
142
+ "-var \"nats_ca_file=#{nats_ca_file}\" " \
138
143
  "-var \"polyn_env=production\""
139
144
  end
140
145
  end
@@ -1,4 +1,7 @@
1
1
  provider "jetstream" {
2
2
  servers = var.jetstream_servers
3
3
  credentials = var.nats_credentials
4
+ tls {
5
+ ca_file = var.nats_ca_file
6
+ }
4
7
  }
@@ -8,6 +8,12 @@ variable "nats_credentials" {
8
8
  description = "Path to file with NATS credentials"
9
9
  }
10
10
 
11
+ variable "nats_ca_file" {
12
+ type = string
13
+ description = "Fully Qualified Path to a file containing Root CA (PEM format). Use when the server has certs signed by an unknown authority."
14
+ default = ""
15
+ }
16
+
11
17
  variable "polyn_env" {
12
18
  type = string
13
19
  description = "The environment terraform is running in"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polyn-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarod
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-08-26 00:00:00.000000000 Z
12
+ date: 2022-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dotenv