martilla 0.4.0.rc1 → 0.4.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 +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/CONTRIBUTING.md +103 -0
- data/Gemfile.lock +6 -6
- data/README.md +3 -10
- data/lib/martilla/utilities.rb +4 -4
- data/lib/martilla/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0e925d44b622c6e024349755ba2b777d65a29ef03f5a44c478749f0c26022a2
|
4
|
+
data.tar.gz: 603c1c72f5dfaf74c66a634d299379c4ba32829dba17f549a42bf5a193191d5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79820251410274f0e945c4ae2d474825622cf68cda0d5a1d7fb1f9a8bbc1cdf53576d46b0e4756e29ec272afce137a0b9beb2eb49667947944c3598124a88bf1
|
7
|
+
data.tar.gz: 4bb017d93cddfbdcb00f7de9df906461eaaf847c01aa43834f239e02c6d798cd9a58552cde20da80910fa940423694b4d4e4744a8c88992203158090fe92be9b
|
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe the bug**
|
11
|
+
A clear and concise description of what the bug is.
|
12
|
+
|
13
|
+
**To Reproduce**
|
14
|
+
Steps to reproduce the behavior:
|
15
|
+
1. Go to '...'
|
16
|
+
2. Click on '....'
|
17
|
+
3. Scroll down to '....'
|
18
|
+
4. See error
|
19
|
+
|
20
|
+
**Sample config file**
|
21
|
+
If possible, a sample config file that is able to reproduce the issue.
|
22
|
+
|
23
|
+
**Expected behavior**
|
24
|
+
A clear and concise description of what you expected to happen.
|
25
|
+
|
26
|
+
**Environment**
|
27
|
+
Please complete the following information
|
28
|
+
- OS: [e.g. Debian 9]
|
29
|
+
- Ruby Version [e.g. `ruby --version`]
|
30
|
+
- RVM/rbenv Version [e.g. `rvm -v`]
|
31
|
+
|
32
|
+
**Additional context**
|
33
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for this project
|
4
|
+
title: ''
|
5
|
+
labels: ''
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
+
|
19
|
+
**Additional context**
|
20
|
+
Add any other context or screenshots about the feature request here.
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
## Contributing
|
2
|
+
|
3
|
+
First off, thank you for considering contributing to Martilla.
|
4
|
+
|
5
|
+
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
6
|
+
|
7
|
+
### Where do I go from here?
|
8
|
+
|
9
|
+
If you've noticed a bug or have a question [search the issue tracker](https://github.com/fdoxyz/martilla/issues?q=) to see if someone else has already created a ticket. If not, go ahead and create a one[new issue](https://github.com/fdoxyz/martilla/issues/new/choose)!
|
10
|
+
|
11
|
+
### Fork & create a branch
|
12
|
+
|
13
|
+
If this is something you think you can fix, then [fork Martilla](https://help.github.com/articles/fork-a-repo) and create a branch with a descriptive name.
|
14
|
+
|
15
|
+
A good branch name would be (where issue #325 is the ticket you're working on):
|
16
|
+
|
17
|
+
```sh
|
18
|
+
git checkout -b 325-add-japanese-translations
|
19
|
+
```
|
20
|
+
|
21
|
+
### Get the test suite running
|
22
|
+
|
23
|
+
Make sure you're using a recent ruby and have the `bundler` gem installed, at least version `2.0.2`.
|
24
|
+
|
25
|
+
Now install the development dependencies:
|
26
|
+
|
27
|
+
```sh
|
28
|
+
bundle install
|
29
|
+
```
|
30
|
+
|
31
|
+
Now you should be able to run the entire suite using:
|
32
|
+
|
33
|
+
```sh
|
34
|
+
bundle exec rspec
|
35
|
+
```
|
36
|
+
|
37
|
+
### Implement your fix or feature
|
38
|
+
|
39
|
+
At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first :)
|
40
|
+
|
41
|
+
### Get the style right
|
42
|
+
|
43
|
+
Your patch should follow the same conventions & pass the same code quality checks as the rest of the project. No linter is set in place at the moment but we're hoping to have one in place.
|
44
|
+
|
45
|
+
### Make a Pull Request
|
46
|
+
|
47
|
+
At this point, you should switch back to your master branch and make sure it's up to date with Martilla's master branch:
|
48
|
+
|
49
|
+
```sh
|
50
|
+
git remote add upstream git@github.com:fdoxyz/martilla.git
|
51
|
+
git checkout master
|
52
|
+
git pull upstream master
|
53
|
+
```
|
54
|
+
|
55
|
+
Then update your feature branch from your local copy of master, and push it!
|
56
|
+
|
57
|
+
```sh
|
58
|
+
git checkout 325-add-japanese-translations
|
59
|
+
git rebase master
|
60
|
+
git push --set-upstream origin 325-add-japanese-translations
|
61
|
+
```
|
62
|
+
|
63
|
+
Finally, go to GitHub and [make a Pull Request](https://help.github.com/articles/creating-a-pull-request) :D
|
64
|
+
|
65
|
+
[Travis CI](https://travis-ci.org/) will run our test suite against all supported Ruby versions. We care about quality, so your PR won't be merged until all tests pass. It's unlikely, but it's possible that your changes pass tests in one Ruby version but fail in another.
|
66
|
+
|
67
|
+
### Keeping your Pull Request updated
|
68
|
+
|
69
|
+
If a maintainer asks you to "rebase" your PR, they're saying that a lot of code has changed, and that you need to update your branch so it's easier to merge.
|
70
|
+
|
71
|
+
To learn more about rebasing in Git, there are a lot of good [git rebasing](http://git-scm.com/book/en/Git-Branching-Rebasing) & [interactive rebase](https://help.github.com/articles/interactive-rebase) resources but here's the suggested workflow:
|
72
|
+
|
73
|
+
```sh
|
74
|
+
git checkout 325-add-japanese-translations
|
75
|
+
git pull --rebase upstream master
|
76
|
+
git push --force-with-lease 325-add-japanese-translations
|
77
|
+
```
|
78
|
+
|
79
|
+
### Merging a PR (maintainers only)
|
80
|
+
|
81
|
+
A PR can only be merged into master by a maintainer if:
|
82
|
+
|
83
|
+
* It is passing CI.
|
84
|
+
* It has no requested changes.
|
85
|
+
* It is up to date with current master.
|
86
|
+
|
87
|
+
Any maintainer is allowed to merge a PR if all of these conditions are met.
|
88
|
+
|
89
|
+
### Shipping a release (maintainers only)
|
90
|
+
|
91
|
+
Maintainers need to do the following to push out a release:
|
92
|
+
|
93
|
+
* Make sure all pull requests are in and that [changelog](https://github.com/fdoxyz/martilla/blob/master/CHANGELOG.md) is current
|
94
|
+
* Update `version.rb` file and changelog with new version number
|
95
|
+
* If it's not a patch level release, create a stable branch for that release, otherwise switch to the stable branch corresponding to the patch release you want to ship:
|
96
|
+
|
97
|
+
```sh
|
98
|
+
bundle install
|
99
|
+
git add .
|
100
|
+
git commit -m "v[X.Y.Z] release"
|
101
|
+
git push origin master
|
102
|
+
rake release
|
103
|
+
```
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
martilla (0.4.0
|
4
|
+
martilla (0.4.0)
|
5
5
|
aws-sdk-s3 (~> 1.49)
|
6
6
|
aws-sdk-ses (~> 1.26)
|
7
7
|
memoist (~> 0.16.0)
|
@@ -13,17 +13,17 @@ GEM
|
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
15
|
aws-eventstream (1.0.3)
|
16
|
-
aws-partitions (1.
|
17
|
-
aws-sdk-core (3.
|
16
|
+
aws-partitions (1.240.0)
|
17
|
+
aws-sdk-core (3.78.0)
|
18
18
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
19
|
-
aws-partitions (~> 1, >= 1.
|
19
|
+
aws-partitions (~> 1, >= 1.239.0)
|
20
20
|
aws-sigv4 (~> 1.1)
|
21
21
|
jmespath (~> 1.0)
|
22
22
|
aws-sdk-kms (1.25.0)
|
23
23
|
aws-sdk-core (~> 3, >= 3.71.0)
|
24
24
|
aws-sigv4 (~> 1.1)
|
25
|
-
aws-sdk-s3 (1.
|
26
|
-
aws-sdk-core (~> 3, >= 3.
|
25
|
+
aws-sdk-s3 (1.56.0)
|
26
|
+
aws-sdk-core (~> 3, >= 3.77.0)
|
27
27
|
aws-sdk-kms (~> 1)
|
28
28
|
aws-sigv4 (~> 1.1)
|
29
29
|
aws-sdk-ses (1.27.0)
|
data/README.md
CHANGED
@@ -13,7 +13,6 @@ The name Martilla comes from a local name for the [Kinkajou](https://en.wikipedi
|
|
13
13
|
* [Notifiers](https://github.com/fdoxyz/martilla#notifiers)
|
14
14
|
* [Perform a backup](https://github.com/fdoxyz/martilla#perform-a-backup)
|
15
15
|
3. [Contributing](https://github.com/fdoxyz/martilla#contributing)
|
16
|
-
4. [Development](https://github.com/fdoxyz/martilla#development)
|
17
16
|
5. [License](https://github.com/fdoxyz/martilla#license)
|
18
17
|
6. [Code of Conduct](https://github.com/fdoxyz/martilla#code-of-conduct)
|
19
18
|
|
@@ -102,9 +101,7 @@ The available Storages types are **local**, **S3** & **SCP**. They each have dif
|
|
102
101
|
- can be specified with the usual ENV variables or IAM roles
|
103
102
|
- `retention`
|
104
103
|
- An integer that defines the max number of backups stored at the defined location
|
105
|
-
- **IMPORTANT NOTE:** Releases
|
106
|
-
- Don't use retention configuration for **s3** storage and wait until a fix is released soon. More details and the status of the issue [here](https://github.com/fdoxyz/martilla/issues/18)
|
107
|
-
- Use a subdirectory within your bucket exclusively for the backups by using the `filename` option to something like `/path/to/backups/backup_name.sql`
|
104
|
+
- **IMPORTANT NOTE:** Releases in `v0.3.x` added a bug where the s3 storage option **might delete other files when enforcing retention**. Make sure you're using `v0.4.x` or newer if you want to enforce a retention limit. More details [here](https://github.com/fdoxyz/martilla/issues/18)
|
108
105
|
- options for type: **scp**
|
109
106
|
- `filename`
|
110
107
|
- The location to where the backup will be stored within remote server
|
@@ -170,14 +167,10 @@ As simple as running the `backup` command on the martilla CLI and passing as arg
|
|
170
167
|
Help the help command help you
|
171
168
|
|
172
169
|
$ martilla help
|
173
|
-
|
174
|
-
## Contributing
|
175
|
-
|
176
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/fdoxyz/martilla. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
177
170
|
|
178
|
-
##
|
171
|
+
## Contributing
|
179
172
|
|
180
|
-
|
173
|
+
Check out our [contributing guide](https://github.com/fdoxyz/martilla/blob/master/CONTRIBUTING.md)
|
181
174
|
|
182
175
|
## License
|
183
176
|
|
data/lib/martilla/utilities.rb
CHANGED
@@ -2,16 +2,16 @@ module Martilla
|
|
2
2
|
class Backup
|
3
3
|
module Utilities
|
4
4
|
def duration_format(seconds)
|
5
|
-
case seconds
|
5
|
+
case seconds.to_i
|
6
6
|
when 0..59
|
7
7
|
# 22s
|
8
|
-
"#{seconds}s"
|
8
|
+
"#{seconds.to_i}s"
|
9
9
|
when 60..3599
|
10
10
|
# 18m 19s
|
11
|
-
"#{s_to_m(seconds)}m #{seconds % 60}s"
|
11
|
+
"#{s_to_m(seconds).to_i}m #{(seconds % 60).to_i}s"
|
12
12
|
else
|
13
13
|
# 7h 9m 51s
|
14
|
-
"#{s_to_h(seconds)}h #{s_to_m(seconds)}m #{seconds % 60}s"
|
14
|
+
"#{s_to_h(seconds).to_i}h #{s_to_m(seconds).to_i}m #{(seconds % 60).to_i}s"
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
data/lib/martilla/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: martilla
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Valverde
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -186,11 +186,14 @@ executables:
|
|
186
186
|
extensions: []
|
187
187
|
extra_rdoc_files: []
|
188
188
|
files:
|
189
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
190
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
189
191
|
- ".gitignore"
|
190
192
|
- ".rspec"
|
191
193
|
- ".travis.yml"
|
192
194
|
- CHANGELOG.md
|
193
195
|
- CODE_OF_CONDUCT.md
|
196
|
+
- CONTRIBUTING.md
|
194
197
|
- Gemfile
|
195
198
|
- Gemfile.lock
|
196
199
|
- LICENSE.txt
|
@@ -238,9 +241,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
238
241
|
version: '0'
|
239
242
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
243
|
requirements:
|
241
|
-
- - "
|
244
|
+
- - ">="
|
242
245
|
- !ruby/object:Gem::Version
|
243
|
-
version:
|
246
|
+
version: '0'
|
244
247
|
requirements: []
|
245
248
|
rubygems_version: 3.0.3
|
246
249
|
signing_key:
|