intercity 0.1.2 → 0.1.3

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: 839bbcd9b7b4c37fe2852417b04b78c93a2bf494
4
- data.tar.gz: 92f8944544dd5be756d7c6cf6e6c5577ce366b1f
3
+ metadata.gz: b9e4cb14857b488f4fa9b273892debcc5fd189c7
4
+ data.tar.gz: 732ddd745efc949198da1663c003e6ae081950ec
5
5
  SHA512:
6
- metadata.gz: e2b7e09ee366fd2f8d65d0b3ec80fbbb337525754d05ba7bf9061559b2f29888a2844b45f8103baee126768a539826972a7be562eea88a1bb0eb021d69ca1513
7
- data.tar.gz: 7254762f6105434bb52b41a764054ace20c8816f72a926ba9ca74dd20c1212ba8b285f27e882eb3f60b385bfd803b3b33f977e1254a560b182b27ead786db373
6
+ metadata.gz: 8883ba153a41414ff4617a16184f23a0c80fceafbd35889c828ebb3a3ef0107f6438979e85e3b67521ec5ece5542f8752e48c39c4eff85f9401664341d5428bf
7
+ data.tar.gz: 48610b447767312fade43c6e5723e0f7f17507af06f3716561e23c8edf0dd1ffd6b300b873d75e5a21a1dc42aab91c48ea4fa7c0e49c1cec7f62dabf20660653
checksums.yaml.gz.sig CHANGED
Binary file
data/intercity.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'intercity'
3
- s.version = '0.1.2'
3
+ s.version = '0.1.3'
4
4
  s.date = '2015-01-24'
5
5
  s.summary = 'Command-line interface for hosting Rails apps on your server.'
6
6
  s.authors = ['Michiel Sikkes']
@@ -103,8 +103,12 @@ module IntercityCLI
103
103
  option :ruby_version, type: :string, default: "2.1.3"
104
104
  def add(application)
105
105
  address = options[:server]
106
- if File.exists?("#{address}.json")
107
- raw_json = File.read("#{address}.json")
106
+
107
+ configuration = IntercityCLI::Configuration.new()
108
+ node_file = File.join(configuration.config_directory, "#{address}.json")
109
+
110
+ if File.exists?(node_file)
111
+ raw_json = File.read(node_file)
108
112
  json = JSON.parse(raw_json)
109
113
  else
110
114
  raise "No configuration file for this server yet! Please create one by running:\n\n$ intercity server install <ip address>\n\n"
@@ -129,7 +133,7 @@ module IntercityCLI
129
133
  }
130
134
  )
131
135
 
132
- File.open("#{address}.json", "w") do |f|
136
+ File.open(node_file, "w+") do |f|
133
137
  f.write(JSON.pretty_generate(json))
134
138
  end
135
139
 
@@ -139,7 +143,7 @@ module IntercityCLI
139
143
  with debian_frontend: :noninteractive do
140
144
  host.user = user
141
145
 
142
- upload! "#{address}.json", "/root/server_config.json"
146
+ upload! node_file, "/root/server_config.json"
143
147
 
144
148
  execute 'chef-client -z -j ~/server_config.json -o "recipe[rails::passenger],recipe[rails::databases]"'
145
149
  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.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michiel Sikkes
metadata.gz.sig CHANGED
Binary file