flick 0.3.5 → 0.3.6

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
  SHA1:
3
- metadata.gz: 60c1f971ea573c80a3728c5b6473637edc635510
4
- data.tar.gz: 38a0fc9d7c3b996a44d3721262ee020a40745c27
3
+ metadata.gz: 27692e3fa6ead5fe5bfcf968efa565ab643a950f
4
+ data.tar.gz: 2150edd88098180e98a17d88e105447de512543e
5
5
  SHA512:
6
- metadata.gz: 3c001315844ae3126cbb92d6d786522d6d07d7335021dd842ac915fefae80425f8f082e502fa532d0c4103ad4125e5b1dc2b26a5702a0753cc8a6b10afaaccbd
7
- data.tar.gz: 4cd4aa8fe85f50196d59190f13f75e4ff9e9179b45ce90450427e479ca132403e823538c75cdda4c295589a8b7668ea8509485a57a98c065bb9386448a2f3bdc
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'
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
@@ -1,3 +1,3 @@
1
1
  module Flick
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin