orats 0.6.5 → 0.7.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.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +231 -58
  3. data/lib/orats/cli.rb +63 -25
  4. data/lib/orats/commands/common.rb +47 -22
  5. data/lib/orats/commands/{outdated → diff}/compare.rb +5 -4
  6. data/lib/orats/commands/diff/exec.rb +86 -0
  7. data/lib/orats/commands/{outdated → diff}/parse.rb +5 -1
  8. data/lib/orats/commands/inventory.rb +121 -0
  9. data/lib/orats/commands/{play.rb → playbook.rb} +5 -5
  10. data/lib/orats/commands/project/exec.rb +74 -0
  11. data/lib/orats/commands/{new → project}/rails.rb +57 -81
  12. data/lib/orats/commands/{new → project}/server.rb +6 -4
  13. data/lib/orats/templates/auth.rb +26 -481
  14. data/lib/orats/templates/base.rb +74 -716
  15. data/lib/orats/templates/includes/common/LICENSE +22 -0
  16. data/lib/orats/templates/includes/new/rails/.env +43 -0
  17. data/lib/orats/templates/includes/{Gemfile → new/rails/Gemfile} +1 -1
  18. data/lib/orats/templates/includes/new/rails/Procfile +3 -0
  19. data/lib/orats/templates/includes/new/rails/README.md +3 -0
  20. data/lib/orats/templates/includes/{app → new/rails/app}/assets/favicon/favicon_base.png +0 -0
  21. data/lib/orats/templates/includes/new/rails/app/helpers/application_helper.rb +53 -0
  22. data/lib/orats/templates/includes/new/rails/app/models/account.rb +40 -0
  23. data/lib/orats/templates/includes/new/rails/app/views/devise/confirmations/new.html.erb +26 -0
  24. data/lib/orats/templates/includes/new/rails/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  25. data/lib/orats/templates/includes/new/rails/app/views/devise/mailer/reset_password_instructions.html.erb +10 -0
  26. data/lib/orats/templates/includes/new/rails/app/views/devise/mailer/unlock_instructions.html.erb +8 -0
  27. data/lib/orats/templates/includes/new/rails/app/views/devise/passwords/edit.html.erb +28 -0
  28. data/lib/orats/templates/includes/new/rails/app/views/devise/passwords/new.html.erb +26 -0
  29. data/lib/orats/templates/includes/new/rails/app/views/devise/registrations/edit.html.erb +51 -0
  30. data/lib/orats/templates/includes/new/rails/app/views/devise/registrations/new.html.erb +31 -0
  31. data/lib/orats/templates/includes/new/rails/app/views/devise/sessions/new.html.erb +39 -0
  32. data/lib/orats/templates/includes/new/rails/app/views/devise/shared/_links.html.erb +38 -0
  33. data/lib/orats/templates/includes/new/rails/app/views/devise/unlocks/new.html.erb +26 -0
  34. data/lib/orats/templates/includes/new/rails/app/views/layouts/_disqus_comments_snippet.html.erb +19 -0
  35. data/lib/orats/templates/includes/new/rails/app/views/layouts/_disqus_count_snippet.html.erb +12 -0
  36. data/lib/orats/templates/includes/new/rails/app/views/layouts/_flash.html.erb +10 -0
  37. data/lib/orats/templates/includes/new/rails/app/views/layouts/_footer.html.erb +2 -0
  38. data/lib/orats/templates/includes/new/rails/app/views/layouts/_google_analytics_snippet.html.erb +13 -0
  39. data/lib/orats/templates/includes/new/rails/app/views/layouts/_google_analytics_tracker.html.erb +4 -0
  40. data/lib/orats/templates/includes/new/rails/app/views/layouts/_navigation.html.erb +18 -0
  41. data/lib/orats/templates/includes/new/rails/app/views/layouts/_navigation_auth.html.erb +15 -0
  42. data/lib/orats/templates/includes/new/rails/app/views/layouts/_navigation_links.html.erb +3 -0
  43. data/lib/orats/templates/includes/new/rails/app/views/layouts/application.html.erb +48 -0
  44. data/lib/orats/templates/includes/new/rails/app/views/pages/home.html.erb +81 -0
  45. data/lib/orats/templates/includes/new/rails/config/database.yml +19 -0
  46. data/lib/orats/templates/includes/new/rails/config/environments/staging.rb +5 -0
  47. data/lib/orats/templates/includes/new/rails/config/initializers/devise_async.rb +1 -0
  48. data/lib/orats/templates/includes/new/rails/config/initializers/mini_profiler.rb +4 -0
  49. data/lib/orats/templates/includes/new/rails/config/initializers/sidekiq.rb +16 -0
  50. data/lib/orats/templates/includes/new/rails/config/puma.rb +25 -0
  51. data/lib/orats/templates/includes/new/rails/config/secrets.yml +12 -0
  52. data/lib/orats/templates/includes/new/rails/config/sidekiq.yml +5 -0
  53. data/lib/orats/templates/includes/new/rails/config/sitemap.rb +20 -0
  54. data/lib/orats/templates/includes/new/rails/config/whenever.rb +7 -0
  55. data/lib/orats/templates/includes/new/rails/lib/backup/config.rb +116 -0
  56. data/lib/orats/templates/includes/new/rails/lib/backup/models/backup.rb +55 -0
  57. data/lib/orats/templates/includes/new/rails/lib/tasks/orats/backup.rake +18 -0
  58. data/lib/orats/templates/includes/new/rails/lib/tasks/orats/favicon.rake +48 -0
  59. data/lib/orats/templates/includes/new/rails/public/404.html +13 -0
  60. data/lib/orats/templates/includes/new/rails/public/422.html +13 -0
  61. data/lib/orats/templates/includes/new/rails/public/500.html +13 -0
  62. data/lib/orats/templates/includes/new/rails/public/502.html +13 -0
  63. data/lib/orats/templates/includes/new/rails/test/fixtures/accounts.yml +27 -0
  64. data/lib/orats/templates/includes/new/rails/test/models/account_test.rb +46 -0
  65. data/lib/orats/templates/includes/{Galaxyfile → playbook/Galaxyfile} +0 -0
  66. data/lib/orats/templates/includes/playbook/site.yml +53 -0
  67. data/lib/orats/templates/playbook.rb +115 -0
  68. data/lib/orats/version.rb +1 -1
  69. data/test/integration/cli_test.rb +122 -75
  70. data/test/test_helper.rb +16 -8
  71. metadata +63 -14
  72. data/lib/orats/commands/new/ansible.rb +0 -98
  73. data/lib/orats/commands/new/exec.rb +0 -60
  74. data/lib/orats/commands/outdated/exec.rb +0 -46
  75. data/lib/orats/templates/play.rb +0 -185
