backy 0.0.2 → 0.0.3

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: e3d662757c9b73f8cf156945547b608b96993cdd
4
- data.tar.gz: 93f3649a406db4467a4ac83a227ee8ffb1fddfff
3
+ metadata.gz: 059fa91f6275a914c6885fcc185820a5f53bac5f
4
+ data.tar.gz: 2e362966f560d5be10632bb81d239ec588724798
5
5
  SHA512:
6
- metadata.gz: e9d34a7ee808c652a4a968bf58cd90e0bec50ff2f8a4d651440b4ed502a05a3adfa8bd7c574d90bf0d135df1c0c29061fa0ad0dad22e898853cadaf4202685ad
7
- data.tar.gz: 01eb7d92fe866e8653db4e8c4e03e5b366d6029fe812500c68ef70e5b51e1c9805e1d358f24fc27dabb24565a852de73f462367e3c93a64a8c832396263276be
6
+ metadata.gz: 431ba8b73f6df0fcb2ed9b13669e60fe93544f5645ea3d9b5ce3910775feb5d6fb8f2721442fec1afdad872f9403f7b664ac59a924375c66b5575ab3687a9747
7
+ data.tar.gz: f7f1d7667abaf7769e8e09fcc80a05efcd88ca3bf87db99451496cb2844ae0bf2aa36b0357413e3f5a330bb717d0467904af2db5863aa7dcacb4478a64718b77
data/lib/backy.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require "capistrano"
2
- require File.expand_path("#{File.dirname(__FILE__)}/recipes/recipes")
2
+ require File.expand_path("#{File.dirname(__FILE__)}/backy/recipes.rb")
3
3
 
4
4
  module MyPlugin
5
5
  require 'backy/railtie' if defined?(Rails)
data/lib/backy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Test
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -0,0 +1,37 @@
1
+ if Capistrano::Configuration.instance(false)
2
+
3
+ Capistrano::Configuration.instance(true).load do |instance|
4
+
5
+ # require File.expand_path("#{File.dirname(__FILE__)}/util")
6
+ # require File.expand_path("#{File.dirname(__FILE__)}/database")
7
+ # require File.expand_path("#{File.dirname(__FILE__)}/asset")
8
+
9
+ instance.set :local_rails_env, ENV['RAILS_ENV'] || 'development' unless exists?(:local_rails_env)
10
+ instance.set :rails_env, 'production' unless exists?(:rails_env)
11
+ instance.set :db_local_clean, false unless exists?(:db_local_clean)
12
+ instance.set :assets_dir, 'system' unless exists?(:assets_dir)
13
+ instance.set :local_assets_dir, 'public' unless exists?(:local_assets_dir)
14
+
15
+ namespace :backy do
16
+ desc 'dumps the database using backy gem and downloads to local'
17
+ task :down do
18
+ remote_file = "#{current_path}/db/backy.sql"
19
+ output_file = "db/backy.sql"
20
+ run "cd #{current_path} && rake backy:dump"
21
+ self.get remote_file, output_file
22
+ end
23
+
24
+ desc 'uploads sql and loads using backy'
25
+ task :up do
26
+ remote_file = "#{current_path}/db/backy.sql"
27
+ output_file = "db/backy.sql"
28
+ self.upload output_file, remote_file
29
+ run "cd #{current_path} && rake backy:load"
30
+ end
31
+ end
32
+
33
+ end
34
+
35
+
36
+
37
+ end
data/lib/tasks/backy.rake CHANGED
@@ -28,6 +28,7 @@
28
28
  postgresql_load
29
29
  when "Mysql2"
30
30
  mysql2_load
31
+ else
31
32
  else
32
33
  abort("only PostgreSQL, Mysql2 compatible")
33
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konrad Strojny
@@ -54,6 +54,7 @@ files:
54
54
  - lib/backy.rb
55
55
  - lib/backy/railtie.rb
56
56
  - lib/backy/version.rb
57
+ - lib/recipes/recipes.rb
57
58
  - lib/tasks/backy.rake
58
59
  homepage: http://www.sology.eu
59
60
  licenses: