fly.io-rails 0.1.17-aarch64-linux → 0.1.18-aarch64-linux

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: 9b811abd0796f98b64ce088f8e9b2b4cd31308e739a1f11066c78ee4ef203c7c
4
- data.tar.gz: efc0ff0a0ce55759bf6ba1a0d2da3438e7fd85a5ca8216d82a69ff9e18c35833
3
+ metadata.gz: 57e5ae6928d84dfd6e9fbce5617ecdccb86c96f08b66efb388ced7acd6d4300e
4
+ data.tar.gz: a960753eba8fc03563e34656331411d060ce2270b697ce90582d77e95d0dec17
5
5
  SHA512:
6
- metadata.gz: 1b2dcdab7c02f669cdb5f0583d41c0110129ce319121baab165621908f88d2c8436fff613469b5e0ca44281730e47945e5aef7bfabddd13f3e4aae0227e4841b
7
- data.tar.gz: 95876661bc40e5ae17233cd425bebf458e83f12de769bfd2233c4e3e44da629bfbd55752c8017710897a1e8c2f2dffc4e21031aa8f55212d05434f11fb67556f
6
+ metadata.gz: 89fbef2f0e6f4849b179d46875ea4396bb5502ffdbaadcfd5bd4bf7d18d4b4cff5bb3f0858c59ef49f539a8352d9bacf3ba62d962136a9b534d9933004596fb2
7
+ data.tar.gz: 1d7533be67de6e5cc72ec96cacaf5cc13a4bb4ae6f64c7da3974cf4e77473729e80f76a1738cf5da1eed27353ba8158cb285523e114d9b145ba2d922b9631b35
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: aarch64-linux
6
6
  authors:
7
7
  - Sam Ruby