shippy 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
  SHA256:
3
- metadata.gz: 9ce6e44f28e948929448f1857fb96cfb88f465d6c87e63875d604fcf82d4249a
4
- data.tar.gz: 04d5c426b722dd01026782c13fb6f0affc5e3adb852078cf6bfab438653f120c
3
+ metadata.gz: 16d22f393393da56cb043a62389601922ba62bc3dc7ce8b0f6d11a7b3880f991
4
+ data.tar.gz: daae530d2031f02777ebee3ee60cc2d2988415498496e6ac37eda94c82b6ec99
5
5
  SHA512:
6
- metadata.gz: 24cbc978591cd530f357e54996dfad3c52ebe039496876925fac2ed40088158066c6e86e1d92fb221ab13f0ff559eac4b6addfdd1119e4845e376b39986bd542
7
- data.tar.gz: 7a6ad6e12d78a962ed9477933b7b8132419343ab4acad6e8048a20879c3b55687bd7ae25509539ae30fe921e1036f9bfe541399cf16123c478ccab08223f8975
6
+ metadata.gz: fc45722dcf032d0b8d0f0023da31a1d03c97af039851cbd67c81ac1a907587d0f964a6b96c49af1aa05cbea96bb4264c1df6859bf49ad748711394fd9eb2ff93
7
+ data.tar.gz: 5e1efdbee18892ddcee10e52ad5078c60ed5aad448f98a536f8b54130c4ccae3081176a5262fbec06ab27abea5cb3cd400447fff780cd5c2c5fc1ac012e78b78
@@ -41,6 +41,17 @@ class Shippy::Cli::App < Shippy::Cli::Base
41
41
  end
42
42
  end
43
43
 
44
+ desc "restart", "Restart application"
45
+ option :service, aliases: "-S", type: :string, desc: "Restart only a SERVICE"
46
+ def restart
47
+ say "Restarting #{app_name} on #{SHIPPY.host}...", :magenta
48
+ restart_options = options[:service] ? ["--", options[:service]] : []
49
+
50
+ within_app do
51
+ execute :docker_compose, "restart", *restart_options
52
+ end
53
+ end
54
+
44
55
  desc "stop", "Stop application"
45
56
  def stop
46
57
  say "Stopping #{app_name} on #{SHIPPY.host}...", :magenta
@@ -65,6 +65,17 @@ class Shippy::Cli::Main < Shippy::Cli::Base
65
65
  end
66
66
  end
67
67
 
68
+ desc "refresh", "Pull newer images and restart services"
69
+ def refresh
70
+ print_runtime do
71
+ Dir.glob("*", base: "apps").each do |name|
72
+ Shippy::Cli::App.send :dispatch, :refresh, [name], {}, {}
73
+ Shippy::Cli::App.send :dispatch, :start, [name], {}, {}
74
+ Shippy::Cli::App.send :dispatch, :status, [name], {}, {}
75
+ end
76
+ end
77
+ end
78
+
68
79
  desc "app", "Manage application"
69
80
  subcommand "app", Shippy::Cli::App
70
81
 
@@ -52,10 +52,6 @@ module Shippy
52
52
  binding
53
53
  end
54
54
 
55
- def local_domains
56
- @services.flat_map(&:local_domains).uniq
57
- end
58
-
59
55
  delegate :x, to: Shippy
60
56
  delegate :wildcard_domain, :local_domain, to: :x
61
57
 
@@ -115,12 +115,6 @@ module Shippy
115
115
  end
116
116
  end
117
117
 
118
- def local_domains
119
- labels.to_a.filter_map do |label|
120
- label.match(/Host\(`(\w+\.#{local_domain})`\)/).to_a[1]
121
- end
122
- end
123
-
124
118
  private
125
119
 
126
120
  def normalize_hooks(data)
@@ -1,3 +1,3 @@
1
1
  module Shippy
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shippy
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
  - Marius Bobin