webtranslateit-safe 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +7 -0
  2. data/.autotest +3 -0
  3. data/.document +5 -0
  4. data/.github/dependabot.yml +26 -0
  5. data/.github/release-drafter.yml +36 -0
  6. data/.github/workflows/ci.yml +51 -0
  7. data/.github/workflows/release-drafter.yml +29 -0
  8. data/.gitignore +18 -0
  9. data/.rspec +3 -0
  10. data/.rubocop.yml +8 -0
  11. data/.rubocop_todo.yml +552 -0
  12. data/CHANGELOG +42 -0
  13. data/Gemfile +11 -0
  14. data/Gemfile.lock +89 -0
  15. data/LICENSE.txt +22 -0
  16. data/README.markdown +237 -0
  17. data/Rakefile +8 -0
  18. data/TODO +31 -0
  19. data/bin/webtranslateit-safe +64 -0
  20. data/lib/extensions/mktmpdir.rb +45 -0
  21. data/lib/webtranslateit/safe/archive.rb +29 -0
  22. data/lib/webtranslateit/safe/backup.rb +27 -0
  23. data/lib/webtranslateit/safe/cloudfiles.rb +77 -0
  24. data/lib/webtranslateit/safe/config/builder.rb +100 -0
  25. data/lib/webtranslateit/safe/config/node.rb +79 -0
  26. data/lib/webtranslateit/safe/ftp.rb +85 -0
  27. data/lib/webtranslateit/safe/gpg.rb +52 -0
  28. data/lib/webtranslateit/safe/gzip.rb +29 -0
  29. data/lib/webtranslateit/safe/local.rb +55 -0
  30. data/lib/webtranslateit/safe/mongodump.rb +30 -0
  31. data/lib/webtranslateit/safe/mysqldump.rb +36 -0
  32. data/lib/webtranslateit/safe/pgdump.rb +36 -0
  33. data/lib/webtranslateit/safe/pipe.rb +23 -0
  34. data/lib/webtranslateit/safe/s3.rb +80 -0
  35. data/lib/webtranslateit/safe/sftp.rb +96 -0
  36. data/lib/webtranslateit/safe/sink.rb +40 -0
  37. data/lib/webtranslateit/safe/source.rb +51 -0
  38. data/lib/webtranslateit/safe/stream.rb +40 -0
  39. data/lib/webtranslateit/safe/svndump.rb +17 -0
  40. data/lib/webtranslateit/safe/tmp_file.rb +53 -0
  41. data/lib/webtranslateit/safe/version.rb +9 -0
  42. data/lib/webtranslateit/safe.rb +70 -0
  43. data/spec/integration/archive_integration_spec.rb +89 -0
  44. data/spec/integration/cleanup_spec.rb +62 -0
  45. data/spec/spec_helper.rb +7 -0
  46. data/spec/webtranslateit/safe/archive_spec.rb +67 -0
  47. data/spec/webtranslateit/safe/cloudfiles_spec.rb +175 -0
  48. data/spec/webtranslateit/safe/config_spec.rb +307 -0
  49. data/spec/webtranslateit/safe/gpg_spec.rb +148 -0
  50. data/spec/webtranslateit/safe/gzip_spec.rb +64 -0
  51. data/spec/webtranslateit/safe/local_spec.rb +109 -0
  52. data/spec/webtranslateit/safe/mongodump_spec.rb +54 -0
  53. data/spec/webtranslateit/safe/mysqldump_spec.rb +83 -0
  54. data/spec/webtranslateit/safe/pgdump_spec.rb +45 -0
  55. data/spec/webtranslateit/safe/s3_spec.rb +168 -0
  56. data/spec/webtranslateit/safe/svndump_spec.rb +39 -0
  57. data/templates/script.rb +183 -0
  58. data/webtranslateit-safe.gemspec +32 -0
  59. metadata +149 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 56eb4033020a956c2952a9ae1ce5cdd62cd17a9927f8f571bee895e6541ab16c
