datadog_backup 1.0.5 → 1.1.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: 618459125bc84a9d8c48eb2ffb3256163378d26af4d80e92f2c1033110ae9467
4
- data.tar.gz: 619212b26a22764af2050375426f19edba44563b867ded709d33a00384468fd9
3
+ metadata.gz: 8ca039ced5dce0c26aa2dd6533d4a33d1e3b9819d2f086c656cdfa29b7591df0
4
+ data.tar.gz: 9123edb391f2f6538ef1f4c87f6acbb2c651694e83044d17cea6155075abccce
5
5
  SHA512:
6
- metadata.gz: e029e80229c35796bcd28432af89a7c39172b646c4e880dff8df9e1b5ccfb299706ee9b466fe1c5500126fbd03097dd3da4ef0da91d7ee77e256c8c2657c1a2c
7
- data.tar.gz: 635beff60e9a93d5946c8e88f4a9ac8e11b56f08d0b03f045814ec0f799714eebc7f2b0d1fa665807151524469aebe024e7954cffd6a8b57a898d9da97f6d74c
6
+ metadata.gz: e6d094cea9a1058ea91a5fcb686dbb3cc7207eb441933973a33697fb1d7abce76d6773e1732c67a24ccbb2253e7e0757324d5f4d7d349bb347e5dee6fe72073f
7
+ data.tar.gz: 38f3d9d7d71abe27bad552f97cc005c55c6894f1800b02cf9a5a8115f2722ddb17bfd0c0900f8da07f3886a4decca6816b830e440ac4148a33749806a9ab6aea
@@ -12,7 +12,7 @@ jobs:
12
12
  matrix:
13
13
  os: [ubuntu-latest, macos-latest]
14
14
  # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
15
- ruby: [2.6, 2.7]
15
+ ruby: [2.5, 2.6, 2.7, '3.0']
16
16
  runs-on: ${{ matrix.os }}
17
17
  steps:
