backup_rails 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -26,6 +26,10 @@ For now just add the gem to your Gemfile.
26
26
  Move the files in /examples dir into your project.
27
27
  Run whenever to setup your cron job. Make sure you've set the RAILS_ENV correctly.
28
28
 
29
+ When cron jobs are not run make sure you:
30
+
31
+ sudo touch /etc/cron.deny
32
+
29
33
  ## Contributing
30
34
 
31
35
  Very welcome.. :)
data/backup_rails.gemspec CHANGED
@@ -17,8 +17,9 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  # For backup
19
19
  gem.add_dependency 'backup', '>= 3.0.24'
20
- gem.add_dependency 'net-ssh'
21
- gem.add_dependency 'net-sftp'
22
- gem.add_dependency 'mail'
20
+ gem.add_dependency 'fog', '~> 1.1.0' # S3
21
+ gem.add_dependency 'net-ssh', '~> 2.3.0'
22
+ gem.add_dependency 'net-sftp', '~> 2.0.5'
23
+ gem.add_dependency 'mail', '~> 2.4.0'
23
24
  gem.add_dependency 'whenever' # For cronjob config, see config/schedule.rb
24
25
  end
data/examples/backup ADDED
@@ -0,0 +1,3 @@
1
+ # Put this file in rails_project/script/backup
2
+ #!/bin/bash
3
+ backup perform --trigger mmmenu --config_file config/backup.rb --data-path db --log-path log --tmp-path tmp
data/examples/schedule.rb CHANGED
@@ -1,8 +1,17 @@
1
- # Put this file in rails_project/config/schedule.rb
1
+ # env :PATH, ENV['PATH'] # '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
2
+ # env :RAILS_ENV, ENV['RAILS_ENV']
3
+ # env :HOME, ENV['HOME']
4
+ # env :SHELL, ENV['SHELL']
5
+
6
+ env :MAILTO, 'your@email.com'
7
+
8
+ set :output, {:error => 'log/cron_error.log', :standard => '/dev/null'}
9
+ job_type :script, "cd :path && RAILS_ENV=:environment bundle exec script/:task :output"
2
10
 
3
11
  # Backup using the RAILS_ROOT/config/backup.rb backup gem script.
4
12
  # Schedule it using:
5
13
  # whenever
6
14
  every 1.day, :at => '2:30 am' do
7
- command "bundle exec backup perform --trigger your_project --config_file config/backup.rb --data-path db --log-path log --tmp-path tmp"
8
- end
15
+ # every 1.minute do
16
+ script 'backup'
17
+ end
@@ -1,3 +1,3 @@
1
1
  module BackupRails
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,136 +1,154 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: backup_rails
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.2
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 3
9
+ version: 0.0.3
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Joost Hietbrink
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-07-13 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2012-07-19 00:00:00 +02:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: backup
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 3
29
+ - 0
30
+ - 24
21
31
  version: 3.0.24
22
32
  type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: fog
23
36
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: 3.0.24
30
- - !ruby/object:Gem::Dependency
31
- name: net-ssh
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: '0'
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 1
43
+ - 1
44
+ - 0
45
+ version: 1.1.0
38
46
  type: :runtime
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: net-ssh
39
50
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
46
- - !ruby/object:Gem::Dependency
47
- name: net-sftp
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 2
57
+ - 3
58
+ - 0
59
+ version: 2.3.0
54
60
  type: :runtime
61
+ version_requirements: *id003
62
+ - !ruby/object:Gem::Dependency
63
+ name: net-sftp
55
64
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: mail
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ segments:
70
+ - 2
71
+ - 0
72
+ - 5
73
+ version: 2.0.5
70
74
  type: :runtime
75
+ version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
77
+ name: mail
71
78
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
78
- - !ruby/object:Gem::Dependency
79
- name: whenever
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
79
+ requirement: &id005 !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ~>
82
+ - !ruby/object:Gem::Version
83
+ segments:
84
+ - 2
85
+ - 4
86
+ - 0
87
+ version: 2.4.0
86
88
  type: :runtime
89
+ version_requirements: *id005
90
+ - !ruby/object:Gem::Dependency
91
+ name: whenever
87
92
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
93
+ requirement: &id006 !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ segments:
98
+ - 0
99
+ version: "0"
100
+ type: :runtime
101
+ version_requirements: *id006
94
102
  description: Easy use backup gem with Rails.
95
- email:
103
+ email:
96
104
  - joost@joopp.com
97
105
  executables: []
106
+
98
107
  extensions: []
108
+
99
109
  extra_rdoc_files: []
100
- files:
110
+
111
+ files:
101
112
  - .gitignore
102
113
  - Gemfile
103
114
  - LICENSE
104
115
  - README.md
105
116
  - Rakefile
106
117
  - backup_rails.gemspec
118
+ - examples/backup
107
119
  - examples/backup.rb
108
120
  - examples/schedule.rb
109
121
  - lib/backup_rails.rb
110
122
  - lib/backup_rails/version.rb
111
- homepage: ''
123
+ has_rdoc: true
124
+ homepage: ""
112
125
  licenses: []
126
+
113
127
  post_install_message:
114
128
  rdoc_options: []
115
- require_paths:
129
+
130
+ require_paths:
116
131
  - lib
117
- required_ruby_version: !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
120
- - - ! '>='
121
- - !ruby/object:Gem::Version
122
- version: '0'
123
- required_rubygems_version: !ruby/object:Gem::Requirement
124
- none: false
125
- requirements:
126
- - - ! '>='
127
- - !ruby/object:Gem::Version
128
- version: '0'
132
+ required_ruby_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ segments:
137
+ - 0
138
+ version: "0"
139
+ required_rubygems_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - ">="
142
+ - !ruby/object:Gem::Version
143
+ segments:
144
+ - 0
145
+ version: "0"
129
146
  requirements: []
147
+
130
148
  rubyforge_project:
131
- rubygems_version: 1.8.24
149
+ rubygems_version: 1.3.6
132
150
  signing_key:
133
151
  specification_version: 3
134
152
  summary: Easy use backup gem with Rails.
135
153
  test_files: []
136
- has_rdoc:
154
+