dokkufy 0.1.6 → 0.2.0

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
  SHA1:
3
- metadata.gz: 6aab61149303c5c6e7f30c54f1ad3c95e658a854
4
- data.tar.gz: f6153aaaef75abc52b310e52c3eff9b06682daa2
3
+ metadata.gz: 19b9deba6688d3d0a94eb29c1500cea5a11a6d9c
4
+ data.tar.gz: 2eaf747de93672d4f066b2c5b8fbaf6773a8b258
5
5
  SHA512:
6
- metadata.gz: b537461a0f5c409c5df9be15c532765f634788ea3351d1688efd7241779163151eb420cd12429ecf3685cfca6a2323c7976306fb498924c01a6d25ac56526f75
7
- data.tar.gz: 4297541cd2a8b3578cc0de80fa2bec0fca9b67a6df87b6d8a4bec722c7cb3cfb2d9f9f055640963c5d50ae9dffd25b2567db0922895fda8b904449d029bca119
6
+ metadata.gz: 7daccf75e1bd4da3065dc2fbd67fa0c6c91caf22ff60b67e1914b5cb954b37058fab78c7e3545ea0a4c74861bc2857c6f8dcc3d9b881bf1e992633ec55ba5c04
7
+ data.tar.gz: 1041a1fd445af376e16f57b7c4fddf1d1ede1ca806367a4fb53a8393c26953073403e11fd5f9c0823ed62a905ce6557d7204d4c14ee9ec57a899d5edb1711a58
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dokkufy (0.1.5)
4
+ dokkufy (0.2.0)
5
5
  commander (~> 4.2.0)
6
6
  hpricot (~> 0.8.6)
7
7
  terminal-table (~> 1.4.5)
@@ -9,7 +9,7 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- commander (4.2.0)
12
+ commander (4.2.1)
13
13
  highline (~> 1.6.11)
14
14
  highline (1.6.21)
15
15
  hpricot (0.8.6)
data/lib/dokkufy.rb CHANGED
@@ -4,7 +4,6 @@ require 'dokkufy/server'
4
4
  require 'dokkufy/plugin'
5
5
  require 'dokkufy/app'
6
6
  require 'dokkufy/git'
7
- require 'dokkufy/dokku'
8
7
 
9
8
  module Dokkufy
10
9
  end
data/lib/dokkufy/git.rb CHANGED
@@ -6,17 +6,15 @@ module Dokkufy
6
6
  end
7
7
 
8
8
  def dokku_remote
9
- @dokku_remote ||= git_remote || dokkufile_remote
9
+ @dokku_remote ||= git_remote
10
10
  end
11
11
 
12
12
  def dokku_remote=(remote)
13
13
  @dokku_remote = remote
14
- set_git_remote
15
- set_dokkufile_remote
14
+ self.git_remote=(remote)
16
15
  end
17
16
 
18
17
  def clear
19
- `rm .dokkurc`
20
18
  `git remote remove dokku`
21
19
  end
22
20
 
@@ -30,22 +28,9 @@ module Dokkufy
30
28
  nil
31
29
  end
32
30
 
33
- def dokkufile_remote
34
- output = File.open(".dokkurc").read
35
- return output.strip unless output.empty?
36
- rescue
37
- nil
38
- end
39
-
40
- def set_git_remote
31
+ def git_remote=(remote)
41
32
  puts "Setting git remote"
42
- `git remote add dokku #{@dokku_remote}`
33
+ `git remote add dokku #{remote}`
43
34
  end
44
-
45
- def set_dokkufile_remote
46
- puts "Writing .dokkurc"
47
- `echo #{@dokku_remote} > .dokkurc`
48
- end
49
-
50
35
  end
51
36
  end
data/lib/dokkufy/info.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dokkufy
2
- VERSION = "0.1.6" unless defined? Dokkufy::VERSION
2
+ VERSION = "0.2.0" unless defined? Dokkufy::VERSION
3
3
  NAME = "dokkufy" unless defined? Dokkufy::NAME
4
- DESCRIPTION = "A Dokku toolchain" unless defined? Dokkufy::DESCRIPTION
4
+ DESCRIPTION = "Dokku Provisioning Made Easy" unless defined? Dokkufy::DESCRIPTION
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dokkufy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cristiano Betta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-03 00:00:00.000000000 Z
11
+ date: 2015-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -52,11 +52,10 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.8.6
55
- description: A Dokku toolchain
55
+ description: Dokku Provisioning Made Easy
56
56
  email:
57
57
  - cbetta@gmail.com
58
58
  executables:
59
- - dokku
60
59
  - dokkufy
61
60
  extensions: []
62
61
  extra_rdoc_files: []
@@ -67,12 +66,10 @@ files:
67
66
  - LICENSE
68
67
  - README.md
69
68
  - Rakefile
70
- - bin/dokku
71
69
  - bin/dokkufy
72
70
  - dokkufy.gemspec
73
71
  - lib/dokkufy.rb
74
72
  - lib/dokkufy/app.rb
75
- - lib/dokkufy/dokku.rb
76
73
  - lib/dokkufy/git.rb
77
74
  - lib/dokkufy/info.rb
78
75
  - lib/dokkufy/plugin.rb
@@ -103,8 +100,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
100
  version: '0'
104
101
  requirements: []
105
102
  rubyforge_project:
106
- rubygems_version: 2.2.2
103
+ rubygems_version: 2.4.5
107
104
  signing_key:
108
105
  specification_version: 4
109
- summary: A Dokku toolchain
106
+ summary: Dokku Provisioning Made Easy
110
107
  test_files: []
108
+ has_rdoc:
data/bin/dokku DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'dokkufy'
3
-
4
- if ['-v', '--version', '--help'].include?(ARGV[0]) || ARGV.empty?
5
- puts "Dokkufy::Dokku #{Dokkufy::VERSION}"
6
- exit;
7
- end
8
-
9
- git = Dokkufy::Git.new
10
- if !git.dokku_remote_present?
11
- puts "No Dokku remote found. Run `dokkufy app` first."
12
- else
13
- Dokkufy::Dokku.new(git.dokku_remote).run(ARGV)
14
- end
data/lib/dokkufy/dokku.rb DELETED
@@ -1,43 +0,0 @@
1
- module Dokkufy
2
- class Dokku
3
- attr_accessor :repo
4
-
5
- def initialize repo
6
- self.repo = repo
7
- end
8
-
9
- def run args
10
- args = args.insert(1,app_name) if requires_app_name?(args)
11
- output = `#{command(args)}`
12
- output.gsub!(" <app>", "") if args.first == 'help'
13
-
14
- puts output
15
- end
16
-
17
- private
18
-
19
- def requires_app_name? args
20
- help.lines.each do |line|
21
- return line.include?("<app>") if line.strip.start_with?(args[0])
22
- end
23
- false
24
- end
25
-
26
- def command args
27
- command = "ssh -t -q #{server} #{args.join(" ")}"
28
- end
29
-
30
- def server
31
- @server ||= self.repo.split(":").first
32
- end
33
-
34
- def app_name
35
- @app_name ||= self.repo.split(":").last
36
- end
37
-
38
- def help
39
- @help ||= `#{command(["help"])}`
40
- end
41
-
42
- end
43
- end