do_snapshot 0.0.11 → 0.0.12

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
  SHA1:
3
- metadata.gz: 8803902d64a76db013fb9c2866ef0e04c79ef2de
4
- data.tar.gz: 22589c3aa8c1eef2af78aefd89f6cf04b959340b
3
+ metadata.gz: 1832957a7416c15f2755720be734b7153dc19856
4
+ data.tar.gz: 4cd6ea976f4bbbe26051e10b538e4e213f7cd87c
5
5
  SHA512:
6
- metadata.gz: bcb151a013ef7ec0d78dd35132c5f9e6c9cfdce35e55ec0d918331247f63d616f330b8713d0b11101d7d503fff80d39677f1873a7d044961b0c15425726a3cc8
7
- data.tar.gz: 1b300fb97331704010d0167949345fcb238296d82321e907fa62d13808816227ed2d30476d6ace14db77b7b437300dacb2a76558273927c4e92106c8dbe37f1d
6
+ metadata.gz: 2c988328d3c25992b45336a37e34ff535f5db6e4545ae9946c77b24dd9866517734bf27653e4e170451463ae94580053c88a968f2f9acda141b00ccbb66a0b12
7
+ data.tar.gz: 10532b1d32445a9cd7c28d84119524cd6a8399103295639dcabfe308dd6eddb2aa2c2a1fb4c95e2eecd36a7d026574d33d4693e745a5a00b93d89662272fc471
data/README.md CHANGED
@@ -45,13 +45,17 @@ Install it yourself as:
45
45
 
46
46
  $ gem install do_snapshot
47
47
 
