intercity 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.md +2 -2
- data/intercity.gemspec +2 -2
- data/lib/intercity/cli/application.rb +17 -3
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edd9295364761e3b543ba8ddc3ae95ea16d23fb9
|
4
|
+
data.tar.gz: 4e1d7f35a1c1f28243a62b661e28c6abca869800
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a376658d200686a094996b57f5358aea26756f0aff714c4313e0fb77f309768de56fcae01d6c30cb37b4250dac010f20be02b16c44d6ced3dea35135f06ff20a
|
7
|
+
data.tar.gz: 0d92dd4db5739ae0fb0dbad6e27ccad6bdc3e2e8fbca82e4c7fdd9e4b0bfdd4b3dcdd1c3d3dcf8195025addcbf6f403ee90e7da3d0eef4542272a635232f7b19
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ $ intercity sshkey add
|
|
46
46
|
You can edit environment variables for your app like this:
|
47
47
|
|
48
48
|
```
|
49
|
-
$ intercity application
|
49
|
+
$ intercity application config intercity
|
50
50
|
```
|
51
51
|
|
52
52
|
Finally, set up Capistrano in your app and deploy with:
|
@@ -88,7 +88,7 @@ $ intercity application create APPNAME
|
|
88
88
|
$ intercity application update APPNAME --domain-name=mysite.com
|
89
89
|
|
90
90
|
# Edit environment variables for an application:
|
91
|
-
$ intercity application
|
91
|
+
$ intercity application config APPNAME
|
92
92
|
|
93
93
|
# List all the applications on the server:
|
94
94
|
$ intercity application list
|
data/intercity.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'intercity'
|
3
|
-
s.version = '0.1.
|
4
|
-
s.date = '2015-03-
|
3
|
+
s.version = '0.1.5'
|
4
|
+
s.date = '2015-03-18'
|
5
5
|
s.summary = 'Command-line interface for hosting Rails apps on your server.'
|
6
6
|
s.authors = ['Michiel Sikkes']
|
7
7
|
s.email = 'michiel.sikkes@gmail.com'
|
@@ -8,6 +8,9 @@ module IntercityCLI
|
|
8
8
|
map "create" => :add
|
9
9
|
map "update" => :add
|
10
10
|
|
11
|
+
map "envvars" => :config
|
12
|
+
map "environment_variables" => :config
|
13
|
+
|
11
14
|
desc "list", "Lists all the application deployments on the server"
|
12
15
|
option :user, default: "root"
|
13
16
|
option :server, type: :string
|
@@ -24,10 +27,10 @@ module IntercityCLI
|
|
24
27
|
end
|
25
28
|
end
|
26
29
|
|
27
|
-
desc "
|
30
|
+
desc "config APPLICATION", "Edit ENV variables for application"
|
28
31
|
option :user, default: "root"
|
29
32
|
option :server, type: :string
|
30
|
-
def
|
33
|
+
def config(application)
|
31
34
|
configuration = IntercityCLI::Configuration.new()
|
32
35
|
address = options[:server] || configuration.active_server!
|
33
36
|
node_file = File.join(configuration.nodes_directory, "#{address}.json")
|
@@ -54,7 +57,11 @@ module IntercityCLI
|
|
54
57
|
end
|
55
58
|
|
56
59
|
file_stamp_before_editing = File.mtime(tmp_filename)
|
57
|
-
|
60
|
+
|
61
|
+
editor = ENV["EDITOR"] || find_editor("editor") || find_editor("nano")
|
62
|
+
|
63
|
+
edit_command = "#{editor} #{tmp_filename}"
|
64
|
+
response = system(edit_command)
|
58
65
|
|
59
66
|
if file_stamp_before_editing != File.mtime(tmp_filename)
|
60
67
|
new_vars = {}
|
@@ -153,5 +160,12 @@ module IntercityCLI
|
|
153
160
|
end
|
154
161
|
end
|
155
162
|
end
|
163
|
+
|
164
|
+
private
|
165
|
+
|
166
|
+
def find_editor(editor_name)
|
167
|
+
editor_command = `which #{editor_name}`
|
168
|
+
return editor_command.chomp if editor_command != ""
|
169
|
+
end
|
156
170
|
end
|
157
171
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intercity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michiel Sikkes
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
+MPuiRlaQjfZy/soMMERP/wuGpw6Ce94ITJ56wjQgl3YhqQPoE76KgRu4b4YwKhx
|
31
31
|
H7APPQD4vksmpWYDCN7llFs/nPaYM6lkxy7bcHRQxaA/km9IF+0iwbhv9mDdDQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-03-
|
33
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: thor
|
metadata.gz.sig
CHANGED
Binary file
|