tmrw-cli 0.1.0 → 0.2.0

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: e2a1301d0c6415f24b771e33fdbac1475b5cbea7e91bc86d450d5995cb2bab1c
4
- data.tar.gz: 0e02099c36cea3850d99705f2b15faafd55ae5185791e731cee2ad3e65aeeaf5
3
+ metadata.gz: 9e094641d96b016b47489391e05536f72e87c0960081b06c31329e3f958cb7c4
4
+ data.tar.gz: d1214611a26b3cc1c79654033b15efeb066d5e144aeef8224f15756251cb71c6
5
5
  SHA512:
6
- metadata.gz: 308501df557110f9e5cda6560eff16bb98fe94360eb73c424bbc180d64b0f9e6e6d76e30ad1a43d7f7f7b47188030edb836574f90f440beb592835d2bbe1c64e
7
- data.tar.gz: dc6236dd6c68de511b1b07d6655433faf3fb779bb73fe6d8e3bfd24dc5feb03177da5dac1e26b9e728d4ef149040775a6d9b6eaf4e3bd334219419e83639f486
6
+ metadata.gz: f2d1012a1e69f9510f2ce6cd63b1ef0cb173db6c354bf1df5c6fea4d390499128fd5c6ac6130bc028e28e3ef78a2be053565a7fa3936887612c3534a3812343b
7
+ data.tar.gz: 677c7b15af158d51c1b4f0c2cf6a1e6341c711d9fff5bbd40e23ce594325010152c37510bfca703b030cac40cc00ee20e093ccf5b9914eb4ad3f83077f0c8fb4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- tmrw-cli (0.1.0)
4
+ tmrw-cli (0.2.0)
5
5
  dry-cli (~> 0.4.0)
6
6
  tty-markdown (~> 0.6.0)
7
7
  tty-prompt (~> 0.20.0)
@@ -6,6 +6,7 @@ require "tmrw/docker_image"
6
6
  require "tmrw/color"
7
7
  require "tmrw/namespaces_command"
8
8
  require "tmrw/switch_command"
9
+ require "tmrw/open_command"
9
10
  require "tmrw/publish_command"
10
11
  require "tmrw/containers_command"
11
12
  require "tmrw/console_command"
@@ -3,6 +3,7 @@ module Tmrw
3
3
  extend Dry::CLI::Registry
4
4
 
5
5
  register "publish", PublishCommand
6
+ register "open", OpenCommand
6
7
 
7
8
  if ENV["ALPHA"]
8
9
  register "namespaces", NamespacesCommand
@@ -11,7 +11,7 @@ module Tmrw
11
11
  raise "Failed to build docker image" unless ok
12
12
  end
13
13
 
14
- def push
14
+ def push!
15
15
  ok = system("docker push #{tag}")
16
16
  raise "Failed to push image to registry" unless ok
17
17
  end
@@ -0,0 +1,13 @@
1
+ module Tmrw
2
+ class OpenCommand < Dry::CLI::Command
3
+ desc "Opens application in a browser"
4
+
5
+ argument :name, desc: "Application name", required: true
6
+
7
+ def call(name:, **)
8
+ subdomain = name.gsub("/", "-")
9
+ url = "http://#{subdomain}.tomorrowhq.com"
10
+ system("open #{url}")
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Tmrw
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.2.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmrw-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Volkov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-22 00:00:00.000000000 Z
11
+ date: 2020-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -134,6 +134,7 @@ files:
134
134
  - lib/tmrw/containers_command.rb
135
135
  - lib/tmrw/docker_image.rb
136
136
  - lib/tmrw/namespaces_command.rb
137
+ - lib/tmrw/open_command.rb
137
138
  - lib/tmrw/publish_command.rb
138
139
  - lib/tmrw/switch_command.rb
139
140
  - lib/tmrw/version.rb