48
+ Or System Wide Install (OSX, *nix):
49
+
50
+ $ sudo gem install do_snapshot
51
+
48
52
  For **OSX** users ([Homebrew Tap](http://github.com/merqlove/homebrew-do-snapshot)):
49
53
 
50
54
  $ brew tap merqlove/do-snapshot && brew install do_snapshot
51
55
 
52
56
  $ do_snapshot -V
53
57
 
54
- Standalone pack for **Unix/Linux** users: [Download](https://assets.merqlove.ru.s3.amazonaws.com/do_snapshot/dosnapshot.tgz)
58
+ Standalone pack for **Unix/Linux** users: [Download](https://assets.merqlove.ru.s3.amazonaws.com/do_snapshot/do_snapshot.tgz)
55
59
 
56
60
  $ wget https://assets.merqlove.ru.s3.amazonaws.com/do_snapshot/do_snapshot.tgz # if not done.
57
61
 
@@ -60,17 +64,17 @@ Standalone pack for **Unix/Linux** users: [Download](https://assets.merqlove.ru.
60
64
  $ tar -xzf do_snapshot.tgz /usr/local/ && ln -s /usr/local/do_snapshot/bin/do_snapshot /usr/local/bin/do_snapshot
61
65
  $ do_snapshot help
62
66
 
63
- Or add this line to Gemfile:
67
+ Standalone Zip pack for others: [Download](https://assets.merqlove.ru.s3.amazonaws.com/do_snapshot/do_snapshot.zip)
68
+
69
+ ## Usage
64
70
 
65
- gem 'do_snapshot'
71
+ Mainly it's pretty simple:
66
72
 
67
- And then execute:
73
+ $ do_snapshot --only 123456 -k 5 -c -v
68
74
 
69
- $ bundle
70
-
71
- ## Usage
75
+ ### Setup
72
76
 
73
- First you may need to set DigitalOcean API keys:
77
+ How to set DigitalOcean API keys:
74
78
 
75
79
  $ export DIGITAL_OCEAN_CLIENT_ID="SOMEID"
76
80
  $ export DIGITAL_OCEAN_API_KEY="SOMEKEY"
@@ -79,17 +83,17 @@ If you want to set keys without environment, than set it via options when you ru
79
83
 
80
84
  $ do_snapshot --digital-ocean-client-id YOURLONGAPICLIENTID --digital-ocean-api-key YOURLONGAPIKEY
81
85
 
82
- ### How-To
86
+ ### How-To (Here is also [Longren Tutorial](https://longren.io/automate-making-snapshots-of-your-digitalocean-droplets/))
83
87
 
84
88
  Here we `keeping` only 5 **latest** snapshots and cleanup older after new one is created. If creation of snapshots failed no one will be deleted. By default we keeping `10` droplets.
85
89
 
86
90
  $ do_snapshot --keep 5 -c
87
91
 
88
- Keep latest 3 from selected droplets:
92
+ Keep latest 3 from selected droplet:
89
93
 
90
- $ do_snapshot --only 123456 1234567 --keep 3
94
+ $ do_snapshot --only 123456 --keep 3
91
95
 
92
- Working with all except selected droplets:
96
+ Working with all except droplets:
93
97
 
94
98
  $ do_snapshot --exclude 123456 123457
95
99
 
@@ -106,7 +110,7 @@ For working mailer you need to set e-mail settings via run options.
106
110
 
107
111
  ### Cron example
108
112
 
109
- 0 4 * * 7 /.../bin/do_snapshot -k 5 -m to:TO from:FROM -t address:HOST user_name:LOGIN password:PASSWORD port:2525 -q -c
113
+ 0 4 * * 7 . /.../.digitalocean_keys && /.../bin/do_snapshot -k 5 -m to:TO from:FROM -t address:HOST user_name:LOGIN password:PASSWORD port:2525 -q -c
110
114
 
111
115
  ### Real world example
112
116
 
@@ -172,3 +176,11 @@ For working mailer you need to set e-mail settings via run options.
172
176
  3. Commit your changes (`git commit -am 'Add some feature'`)
173
177
  4. Push to the branch (`git push origin my-new-feature`)
174
178
  5. Create a new Pull Request
179
+
180
+ ### Testing
181
+
182
+ $ rake spec
183
+
184
+ Copyright (c) 2014 Alexander Merkulov
185
+
186
+ MIT License
@@ -36,21 +36,15 @@ module DoSnapshot
36
36
 
37
37
  You can optionally specify parameters to select or exclude some droplets.
38
38
 
39
- ### Advanced options example for MAIL feature:
40
-
41
- --mail to:mail@somehost.com from:from@host.com --smtp address:smtp.gmail.com port:25 user_name:someuser password:somepassword
42
-
43
- For more details look here: https://github.com/benprew/pony
44
-
45
39
  ### Examples
46
40
 
47
- Keep latest 5 and cleanup older if maximum is reached:
41
+ Keep latest 5 and cleanup older if maximum is reached, verbose:
48
42
 
49
- $ do_snapshot --keep 5 -c
43
+ $ do_snapshot -k 5 -c -v
50
44
 
51
- Keep latest 3 from selected droplets:
45
+ Keep latest 3 from selected droplet:
52
46
 
53
- $ do_snapshot --only 123456 1234567 --keep 3
47
+ $ do_snapshot --only 123456 --keep 3
54
48
 
55
49
  Working with all except selected droplets:
56
50
 
@@ -64,6 +58,12 @@ module DoSnapshot
64
58
 
65
59
  0 4 * * 7 /.../bin/do_snapshot -k 5 -m to:TO from:FROM -t address:HOST user_name:LOGIN password:PASSWORD port:2525 -q -c
66
60
 
61
+ ### Advanced options example for MAIL feature:
62
+
63
+ --mail to:mail@somehost.com from:from@host.com --smtp address:smtp.gmail.com port:25 user_name:someuser password:somepassword
64
+
65
+ For more details look here: https://github.com/benprew/pony
66
+
67
67
  VERSION: #{DoSnapshot::VERSION}
68
68
  LONGDESC
69
69
  method_option :only,
@@ -1,5 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
- # require 'thread'
3
2
  require 'do_snapshot/api'
4
3
 
5
4
  module DoSnapshot
@@ -82,7 +81,7 @@ module DoSnapshot
82
81
  # Join threads
83
82
  #
84
83
  def thread_chain
85
- threads.each { |t| t.join }
84
+ threads.each(&:join)
86
85
  end
87
86
 
88
87
  # Run threads
@@ -2,5 +2,5 @@
2
2
  # Current version
3
3
  #
4
4
  module DoSnapshot
5
- VERSION = '0.0.11'
5
+ VERSION = '0.0.12'
6
6
  end
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,7 @@
2
2
  require 'coveralls'
3
3
  Coveralls.wear! do
4
4
  add_filter '/spec/*'
5
+ add_filter '/lib/do_snapshot/mail.rb'
5
6
  end
6
7
 
7
8
  require 'do_snapshot/cli'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: do_snapshot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Merkulov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-21 00:00:00.000000000 Z
11
+ date: 2014-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: digitalocean
@@ -94,48 +94,62 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.24'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '3.1'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '3.1'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: rspec-core
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - ">="
102
116
  - !ruby/object:Gem::Version
103
- version: '3.0'
117
+ version: '3.1'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
122
  - - ">="
109
123
  - !ruby/object:Gem::Version
110
- version: '3.0'
124
+ version: '3.1'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: rspec-expectations
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - ">="
116
130
  - !ruby/object:Gem::Version
117
- version: '3.0'
131
+ version: '3.1'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - ">="
123
137
  - !ruby/object:Gem::Version
124
- version: '3.0'
138
+ version: '3.1'
125
139
  - !ruby/object:Gem::Dependency
126
140
  name: rspec-mocks
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - ">="
130
144
  - !ruby/object:Gem::Version
131
- version: '3.0'
145
+ version: '3.1'
132
146
  type: :development
133
147
  prerelease: false
134
148
  version_requirements: !ruby/object:Gem::Requirement
135
149
  requirements:
136
150
  - - ">="
137
151
  - !ruby/object:Gem::Version
138
- version: '3.0'
152
+ version: '3.1'
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: webmock
141
155
  requirement: !ruby/object:Gem::Requirement
@@ -179,7 +193,7 @@ dependencies:
179
193
  - !ruby/object:Gem::Version
180
194
  version: '0'
181
195
  - !ruby/object:Gem::Dependency
182
- name: aws-s3
196
+ name: s3
183
197
  requirement: !ruby/object:Gem::Requirement
184
198
  requirements:
185
199
  - - ">="
@@ -252,8 +266,8 @@ rubyforge_project:
252
266
  rubygems_version: 2.2.2
253
267
  signing_key:
254
268
  specification_version: 4
255
- summary: Snapshot creator for Digital Ocean droplets. Multi-threading. Auto-cleanup.
256
- Cron optimized.
269
+ summary: A command-line snapshot maker for your DigitalOcean droplets. Fully Automated.
270
+ Multi-threaded.
257
271
  test_files:
258
272
  - spec/.keep
259
273
  - spec/do_snapshot/api_spec.rb