hak 0.4.6 → 0.4.8
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 +4 -4
- data/bin/hak +55 -15
- data/lib/hak/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 94ea625e116d0adfc7f8da4b2fff7a7131c09485
|
|
4
|
+
data.tar.gz: a99cfd36668e5b80625d1a2b4ba8bb2a5a5f2bd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3fa63a36d9ae64f58ca71b9748ea488f3ec56d4d1a19db462c9bf0e74e75ea23eed9477bf718866c53dd5358d9958b6067325bb51fdc5054d72099e1fdc5a9e
|
|
7
|
+
data.tar.gz: 2036af54198f2fd7f62cd6f4ba31ba271b0518b46fbc93f0fe2d53162205b2bb3e2928e5a6b96ef03b6124ac2e6b46f73897356274cd11a8b94073ce9ed75213
|
data/bin/hak
CHANGED
|
@@ -4,9 +4,10 @@ require 'rubygems'
|
|
|
4
4
|
require 'commander/import'
|
|
5
5
|
require 'yaml'
|
|
6
6
|
require 'colorize'
|
|
7
|
+
require 'highline'
|
|
7
8
|
|
|
8
9
|
program :name, 'hak'
|
|
9
|
-
program :version, '0.4.
|
|
10
|
+
program :version, '0.4.8'
|
|
10
11
|
program :description, 'Hak - A Docker powered website manager for OSX'
|
|
11
12
|
|
|
12
13
|
default_command :help
|
|
@@ -104,30 +105,59 @@ command :off do |c|
|
|
|
104
105
|
end
|
|
105
106
|
end
|
|
106
107
|
|
|
107
|
-
command :
|
|
108
|
-
c.syntax = 'hak
|
|
109
|
-
c.summary = '
|
|
108
|
+
command :pull do |c|
|
|
109
|
+
c.syntax = 'hak pull jaequery/honeybadger'
|
|
110
|
+
c.summary = 'downloads framework'
|
|
110
111
|
c.description = ''
|
|
111
|
-
c.example 'description', 'hak
|
|
112
|
+
c.example 'description', 'hak pull jaequery/honeybadger'
|
|
112
113
|
c.action do |args, options|
|
|
113
114
|
|
|
115
|
+
if !Dir.exists?(File.expand_path("~/.hak"))
|
|
116
|
+
system "mkdir ~/.hak"
|
|
117
|
+
end
|
|
118
|
+
|
|
114
119
|
if args.empty?
|
|
115
|
-
|
|
120
|
+
repo = "jaequery/honeybadger"
|
|
121
|
+
package_author = "jaequery"
|
|
122
|
+
package = "honeybadger"
|
|
123
|
+
puts "Pulling #{repo}"
|
|
116
124
|
else
|
|
117
|
-
|
|
125
|
+
repo = args[0]
|
|
126
|
+
package_author = repo.split("/")[0]
|
|
127
|
+
package = repo.split("/")[1]
|
|
128
|
+
end
|
|
118
129
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
130
|
+
system "cd ~/.hak && rm -rf #{repo} && mkdir -p #{repo} && cd #{repo} && wget https://github.com/#{repo}/archive/master.zip && unzip master.zip && rm -f master.zip && mv #{package}-master/* . && rm -r #{package}-master"
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
command :get do |c|
|
|
135
|
+
c.syntax = 'hak get jaequery/react-starter'
|
|
136
|
+
c.summary = 'creates site'
|
|
137
|
+
c.description = ''
|
|
138
|
+
c.example 'description', 'hak get jaequery/react-starter'
|
|
139
|
+
c.action do |args, options|
|
|
140
|
+
|
|
141
|
+
if args.empty?
|
|
142
|
+
puts "ex: hak get jaequery/react-starter"
|
|
143
|
+
|
|
144
|
+
else
|
|
145
|
+
repo = args[0]
|
|
146
|
+
folder = args[1]
|
|
147
|
+
package_author = repo.split("/")[0]
|
|
148
|
+
package = repo.split("/")[1]
|
|
149
|
+
|
|
150
|
+
# if second argument not passed, it uses the git repo's project name
|
|
151
|
+
if folder.nil?
|
|
152
|
+
folder = package
|
|
124
153
|
end
|
|
125
154
|
|
|
126
|
-
|
|
155
|
+
# downloads package from github
|
|
156
|
+
system "mkdir -p #{folder} && cd #{folder} && wget https://github.com/#{repo}/archive/master.zip && unzip master.zip && rm -f master.zip && mv #{package}-master/* #{package}-master/.* . && rm -r #{package}-master"
|
|
127
157
|
|
|
128
158
|
# copies the package from local ~/.hak/[repo] to local folder
|
|
129
|
-
puts "copying ~/.hak/#{repo} to ./#{folder}"
|
|
130
|
-
system "cp -Rfp ~/.hak/#{repo} #{folder}"
|
|
159
|
+
#puts "copying ~/.hak/#{repo} to ./#{folder}"
|
|
160
|
+
#system "cp -Rfp ~/.hak/#{repo} #{folder}"
|
|
131
161
|
|
|
132
162
|
# rename virtual host to app name
|
|
133
163
|
file_path = "#{folder}/docker-compose.yml"
|
|
@@ -178,6 +208,16 @@ command :restart do |c|
|
|
|
178
208
|
end
|
|
179
209
|
end
|
|
180
210
|
|
|
211
|
+
command :rm do |c|
|
|
212
|
+
c.syntax = 'hak rm'
|
|
213
|
+
c.summary = 'deletes docker containers for the project'
|
|
214
|
+
c.description = 'deletes docker containers for the project'
|
|
215
|
+
c.example 'description', 'hak rm'
|
|
216
|
+
c.action do |args, options|
|
|
217
|
+
run "docker-compose rm -f"
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
181
221
|
command :logs do |c|
|
|
182
222
|
c.syntax = 'hak logs'
|
|
183
223
|
c.summary = 'shows the application logs'
|
data/lib/hak/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hak
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- jaequery
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-06-
|
|
11
|
+
date: 2016-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: commander
|