@@ -0,0 +1,26 @@
1
+ <%
2
+ title 'Re-send unlock instructions'
3
+ meta_description '...'
4
+ heading 'Re-send unlock instructions'
5
+ %>
6
+
7
+ <div class="row">
8
+ <div class="col-sm-4">
9
+ <%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: {method: :post}) do |f| %>
10
+ <div class="form-group">
11
+ <%= f.label :email %>
12
+ <%= f.email_field :email, class: 'form-control', maxlength: 254, autofocus: true,
13
+ data: {
14
+ 'rule-required' => 'true',
15
+ 'rule-maxlength' => '254'
16
+ } %>
17
+ </div>
18
+ <%= button_tag type: 'submit', class: 'btn btn-primary' do %>
19
+ Send
20
+ <% end %>
21
+ <% end %>
22
+ </div>
23
+ <div class="col-sm-6 col-sm-offset-2">
24
+ <%= render 'devise/shared/links' %>
25
+ </div>
26
+ </div>
@@ -0,0 +1,19 @@
1
+ <% if ENV['DISQUS_SHORT_NAME'].present? %>
2
+ <div id="disqus_thread"></div>
3
+ <script type="text/javascript">
4
+ var disqus_shortname = '<%= ENV["DISQUS_SHORT_NAME"] %>';
5
+ (function () {
6
+ var dsq = document.createElement('script');
7
+ dsq.type = 'text/javascript';
8
+ dsq.async = true;
9
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
10
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
11
+ })();
12
+ </script>
13
+ <noscript>
14
+ Please enable JavaScript to view the
15
+ <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
16
+ </noscript>
17
+ <a href="http://disqus.com" class="dsq-brlink">comments powered by
18
+ <span class="logo-disqus">Disqus</span></a>
19
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <% if ENV['DISQUS_SHORT_NAME'].present? %>
2
+ <div id="disqus_thread"></div>
3
+ <script type="text/javascript">
4
+ var disqus_shortname = '<%= ENV["DISQUS_SHORT_NAME"] %>';
5
+ (function () {
6
+ var s = document.createElement('script');
7
+ s.async = true;
8
+ s.type = 'text/javascript';
9
+ s.src = '//' + disqus_shortname + '.disqus.com/count.js';
10
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
11
+ }());
12
+ <% end %>
@@ -0,0 +1,10 @@
1
+ <% flash.each do |key, msg| %>
2
+ <% unless key == :timedout %>
3
+ <%= content_tag :div, class: "alert alert-dismissable alert-#{key}" do -%>
4
+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">
5
+ &times;
6
+ </button>
7
+ <%= msg %>
8
+ <% end %>
9
+ <% end %>
10
+ <% end %>
@@ -0,0 +1,2 @@
1
+ <p class="text-muted">&copy; Time.now.year.to_s app_name - All rights
2
+ reserved</p>
@@ -0,0 +1,13 @@
1
+ <script type="text/javascript">
2
+ var _gaq = _gaq || [];
3
+ <% if ENV['GOOGLE_ANALYTICS_UA'].present? %>
4
+ _gaq.push(['_setAccount', '<%= ENV["GOOGLE_ANALYTICS_UA"] %>']);
5
+ (function () {
6
+ var ga = document.createElement('script');
7
+ ga.type = 'text/javascript';
8
+ ga.async = true;
9
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
10
+ var s = document.getElementsByTagName('script')[0];
11
+ s.parentNode.insertBefore(ga, s);
12
+ })();
13
+ <% end %>
@@ -0,0 +1,4 @@
1
+ <script type="text/javascript">
2
+ // This is added in the body to track both turbolinks and regular hits.
3
+ _gaq.push(['_trackPageview']);
4
+ </script>
@@ -0,0 +1,18 @@
1
+ <nav class="navbar navbar-default">
2
+ <div class="container">
3
+ <div class="navbar-header">
4
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
5
+ <span class="sr-only">Toggle navigation</span>
6
+ <span class="icon-bar"></span>
7
+ <span class="icon-bar"></span>
8
+ <span class="icon-bar"></span>
9
+ </button>
10
+ <%= link_to 'app_name', root_path, class: 'navbar-brand' %>
11
+ </div>
12
+ <div class="collapse navbar-collapse">
13
+ <ul class="nav navbar-nav">
14
+ <%= render 'layouts/navigation_links' %>
15
+ </ul>
16
+ </div>
17
+ </div>
18
+ </nav>
@@ -0,0 +1,15 @@
1
+ <% if current_account %>
2
+ <li>
3
+ <%= link_to 'Settings', edit_account_registration_path %>
4
+ </li>
5
+ <li>
6
+ <%= link_to 'Sign out', destroy_account_session_path, method: :delete %>
7
+ </li>
8
+ <% else %>
9
+ <li>
10
+ <%= link_to 'Sign in', new_account_session_path %>
11
+ </li>
12
+ <li>
13
+ <%= link_to 'Register', new_account_registration_path %>
14
+ </li>
15
+ <% end %>
@@ -0,0 +1,3 @@
1
+ <li>
2
+ <%= link_to 'Sidekiq dashboard', '/sidekiq' %>
3
+ </li>
@@ -0,0 +1,48 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <title><%= yield :title %></title>
5
+ <meta charset="utf-8"/>
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
7
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+ <meta name="description" content="<%= yield :meta_description %>"/>
9
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
10
+ <%= javascript_include_tag '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js',
11
+ 'application', 'data-turbolinks-track' => true %>
12
+ <%= csrf_meta_tags %>
13
+ <%= link_to_all_favicons %>
14
+ <!--[if lt IE 9]>
15
+ <script
16
+ src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
17
+ <script
18
+ src="//cdnjs.cloudflare.com/ajax/libs/json3/3.3.0/json3.min.js"></script>
19
+ <script
20
+ src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js"></script>
21
+ <![endif]-->
22
+ <%= render 'layouts/google_analytics_snippet' %>
23
+ </head>
24
+
25
+ <body>
26
+ <%= render 'layouts/google_analytics_tracker' %>
27
+ <header>
28
+ <%= render 'layouts/navigation' %>
29
+ </header>
30
+
31
+ <main role="main" class="container">
32
+ <div class="page-header">
33
+ <h1><%= yield :heading %></h1>
34
+ </div>
35
+ <%= render 'layouts/flash' %>
36
+ <%= yield %>
37
+ </main>
38
+
39
+ <footer>
40
+ <hr/>
41
+ <div class="container">
42
+ <%= render 'layouts/footer' %>
43
+ </div>
44
+ </footer>
45
+
46
+ <%= render 'layouts/disqus_count_snippet' %>
47
+ </body>
48
+ </html>
@@ -0,0 +1,81 @@
1
+ <%
2
+ title 'Welcome to Ruby on Rails'
3
+ meta_description '...'
4
+ heading 'Welcome to Ruby on Rails'
5
+ %>
6
+
7
+ <div class="row">
8
+ <div class="col-sm-9">
9
+ <p class="lead">
10
+ You have successfully generated a project
11
+ with <%= link_to 'orats', 'https://github.com/nickjj/orats' %> vVERSION.
12
+ </p>
13
+
14
+ <hr/>
15
+
16
+ <p>
17
+ <%= image_tag 'https://badge.fury.io/rb/orats.png', alt: 'Gem badge' %> is
18
+ the latest version of orats.
19
+ </p>
20
+
21
+ <hr/>
22
+
23
+ <h3>Custom rake tasks</h3>
24
+ <pre>
25
+ <code>
26
+ # backup the database to S3 or any other location
27
+ bundle exec rake orats:backup
28
+
29
+ # generate a new set of favicons to the public directory
30
+ bundle exec rake orats:favicons
31
+ </code>
32
+ </pre>
33
+
34
+ <hr/>
35
+
36
+ <h3>Trying to figure out what to do next?</h3>
37
+
38
+ <p>
39
+ Visit the wiki guide
40
+ for <%= link_to 'what to look at after making a new project', 'https://github.com/nickjj/orats/wiki/What-to-look-at-after-making-a-new-project' %>
41
+ .
42
+ </p>
43
+
44
+ <hr/>
45
+
46
+ <h3>Looking to deploy your application?</h3>
47
+
48
+ <p>
49
+ Visit the wiki guide
50
+ for <%= link_to 'get your application on a server ', 'https://github.com/nickjj/orats/wiki/Get-your-application-on-a-server' %>
51
+ .
52
+ </p>
53
+
54
+ <hr/>
55
+
56
+ <h3>Want to get rid of the pages controller?</h3>
57
+
58
+ <p>
59
+ No problem, just follow these steps:
60
+ <ul>
61
+ <li>
62
+ Run <code>bundle exec rails d controller Pages</code>
63
+ </li>
64
+ <li>
65
+ Remove the root route from <code>config/routes.rb</code>
66
+ </li>
67
+ <li>
68
+ Remove the link in the navigation partial at
69
+ <code>app/views/layouts/_navigation_links.html.erb</code>
70
+ </li>
71
+ <li>
72
+ Restart the server
73
+ </li>
74
+ </ul>
75
+ </p>
76
+ </div>
77
+
78
+ <div class="col-sm-3">
79
+ <%= image_tag '/apple-touch-icon-228x228-precomposed.png', size: '228x228', alt: 'A ruby image I found on Google' %>
80
+ </div>
81
+ </div>
@@ -0,0 +1,19 @@
1
+ ---
2
+ development: &default
3
+ adapter: postgresql
4
+ database: <%= ENV['DATABASE_NAME'] %>
5
+ host: <%= ENV['DATABASE_HOST'] %>
6
+ pool: <%= ENV['DATABASE_POOL'] %>
7
+ timeout: <%= ENV['DATABASE_TIMEOUT'] %>
8
+ username: <%= ENV['DATABASE_USERNAME'] %>
9
+ password: <%= ENV['DATABASE_PASSWORD'] %>
10
+
11
+ test:
12
+ <<: *default
13
+ database: <%= ENV['DATABASE_NAME'] %>_test
14
+
15
+ staging:
16
+ <<: *default
17
+
18
+ production:
19
+ <<: *default
@@ -0,0 +1,5 @@
1
+ require_relative 'production.rb'
2
+
3
+ app_name.humanize::Application.configure do
4
+ # Overwrite any production settings here, or if you want to start from scratch then remove line 1.
5
+ end
@@ -0,0 +1 @@
1
+ Devise::Async.backend = :sidekiq
@@ -0,0 +1,4 @@
1
+ if defined? Rack::MiniProfiler
2
+ # Toggle with ALT+p
3
+ Rack::MiniProfiler.config.start_hidden = true
4
+ end
@@ -0,0 +1,16 @@
1
+ ENV['CACHE_PASSWORD'].present? ? pass_string = ":#{ENV['CACHE_PASSWORD']}@" : pass_string = ''
2
+
3
+ redis_host = "#{pass_string}#{ENV['CACHE_HOST']}"
4
+
5
+ sidekiq_config = {
6
+ url: "redis://#{redis_host}:#{ENV['CACHE_PORT']}/#{ENV['CACHE_DATABASE']}",
7
+ namespace: "ns_app::sidekiq_#{Rails.env}"
8
+ }
9
+
10
+ Sidekiq.configure_server do |config|
11
+ config.redis = sidekiq_config
12
+ end
13
+
14
+ Sidekiq.configure_client do |config|
15
+ config.redis = sidekiq_config
16
+ end
@@ -0,0 +1,25 @@
1
+ environment ENV['RAILS_ENV']
2
+
3
+ threads ENV['PUMA_THREADS_MIN'].to_i, ENV['PUMA_THREADS_MAX'].to_i
4
+ workers ENV['PUMA_WORKERS'].to_i
5
+
6
+ pidfile "#{ENV['PROJECT_PATH']}/tmp/puma.pid"
7
+
8
+ if ENV['RAILS_ENV'] == 'production'
9
+ bind "unix://#{ENV['PROJECT_PATH']}/tmp/puma.sock"
10
+ else
11
+ port '3000'
12
+ end
13
+
14
+ # https://github.com/puma/puma/blob/master/examples/config.rb#L125
15
+ prune_bundler
16
+
17
+ restart_command 'bundle exec bin/puma'
18
+
19
+ on_worker_boot do
20
+ require 'active_record'
21
+
22
+ config_path = File.expand_path('../database.yml', __FILE__)
23
+ ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished
24
+ ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || YAML.load_file(config_path)[ENV['RAILS_ENV']])
25
+ end
@@ -0,0 +1,12 @@
1
+ ---
2
+ development: &default
3
+ secret_key_base: <%= ENV['TOKEN_RAILS_SECRET'] %>
4
+
5
+ test:
6
+ <<: *default
7
+
8
+ staging:
9
+ <<: *default
10
+
11
+ production:
12
+ <<: *default
@@ -0,0 +1,5 @@
1
+ ---
2
+ :pidfile: <%= ENV['PROJECT_PATH'] %>/tmp/sidekiq.pid
3
+ :concurrency: <%= ENV['SIDEKIQ_CONCURRENCY'].to_i %>
4
+ :queues:
5
+ - default
@@ -0,0 +1,20 @@
1
+ # Set the host name for URL creation
2
+ SitemapGenerator::Sitemap.default_host = "http://www.app_name.com"
3
+
4
+ SitemapGenerator::Sitemap.create do
5
+ # Put links creation logic here.
6
+ #
7
+ # The root path '/' and sitemap index file are added automatically for you.
8
+ # Links are added to the Sitemap in the order they are specified.
9
+ #
10
+ # Examples:
11
+ #
12
+ # add root_path
13
+ # add foobar_path, priority: 0.7, changefreq: 'daily'
14
+ #
15
+ # Iteration example:
16
+ #
17
+ # Article.published.find_each do |article|
18
+ # add article_path("#{article.id}-#{article.permalink}"), priority: 0.9, lastmod: article.updated_at
19
+ # end
20
+ end
@@ -0,0 +1,7 @@
1
+ every 1.day, at: '3:00 am' do
2
+ rake 'orats:backup'
3
+ end
4
+
5
+ every 1.day, at: '4:00 am' do
6
+ rake 'sitemap:refresh'
7
+ end
@@ -0,0 +1,116 @@
1
+ ##
2
+ # Backup v4.x Configuration
3
+ #
4
+ # Documentation: http://meskyanichi.github.io/backup
5
+ # Issue Tracker: https://github.com/meskyanichi/backup/issues
6
+
7
+ # Config Options
8
+ #
9
+ # The options here may be overridden on the command line, but the result
10
+ # will depend on the use of --root-path on the command line.
11
+ #
12
+ # If --root-path is used on the command line, then all paths set here
13
+ # will be overridden. If a path (like --tmp-path) is not given along with
14
+ # --root-path, that path will use it's default location _relative to --root-path_.
15
+ #
16
+ # If --root-path is not used on the command line, a path option (like --tmp-path)
17
+ # given on the command line will override the tmp_path set here, but all other
18
+ # paths set here will be used.
19
+ #
20
+ # Note that relative paths given on the command line without --root-path
21
+ # are relative to the current directory. The root_path set here only applies
22
+ # to relative paths set here.
23
+ #
24
+ # ---
25
+ #
26
+ # Sets the root path for all relative paths, including default paths.
27
+ # May be an absolute path, or relative to the current working directory.
28
+
29
+ root_path 'lib/backup'
30
+
31
+ # Sets the path where backups are processed until they're stored.
32
+ # This must have enough free space to hold apx. 2 backups.
33
+ # May be an absolute path, or relative to the current directory or +root_path+.
34
+
35
+ tmp_path '../../tmp'
36
+
37
+ # Sets the path where backup stores persistent information.
38
+ # When Backup's Cycler is used, small YAML files are stored here.
39
+ # May be an absolute path, or relative to the current directory or +root_path+.
40
+
41
+ data_path '../../tmp/backup/data'
42
+
43
+ # Utilities
44
+ #
45
+ # If you need to use a utility other than the one Backup detects,
46
+ # or a utility can not be found in your $PATH.
47
+ #
48
+ # Utilities.configure do
49
+ # tar '/usr/bin/gnutar'
50
+ # redis_cli '/opt/redis/redis-cli'
51
+ # end
52
+
53
+ # Logging
54
+ #
55
+ # Logging options may be set on the command line, but certain settings
56
+ # may only be configured here.
57
+ #
58
+ # Logger.configure do
59
+ # console.quiet = true # Same as command line: --quiet
60
+ # logfile.max_bytes = 2_000_000 # Default: 500_000
61
+ # syslog.enabled = true # Same as command line: --syslog
62
+ # syslog.ident = 'my_app_backup' # Default: 'backup'
63
+ # end
64
+ #
65
+ # Command line options will override those set here.
66
+ # For example, the following would override the example settings above
67
+ # to disable syslog and enable console output.
68
+ # backup perform --trigger my_backup --no-syslog --no-quiet
69
+
70
+ # Component Defaults
71
+ #
72
+ # Set default options to be applied to components in all models.
73
+ # Options set within a model will override those set here.
74
+ #
75
+ # Storage::S3.defaults do |s3|
76
+ # s3.access_key_id = "my_access_key_id"
77
+ # s3.secret_access_key = "my_secret_access_key"
78
+ # end
79
+ #
80
+ # Notifier::Mail.defaults do |mail|
81
+ # mail.from = 'sender@email.com'
82
+ # mail.to = 'receiver@email.com'
83
+ # mail.address = 'smtp.gmail.com'
84
+ # mail.port = 587
85
+ # mail.domain = 'your.host.name'
86
+ # mail.user_name = 'sender@email.com'
87
+ # mail.password = 'my_password'
88
+ # mail.authentication = 'plain'
89
+ # mail.encryption = :starttls
90
+ # end
91
+
92
+ # Preconfigured Models
93
+ #
94
+ # Create custom models with preconfigured components.
95
+ # Components added within the model definition will
96
+ # +add to+ the preconfigured components.
97
+ #
98
+ # preconfigure 'MyModel' do
99
+ # archive :user_pictures do |archive|
100
+ # archive.add '~/pictures'
101
+ # end
102
+ #
103
+ # notify_by Mail do |mail|
104
+ # mail.to = 'admin@email.com'
105
+ # end
106
+ # end
107
+ #
108
+ # MyModel.new(:john_smith, 'John Smith Backup') do
109
+ # archive :user_music do |archive|
110
+ # archive.add '~/music'
111
+ # end
112
+ #
113
+ # notify_by Mail do |mail|
114
+ # mail.to = 'john.smith@email.com'
115
+ # end
116
+ # end