yu 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -2
  3. data/lib/yu/version.rb +1 -1
  4. data/lib/yu.rb +22 -0
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fb3821b7af04978cc7fb9598a4263938a47da4c
4
- data.tar.gz: f4cf06e57ac66b22d476ced6416d6482a6318518
3
+ metadata.gz: 2bce149a98ba79b8e5b443d5e08b6a72de4ef4f2
4
+ data.tar.gz: 8dc032e5e7f950be1caa09c1a10e6acb073c1d20
5
5
  SHA512:
6
- metadata.gz: 8ec66d2b6c26aed578535573ea52925fc9cefae9ec65b7f51a32bcc534ea2a6614bcbc73f762e5e489c6b19b8195b4230bd5b9bc12fd75fb5b26bf670a5287d5
7
- data.tar.gz: 9ed4968074a7998327b8e1d6c1887e89c68e6641d4fe011e6c32abf8e80b15cd9564ed4b6e8d53cc25cce3b700f61384ff6bf5904426d242e3b5531c3fb44ccb
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
@@ -1,3 +1,3 @@
1
1
  module Yu
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Kelly