fly.io-rails 0.1.17-x64-mingw32 → 0.1.18-x64-mingw32

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
  SHA256:
3
- metadata.gz: db56dc0375073cb48b4255df0b41f4e77967d0e6ca30040756e1f12d121eef31
4
- data.tar.gz: 656579b8ad9eb78bf19e46953ac8edbd389ca46f358dad011460cf488a65b681
3
+ metadata.gz: de0c354099a707c5df36e1661c21870170a523d2755ea0935891cf4bf14d9783
4
+ data.tar.gz: c1eb047bea6edfa1de626ecc43c53951e26f44fdef79db0d26d769203a4f0369
5
5
  SHA512:
6
- metadata.gz: b2bce63de2d640a1371ca80c524ae31fcb5d376a22b7d2961e42ad12c4897afc0ef71b96492c6c97e29b555527a5d3acb987c7ed10534c3a11e476ce42fc417e
7
- data.tar.gz: 8d989eb0092f908a2666efcd2d668e33dda2f9a53d4a36f169d46234acd801208adc5a1652c61a7ac8d5564497af6a56677ba1bb11db25661df2aaf8988eace5
6
+ metadata.gz: e919bec2e6d040b0e66155a433b7068eab2294dc6d34e74549f7e0b12f99cef8f30cc28bb1bcdad0ba44aa00334c98132fe014b76bb89af5087656b14ab630f4
7
+ data.tar.gz: f44a08b3ce2ae82f0ad3f7d1f98b07489bc7f236e5a1fc1b787a9c4828a0af6e3597dd546e269135f16bec8a48cdd2cff5da9644e032b7f525e26bb35d217107
Binary file
@@ -237,8 +237,8 @@ module Fly
237
237
  output[%r{redis://\S+}]
238
238
  end
239
239
 
240
- def release(app, config)
241
- start = Fly::Machines.create_and_start_machine(app, config: config)
240
+ def release(app, options)
241
+ start = Fly::Machines.create_and_start_machine(app, options)
242
242
  machine = start[:id]
243
243
 
244
244
  if not machine
@@ -322,9 +322,6 @@ module Fly
322
322
 
323
323
  # default config
324
324
  config = {
325
- region: @region,
326
- app: app,
327
- name: "#{app}-machine",
328
325
  image: image,
329
326
  guest: {
330
327
  cpus: @config.machine.cpus,
@@ -353,7 +350,7 @@ module Fly
353
350
 
354
351
  # perform release
355
352
  say_status :fly, release_config[:env]['SERVER_COMMAND']
356
- event, exit_code, machine = release(app, release_config)
353
+ event, exit_code, machine = release(app, region: @region, config: release_config)
357
354
 
358
355
  if exit_code != 0
359
356
  STDERR.puts 'Error performing release'
@@ -410,19 +407,22 @@ module Fly
410
407
 
411
408
  # start app
412
409
  machines = {}
410
+ options = {region: @region, config: config}
413
411
  say_status :fly, "start #{app}"
414
412
  if not toml['processes'] or toml['processes'].empty?
415
- start = Fly::Machines.create_and_start_machine(app, config: config)
413
+ options[:name] = "#{app}-machine",
414
+ start = Fly::Machines.create_and_start_machine(app, options)
416
415
  machines['app'] = start[:id]
417
416
  else
418
417
  config[:env] ||= {}
419
418
  config[:env]['NATS_SERVER'] = 'localhost'
420
419
  toml['processes'].each do |name, entrypoint|
420
+ options[:name] = "#{app}-machine-#{name}"
421
421
  config[:env]['SERVER_COMMAND'] = entrypoint
422
- start = Fly::Machines.create_and_start_machine(app, config: config)
422
+ start = Fly::Machines.create_and_start_machine(app, options)
423
423
 
424
424
  if start['error']
425
- STDERR.puts start.inspect
425
+ STDERR.puts "ERROR: #{start.error}"
426
426
  exit 1
427
427
  end
428
428
 
@@ -499,7 +499,7 @@ module Fly
499
499
  # perform release, if necessary
500
500
  if (IO.read('lib/tasks/fly.rake') rescue '') =~ /^\s*task[ \t]*+:?release"?[ \t]*\S/
501
501
  say_status :fly, config[:env]['SERVER_COMMAND']
502
- event, exit_code, machine = release(app, config)
502
+ event, exit_code, machine = release(app, region: @region, config: config)
503
503
  else
504
504
  exit_code = 0
505
505
  end
@@ -1,3 +1,3 @@
1
1
  module Fly_io
2
- VERSION = '0.1.17'
2
+ VERSION = '0.1.18'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fly.io-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Sam Ruby