yu 0.1.3 → 0.1.4
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/README.md +4 -2
- data/lib/yu/version.rb +1 -1
- data/lib/yu.rb +22 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bce149a98ba79b8e5b443d5e08b6a72de4ef4f2
|
4
|
+
data.tar.gz: 8dc032e5e7f950be1caa09c1a10e6acb073c1d20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 582744c63acc6a1e4fdca8765abd8e7a6f298d9035fac47eaf0978345d4da7cd38a3c36351ca752c83b06ba620ff36b519f3985587372f48ab8bf84cc0f688c8
|
7
|
+
data.tar.gz: 3faa57ff181c2c5209c6c699eeb6252f657cc2263d4b83eb25d362dd2b0de440bb057283018d923b01c8672c343c7cd774ef1cc60cd7e942169f50a48633843c
|
data/README.md
CHANGED
@@ -14,6 +14,10 @@ $ gem install yu
|
|
14
14
|
|
15
15
|
```bash
|
16
16
|
yu --help
|
17
|
+
# Check your system is ready to use yu
|
18
|
+
yu doctor
|
19
|
+
# Reset everything
|
20
|
+
yu reset
|
17
21
|
# Run all tests
|
18
22
|
yu test
|
19
23
|
# Test specific service(s)
|
@@ -26,8 +30,6 @@ yu shell --test api
|
|
26
30
|
yu build
|
27
31
|
# Build base image for specific service(s)
|
28
32
|
yu build api web
|
29
|
-
# Reset everything
|
30
|
-
yu reset
|
31
33
|
```
|
32
34
|
|
33
35
|
## Development
|
data/lib/yu/version.rb
CHANGED
data/lib/yu.rb
CHANGED
@@ -39,6 +39,12 @@ module Yu
|
|
39
39
|
c.action(method(:reset))
|
40
40
|
end
|
41
41
|
|
42
|
+
command :doctor do |c|
|
43
|
+
c.syntax = 'yu doctor'
|
44
|
+
c.description = 'Check your environment is ready to yu'
|
45
|
+
c.action(method(:doctor))
|
46
|
+
end
|
47
|
+
|
42
48
|
global_option('-V', '--verbose', 'Verbose output') { $verbose_mode = true }
|
43
49
|
|
44
50
|
run!
|
@@ -110,6 +116,22 @@ module Yu
|
|
110
116
|
run_command "docker-compose up -d --no-recreate"
|
111
117
|
end
|
112
118
|
|
119
|
+
def doctor(args, options)
|
120
|
+
run_command "docker", showing_output: false do
|
121
|
+
info "Please ensure you have docker working"
|
122
|
+
exit 1
|
123
|
+
end
|
124
|
+
run_command "docker-compose --version", showing_output: false do
|
125
|
+
info "Please ensure you have docker-compose working"
|
126
|
+
exit 1
|
127
|
+
end
|
128
|
+
run_command "docker-compose ps", showing_output: false do
|
129
|
+
info "Your current directory does not contain a docker-compose.yml"
|
130
|
+
exit 1
|
131
|
+
end
|
132
|
+
info "Everything looks good."
|
133
|
+
end
|
134
|
+
|
113
135
|
def run_command(command, showing_output: true, exit_on_failure: true)
|
114
136
|
unless showing_output || verbose_mode?
|
115
137
|
command = "#{command} &>/dev/null"
|