hak 0.4.0 → 0.4.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/hak +20 -13
  3. data/lib/hak/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef8f2d427f29a8b74687d2af39d0c74b64325313
4
- data.tar.gz: e1a059807866443ee9be6d13ad36b162721feb4f
3
+ metadata.gz: 16eb47d7ba6667181ac796e52f29a790265e39c5
4
+ data.tar.gz: 839c5a2dedc2adf3f6edfea79075be28ab550f03
5
5
  SHA512:
6
- metadata.gz: 2f562cdaaa2ee1a06e2055cf3a43c249b3daa942cd2f6c18abecbf18c2ca7759e64e7954120594b7b8f09c65c458736bd134d6f2b2d380899cacd9afce747e17
7
- data.tar.gz: dafed174048dababcc94eec4d12a2d7531bbeadcc2d10dadbbb843512bd1a5f05ae32ff2e130d09608ca5ffcc298a57f715dda71732acb6ebdc59819449a185e
6
+ metadata.gz: 5a64b4619a7436a253fae3314340085de0bc20c96885c7bf72ab925653a2f127c53bd08257c4551e2537bcb70364c18c47e00c57aa45306613470499497c1d37
7
+ data.tar.gz: 21f09e6ae8e59b87ea4408a35e8933bb2f6cd48569ee5abb14b2e7cc2ca475aa68355c1a6c6ae7ce2944e5a7ac14e7cd57645f8c7e8053fb6d7252e85b850682
data/bin/hak CHANGED
@@ -6,7 +6,7 @@ require 'yaml'
6
6
  require 'colorize'
7
7
 
8
8
  program :name, 'hak'
9
- program :version, '0.4.0'
9
+ program :version, '0.4.1'
10
10
  program :description, 'Hak - start hacking!'
11
11
 
12
12
  default_command :help
@@ -23,25 +23,31 @@ command :setup do |c|
23
23
  if !Dir.exists?(File.expand_path('~/.hak'))
24
24
  puts "- creating ~/.hak".light_blue
25
25
  system "mkdir -p ~/.hak/packages"
26
- else
27
- puts "- it exists, skipping".blue
28
- end
29
26
 
30
- # if ~/.dinghy not exists, initialize it
31
- puts "checking to see if ~/.dinghy exists".blue
32
- if !Dir.exists?(File.expand_path('~/.dinghy'))
27
+ # install required dependencies
33
28
  puts "- installing docker, docker-machine, docker-compose, xhyve, wget".light_blue
34
- # remove existing docker
35
- system "brew upgrade docker docker-machine docker-compose"
29
+
30
+ # re-install docker
31
+ system "brew upgrade dinghy docker docker-machine docker-compose wget docker-machine-driver-xhyve"
36
32
  system "brew tap codekitchen/dinghy"
37
33
  system "brew install dinghy"
38
34
  system "brew install docker docker-machine docker-compose wget"
39
- system "brew link --overwrite docker-machine"
40
35
  system "brew install docker-machine-driver-xhyve"
36
+ system "brew link --overwrite docker-machine"
37
+
41
38
  system "sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve"
42
39
  system "sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve"
43
40
  system "dinghy create --provider xhyve"
44
41
 
42
+ else
43
+ puts "- it exists, skipping".blue
44
+ end
45
+
46
+ # if ~/.dinghy not exists, initialize it
47
+ puts "checking to see if ~/.dinghy exists".blue
48
+ if !Dir.exists?(File.expand_path('~/.dinghy'))
49
+
50
+
45
51
  else
46
52
  puts "- it exists, skipping".blue
47
53
  end
@@ -61,7 +67,7 @@ command :setup do |c|
61
67
  end
62
68
 
63
69
  if shell == '/bin/bash'
64
- docker_env_exist = `fgrep "export DOCKER_MACHINE_NAME=dinghy" ~/.bashrc |wc -l`.to_i
70
+ docker_env_exist = `fgrep "export DOCKER_MACHINE_NAME=dinghy" ~/.bash_profile |wc -l`.to_i
65
71
  if docker_env_exist == 0
66
72
  puts '- not set, type:'.yellow
67
73
  puts ' echo "$(dinghy env)" >> ~/.bash_profile'
@@ -170,11 +176,11 @@ command :create do |c|
170
176
  host = "#{folder}.docker"
171
177
  new_content = content.gsub(/VIRTUAL_HOST=(.*?)\n/, "VIRTUAL_HOST=#{host}\n")
172
178
  File.write(file_path, new_content)
173
- puts "set VIRTUAL_HOST of http://#{host}/"
179
+ puts "this site will be viewable at http://#{host}/"
174
180
 
175
181
  puts "now type:"
176
182
  puts "cd #{folder}"
177
- puts "hak up"
183
+ puts "hak start"
178
184
 
179
185
  end
180
186
 
@@ -288,6 +294,7 @@ command :upgrade do |c|
288
294
  c.description = ''
289
295
  c.example 'description', 'hak upgrade'
290
296
  c.action do |args, options|
297
+ system "gem update hak"
291
298
  run "dinghy upgrade"
292
299
  end
293
300
  end
data/lib/hak/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hak
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jaequery
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  requirements: []
72
72
  rubyforge_project:
73
- rubygems_version: 2.5.1
73
+ rubygems_version: 2.4.6
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: Hak is like NPM for websites