18
18
  - uses: actions/checkout@v2.3.4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.1.0](https://github.com/scribd/datadog_backup/compare/v1.0.5...v1.1.0) (2021-07-14)
2
+
3
+
4
+ ### Features
5
+
6
+ * Add support for ruby 2.5 and 3.0 ([#89](https://github.com/scribd/datadog_backup/issues/89)) ([a181dbc](https://github.com/scribd/datadog_backup/commit/a181dbcfd55220e2fd7ce92d384738f71c50baa8))
7
+
1
8
  ## [1.0.5](https://github.com/scribd/datadog_backup/compare/v1.0.4...v1.0.5) (2021-07-12)
2
9
 
3
10
 
data/README.md CHANGED
@@ -16,12 +16,6 @@ Additional features may be built out over time.
16
16
  ```
17
17
  gem install datadog_backup
18
18
  ```
19
- or
20
-
21
- ```
22
- gem build datadog_backup.gemspec
23
- gem install datadog_backup-*.gem
24
- ```
25
19
 
26
20
  ## Usage
27
21
 
@@ -36,29 +30,46 @@ gem install datadog_backup
36
30
  export DATADOG_API_KEY=abc123
37
31
  export DATADOG_APP_KEY=abc123
38
32
 
39
- # Perform backup to optional/path/to/backupdir using YAML encoding
40
- datadog_backup backup --backup-dir optional/path/to/backupdir
33
+ # Perform backup to `./backup/` using YAML encoding
34
+ datadog_backup backup
41
35
 
42
36
  # Make some changes
43
37
 
44
38
  # Just review the changes since last backup
45
- datadog_backup diffs --backup-dir optional/path/to/backupdir
39
+ datadog_backup diffs
46
40
 
47
- # Review and apply local changes to datadog
41
+ # Review the changes since last backup and apply local changes to datadog
48
42
 
49
- datadog_backup restore --backup-dir optional/path/to/backupdir
43
+ datadog_backup restore
50
44
  ```
45
+ ## Parameters
46
+
47
+ Supply the following parameters in order to customize datadog_backup:
48
+
49
+ parameter | description | default
50
+ ---------------------|-------------------------------------------------------------------------------------------------------------------------------|--------------------------
51
+ --debug | log debug and above | info
52
+ --shh | log warnings and above | info
53
+ --shhh | log errors and above | info
54
+ --backup-dir PATH | path to the directory to backup to or restore from | `./backup/`
55
+ --monitors-only | only backup monitors | backup monitors and dashboards
56
+ --dashboards-only | only backup dashboards | backup monitors and dashboards
57
+ --json | format backups as JSON instead of YAML. Does not impact `diffs` nor `restore`, but do not mix formats in the same backup-dir. | YAML
58
+ --no-color | removes colored output from diff format
59
+ --diff-format FORMAT | one of `color`, `html_simple`, `html` | `color`
60
+ --force-restore | Force restore to Datadog. Do not ask to validate. Non-interactive.
61
+ --h, --help | help
51
62
 
52
63
  ## Environment variables
53
64
 
54
65
  The following environment variables can be set in order to further customize datadog_backup:
55
66
 
56
- environment variable | description | default
67
+ environment variable | description | default
57
68
  ---------------------|--------------------------------------------------------------------------------|--------------------------
58
- DATADOG_HOST | Describe the API endpoint to connect to (https://api.datadoghq.eu for example) | https://api.datadoghq.com
59
- http_proxy | Instruct Dogapi to connect via a differnt proxy address | none
60
- https_proxy | same as http_proxy | none
61
- dd_proxy_https | same as http_proxy | none
69
+ DATADOG_HOST | Describe the API endpoint to connect to (https://api.datadoghq.eu for example) | https://api.datadoghq.com
70
+ http_proxy | Instruct Dogapi to connect via a differnt proxy address | none
71
+ https_proxy | Same as `http_proxy` | none
72
+ dd_proxy_https | Same as `http_proxy` | none
62
73
 
63
74
 
64
75
  ### Usage in a Github repo
data/bin/datadog_backup CHANGED
@@ -66,7 +66,7 @@ def prereqs(defaults)
66
66
  opts.on('--diff-format FORMAT', 'one of `color`, `html_simple`, `html`') do |format|
67
67
  result[:diff_format] = format.to_sym
68
68
  end
69
- opts.on('--force-restore', 'force restore to Datadog') do
69
+ opts.on('--force-restore', 'Force restore to Datadog. Do not ask to validate. Non-interactive.') do
70
70
  result[:force_restore] = true
71
71
  end
72
72
  end
@@ -19,6 +19,8 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^spec/})
20
20
  spec.require_paths = ['lib']
21
21
 
22
+ spec.required_ruby_version = ['>= 2.5']
23
+
22
24
  spec.add_dependency 'amazing_print', '1.3.0'
23
25
  spec.add_dependency 'concurrent-ruby', '1.1.9'
24
26
  spec.add_dependency 'deepsort', '0.4.5'
@@ -46,7 +46,7 @@ module DatadogBackup
46
46
  end
47
47
 
48
48
  def file_type(filepath)
49
- ::File.extname(filepath).strip.downcase[1..].to_sym
49
+ ::File.extname(filepath).strip.downcase[1..-1].to_sym
50
50
  end
51
51
 
52
52
  def find_file_by_id(id)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DatadogBackup
4
- VERSION = '1.0.5'
4
+ VERSION = '1.1.0'
5
5
  end
@@ -41,7 +41,6 @@ describe 'bin/datadog_backup' do
41
41
  env[v] = v.downcase
42
42
  end
43
43
 
44
-
45
44
  required_vars.map do |v|
46
45
  it "dies unless given ENV[#{v}]" do
47
46
  stub_const('ENV', env.dup.tap { |h| h.delete(v) })
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.5
4
+ version: 1.1.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-07-12 00:00:00.000000000 Z
12
+ date: 2021-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: amazing_print
@@ -167,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - ">="
169
169
  - !ruby/object:Gem::Version
170
- version: '0'
170
+ version: '2.5'
171
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  requirements:
173
173
  - - ">="