adb_device 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86e8137b39282bd2d4a427ee47e17c0958f181dfacabcd819e24f209fd547754
4
- data.tar.gz: b1d0018e0acca42fa045991eab4752a64b04a98656fde5b1e327737b261f8685
3
+ metadata.gz: 30603b00c42fd99469418aeaef7d706a7e8d43968520a8c03bb6362666f472bd
4
+ data.tar.gz: 2b0969f794d64c5cf6de4774e129cf14b18c4af08921852dd3873478ec10352f
5
5
  SHA512:
6
- metadata.gz: 4dd15ada3316966b9c78eb5c730d03f4161b14eebdeeae5cdeffe871dad10515f357a17e7833a246eb65f4259f16278206e755f734f741271b89d34e3f58c6c6
7
- data.tar.gz: fae47032c4714abedbc5970b88d4395f351d95b16f59abe9a93defada5fb96494afb87ea760b70911802794d14b7f5ee6d4e9364cbaf772cf44698943ddaf036
6
+ metadata.gz: 5a8ed6a38f9cf56365293ebf15c1de95f4abd2cfacdce76e8f52209c9ee4c444ac19d4f1431d415312e1aa8b104d2131eb725c635a61532e554d45530e9708bf
7
+ data.tar.gz: 87ffaaa9562dba1031b1ffcb7660c1db48e13dbe2f0dae26f3e13826fcfd2d49278a529917032061a3402cdedaa62a805061ac7ef2554e5dd13abdfc35d0bf10
data/.gitignore CHANGED
@@ -6,3 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+
10
+ # Test framework files
11
+ .rspec
12
+ /spec/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- adb_device (0.2.0)
4
+ adb_device (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,2 +1,15 @@
1
- # adb_device
1
+ # AdbDevice
2
2
  This is a gem for interacting with a connected Android devices
3
+
4
+ # Usage
5
+ ```ruby
6
+ AdbDevice.device_list # returns Searial Numbers of connected devices ["a21dasd21","1231asd12]
7
+ # Make a Deivce object
8
+ device = AdbDevice::Device("a21dasd21")
9
+ # returns the brand of the device
10
+ device.brand # Xiaomi; samsung
11
+ # returns the model of the device
12
+ device.model # MI 9; SM-A310F
13
+ # returns device OS version
14
+ device.os # 10; 8.0.0
15
+ ```
@@ -14,5 +14,10 @@ module AdbDevice
14
14
  output = `adb -s #{@sn} shell getprop ro.product.model`
15
15
  model = output.tr("\n", "")
16
16
  end
17
+
18
+ def os
19
+ output = `adb -s #{@sn} shell getprop ro.build.version.release`
20
+ os = output.match(Regexp.new(/([0-9]{1,2}|[0-9]{1,2}.[0-9]{1,2}|[0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2})\n/))[1]
21
+ end
17
22
  end
18
23
  end
@@ -1,3 +1,3 @@
1
1
  module AdbDevice
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adb_device
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristaps Indriksons