mobo 0.0.2 → 0.0.3

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/lib/mobo/android.rb +3 -3
  3. data/lib/mobo.rb +7 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f77e20cff1a1e98f80bf8f37403cea15cffcbc5
4
- data.tar.gz: b25b6714a1b911f45d20461c8472777fa34d5b8e
3
+ metadata.gz: 9cb76d7425338870e1922afcda730786204c9881
4
+ data.tar.gz: c212948730a6331afd4c35db61842e79c9f2655a
5
5
  SHA512:
6
- metadata.gz: d55e7bf129fbec48f552aa2613072b9e49db8de1ad4defa88747914cd4d0b37499dfb3c20bb3b1ce84cda0bcc4957d6b4453ebc7d213c9986243be753aa9cef2
7
- data.tar.gz: b1ee9d312f2b2b32247c3cbd27228a379e7156d3bb3e5ecbed1eaad10c90a879444a2267de3dbbafc97f342c6d7d87a460390c41bc17611936a669ebf064c4f0
6
+ metadata.gz: cdf7ad5905136253b76e31e8e09c414a11ea76fb27b8156177363daac969d306c3d4d2c8db47637c908a6905b2fe353c464f325baea52f1f92172b6460e61e99
7
+ data.tar.gz: 9565d3808d4f3ecf5d9a7a27ccfd7cf87ad6c4312d490b92125e62d7107a9374493ceba75ad9bd6da9e13b7233d900f7913cb7ce3e0673ff65da6789ade5d4f4
data/lib/mobo/android.rb CHANGED
@@ -229,12 +229,12 @@ module Mobo
229
229
 
230
230
  def booted?
231
231
  bootanim = Mobo.cmd_out("adb -s #{@device["id"]} shell 'getprop init.svc.bootanim'")
232
- bootanim.match(/stopped/)
232
+ bootanim.match(/stopped/) ? true : false
233
233
  end
234
234
 
235
235
  def booting?
236
236
  bootanim = Mobo.cmd_out("adb -s #{@device["id"]} shell 'getprop init.svc.bootanim'")
237
- bootanim.match(/running/)
237
+ bootanim.match(/running/) ? true : false
238
238
  end
239
239
 
240
240
  def unlock
@@ -247,7 +247,7 @@ module Mobo
247
247
  end
248
248
 
249
249
  def status
250
- Mobo.log.info("#{@device["name"]} (#{@device["id"]}) is running: #{booted?}")
250
+ puts "#{@device["id"]} \t #{@device["name"]} \t #{booted?} \t #{@device["port"]}"
251
251
  end
252
252
 
253
253
  def destroy
data/lib/mobo.rb CHANGED
@@ -11,7 +11,11 @@ module Mobo
11
11
  attr_accessor :log, :data, :devices
12
12
 
13
13
  def log
14
- @log || @log = Logger.new(STDOUT)
14
+ unless @log
15
+ @log = Logger.new(STDOUT)
16
+ @log.level = ENV['DEBUG'] ? Logger::DEBUG : Logger::INFO
17
+ end
18
+ @log
15
19
  end
16
20
 
17
21
  def cmd(command)
@@ -88,6 +92,8 @@ module Mobo
88
92
 
89
93
  def status(filename)
90
94
  load_data(filename)
95
+ puts "id \t name \t status \t port"
96
+ puts "-----------------------------"
91
97
  Mobo.data.each_pair do |name, device|
92
98
  Mobo::Android::Emulator.new(device).status
93
99
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark O'Shea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-05 00:00:00.000000000 Z
11
+ date: 2015-09-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Abstract android emaulators with a simple yaml file
14
14
  email: mark@osheatech.com