ecm_capistrano_yaml_db 0.0.7

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.
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 Roberto Vásquez Angel
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,21 @@
1
+ = Installation
2
+
3
+ Do not bundle the gem.
4
+
5
+ 1. Install it via gem install:
6
+
7
+ > gem install ecm_capistrano_yaml_db
8
+
9
+ 2. require it in your deploy.rb file:
10
+
11
+ require 'ecm_capistrano_yaml_db'
12
+
13
+ = Usage
14
+
15
+ To dump the data to data.yml:
16
+
17
+ cap <stage> db:data:dump
18
+
19
+ To load the data from data.yml:
20
+
21
+ cap <stage> db:data:load!
@@ -0,0 +1,5 @@
1
+ def _cset(name, *args, &block)
2
+ unless exists?(name)
3
+ set(name, *args, &block)
4
+ end
5
+ end
@@ -0,0 +1,38 @@
1
+ # require 'ecm/capistrano/common'
2
+
3
+ unless Capistrano::Configuration.respond_to?(:instance)
4
+ abort "ecm/capistrano/yaml_db requires Capistrano 2"
5
+ end
6
+
7
+ Capistrano::Configuration.instance.load do
8
+ namespace :db do
9
+ namespace :data do
10
+ desc "Loads data from data.yml"
11
+ task :"load!", :roles => :app do
12
+ actual_env = respond_to?(:stage) ? stage : rails_env;
13
+ run <<-CMD
14
+ cd #{current_path};
15
+ bundle exec rake RAILS_ENV=#{actual_env} db:data:load
16
+ CMD
17
+ end
18
+
19
+ desc "dumps the db data to db/data.yml"
20
+ task :dump, :roles => :app do
21
+ actual_env = respond_to?(:stage) ? stage : rails_env;
22
+ run <<-CMD
23
+ cd #{current_path};
24
+ bundle exec rake RAILS_ENV=#{actual_env} db:data:dump
25
+ CMD
26
+ end
27
+
28
+ desc "dumps the db data to db/dump_dir"
29
+ task :dump_dir, :roles => :app do
30
+ actual_env = respond_to?(:stage) ? stage : rails_env;
31
+ run <<-CMD
32
+ cd #{current_path};
33
+ bundle exec rake RAILS_ENV=#{actual_env} db:data:dump_dir
34
+ CMD
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,7 @@
1
+ module Ecm
2
+ module Capistrano
3
+ module YamlDb
4
+ VERSION = '0.0.7'
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ require 'capistrano'
2
+ require 'ecm/capistrano/yaml_db/common'
3
+ require 'ecm/capistrano/yaml_db/tasks'
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ecm_capistrano_yaml_db
3
+ version: !ruby/object:Gem::Version
4
+ hash: 17
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 7
10
+ version: 0.0.7
11
+ platform: ruby
12
+ authors:
13
+ - Roberto Vasquez Angel
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-09-12 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: capistrano
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ description: Capistrano yaml db tasks
35
+ email:
36
+ - roberto@vasquez-angel.de
37
+ executables: []
38
+
39
+ extensions: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - lib/ecm_capistrano_yaml_db.rb
45
+ - lib/ecm/capistrano/yaml_db/tasks.rb
46
+ - lib/ecm/capistrano/yaml_db/version.rb
47
+ - lib/ecm/capistrano/yaml_db/common.rb
48
+ - MIT-LICENSE
49
+ - Gemfile
50
+ - README.rdoc
51
+ homepage:
52
+ licenses: []
53
+
54
+ post_install_message:
55
+ rdoc_options: []
56
+
57
+ require_paths:
58
+ - lib
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ none: false
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ hash: 3
65
+ segments:
66
+ - 0
67
+ version: "0"
68
+ required_rubygems_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
76
+ version: "0"
77
+ requirements: []
78
+
79
+ rubyforge_project:
80
+ rubygems_version: 1.8.24
81
+ signing_key:
82
+ specification_version: 3
83
+ summary: Capistrano yaml db tasks
84
+ test_files: []
85
+
86
+ has_rdoc: