combat 0.9.2 → 0.9.5
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.
- data/lib/combat.rb +10 -6
- data/lib/version.rb +1 -1
- metadata +2 -2
data/lib/combat.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
class Combat < Thor
|
2
2
|
include Thor::Actions
|
3
|
+
|
4
|
+
COMBAT_CONFIG_FILE = 'combat.yml'
|
3
5
|
|
4
6
|
map '-s' => 'setup'
|
5
7
|
map '-d' => 'deploy'
|
@@ -37,8 +39,8 @@ class Combat < Thor
|
|
37
39
|
:remote_user => defaults[:remote_user] || 'www-data'
|
38
40
|
}
|
39
41
|
|
40
|
-
unless File.exists?(
|
41
|
-
create_file
|
42
|
+
unless File.exists?(COMBAT_CONFIG_FILE)
|
43
|
+
create_file COMBAT_CONFIG_FILE, settings.to_yaml
|
42
44
|
end
|
43
45
|
|
44
46
|
system "mkdir -p deployed"
|
@@ -51,8 +53,9 @@ class Combat < Thor
|
|
51
53
|
end
|
52
54
|
|
53
55
|
desc "deploy", "Deploy a project to the server for testing"
|
56
|
+
method_options :config => :string
|
54
57
|
def deploy
|
55
|
-
load_config
|
58
|
+
load_config(options[:config] || COMBAT_CONFIG_FILE)
|
56
59
|
|
57
60
|
if @config.valid?
|
58
61
|
deploy_html_file = 'combat_deployed_page.html'
|
@@ -82,8 +85,9 @@ class Combat < Thor
|
|
82
85
|
end
|
83
86
|
|
84
87
|
desc "open", "Open the deploy page in the browser (Mac OS only)"
|
88
|
+
method_options :config => :string
|
85
89
|
def open
|
86
|
-
load_config
|
90
|
+
load_config(options[:config] || COMBAT_CONFIG_FILE)
|
87
91
|
%x{open #{@config.url}}
|
88
92
|
end
|
89
93
|
|
@@ -97,8 +101,8 @@ class Combat < Thor
|
|
97
101
|
end
|
98
102
|
end
|
99
103
|
|
100
|
-
def load_config
|
101
|
-
string = File.read(
|
104
|
+
def load_config(file)
|
105
|
+
string = File.read(file)
|
102
106
|
yml = YAML::load(string)
|
103
107
|
@config = Settings.new(yml)
|
104
108
|
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: combat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.9.
|
5
|
+
version: 0.9.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Tomislav Car
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-11-16 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: Deploy your iPhone and Android apps to clients with ease. It's like Capistrano, only for mobile apps.
|