production-sync 0.1.1 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/Readme CHANGED
@@ -1,4 +1,13 @@
1
1
  Production Sync
2
2
  ---------------
3
3
 
4
- A simple rsync wrapper allowing you to configure "sites" that can be rsync'd up to a remote server via SSH
4
+ A simple rsync wrapper allowing you to configure "sites" that can be rsync'd up to a remote server via SSH
5
+
6
+ Sample Config Entry
7
+
8
+ live_server:
9
+ server: server.com
10
+ username: username
11
+ source: /Users/home_folder
12
+ destination: /home/user/remote_location
13
+ #ignore_file: .something_else
@@ -1,3 +1,3 @@
1
1
  module ProductionSync
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.5'
3
3
  end
@@ -44,13 +44,15 @@ module ProductionSync
44
44
 
45
45
  #Sanitize the / at the end of destination, we don't check to see if this exists
46
46
  @site['destination'] += "/" if @site['destination'][-1,1] != "/"
47
-
48
47
 
48
+ #Default to .rsyncignore, but this can be configured, it could be configured to .gitignore
49
+ @ignore_file = @site['ignore_file'] || ".rsyncignore"
50
+
49
51
  end
50
52
 
51
53
  #Define the command to run
52
54
  def command
53
- @command = "#{@rsync} -rv --delete --exclude '.git' --exclude '.svn' --exclude '.gitignore' --exclude '.rsyncignore' --exclude-from #{@site['source'] + "/.rsyncignore"} #{File.expand_path(@site['source']) + "/"} #{@site['username']}@#{@site['server']}:#{@site['destination']}"
55
+ @command = "#{@rsync} -rv --delete --exclude '.git' --exclude '.svn' --exclude '.gitignore' --exclude '.rsyncignore' --exclude-from #{@site['source']}/#{@ignore_file} #{File.expand_path(@site['source']) + "/"} #{@site['username']}@#{@site['server']}:#{@site['destination']}"
54
56
  end
55
57
 
56
58
  #Run the command
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 5
9
+ version: 0.1.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bryan Shelton