intercity 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: edd9295364761e3b543ba8ddc3ae95ea16d23fb9
4
- data.tar.gz: 4e1d7f35a1c1f28243a62b661e28c6abca869800
3
+ metadata.gz: 49322982eae927d2f688bf309f8c1f248371883e
4
+ data.tar.gz: 9a67fa4297a2a2ec672dcf830caff6f7b329d13e
5
5
  SHA512:
6
- metadata.gz: a376658d200686a094996b57f5358aea26756f0aff714c4313e0fb77f309768de56fcae01d6c30cb37b4250dac010f20be02b16c44d6ced3dea35135f06ff20a
7
- data.tar.gz: 0d92dd4db5739ae0fb0dbad6e27ccad6bdc3e2e8fbca82e4c7fdd9e4b0bfdd4b3dcdd1c3d3dcf8195025addcbf6f403ee90e7da3d0eef4542272a635232f7b19
6
+ metadata.gz: a579704821507a9a7e4be4ddee0c82867ca263a342c84754abf7978a1b44abf2cdf2db274ca393af5012ac0c83a14ef9d5d67d59e634cd326c58efdeeb15cf49
7
+ data.tar.gz: aaa03751dc4395793e3b8a66d96d937681d4ee3510078b2ba7dbac5caf41e69e65a5f0ecc9aaccd7b3b3947780a0fef641bd4e68a70f8e732f0336f54dcbf459
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'intercity'
3
- s.version = '0.1.5'
3
+ s.version = '0.1.6'
4
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']
@@ -106,7 +106,7 @@ module IntercityCLI
106
106
  option :database_user, type: :string, default: SecureRandom.hex(6)
107
107
  option :database_password, type: :string, default: SecureRandom.hex()
108
108
  option :database_host, type: :string, default: "localhost"
109
- option :ruby_version, type: :string, default: "2.1.3"
109
+ option :ruby_version, type: :string, default: "2.2.1"
110
110
  def add(application)
111
111
  configuration = IntercityCLI::Configuration.new()
112
112
 
@@ -37,8 +37,8 @@ module IntercityCLI
37
37
  execute "curl -L https://www.chef.io/chef/install.sh | sudo bash"
38
38
 
39
39
  # Install chef-repo
40
- execute "wget http://binaries.intercityup.com/cookbooks/cookbooks-2.3.1.tar.gz?client=cli -O cookbooks-2.3.1.tar.gz"
41
- execute "tar zxf cookbooks-2.3.1.tar.gz"
40
+ execute "wget http://binaries.intercityup.com/cookbooks/cookbooks-2.4.0.tar.gz?client=cli -O cookbooks-2.4.0.tar.gz"
41
+ execute "tar zxf cookbooks-2.4.0.tar.gz"
42
42
 
43
43
  solo_config = StringIO.new('cookbook_path ["/root/cookbooks"]')
44
44
  upload! solo_config, "/root/solo.rb"
@@ -48,6 +48,20 @@ module IntercityCLI
48
48
  end
49
49
 
50
50
  configuration.active_server = address
51
+
52
+ node_file = File.join(configuration.nodes_directory, "#{address}.json")
53
+
54
+ if File.exists?(node_file)
55
+ raw_json = File.read(node_file)
56
+ json = JSON.parse(raw_json)
57
+ else
58
+ json = {}
59
+ end
60
+
61
+ File.open(node_file, "w+") do |f|
62
+ f.write(JSON.pretty_generate(json))
63
+ end
64
+
51
65
  puts
52
66
  puts "Badam. Server #{address} initialized."
53
67
  puts "This server will be used for subsequent commands."
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.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michiel Sikkes
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.2.2
101
+ rubygems_version: 2.4.5
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: Command-line interface for hosting Rails apps on your server.
metadata.gz.sig CHANGED
Binary file