flick 0.3.5 → 0.3.6
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/flick +2 -1
- data/lib/flick/android.rb +3 -3
- data/lib/flick/version.rb +1 -1
- 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: 27692e3fa6ead5fe5bfcf968efa565ab643a950f
|
4
|
+
data.tar.gz: 2150edd88098180e98a17d88e105447de512543e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ef309a2fbc5322111e673e5478a726ef9515a7e8c6403a8dad9d6b0aa51402d0e703806420e43e361d0e818b66a00f281e9e96f8f849a6d2ead7779edaa6a50
|
7
|
+
data.tar.gz: 6121f25efc7b26eb55011ad2913c920e43c5c71f07f511fb41a6417167e063c3c7009e35b92d6ee721edaf4cc7391b74121ab7d7d70e03dd44471d6c41d8a561
|
data/bin/flick
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
require_relative '../lib/flick'
|
3
3
|
require 'commander/import'
|
4
4
|
|
5
|
-
program :version, '0.3.
|
5
|
+
program :version, '0.3.6'
|
6
6
|
program :description, 'A CLI to capture screenshots, video, logs, and device info for Android (Devices & Emulators) and iOS (Devices).'
|
7
7
|
|
8
8
|
command :video do |c|
|
@@ -108,6 +108,7 @@ command :manager do |c|
|
|
108
108
|
c.example 'description', "flick vitals -p android -n com.viber"
|
109
109
|
c.option '-p', '--platform PLATFORM', String, 'Set platform: android or ios'
|
110
110
|
c.option '-n', '--name NAME', String, 'Set the package name.'
|
111
|
+
c.option '-u', '--udid UDID', String, 'Set device UDID.'
|
111
112
|
c.action do |args, options|
|
112
113
|
|
113
114
|
Vitals.new(options.default).vitals
|
data/lib/flick/android.rb
CHANGED
@@ -70,7 +70,7 @@ module Flick
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def system_stats
|
73
|
-
x = %x(adb shell top -n 1 -d 1 | grep System).split(",")
|
73
|
+
x = %x(adb -s #{udid} shell top -n 1 -d 1 | grep System).split(",")
|
74
74
|
user = x.find { |x| x.include? "User" }.match(/User (.*)%/)[1].to_i
|
75
75
|
sys = x.find { |x| x.include? "System" }.match(/System (.*)%/)[1].to_i
|
76
76
|
iow = x.find { |x| x.include? "IOW" }.match(/IOW (.*)%/)[1].to_i
|
@@ -79,11 +79,11 @@ module Flick
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def memory package
|
82
|
-
(%x(adb shell dumpsys meminfo | grep #{package} | awk '{print $1}').strip.split.last.to_i * 0.001).round(2)
|
82
|
+
(%x(adb -s #{udid} shell dumpsys meminfo | grep #{package} | awk '{print $1}').strip.split.last.to_i * 0.001).round(2)
|
83
83
|
end
|
84
84
|
|
85
85
|
def cpu package
|
86
|
-
%x(adb shell top -n 1 -d 1 | grep #{package} | awk '{print $3}').strip.chomp("%").to_i
|
86
|
+
%x(adb -s #{udid} shell top -n 1 -d 1 | grep #{package} | awk '{print $3}').strip.chomp("%").to_i
|
87
87
|
end
|
88
88
|
|
89
89
|
def get_vitals package
|
data/lib/flick/version.rb
CHANGED