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 +4 -4
- data/lib/sumodev/commands/box.rb +1 -0
- data/lib/sumodev/commands/project.rb +8 -3
- data/lib/sumodev/config.rb +15 -4
- data/lib/sumodev/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a69b29b5b7482fcac439cf03059c38468844a0c
|
4
|
+
data.tar.gz: 6b242d110bbf5e8b7290abc2b8d8e91c2001f1c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb808553299c0b30a1b6f3c5adf1852fe965d3e175975becd1b8a48427ebe4a562260ab487948d78f09e8681bb9695ed5646b9ce8145f0c0fbfc50ba325ec487
|
7
|
+
data.tar.gz: adb22cf7203bf00ef8d5eb002328487b8f7e223157191378c50add33c7e57771da8f64db8598842cb3264ad5824cc4f0a0e68d68caffd5b7f3cdf4e786b2868b
|
data/lib/sumodev/commands/box.rb
CHANGED
@@ -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
|
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
|
-
|
71
|
-
|
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
|
data/lib/sumodev/config.rb
CHANGED
@@ -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
|
data/lib/sumodev/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|