intercity 0.1.4 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d35afb301302349a658481ccc4791431ff3d042d
4
- data.tar.gz: 1c7e5d7ab4cfbfb85a5b5ead6cb581a865958741
3
+ metadata.gz: edd9295364761e3b543ba8ddc3ae95ea16d23fb9
4
+ data.tar.gz: 4e1d7f35a1c1f28243a62b661e28c6abca869800
5
5
  SHA512:
6
- metadata.gz: f93310bb6008f3edc8a27d4fe760c2d6480f120200c884cc7e5c6170f21e5ac8f88808303d46ca920b27c59137caa029341b68d361f65cd044f5d3985585cd30
7
- data.tar.gz: 6a605b5a6dbe905730024a76221ee9c3218e2b17d446a0016cbbf1c130b6cb9118b5d1e5a253b6196a25e27e0c0c5594b19242932c6f68d461d03af3a63e5860
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 edit intercity
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 edit APPNAME
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'
4
- s.date = '2015-03-15'
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 "edit APPLICATION", "Edit ENV variables for application"
30
+ desc "config APPLICATION", "Edit ENV variables for application"
28
31
  option :user, default: "root"
29
32
  option :server, type: :string
30
- def edit(application)
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
- response = system("$EDITOR #{tmp_filename}")
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
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-15 00:00:00.000000000 Z
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