dumper 1.7.0 → 1.7.1

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: ac1187f49a5fc65297a18ba1a29d2250a3cb5c64
4
- data.tar.gz: b2e46c049457c2af2971c51abc5168e014495dc9
3
+ metadata.gz: 738929ed8f9f1892d7aba60b3522e82b1d980c4b
4
+ data.tar.gz: 96d32207c0c292ff11d40fc6d5ba1184753b4996
5
5
  SHA512:
6
- metadata.gz: c586ad184612a5f52973da9993a493c6019ae007865fabf5481626bd3114b61cb8d284502296afd76d2184c235a36f604ff19f2bab087934ba8e2bbe6796e881
7
- data.tar.gz: 4281609a5d7963ab9f71754f2d1d7cc1d9af7be07e0c95112124def6fbc05ad86e98b4f26c282fc82aa58241aa64f5109058db69af185fb31fd15a943eac298d
6
+ metadata.gz: 05136b455cf44fef7dfa0937b0fdd1269141797eea397e4994723736e7f07c5861d3d93f19cd58eabd6eb798ce312fd84dc31dd070c77e2c5d5484d87db1bbc6
7
+ data.tar.gz: 1d8cec2a5661f84c1d694e88222f9196575bd9278398a11d194c856deb038ba1cfd527e1b5b29119c849ddc8625ede6d3d1bbf5a7db61130b13f22324ae99eea
data/README.md CHANGED
@@ -27,7 +27,13 @@ gem 'aws-sdk', '>= 1.8.1.2', '< 2.0'
27
27
  gem 'dumper'
28
28
  ```
29
29
 
30
- then create `config/initializers/dumper.rb` and add the following line:
30
+ then run the installer:
31
+
32
+ ```ruby
33
+ rails g dumper:install [YOUR_APP_KEY]
34
+ ```
35
+
36
+ or manually create `config/initializers/dumper.rb` and add the following line:
31
37
 
32
38
  ```ruby
33
39
  Dumper::Agent.start(:app_key => 'YOUR_APP_KEY')
@@ -1,3 +1,3 @@
1
1
  module Dumper
2
- VERSION = '1.7.0'
2
+ VERSION = '1.7.1'
3
3
  end
@@ -0,0 +1,13 @@
1
+ module Dumper
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ source_root File.expand_path('../templates', __FILE__)
5
+
6
+ argument :app_key, required: false
7
+
8
+ def copy_initializer
9
+ template 'dumper.rb.erb', 'config/initializers/dumper.rb'
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,18 @@
1
+ # Dumper (http://dumper.io) is an online tool that provides
2
+ # robust database backup in your Rails applications.
3
+ #
4
+ # For debug logging:
5
+ #
6
+ # Dumper::Agent.start(app_key: 'YOUR_APP_KEY', debug: true)
7
+ #
8
+ # For conditional start:
9
+ #
10
+ # Dumper::Agent.start_if(:app_key => 'YOUR_APP_KEY') do
11
+ # Rails.env.production? && dumper_enabled_host?
12
+ # end
13
+ #
14
+ <% if app_key -%>
15
+ Dumper::Agent.start(:app_key => '<%= app_key %>')
16
+ <% else -%>
17
+ Dumper::Agent.start(:app_key => 'YOUR_APP_KEY')
18
+ <% end -%>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dumper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenn Ejima
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-10 00:00:00.000000000 Z
11
+ date: 2017-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -167,6 +167,8 @@ files:
167
167
  - lib/dumper/stack.rb
168
168
  - lib/dumper/utility.rb
169
169
  - lib/dumper/version.rb
170
+ - lib/generators/dumper/install_generator.rb
171
+ - lib/generators/dumper/templates/dumper.rb.erb
170
172
  - spec/dumper_spec.rb
171
173
  - spec/spec_helper.rb
172
174
  homepage: https://github.com/kenn/dumper