kennel 1.104.0 → 1.105.0

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: f0d55e3357f578e2a819d4d40b011ece451794b5b29dbe507e3ac7e204a1d570
4
- data.tar.gz: 6f09bcb437b83437b98b85ecb9d9f5194819c9f935cb4e075a8d6275381917ad
3
+ metadata.gz: 15372f06919044f4751bb25a9aea5b965a16253145841c6b964ee8d109e14d26
4
+ data.tar.gz: 7f658ed4facabdf0100650a1298e83de855a35000b3ed4da8b12f23d7e108894
5
5
  SHA512:
6
- metadata.gz: 4f84de09f8c28c45102e1a0bc0f1761d8c382b736783c3d6fdd51a2bc3b249e6082eeb06d9f24db8940e452671e1f28ed3e92076a5a15a77a885df3f4eb770a7
7
- data.tar.gz: 326c8036e56c212d16634295b221348df499d648d2fbb5748be9e187e02f8cb6b0f8983353816de38fe0a97cedde3c909d0e19f6cdbcdbc903ae351992c87d35
6
+ metadata.gz: 6bf58efda2f995a5903c52f3e0ed58f756638c28009d3e172b34b456f3fc64c494f0bdbb789d147f368ab30ad004453c7a969c6eb644e610557a3874c0c56da7
7
+ data.tar.gz: d1e3d4eca303de897dee30c357f0e0a03ac0ff7fee9a1de8904c1749c43eb093aa309b0063e7146782d19928664ea0d6e497da7ed8dc92ca0d87da437db97ed2
data/Readme.md CHANGED
@@ -82,7 +82,7 @@ end
82
82
  - open [Datadog API Settings](https://app.datadoghq.com/account/settings#api)
83
83
  - create a `API Key` or get an existing one from an admin, then add it to `.env` as `DATADOG_API_KEY`
84
84
  - open [Datadog API Settings](https://app.datadoghq.com/access/application-keys) and create a new key, then add it to `.env` as `DATADOG_APP_KEY=`
85
- - change the `DATADOG_SUBDOMAIN=app` in `.env` to your companies subdomain if you have one
85
+ - if you have a custom subdomain, change the `DATADOG_SUBDOMAIN=app` in `.env`
86
86
  - verify it works by running `rake plan`, it might show some diff, but should not crash
87
87
  -->
88
88
 
@@ -149,6 +149,10 @@ end
149
149
  - make a PR ... get reviewed ... merge
150
150
  - datadog is updated by CI
151
151
 
152
+ ### Deleting
153
+
154
+ Remove the code that created the resource. The next update will delete it (see above for PR workflow).
155
+
152
156
  ### Adding a new dashboard
153
157
  - go to [datadog dashboard UI](https://app.datadoghq.com/dashboard/lists) and click on _New Dashboard_ to create a dashboard
154
158
  - see below
data/lib/kennel/api.rb CHANGED
@@ -8,7 +8,8 @@ module Kennel
8
8
  def initialize(app_key, api_key)
9
9
  @app_key = app_key
10
10
  @api_key = api_key
11
- @client = Faraday.new(url: "https://app.datadoghq.com") { |c| c.adapter :net_http_persistent }
11
+ url = Utils.path_to_url("", subdomain: "app")
12
+ @client = Faraday.new(url: url) { |c| c.adapter :net_http_persistent }
12
13
  end
13
14
 
14
15
  def show(api_resource, id, params = {})
@@ -138,7 +138,7 @@ module Kennel
138
138
 
139
139
  "\n#{pretty}\n "
140
140
  elsif [:message, :description].include?(k)
141
- "\n <<~TEXT\n#{v.each_line.map { |l| l.strip.empty? ? "\n" : " #{l}" }.join}\n \#{super()}\n TEXT\n "
141
+ "\n <<~TEXT\n#{v.to_s.each_line.map { |l| l.strip.empty? ? "\n" : " #{l}" }.join}\n \#{super()}\n TEXT\n "
142
142
  elsif k == :tags
143
143
  " super() + #{v.inspect} "
144
144
  else
@@ -40,7 +40,7 @@ module Kennel
40
40
  private
41
41
 
42
42
  def validate_setting_exist(name)
43
- return if !@settings || @settings.include?(name)
43
+ return if @settings.include?(name)
44
44
  supported = @settings.map(&:inspect)
45
45
  raise ArgumentError, "Unsupported setting #{name.inspect}, supported settings are #{supported.join(", ")}"
46
46
  end
data/lib/kennel/utils.rb CHANGED
@@ -96,12 +96,9 @@ module Kennel
96
96
  result
97
97
  end
98
98
 
99
- def path_to_url(path)
100
- if subdomain = ENV["DATADOG_SUBDOMAIN"]
101
- "https://#{subdomain}.datadoghq.com#{path}"
102
- else
103
- path
104
- end
99
+ def path_to_url(path, subdomain: nil)
100
+ subdomain ||= (ENV["DATADOG_SUBDOMAIN"] || "app")
101
+ "https://#{subdomain}.datadoghq.com#{path}"
105
102
  end
106
103
 
107
104
  def parallel(items, max: 10)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Kennel
3
- VERSION = "1.104.0"
3
+ VERSION = "1.105.0"
4
4
  end
data/template/Readme.md CHANGED
@@ -131,6 +131,10 @@ end
131
131
  - make a PR ... get reviewed ... merge
132
132
  - datadog is updated by CI
133
133
 
134
+ ### Deleting
135
+
136
+ Remove the code that created the resource. The next update will delete it (see above for PR workflow).
137
+
134
138
  ### Adding a new dashboard
135
139
  - go to [datadog dashboard UI](https://app.datadoghq.com/dashboard/lists) and click on _New Dashboard_ to create a dashboard
136
140
  - see below
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.104.0
4
+ version: 1.105.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday