capistrano-shared_file 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTdkNDI0YTU4ZjgyZTViZTU2MDA1N2YxN2E4NTg1MTFkNDgxOWQzOA==
5
+ data.tar.gz: !binary |-
6
+ NzhhYTFjYjViMDJiNGI5Yzc4ZTZiNjhjOThhYWNhNDgyNzZkZjg1Zg==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YWIyMGMwNjg3ZGFkZDBhMjAxNWQzOGRmMWU5OGY4ZmQ3YTMyYTlhOTViMjRk
10
+ ZjAzYTM4ODNiMDE5ZTVhMjZjNzVlM2I3ZWVhOTNmMjAzMTg0OTgyZjQ4OTFh
11
+ YTcwMTI2ZThlNTk2YzQ1OWFmMTQ1MDY3N2Q1NmQyYzhlNjQxZjk=
12
+ data.tar.gz: !binary |-
13
+ NGJjMzQ2ZTcwMmZkZDkzNTVhZGNmOWRlNjZkZWEzMjJjNGM3NjFjMzJhZmQ0
14
+ MWMyOGQyNmI3MDU5OTllMTc5NTVkNTQzYTU1NmJkMDAxMmZmZDExNDIwNGU1
15
+ NGI2ZDU1NWVmMGU3NGQ4ZDMwZmVhZjhjZjZjNDdlMTNlZmVhYWM=
data/Gemfile CHANGED
@@ -4,6 +4,6 @@ source "http://rubygems.org"
4
4
  # Include everything needed to run rake, tests, features, etc.
5
5
  group :development do
6
6
  gem "rdoc", "~> 3.12"
7
- gem "bundler", "~> 1.0.0"
8
- gem "jeweler", "~> 1.8.3"
7
+ gem "bundler"
8
+ gem "jeweler"
9
9
  end
data/Gemfile.lock CHANGED
@@ -1,21 +1,53 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- git (1.2.5)
5
- jeweler (1.8.3)
4
+ addressable (2.3.5)
5
+ builder (3.2.2)
6
+ faraday (0.8.8)
7
+ multipart-post (~> 1.2.0)
8
+ git (1.2.6)
9
+ github_api (0.10.1)
10
+ addressable
11
+ faraday (~> 0.8.1)
12
+ hashie (>= 1.2)
13
+ multi_json (~> 1.4)
14
+ nokogiri (~> 1.5.2)
15
+ oauth2
16
+ hashie (2.0.5)
17
+ highline (1.6.19)
18
+ httpauth (0.2.0)
19
+ jeweler (1.8.7)
20
+ builder
6
21
  bundler (~> 1.0)
7
22
  git (>= 1.2.5)
23
+ github_api (= 0.10.1)
24
+ highline (>= 1.6.15)
25
+ nokogiri (= 1.5.10)
8
26
  rake
9
27
  rdoc
10
- json (1.7.1)
11
- rake (0.9.2.2)
12
- rdoc (3.12)
28
+ json (1.8.0)
29
+ jwt (0.1.8)
30
+ multi_json (>= 1.5)
31
+ multi_json (1.7.9)
32
+ multi_xml (0.5.5)
33
+ multipart-post (1.2.0)
34
+ nokogiri (1.5.10)
35
+ oauth2 (0.9.2)
36
+ faraday (~> 0.8)
37
+ httpauth (~> 0.2)
38
+ jwt (~> 0.1.4)
39
+ multi_json (~> 1.0)
40
+ multi_xml (~> 0.5)
41
+ rack (~> 1.2)
42
+ rack (1.5.2)
43
+ rake (10.1.0)
44
+ rdoc (3.12.2)
13
45
  json (~> 1.4)
14
46
 
15
47
  PLATFORMS
16
48
  ruby
17
49
 
18
50
  DEPENDENCIES
