unfold 1.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/unfold.rb +5 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60b7400582a701247f1a4eff588c1c1466a56d9c
4
- data.tar.gz: b3f59cbf2f4492a42745ba678c0886772c2f227d
3
+ metadata.gz: cac5b5e9580da7fa1d53e368a9973630601016eb
4
+ data.tar.gz: e880c9effeff80330533fb1d5d0d2a6d4d8f43af
5
5
  SHA512:
6
- metadata.gz: d0add756ea37a281bb44758b72dc4998b002e6a9a4fd87fbb2e44d47c47f2289b9ee157c5acbc5bff0c5cd80bbe177d50aa5ebb186423ee981c7246462cd30fb
7
- data.tar.gz: d9771451840810bcc1f5e36cc40c34b385a0dec8037d18995152bb59a1373c00f361dd4d55295ef2698ea64ef8ff0bb83576d00aaa0434879a08451a23281164
6
+ metadata.gz: e873293ca34d69abb1490c8297ac7f5a9a43c29362c47dea0a24d574c757989903313e7fc7b5400b5ae670bc402719e2688da66c67a97f83b9e895e05ec188d5
7
+ data.tar.gz: 8343056f19ac5ac04f5e7b355dd44edbfebe384c4f6315e5d625109dd27a740bdb67fd0efa2cddcdf922be236807e3b80842fe0fe76740ea5f2b12c86da6e69e
data/lib/unfold.rb CHANGED
@@ -32,7 +32,7 @@ module Unfold
32
32
  end
33
33
  end
34
34
 
35
- # creates a post-receive hook script from a config file
35
+ # creates a post-receive hook script from a configuration
36
36
  def self.post_receive_script(c)
37
37
  log_location = "~/.unfold/logs/#{c.appname}-#{c.env}/deploy.log"
38
38
  postdep = "#{c.remote_destination}/config/unfold_postdeploy.rb"
@@ -60,7 +60,6 @@ module Unfold
60
60
 
61
61
  # set up the local git repo's remotes
62
62
  configs.each do |c|
63
- # add it as a remote to the local git repo
64
63
  repo_path = "~/.unfold/repos/#{c.appname}-#{c.env}.git"
65
64
  `git remote add #{c.env} #{c.remote_user}@#{c.remote_host}:#{repo_path}`
66
65
  end
@@ -81,8 +80,8 @@ module Unfold
81
80
  logs_path = "#{path}/.unfold/logs/#{c.appname}-#{c.env}/"
82
81
 
83
82
  # create the remote repo
84
- print ssh.exec!("mkdir -p #{repo_path}; mkdir -p #{logs_path}")
85
- print ssh.exec!("cd #{repo_path}; git --bare init")
83
+ ssh.exec!("mkdir -p #{repo_path}; mkdir -p #{logs_path}")
84
+ ssh.exec!("cd #{repo_path}; git --bare init")
86
85
 
87
86
  # upload the post-receive hook
88
87
  script = StringIO.new(Unfold.post_receive_script(c))
@@ -90,10 +89,10 @@ module Unfold
90
89
  ssh.scp.upload!(script, dest)
91
90
 
92
91
  # make it executable
93
- print ssh.exec!("chmod 775 #{repo_path}/hooks/post-receive")
92
+ ssh.exec!("chmod 775 #{repo_path}/hooks/post-receive")
94
93
 
95
94
  # move to the deployment target and locally clone the repo
96
- print ssh.exec!("cd #{c.remote_destination}; git clone #{repo_path} .")
95
+ ssh.exec!("cd #{c.remote_destination}; git clone #{repo_path} .")
97
96
  end
98
97
  end
99
98
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unfold
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathaniel Symer