rsync-deploy 0.0.12 → 0.0.13

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,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NDNjODI1ZjBkOWJhMWIwZThjMjVmNjEwOGQ3NjNjYjcxNTg1MGZjZg==
5
- data.tar.gz: !binary |-
6
- ODliZmE4MDNkOGMxMGI3ZmIwOGI3N2JlMWRjZDAzMTBlN2FmMjc0MA==
2
+ SHA1:
3
+ metadata.gz: c0d8bd2f75921bfade8891d99baf5728fea343a4
4
+ data.tar.gz: 2756d336765d28db681f0972caa33babc12c1be1
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NDFlMDZiMDIxYzg4NTc4YmZkYWY5OTczYTE2MDliYTJmZjFhMzU5Mzk0MWRj
10
- NWM5YTU1ODQ4MTJlN2VkNWVmNzcyNDE4OTY0MzM4ZDVjYjI1MTg4YWQ3NTgx
11
- MTc1NDgyNDY5NzI4MGM1N2RmZWQ1ZGNhYWM5Y2FkNDkzYmExYTA=
12
- data.tar.gz: !binary |-
13
- NTRmMTBhNDY5NzI3MWJlZDQ3ZmUxYTdjZmQ4MjhjNjg3ZjgzMGJhMjkyOGM3
14
- OGVjNzEzMjQ1NjEwMGJjYTMxM2NiMzNhZGYwODlhZmVlZDg4ODBkMmU2Njk4
15
- NDEyZjI4ZWY4MGM5NjY4ZDVhOTIyMDFjZTc1ODgyNzdiZWUxYjc=
6
+ metadata.gz: 91236019ec3336df7c25891c4936b89a450b76dc6183d1a75fba8fa15bd6d533334e213143445bb8ef17087646984f8cb8f6a44c5576e5288dc03917ed550c9d
7
+ data.tar.gz: 0de91dbc4e02509b4845230e4f54efcd5130d1c5e2c57bfbbe770eea02954cadd58f72363287ba9a26a89ae49592861f500116dee788188635320f02215ae353
data/README.md CHANGED
@@ -58,6 +58,10 @@ Or to multiple servers, like this:
58
58
  deploy dev staging production
59
59
  ```
60
60
 
61
+ #### deploy config NAME
62
+
63
+ Will change the name of deployment configuration files. By default they are named `deploy.yml`, but this can be changed to names such as `.deploy` which makes them hidden files. Keep in mind that **this is a global setting and will be applied to all deployments.**
64
+
61
65
  #### deploy help
62
66
 
63
67
  Will output a list of all commands
data/bin/deploy CHANGED
@@ -15,6 +15,7 @@ def help
15
15
 
16
16
  Commands:
17
17
  install Configure directory for deployment
18
+ config NAME Changes the deployment config file name
18
19
  help Prints this help document
19
20
  version Prints the siteleaf gem version
20
21
 
@@ -83,6 +84,17 @@ if ARGV.size > 0
83
84
  when 'install', 'setup'
84
85
  install
85
86
  exit
87
+ when 'config'
88
+ unless ARGV[1].empty?
89
+ File.open(Deploy::GEM_SETTINGS_PATH, 'w+') do |file|
90
+ # Remove illegal characters and add to file
91
+ file.puts 'config_path: ' + ARGV[1].gsub(/[^\w\.]/, '_')
92
+ end
93
+ puts "Configuration file renamed to `#{ARGV[1].gsub(/[^\w\.]/, '_')}`"
94
+ else
95
+ puts "Please provide a name for configuration files. See `deploy help` for more details."
96
+ end
97
+ exit
86
98
  end
87
99
  end
88
100
 
data/lib/config.yml ADDED
@@ -0,0 +1 @@
1
+ config_path: deploy.yml
@@ -88,11 +88,11 @@ module Deploy
88
88
  rsync_cmd += " " # Adding a space here means we don't need an if/else statement
89
89
  rsync_cmd += "#{@config[:user]}@" unless @config[:user].empty? # Only add user if not empty
90
90
  rsync_cmd += "#{@config[:host]}:" # Add host
91
- rsync_cmd += "~#{@config[:remote]}" # Add remote
91
+ rsync_cmd += "~#{@config[:remote]}" # Add remote (relative to remote user home)
92
92
 
93
93
  # Run the command
94
- # puts rsync_cmd
95
- system(rsync_cmd)
94
+ puts rsync_cmd
95
+ # system(rsync_cmd)
96
96
 
97
97
  # Remove excludes/pass file if needed
98
98
  tmp_exclude.unlink unless @config[:excludes].empty?
@@ -1,5 +1,5 @@
1
1
  module Deploy
2
2
 
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.13"
4
4
 
5
5
  end
data/lib/deploy.rb CHANGED
@@ -6,9 +6,10 @@ require 'deploy/version'
6
6
  require 'deploy/environment'
7
7
 
8
8
  module Deploy
9
-
10
- # TODO: Make this adjustable from the command line
11
- CONFIG_PATH = "deploy.yml"
9
+
10
+ # Config path is loaded in from a config.yml stored in the gem
11
+ GEM_SETTINGS_PATH = File.dirname(__FILE__) + '/config.yml'
12
+ CONFIG_PATH = YAML::load(File.open(GEM_SETTINGS_PATH))['config_path']
12
13
 
13
14
  class Deployment
14
15
 
data/rsync-deploy.gemspec CHANGED
@@ -19,11 +19,8 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.require_paths = ['lib']
21
21
 
22
- s.add_development_dependency "bundler", "~> 1.3"
23
- s.add_development_dependency "rake"
24
-
25
22
  s.files = `git ls-files`.split($/)
26
- s.files += Dir.glob("lib/**/*.rb")
23
+ s.files += Dir.glob("lib/**/*.*")
27
24
  s.executables = ["deploy"]
28
25
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
29
26
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rsync-deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Zurowski
@@ -9,35 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2013-12-23 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '1.3'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ~>
25
- - !ruby/object:Gem::Version
26
- version: '1.3'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ! '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ! '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
12
+ dependencies: []
41
13
  description: A simple rsync based deployment gem
42
14
  email: ross@rosszurowski.com
43
15
  executables:
@@ -45,12 +17,13 @@ executables:
45
17
  extensions: []
46
18
  extra_rdoc_files: []
47
19
  files:
48
- - .gitignore
20
+ - ".gitignore"
49
21
  - Gemfile
50
22
  - LICENSE.txt
51
23
  - README.md
52
24
  - Rakefile
53
25
  - bin/deploy
26
+ - lib/config.yml
54
27
  - lib/deploy.rb
55
28
  - lib/deploy/environment.rb
56
29
  - lib/deploy/version.rb
@@ -65,17 +38,17 @@ require_paths:
65
38
  - lib
66
39
  required_ruby_version: !ruby/object:Gem::Requirement
67
40
  requirements:
68
- - - ! '>='
41
+ - - ">="
69
42
  - !ruby/object:Gem::Version
70
43
  version: '0'
71
44
  required_rubygems_version: !ruby/object:Gem::Requirement
72
45
  requirements:
73
- - - ! '>='
46
+ - - ">="
74
47
  - !ruby/object:Gem::Version
75
48
  version: '0'
76
49
  requirements: []
77
50
  rubyforge_project:
78
- rubygems_version: 2.1.11
51
+ rubygems_version: 2.2.0
79
52
  signing_key:
80
53
  specification_version: 4
81
54
  summary: Deployments based on rsync