19
- bundler (~> 1.0.0)
20
- jeweler (~> 1.8.3)
51
+ bundler
52
+ jeweler
21
53
  rdoc (~> 3.12)
data/README.rdoc CHANGED
@@ -1,9 +1,18 @@
1
1
  = capistrano-shared_file
2
2
 
3
- Capistrano recipe to symlink shared files e.g. config/database.yml
3
+ A Capistrano recipe to symlink shared files e.g. config/database.yml
4
4
  stored in shared path to release path.
5
5
 
6
- To use the recipe, add the following lines to config/deploy.rb:
6
+ == Install
7
+
8
+ gem install capistrano-shared_file
9
+
10
+ For Bundler, add this to your <tt>Gemfile</tt>:
11
+
12
+ gem 'capistrano-shared_file'
13
+
14
+ == Using
15
+ Add the following lines to <tt>config/deploy.rb</tt>:
7
16
 
8
17
  #set :shared_files, %w(config/database.yml) # optional, as it's the default value
9
18
  require 'capistrano/shared_file'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "capistrano-shared_file"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["teohm"]
12
- s.date = "2012-05-11"
12
+ s.date = "2013-08-28"
13
13
  s.description = "Capistrano recipe to symlink shared files e.g. config/database.yml"
14
14
  s.email = "teohuiming@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -30,25 +30,25 @@ Gem::Specification.new do |s|
30
30
  s.homepage = "http://github.com/teohm/capistrano-shared_file"
31
31
  s.licenses = ["MIT"]
32
32
  s.require_paths = ["lib"]
33
- s.rubygems_version = "1.8.24"
33
+ s.rubygems_version = "2.0.7"
34
34
  s.summary = "Capistrano recipe to symlink shared files e.g. config/database.yml"
35
35
 
36
36
  if s.respond_to? :specification_version then
37
- s.specification_version = 3
37
+ s.specification_version = 4
38
38
 
39
39
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
40
40
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
41
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
42
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
41
+ s.add_development_dependency(%q<bundler>, [">= 0"])
42
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
43
43
  else
44
44
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
45
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
46
- s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
45
+ s.add_dependency(%q<bundler>, [">= 0"])
46
+ s.add_dependency(%q<jeweler>, [">= 0"])
47
47
  end
48
48
  else
49
49
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
50
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
51
- s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
50
+ s.add_dependency(%q<bundler>, [">= 0"])
51
+ s.add_dependency(%q<jeweler>, [">= 0"])
52
52
  end
53
53
  end
54
54
 
@@ -2,103 +2,104 @@ unless Capistrano::Configuration.respond_to?(:instance)
2
2
  abort "capistrano/shared_files requires Capistrano 2"
3
3
  end
4
4
 