4
+ data.tar.gz: 9a1fc0cf5fd486e45a73a8b744f41b31346319346454dd99029ff68a2f0f3da4
5
+ SHA512:
6
+ metadata.gz: e3d3dc746e4bfd0e7e3f023781623a7601dff9b08adc413995afbc42ed0b7478c23dc0a261e7cb25e3b706c7fc7582944526c3deb2799f36f37a1d7b9a103662
7
+ data.tar.gz: 264dc20327e89a0e4bd030c1f77e7a00a1a904455ef8ea2be58e1afca71d62fd8a3980bdff9b906801398f3be2df835d9400e9c99f74bf62094c3c6cf3098226
data/.autotest ADDED
@@ -0,0 +1,3 @@
1
+ Autotest.add_hook(:initialize) do |at|
2
+ at.add_mapping(%r{lib/webtranslateit/safe/config/.*\.rb$}, true) {'spec/webtranslateit/safe/config_spec.rb'}
3
+ end
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
@@ -0,0 +1,26 @@
1
+ # Please see the documentation for all configuration options:
2
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3
+
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: "bundler"
7
+ directory: "/"
8
+ schedule:
9
+ interval: "weekly"
10
+ day: "monday"
11
+ time: "04:00"
12
+ reviewers:
13
+ - edouard
14
+ assignees:
15
+ - edouard
16
+
17
+ - package-ecosystem: github-actions
18
+ directory: "/"
19
+ schedule:
20
+ interval: weekly
21
+ day: monday
22
+ time: "04:00"
23
+ reviewers:
24
+ - edouard
25
+ assignees:
26
+ - edouard
@@ -0,0 +1,36 @@
1
+ name-template: '$RESOLVED_VERSION 🌈'
2
+ tag-template: '$RESOLVED_VERSION'
3
+ categories:
4
+ - title: '🚀 Features'
5
+ labels:
6
+ - 'feature'
7
+ - 'enhancement'
8
+ - title: '🐛 Bug Fixes'
9
+ labels:
10
+ - 'bug'
11
+ - 'design'
12
+ - 'performance'
13
+ - title: '🧰 Maintenance'
14
+ labels:
15
+ - 'admin'
16
+ - 'refactoring'
17
+ - 'dependencies'
18
+ - 'github_actions'
19
+ - 'tests'
20
+ change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
21
+ change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
22
+ version-resolver:
23
+ major:
24
+ labels:
25
+ - 'major'
26
+ minor:
27
+ labels:
28
+ - 'minor'
29
+ patch:
30
+ labels:
31
+ - 'patch'
32
+ default: patch
33
+ template: |
34
+ ## Changes
35
+
36
+ $CHANGES
@@ -0,0 +1,51 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on: push
11
+
12
+ jobs:
13
+ test:
14
+ env:
15
+ COVERAGE: Y
16
+ CC_TEST_REPORTER_ID: 9eb2d68da2519eb132eb0c3e063c4b899247c7ebe390a68c286545fc9f346286
17
+
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ matrix:
21
+ ruby-version: ['3.2']
22
+
23
+ steps:
24
+ - uses: actions/checkout@v3
25
+ - name: Set up Ruby
26
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
27
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby-version }}
31
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
32
+ - name: Run tests
33
+ run: bundle exec rspec
34
+
35
+ linters:
36
+ name: Linters
37
+ runs-on: ubuntu-22.04
38
+ timeout-minutes: 10
39
+
40
+ steps:
41
+ - name: Checkout repository
42
+ uses: actions/checkout@v3
43
+
44
+ - name: Install ruby and gems
45
+ uses: ruby/setup-ruby@v1
46
+ with:
47
+ ruby-version: 3.2.0 # Use .ruby-version file instead of duplicating here and in Gemfile?
48
+ bundler-cache: true
49
+
50
+ - name: Run ruby linter
51
+ run: bundle exec rubocop --format github
@@ -0,0 +1,29 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ # branches to consider in the event; optional, defaults to all
6
+ branches:
7
+ - master
8
+ # pull_request event is required only for autolabeler
9
+ pull_request:
10
+ # Only following types are handled by the action, but one can default to all as well
11
+ types: [opened, reopened, synchronize]
12
+
13
+ jobs:
14
+ update_release_draft:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ # (Optional) GitHub Enterprise requires GHE_HOST variable set
18
+ #- name: Set GHE_HOST
19
+ # run: |
20
+ # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
21
+
22
+ # Drafts your next Release notes as Pull Requests are merged into "master"
23
+ - uses: release-drafter/release-drafter@v5
24
+ # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
25
+ # with:
26
+ # config-name: my-config.yml
27
+ # disable-autolabeler: true
28
+ env:
29
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
data/.gitignore ADDED
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .rubocop-http*
6
+ .yardoc
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ tags
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --colour
2
+ --format d
3
+ --profile
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ inherit_from:
2
+ - https://raw.githubusercontent.com/webtranslateit/webtranslateit/main/.rubocop_common.yml
3
+ - .rubocop_todo.yml
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 3.2
7
+ Exclude:
8
+ - vendor/bundle/**/*