datadog_backup 1.0.0.alpha.2 → 1.0.0

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: 04e0cf7686b2efa66728d2bb5d3fd021847368a6522b3b3ba3cc9012a118e32f
4
- data.tar.gz: 22643d6160be735c52f6bc25c134f250adae2ce9b6751c62ee04265d2082b9d3
3
+ metadata.gz: 1ff7695b471968ff7c34559829656149d0e77b139d484ff8e677424d90b4303d
4
+ data.tar.gz: d1bd644801cc09c4e8c442c2765e6b3da675f2de80b3acccd1e55e4ab5dbd8b4
5
5
  SHA512:
6
- metadata.gz: 2293472fd1e18a59755e9e44ed1a39a17eb071e36de772c8ae146070138574f0726b016e9d0049cb8c8b8d625ce440a227ad5cf18a07a82ab77601580b96d01a
7
- data.tar.gz: 583ff00c4a38005736f1bca85d80fc82eb6fbf8deb107044423ea2e7c3f87e05d82834f0051bf5fb7e5c2e476ea8c810292f93c392a3a1fe4e08a2be4327849e
6
+ metadata.gz: 8ee25ab151f20f67983335fefe4011a44a43aaf3819b9ef3264345b20aa05f0e2d212d0004bb2a9a8a170ae90a9cd6c1c3a5ef7cc7b573da269bcb01639c0fcc
7
+ data.tar.gz: f70bf349b96a98da7a48eff26ddb5841f0c41c82b08df298ab8ed3a2f2a17301a23b29ef43c60168771a016b290f7c0e1ca1186b149db9cd1c23304a635dd3a3
@@ -12,7 +12,7 @@ jobs:
12
12
  steps:
13
13
  - uses: actions/checkout@v2
14
14
  - name: Set up Ruby 2.7.2
15
- uses: actions/setup-ruby@v1.1.2
15
+ uses: actions/setup-ruby@v1.1.3
16
16
  with:
17
17
  ruby-version: 2.7.2
18
18
  - name: Test with Rspec
@@ -28,7 +28,7 @@ jobs:
28
28
  steps:
29
29
  - uses: actions/checkout@v2
30
30
  - name: Set up Ruby 2.7.2
31
- uses: actions/setup-ruby@v1.1.2
31
+ uses: actions/setup-ruby@v1.1.3
32
32
  with:
33
33
  ruby-version: 2.7.2
34
34
  - name: Build with bundler
data/CHANGELOG.md CHANGED
@@ -1,22 +1,14 @@
1
- # [1.0.0-alpha.2](https://github.com/scribd/datadog_backup/compare/v1.0.0-alpha.1...v1.0.0-alpha.2) (2021-01-19)
1
+ # [1.0.0](https://github.com/scribd/datadog_backup/compare/v0.11.0...v1.0.0) (2021-03-02)
2
2
 
3
3
 
4
- ### Features
5
-
6
- * If resource doesn't exist in Datadog, the resource is recreated. ([f2f9e1f](https://github.com/scribd/datadog_backup/commit/f2f9e1f7b244eb3eeaaf121025769f9f327f4e1e))
7
-
8
-
9
- ### BREAKING CHANGES
10
-
11
- * `datadog-backup` used to exit with an error if a resource
12
- wasn't found in Datadog.
4
+ ### Bug Fixes
13
5
 
14
- # [1.0.0-alpha.1](https://github.com/scribd/datadog_backup/compare/v0.11.0...v1.0.0-alpha.1) (2021-01-17)
6
+ * handle gets with no result ([8d016a1](https://github.com/scribd/datadog_backup/commit/8d016a1858b44d374a0dff121c71340bf18062e0))
15
7
 
16
8
 
17
9
  ### Features
18
10
 
19
- * If resource doesn't exist in Datadog, the resource is recreated. ([95d9699](https://github.com/scribd/datadog_backup/commit/95d9699e3fe6a6ecae0d6690dce225680f1d6a8a))
11
+ * If resource doesn't exist in Datadog, the resource is recreated. ([18ba241](https://github.com/scribd/datadog_backup/commit/18ba24183e136f9d899351bbb0999aba2c22308f))
20
12
 
21
13
 
22
14
  ### BREAKING CHANGES
@@ -47,6 +47,9 @@ module DatadogBackup
47
47
  with_200 do
48
48
  api_service.request(Net::HTTP::Get, "/api/#{api_version}/#{api_resource_name}/#{id}", nil, nil, false)
49
49
  end
50
+ rescue RuntimeError => e
51
+ return {} if e.message.include?('Request failed with error ["404"')
52
+ raise e.message
50
53
  end
51
54
 
52
55
  def get_all
@@ -27,7 +27,8 @@ module DatadogBackup
27
27
  end
28
28
 
29
29
  def get_by_id(id)
30
- except(all_monitors.select { |monitor| monitor['id'].to_s == id.to_s }.first)
30
+ monitor = all_monitors.select { |monitor| monitor['id'].to_s == id.to_s }.first
31
+ monitor.nil? ? {} : except(monitor)
31
32
  end
32
33
 
33
34
  def initialize(options)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatadogBackup
4
- VERSION = '1.0.0.alpha.2'
4
+ VERSION = '1.0.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datadog_backup
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamran Farhadi
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-01-19 00:00:00.000000000 Z
12
+ date: 2021-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: amazing_print
@@ -184,9 +184,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  requirements:
187
- - - ">"
187
+ - - ">="
188
188
  - !ruby/object:Gem::Version
189
- version: 1.3.1
189
+ version: '0'
190
190
  requirements: []
191
191
  rubygems_version: 3.1.4
192
192
  signing_key: