sumodev 0.2.2 → 0.3.0

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: 089ef41613c50e3b181da222401ea5f115df3f05
4
- data.tar.gz: 8295eb6155fa7dcae9562e5c525f22bd407d7ab8
3
+ metadata.gz: 3a69b29b5b7482fcac439cf03059c38468844a0c
4
+ data.tar.gz: 6b242d110bbf5e8b7290abc2b8d8e91c2001f1c4
5
5
  SHA512:
6
- metadata.gz: 56a04fc4624b75087acbbeecc7c28ce4eac67037d9392c77fe7eb743aea60163ca4e5d11ee9f5f857b15bde4713c33b9bd9c20c50c2cb41e645a7dd16ab0582a
7
- data.tar.gz: e2ef394e378287eec0483def2472a5011503ea3b07f139557834fd22ddf90885aa8be1e58c01cd3a59b1c92db778263debeadf4217137b48d3842a0c8e2503de
6
+ metadata.gz: fb808553299c0b30a1b6f3c5adf1852fe965d3e175975becd1b8a48427ebe4a562260ab487948d78f09e8681bb9695ed5646b9ce8145f0c0fbfc50ba325ec487
7
+ data.tar.gz: adb22cf7203bf00ef8d5eb002328487b8f7e223157191378c50add33c7e57771da8f64db8598842cb3264ad5824cc4f0a0e68d68caffd5b7f3cdf4e786b2868b
@@ -29,6 +29,7 @@ class Sumodev::Commands::Box < Sumodev::Command
29
29
  end
30
30
 
31
31
  def configure_port_mapping
32
+ return unless Sumodev::Config.true?('SUMO_FORWARD_PORTS')
32
33
  ipfw_lines = `sudo ipfw list`
33
34
 
34
35
  {
@@ -34,7 +34,7 @@ class Sumodev::Commands::Project < Sumodev::Command
34
34
  tmp_path = File.expand_path(Sumodev::Config.get('SUMO_TEMP_PATH'));
35
35
 
36
36
  system "rm -rf #{tmp_path}/temp_project"
37
- system "git clone -q #{repo} #{tmp_path}/temp_project 2> /dev/null"
37
+ system "git clone -q #{repo} #{tmp_path}/temp_project > /dev/null"
38
38
 
39
39
  capfile_path = "#{tmp_path}/temp_project/Capfile"
40
40
  if File.file?(capfile_path)
@@ -67,8 +67,13 @@ class Sumodev::Commands::Project < Sumodev::Command
67
67
  end
68
68
 
69
69
  say "Grabbing data", :green
70
- system "cd #{project_path}; cap #{stage} sumodev:db:get"
71
- system "cd #{project_path}; cap #{stage} sumodev:files:get"
70
+ if File.file?(gemfile_path)
71
+ system "cd #{project_path}; bundle exec cap #{stage} sumodev:db:get"
72
+ system "cd #{project_path}; bundle exec cap #{stage} sumodev:files:get"
73
+ else
74
+ system "cd #{project_path}; cap #{stage} sumodev:db:get"
75
+ system "cd #{project_path}; cap #{stage} sumodev:files:get"
76
+ end
72
77
 
73
78
  say "Change location to the project", :green
74
79
  Dir.chdir project_path # @todo defv this doesn't work
@@ -5,8 +5,19 @@ class Sumodev::Config
5
5
 
6
6
  attr_accessor :variables
7
7
 
8
+ class << self
9
+ def get(*args)
10
+ instance.get(*args)
11
+ end
12
+
13
+ def true?(*args)
14
+ instance.true?(*args)
15
+ end
16
+ end
17
+
8
18
  Defaults = {
9
19
  'SUMO_TEMP_PATH' => "/tmp/",
20
+ 'SUMO_FORWARD_PORTS' => true
10
21
  }
11
22
 
12
23
  def initialize
@@ -23,11 +34,11 @@ class Sumodev::Config
23
34
  end
24
35
  end
25
36
 
26
- def self.get(*args)
27
- instance.get(*args)
28
- end
29
-
30
37
  def get(name)
31
38
  @variables[name] || Defaults[name] || raise("Can't find setting for #{name} in ~/.sumorc")
32
39
  end
40
+
41
+ def true?(name)
42
+ ['1', 'true', 'yes', 't', 'y'].member?(get(name).downcase)
43
+ end
33
44
  end
@@ -1,3 +1,3 @@
1
1
  module Sumodev
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sumodev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan De Poorter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-06 00:00:00.000000000 Z
11
+ date: 2014-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport