dokkufy 0.0.2 → 0.0.3

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: 55b1689044818f6438e0f573ced322647aeb62b8
4
- data.tar.gz: e7c920226ce9206a632f5103ba07f9d7e60a5337
3
+ metadata.gz: f74401947f66111ab2705285fc3aa7c503e260c0
4
+ data.tar.gz: d7a081974f613589e716197da80c964fe5589651
5
5
  SHA512:
6
- metadata.gz: 75b7ef85d00f9982db97106641e584376a36b09a7f6d19fb07fba473697d522a8c9593807053bb5a8e448ce50d0ec620d659b19113b630573ad7d7e9abd5e9a9
7
- data.tar.gz: 9e48af20386315d2ff08824c38e07c9fd3097cca29471c84a348f96039b6e1798d9ccacaa78200775332c8ea5b957c2b38ea4d6835c4affe844493e26a66b0e2
6
+ metadata.gz: b15b698b573abb9d3dcba4018dd1c699796841ed564aea9137d0190f92b28565e083e8dc8b59ba90fb128974e878a76939d8841cf42edb0b45ed2bd4453bb77a
7
+ data.tar.gz: 434a8f9dcab71927465f32c6598f85cc1358c17a0d297668c8fee7d38efd241b0b34f10b3347dde76a41ce06c44eeb0a00d17f241bdf63b56225e6de757497d6
data/README.md CHANGED
@@ -21,15 +21,17 @@ dokku <command> runs dokku commands on the server attached to this app
21
21
  ### dokkufy server
22
22
 
23
23
  ```sh
24
- dokkufy server <hostname> <username> <domain>
24
+ dokkufy server <hostname> <username> <domain> --version <version>
25
25
  ```
26
26
 
27
- Installs dokku on server at IP or Hostname `<hostname>`, using user `<username>` to install the software.
27
+ Installs dokku on server at IP or Hostname `<hostname>`, using the `<username>` account to install the software.
28
28
 
29
- It also sets up the app on domain <domain>, resulting in all apps being served as a subdomain of that domain.
29
+ It also sets up the app on domain `<domain>`, resulting in all apps being served as a subdomain of that domain.
30
30
 
31
+ Optionally this takes a `<version>` to specify the [Dokku tag](https://github.com/progrium/dokku/tags).
31
32
  ## Release notes
32
33
 
34
+ * **0.0.3** Determines latest version from Dokku github page
33
35
  * **0.0.2** Added `server` command
34
36
  * **0.0.1** Gem skeleton
35
37
 
data/bin/dokkufy CHANGED
@@ -16,7 +16,7 @@ Commander.configure do
16
16
  hostname = args[0] || ask('Server hostname or IP: ')
17
17
  username = args[1] || ask('Username on server: ')
18
18
  domain = args[2] || ask('Desired root domain (e.g. example.com): ')
19
- version = options.version.nil? ? 'master' : "v#{options.version}"
19
+ version = options.version.nil? ? Dokkufy::Utils.stable_version : "v#{options.version}"
20
20
 
21
21
  server = Dokkufy::Server.new(hostname, username)
22
22
  server.ensure_passwordless_sudo
data/lib/dokkufy/info.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dokkufy
2
- VERSION = "0.0.2" unless defined? Dokkufy::VERSION
2
+ VERSION = "0.0.3" unless defined? Dokkufy::VERSION
3
3
  NAME = "dokkufy" unless defined? Dokkufy::NAME
4
4
  DESCRIPTION = "A Dokku toolchain" unless defined? Dokkufy::DESCRIPTION
5
5
  end
data/lib/dokkufy/utils.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'open-uri'
2
+
1
3
  module Dokkufy
2
4
  module Utils
3
5
  def self.scripts_directory
@@ -10,5 +12,12 @@ module Dokkufy
10
12
  def self.script name
11
13
  File.join(scripts_directory, "#{name}.sh")
12
14
  end
15
+
16
+ def self.stable_version
17
+ uri = "https://github.com/progrium/dokku/releases/latest"
18
+ open(uri) do |resp|
19
+ return resp.base_uri.to_s.split("/").last
20
+ end
21
+ end
13
22
  end
14
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dokkufy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cristiano Betta