capistrano-shared_configs 0.1.0 → 0.1.1

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: 2ec62c51cf16354a8ef1a2aa22682289c27a26d2
4
- data.tar.gz: e917dcfe540ebed1ad684ed43ab3ae8d2cd231ac
3
+ metadata.gz: 7cbcac32427d37f7be2f46de15130127e4f9e13e
4
+ data.tar.gz: 9c3b46df5b3fd38eced936e1dd6f78b7a006fe6e
5
5
  SHA512:
6
- metadata.gz: 3f80520020362bd822d7bf913d6350f89c40d0f74a320ecbf1ab5cac80c1325e019ba2dba3fdead6acf5e224cce25e4c942f7f3fafe6cb9b825843e08d86b4b1
7
- data.tar.gz: d0b49e3970d70cc60df929e778b8c99d9a880c1ed84a2cde4d49b42f979a9ae7597e54c282ef83fef608febf4aca3c1e4d2029d008df4b5cecedf79884465450
6
+ metadata.gz: 3732020492528877c0d3c619d4db35b7617427394d93a54cae0d57cd918b4ae9e24c92f7b681c0b9b065366c4f43ca05dba16a1b94776e5fe54b407f7268a925
7
+ data.tar.gz: 0879adfc20aa6d20f7723e588cc7be38599a2e57a8c01675b4c1777549d1fa01dad603ccabc8447ff8961a497cee86498b283fc9301ea7ae1877d1dd1cf3a230
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Capistrano::SharedConfigs
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/capistrano/shared_configs`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This gem provides capistrano tasks to pull the latest configs from the shared configs branch and update the symlinks in the shared directory.
6
4
 
7
5
  ## Installation
8
6
 
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module SharedConfigs
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -1,14 +1,5 @@
1
- def within_repo_configs_path(&block)
2
- repo_config_path = Pathname.new("#{shared_path}/repo_configs")
3
- on roles(:app) do
4
- if test("[ -d #{repo_config_path} ]")
5
- within repo_config_path do
6
- yield block
7
- end
8
- else
9
- puts "No shared configs located at #{repo_config_path}"
10
- end
11
- end
1
+ def repo_config_path
2
+ Pathname.new("#{shared_path}/repo_configs")
12
3
  end
13
4
 
14
5
  namespace :shared_configs do
@@ -20,15 +11,29 @@ namespace :shared_configs do
20
11
 
21
12
  desc 'Pulls the latest from the shared configs directory'
22
13
  task :pull do
23
- within_repo_configs_path do
24
- execute 'git pull'
14
+ on roles(:app) do
15
+ if test("[ -d #{repo_config_path} ]")
16
+ execute <<-COMMAND
17
+ cd #{repo_config_path}
18
+ git pull
19
+ COMMAND
20
+ else
21
+ puts "Unable to pull shared configs. No shared configs located at #{repo_config_path}."
22
+ end
25
23
  end
26
24
  end
27
25
 
28
26
  desc 'Symlinks the shared configs directory into the capistrano shared directory'
29
27
  task :symlink do
30
- within_repo_configs_path do
31
- execute 'cp -rlf * ../'
28
+ on roles(:app) do
29
+ if test("[ -d #{repo_config_path} ]")
30
+ execute <<-COMMAND
31
+ cd #{repo_config_path}
32
+ cp -rlf * ../
33
+ COMMAND
34
+ else
35
+ puts "Unable to symlink shared configs. No shared configs located at #{repo_config_path}."
36
+ end
32
37
  end
33
38
  end
34
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-shared_configs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jessie Keck