mozzn 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mozzn/commands/app.rb +15 -13
- data/lib/mozzn/version.rb +1 -1
- data/mozzn.gemspec +1 -0
- metadata +16 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 454e5a3c7cc085d45c2fafcd2d5e9b4deca671d6
|
4
|
+
data.tar.gz: dbf48df77a6d527f31d77b1c9549382d92cc1ce7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb0f39b1ff4c33ea5496ff1950ce1b4a0aa7bbdaa821afbfcdf59f9fe29e7f261fa4a428471f988447f77a8bba8de4b04b41674a6b51ef9415611359cb5aef0e
|
7
|
+
data.tar.gz: ff490d0b66bc7ac52037bbca27ba3c501650faa8fe865f5c15ea0b2ebde9bbafd34c703c4e2bc2efdee7734a9048af43b34d1d4da176681d3c70afcb0ac3c268
|
data/lib/mozzn/commands/app.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'parseconfig'
|
2
|
+
|
1
3
|
module Mozzn
|
2
4
|
module Commands
|
3
5
|
class App < Thor
|
@@ -21,7 +23,7 @@ module Mozzn
|
|
21
23
|
}
|
22
24
|
response = mozzn.post(path, params)
|
23
25
|
if response.has_key?('message')
|
24
|
-
raise Thor::Error, "#{response['message']}"
|
26
|
+
raise Thor::Error, "#{response['message']}."
|
25
27
|
else
|
26
28
|
say response['info'], :green
|
27
29
|
git = Git.init
|
@@ -36,7 +38,7 @@ module Mozzn
|
|
36
38
|
begin
|
37
39
|
git.add_remote("mozzn", "git@git.mozzn.com:#{name}.git")
|
38
40
|
rescue Git::GitExecuteError => e
|
39
|
-
say 'Git remote already configured, skipping
|
41
|
+
say 'Git remote already configured, skipping.'
|
40
42
|
end
|
41
43
|
end
|
42
44
|
rescue Mozzn::Disconnected
|
@@ -65,7 +67,7 @@ module Mozzn
|
|
65
67
|
begin
|
66
68
|
response = mozzn.get(search_path, params)
|
67
69
|
if response.has_key?('info')
|
68
|
-
raise Thor::Error, "#{response['info']}"
|
70
|
+
raise Thor::Error, "#{response['info']}."
|
69
71
|
else
|
70
72
|
id = response['app_id']
|
71
73
|
resources_path = "applications/#{id}/remove"
|
@@ -80,7 +82,7 @@ module Mozzn
|
|
80
82
|
rescue Mozzn::UnexpectedOutput
|
81
83
|
say 'UnexpectedOutput', :red
|
82
84
|
end
|
83
|
-
desc "list", "List all your Applications
|
85
|
+
desc "list", "List all your Applications"
|
84
86
|
|
85
87
|
def list
|
86
88
|
#TODO
|
@@ -205,16 +207,16 @@ module Mozzn
|
|
205
207
|
desc 'appname', 'Get application name'
|
206
208
|
def appname
|
207
209
|
config_file_path = ".git/config"
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
210
|
+
unless File.exists?(config_file_path)
|
211
|
+
raise Thor::Error,"Unable to find a Git repository for this directory. You are probably not in the application directory or this application does not have a Git repository yet."
|
212
|
+
end
|
213
|
+
config = ParseConfig.new(config_file_path)
|
214
|
+
our_key = 'remote "mozzn"'
|
215
|
+
unless config.get_groups.include?(our_key)
|
216
|
+
raise Thor::Error,"Unable to find a Git repository for this directory. You are probably not in the application directory or this application does not have a Git repository yet."
|
214
217
|
end
|
215
|
-
url =
|
216
|
-
|
217
|
-
appname = app.split('.').first
|
218
|
+
url = config['remote "mozzn"']['url']
|
219
|
+
appname = url.split(':').last.split('.').first
|
218
220
|
end
|
219
221
|
end
|
220
222
|
end
|
data/lib/mozzn/version.rb
CHANGED
data/mozzn.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mozzn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mozzn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: parseconfig
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
139
153
|
description: Command Line Interface to mozzn
|
140
154
|
email:
|
141
155
|
- info@mozzn.com
|
@@ -197,4 +211,3 @@ test_files:
|
|
197
211
|
- spec/cli_spec.rb
|
198
212
|
- spec/key_spec.rb
|
199
213
|
- spec/spec_helper.rb
|
200
|
-
has_rdoc:
|