shaddox 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 98dd88534434214e1cde9ceb7134f0b0e449665c
4
- data.tar.gz: 1d22d40f4a16cfebf276d3fbd98f721a7eafc273
3
+ metadata.gz: 959be3a573d73f65aff4a01e635b0b7825c32456
4
+ data.tar.gz: c57378931aed9b37b571f1e43c188909d1235761
5
5
  SHA512:
6
- metadata.gz: fa6d70301608061127ec6e8d1c6f569892ef8927fbd3cd300b09bf6e3ccce604320de41d0a9489fb630d7050f189bed81c3b2772231b962524397485a2659302
7
- data.tar.gz: 862bb4a2a13cca67c4623229546873acd1edd225687afb8a0dbb4923bf99c60fb1e41f506e7b843e8d3a079775ad61826ee1b0894866da185ee7cce97caaad78
6
+ metadata.gz: 8d11f2eab72bdfa3b5cf07b69edd8f69ef0e9fca8ed2e8b50424549f4e04fb9418a9c1cf1de4b49a18c5631722e096102ee857d7d1a4ade45485f4ab26778607
7
+ data.tar.gz: d4a8d0ea643810e493e32c5aee0a141ee5630edcf556e09d27b78bbcba1ca2a4b0b5f01272491d15b83aef786e51fc20ec39446bbe8e03035fa950e25bc2efd6
@@ -10,7 +10,7 @@ module Shaddox
10
10
  require 'fileutils'
11
11
  #include FileUtils
12
12
  def initialize(options, &block)
13
- @debug = options[:debug] || false
13
+ @debug = options[:debug] || true # TODO: change to false for actual release
14
14
  @installer = options[:installer]
15
15
  @tmppath = options[:tmppath] || '/tmp/shaddox/'
16
16
  @required = true
@@ -36,11 +36,10 @@ module Shaddox
36
36
  end
37
37
 
38
38
  def cd(path, &block)
39
- current_path = Dir.pwd
40
39
  mkdir(path)
41
- FileUtils.cd(path.exp_path)
42
- instance_eval(&block)
43
- FileUtils.cd(current_path)
40
+ FileUtils.cd(path.exp_path) do
41
+ instance_eval(&block)
42
+ end
44
43
  end
45
44
 
46
45
  def exists(path)
@@ -58,12 +57,12 @@ module Shaddox
58
57
  def ln_s(source, dest, opts = {})
59
58
  ensure_parent_dir(source)
60
59
  ensure_parent_dir(dest)
61
- info "Linking '#{source}' to '#{dest}'", 1 if @verbose
60
+ info "Linking '#{source}' to '#{dest}'", 1 if @debug
62
61
  FileUtils::ln_s(source.exp_path, dest.exp_path, opts)
63
62
  end
64
63
 
65
64
  def mkdir(path)
66
- info "Ensuring directory '#{path}' exists", 1 if @verbose
65
+ info "Ensuring directory '#{path}' exists", 1 if @debug
67
66
  FileUtils::mkdir_p(path.exp_path)
68
67
  end
69
68
 
@@ -102,6 +101,7 @@ module Shaddox
102
101
  case repo.vcs
103
102
  when :git
104
103
  # Clone/update repo in vcs:
104
+ info 'Updating the repository', 1 if @debug
105
105
  if exists_d('vcs')
106
106
  cd 'vcs' do
107
107
  exec "git fetch #{repo.url} #{repo.branch}:#{repo.branch} --force"
@@ -114,10 +114,12 @@ module Shaddox
114
114
 
115
115
  # Link shared paths
116
116
  repo.shared.each do |shared_path|
117
+ info 'Linking shared paths', 1 if @debug
117
118
  ln_s "#{release_path}/#{shared_path}", "./shared/#{shared_path}"
118
119
  end
119
120
 
120
121
  # Link ./current to the latest release
122
+ info 'Linking current to latest release', 1 if @debug
121
123
  ln_s './current', release_path
122
124
  end
123
125
  end
@@ -137,7 +139,7 @@ module Shaddox
137
139
  puts "-------------------"
138
140
  end
139
141
  raise "No installer specified for this target!" unless @installer
140
- info "Ensuring #{package} is installed with #{@installer}", 1 if @verbose
142
+ info "Ensuring #{package} is installed with #{@installer}", 1 if @debug
141
143
  package_installed = lambda { system("type #{package} >/dev/null 2>&1") }
142
144
  unless package_installed.call()
143
145
  case @installer
@@ -1,3 +1,3 @@
1
1
  module Shaddox
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.25"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shaddox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - joshglendenning