dokku-cli 0.1.0 → 0.1.1

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: 49fff4f7f596e8abe3d6952838c3b8e05882d9f1
4
- data.tar.gz: 46f771d59e47669ff39bd8f04f7e7a29cad63b9b
3
+ metadata.gz: 724f7ac890a39069c50b97b6217a85780c2dea26
4
+ data.tar.gz: 136f805fb2b8214c333b5f2aaf7acbecb3d50512
5
5
  SHA512:
6
- metadata.gz: f16831197e9855aa8c04e37b5f262d5ddd70d41cfd99b8a4b7de5b7657cb2208258783ad12251743b03dd0d6e785c0b7f04a32855ba3f359ed2b82ca2fb50db1
7
- data.tar.gz: a237acbc1f7ade9de87b2334ec806afc7c7ca958c1060701ffa3ebc081f803dfab8a8963016454ee48902218408bc3c4cbcc30aa97eafbda14e7715617638f0c
6
+ metadata.gz: 12ccd7edd222d9afaecccb33203c6375ae6d3a74249887b4b2dd13b9a73f15ce2ad32e835c740ac6c097e3b10495fd1a84bc83df5a44a159c2d3b41151e05c11
7
+ data.tar.gz: e79dd785bc324fd69b7afa2356c228f7c597a4f5550ab619d48bb11e5212e026017c99948f595b228da7691f3fde49b875a73b968f970c1d5a3bff849c4ad24b
data/README.md CHANGED
@@ -13,7 +13,7 @@ $ gem install dokku-cli
13
13
 
14
14
  ## Usage
15
15
 
16
- Dokku CLI reads the domain of your Dokku server from your git configuration file and requires no configuration. Change in your application directory and run
16
+ Dokku CLI reads the domain of your Dokku server from your git configuration file and requires no configuration. Change in your application directory and run ``dokku``
17
17
 
18
18
  ```
19
19
  $ dokku help
@@ -21,6 +21,7 @@ Commands:
21
21
  dokku config # Display the app's environment variables
22
22
  dokku config:get KEY # Display an environment variable value
23
23
  dokku config:set KEY1=VALUE1 [KEY2=VALUE2 ...] # Set one or more environment variables
24
+ dokku config:set:file path/to/file # Set one or more environment variables from file
24
25
  dokku config:unset KEY1 [KEY2 ...] # Unset one or more environment variables
25
26
  dokku domains # List custom domains for the app
26
27
  dokku domains:add DOMAIN # Add a custom domain to the app
data/lib/dokku_cli.rb CHANGED
@@ -21,8 +21,8 @@ module DokkuCli
21
21
 
22
22
  desc "open", "Open the app in your default browser"
23
23
  def open
24
- # TODO: get domain from 'dokku domains'
25
- exec("open http://#{app_name}.#{domain}")
24
+ url = %x[dokku urls].split("\r").first
25
+ exec("open #{url}")
26
26
  end
27
27
 
28
28
  desc "run <cmd>", "Run a one-off command in the environment of the app"
@@ -46,6 +46,18 @@ module DokkuCli
46
46
  def config_unset(*args)
47
47
  run_command "config:unset #{app_name} #{args.join(' ')}"
48
48
  end
49
-
49
+
50
+ desc "config:set:file path/to/file", "Set one or more environment variables from file"
51
+ def config_set_file(config_file)
52
+ config_params = ""
53
+ if File.exists?(config_file)
54
+ File.open(config_file).each_line do |line|
55
+ config_params += line.strip + " " unless line.start_with? "#" || line.strip == ""
56
+ end
57
+ config_set(config_params)
58
+ else
59
+ puts "File #{config_file} does not exist."
60
+ end
61
+ end
50
62
  end
51
63
  end
@@ -1,3 +1,3 @@
1
1
  module DokkuCli
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dokku-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Szturo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-15 00:00:00.000000000 Z
11
+ date: 2015-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.4.5
82
+ rubygems_version: 2.4.6
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: Command line tool for Dokku.