5
- Capistrano::Configuration.instance.load do
6
-
7
- # ================================================================
8
- # This variable defines files to be symlinked from shared path.
9
- #
10
- # File 'config/database.yml' is added by default, to cover 80%
11
- # of the use cases. Please OVERWRITE this to fit your needs.
12
- # ================================================================
13
- _cset :shared_files, %w(config/database.yml)
14
-
15
- # ================================================================
16
- # These variables define where to store the shared files.
17
- # Make sure you understand the implication when you modify them.
18
- # ================================================================
19
- _cset :shared_file_dir, "files"
20
- _cset(:shared_file_path) { File.join(shared_path, shared_file_dir) }
21
-
22
-
23
- # ================================================================
24
- # Cap tasks are added under namespace deploy:shared_file:*
25
- # Usually you do not need to call them directly, as they are
26
- # triggered during deploy:setup and deploy.
27
- # ================================================================
28
- namespace :deploy do
29
- namespace :shared_file do
30
-
31
- desc <<-DESC
32
- Generate shared file dirs under shared/files dir.
33
-
34
- For example, given:
35
- set :shared_files, %w(config/database.yml db/seeds.yml)
36
-
37
- The following directories will be generated:
38
- shared/files/config/
39
- shared/files/db/
40
- DESC
41
- task :setup, :except => { :no_release => true } do
42
- if exists?(:shared_files)
43
- dirs = shared_files.map {|f| File.join(shared_file_path, File.dirname(f)) }
44
- run "#{try_sudo} mkdir -p #{dirs.join(' ')}"
45
- run "#{try_sudo} chmod g+w #{dirs.join(' ')}" if fetch(:group_writable, true)
5
+ if Capistrano::Configuration.instance
6
+ Capistrano::Configuration.instance.load do
7
+
8
+ # ================================================================
9
+ # This variable defines files to be symlinked from shared path.
10
+ #
11
+ # File 'config/database.yml' is added by default, to cover 80%
12
+ # of the use cases. Please OVERWRITE this to fit your needs.
13
+ # ================================================================
14
+ _cset :shared_files, %w(config/database.yml)
15
+
16
+ # ================================================================
17
+ # These variables define where to store the shared files.
18
+ # Make sure you understand the implication when you modify them.
19
+ # ================================================================
20
+ _cset :shared_file_dir, "files"
21
+ _cset(:shared_file_path) { File.join(shared_path, shared_file_dir) }
22
+
23
+
24
+ # ================================================================
25
+ # Cap tasks are added under namespace deploy:shared_file:*
26
+ # Usually you do not need to call them directly, as they are
27
+ # triggered during deploy:setup and deploy.
28
+ # ================================================================
29
+ namespace :deploy do
30
+ namespace :shared_file do
31
+
32
+ desc <<-DESC
33
+ Generate shared file dirs under shared/files dir.
34
+
35
+ For example, given:
36
+ set :shared_files, %w(config/database.yml db/seeds.yml)
37
+
38
+ The following directories will be generated:
39
+ shared/files/config/
40
+ shared/files/db/
41
+ DESC
42
+ task :setup, :except => { :no_release => true } do
43
+ if exists?(:shared_files)
44
+ dirs = shared_files.map {|f| File.join(shared_file_path, File.dirname(f)) }
45
+ run "#{try_sudo} mkdir -p #{dirs.join(' ')}"
46
+ run "#{try_sudo} chmod g+w #{dirs.join(' ')}" if fetch(:group_writable, true)
47
+ end
46
48
  end
47
- end
48
- after "deploy:setup", "deploy:shared_file:setup"
49
+ after "deploy:setup", "deploy:shared_file:setup"
49
50
 
50
51
 
51
- desc <<-DESC
52
- Print a reminder to upload shared files \
53
- along with scp samples.
54
- DESC
55
- task :print_reminder do
56
- if exists?(:shared_files)
57
- servers = find_servers(:no_release => false)
58
- puts <<-INFO
59
- *************************
60
- * UPLOAD SHARED FILES *
52
+ desc <<-DESC
53
+ Print a reminder to upload shared files \
54
+ along with scp samples.
55
+ DESC
56
+ task :print_reminder do
57
+ if exists?(:shared_files)
58
+ servers = find_servers(:no_release => false)
59
+ puts <<-INFO
60
+ *************************
61
+ * UPLOAD SHARED FILES *
61
62
 
62
- Remember to upload these files:
63
- #{ shared_files.join('\n ') }
63
+ Remember to upload these files:
64
+ #{ shared_files.join('\n ') }
64
65
 
65
- To '#{shared_file_path}' in server(s):
66
- #{servers.join('\n ')}
66
+ To '#{shared_file_path}' in server(s):
67
+ #{servers.join('\n ')}
67
68
 
68
- SCP Samples:
69
- INFO
69
+ SCP Samples:
70
+ INFO
70
71
 
71
- servers.each do |server|
72
- shared_files.each do |file_path|
73
- puts " scp #{file_path} #{server}:#{File.join(shared_file_path, file_path)}\n"
72
+ servers.each do |server|
73
+ shared_files.each do |file_path|
74
+ puts " scp #{file_path} #{server}:#{File.join(shared_file_path, file_path)}\n"
75
+ end
74
76
  end
75
- end
76
77
 
77
- puts <<-INFO
78
+ puts <<-INFO
78
79
 
79
- *************************
80
- INFO
80
+ *************************
81
+ INFO
82
+ end
81
83
  end
82
- end
83
- after "deploy:setup", "deploy:shared_file:print_reminder"
84
+ after "deploy:setup", "deploy:shared_file:print_reminder"
84
85
 
85
86
 
86
- desc <<-DESC
87
- Symlink shared files to release path.
87
+ desc <<-DESC
88
+ Symlink shared files to release path.
88
89
 
89
- WARNING: It DOES NOT warn you when shared files not exist. \
90
- So symlink will be created even when a shared file does not \
91
- exist.
92
- DESC
93
- task :create_symlink, :except => { :no_release => true } do
94
- (shared_files || []).each do |path|
95
- run "ln -nfs #{shared_file_path}/#{path} #{release_path}/#{path}"
90
+ WARNING: It DOES NOT warn you when shared files not exist. \
91
+ So symlink will be created even when a shared file does not \
92
+ exist.
93
+ DESC
94
+ task :create_symlink, :except => { :no_release => true } do
95
+ (shared_files || []).each do |path|
96
+ run "ln -nfs #{shared_file_path}/#{path} #{release_path}/#{path}"
97
+ end
96
98
  end
97
- end
98
- after "deploy:finalize_update", "deploy:shared_file:create_symlink"
99
+ after "deploy:finalize_update", "deploy:shared_file:create_symlink"
99
100
 
100
- end # namespace shared_file
101
- end # namespace deploy
101
+ end # namespace shared_file
102
+ end # namespace deploy
102
103
 
104
+ end
103
105
  end
104
-
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-shared_file
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - teohm
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-05-11 00:00:00.000000000 Z
11
+ date: 2013-08-28 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rdoc
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,35 +27,31 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: bundler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - ! '>='
36
32
  - !ruby/object:Gem::Version
37
- version: 1.0.0
33
+ version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - ! '>='
44
39
  - !ruby/object:Gem::Version
45
- version: 1.0.0
40
+ version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: jeweler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - ! '>='
52
46
  - !ruby/object:Gem::Version
53
- version: 1.8.3
47
+ version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - ! '>='
60
53
  - !ruby/object:Gem::Version
61
- version: 1.8.3
54
+ version: '0'
62
55
  description: Capistrano recipe to symlink shared files e.g. config/database.yml
63
56
  email: teohuiming@gmail.com
64
57
  executables: []
@@ -79,29 +72,25 @@ files:
79
72
  homepage: http://github.com/teohm/capistrano-shared_file
80
73
  licenses:
81
74
  - MIT
75
+ metadata: {}
82
76
  post_install_message:
83
77
  rdoc_options: []
84
78
  require_paths:
85
79
  - lib
86
80
  required_ruby_version: !ruby/object:Gem::Requirement
87
- none: false
88
81
  requirements:
89
82
  - - ! '>='
90
83
  - !ruby/object:Gem::Version
91
84
  version: '0'
92
- segments:
93
- - 0
94
- hash: 2576442302221733653
95
85
  required_rubygems_version: !ruby/object:Gem::Requirement
96
- none: false
97
86
  requirements:
98
87
  - - ! '>='
99
88
  - !ruby/object:Gem::Version
100
89
  version: '0'
101
90
  requirements: []
102
91
  rubyforge_project:
103
- rubygems_version: 1.8.24
92
+ rubygems_version: 2.0.7
104
93
  signing_key:
105
- specification_version: 3
94
+ specification_version: 4
106
95
  summary: Capistrano recipe to symlink shared files e.g. config/database.yml
107
96
  test_files: []