mdq 0.2.0 → 0.4.0
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/.rubocop_todo.yml +3 -3
- data/README.base.md +43 -2
- data/README.ja.md +43 -2
- data/README.md +43 -2
- data/lib/mdq/check.rb +13 -3
- data/lib/mdq/db.rb +77 -0
- data/lib/mdq/{ddb.rb → discovery.rb} +86 -89
- data/lib/mdq/list.rb +7 -5
- data/lib/mdq/version.rb +1 -1
- data/lib/mdq.rb +3 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cac0bbdd587c39245b20565f173c940cc3820d013e85ea49cdeef449fbba699
|
4
|
+
data.tar.gz: 13ccafb7f07a7e52425f350d26315a0e6638cbd2f6cf07a83d3c2e58501b6293
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dc6da32e3ab760db20aa66e1c744506eacee4ab46f210f212742faac3622bddc9b340d9565c31466b20104fcec674f61eca9d5a26ab8d87343b5404a5745669
|
7
|
+
data.tar.gz: 853b11146f7ea736f48ef558e7d88eae4f43d4d55da1056dfaa00d1179fcba0cfea1812df5edc4e0a7ecc6f8784706fef394c4d58405c263e6ce8abb52c66b1e
|
data/.rubocop_todo.yml
CHANGED
@@ -9,18 +9,18 @@
|
|
9
9
|
# Offense count: 2
|
10
10
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
11
11
|
Metrics/AbcSize:
|
12
|
-
Max:
|
12
|
+
Max: 50
|
13
13
|
|
14
14
|
# Offense count: 1
|
15
15
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
16
16
|
# AllowedMethods: refine
|
17
17
|
Metrics/BlockLength:
|
18
|
-
Max:
|
18
|
+
Max: 70
|
19
19
|
|
20
20
|
# Offense count: 1
|
21
21
|
# Configuration parameters: CountComments, CountAsOne.
|
22
22
|
Metrics/ClassLength:
|
23
|
-
Max:
|
23
|
+
Max: 180
|
24
24
|
|
25
25
|
# Offense count: 1
|
26
26
|
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
data/README.base.md
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
|
8
8
|
# mdq - Mobile Device Query
|
9
9
|
|
10
|
+
[](https://badge.fury.io/rb/mdq)
|
11
|
+
|
10
12
|
MDQ stands for Mobile Device Query and is a command line tool for displaying information about Android and Apple devices.
|
11
13
|
|
12
14
|
# Usage
|
@@ -83,6 +85,34 @@ $ mdq list -q="select * from devices where platform='iOS'"
|
|
83
85
|
]
|
84
86
|
```
|
85
87
|
|
88
|
+
View apps installed on your device.
|
89
|
+
Apple Devices displays the apps installed with Xcode.
|
90
|
+
|
91
|
+
```
|
92
|
+
$ mdq list -q='select * from apps'
|
93
|
+
```
|
94
|
+
|
95
|
+
Take a screenshot on Android.
|
96
|
+
|
97
|
+
```
|
98
|
+
$ mdq list --cap='/Users/xxxxx/'
|
99
|
+
```
|
100
|
+
|
101
|
+
Install the app.
|
102
|
+
|
103
|
+
```
|
104
|
+
$ mdq list --install='/Users/xxxxx/example.apk'
|
105
|
+
$ mdq list --install='/Users/xxxxx/example.ipa'
|
106
|
+
```
|
107
|
+
|
108
|
+
Uninstall the app.
|
109
|
+
|
110
|
+
```
|
111
|
+
$ mdq list --uninstall='com.example.app'
|
112
|
+
```
|
113
|
+
|
114
|
+
|
115
|
+
|
86
116
|
# Specification
|
87
117
|
|
88
118
|
Details of the devices table.
|
@@ -99,5 +129,16 @@ Details of the devices table.
|
|
99
129
|
| build_version | ro.build.version.release | deviceProperties.osVersionNumber |
|
100
130
|
| build_id | ro.build.id | deviceProperties.osBuildUpdate |
|
101
131
|
| battery_level | battery | Always "null" |
|
102
|
-
| total_capacity | df |
|
103
|
-
| free_capacity | df | Always "null" |
|
132
|
+
| total_capacity | df | hardwareProperties.internalStorageCapacity |
|
133
|
+
| free_capacity | df | Always "null" |
|
134
|
+
|
135
|
+
|
136
|
+
Details of the apps table.
|
137
|
+
Apple Devices displays the apps installed with Xcode.
|
138
|
+
|
139
|
+
| name | android | apple devices |
|
140
|
+
| -- | -- | -- |
|
141
|
+
| udid | Serial number | hardwareProperties.udid |
|
142
|
+
| name | Always "null" | name |
|
143
|
+
| package_name | Package name | bundleIdentifier |
|
144
|
+
| version | Always "null" | version |
|
data/README.ja.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
# mdq - Mobile Device Query
|
4
4
|
|
5
|
+
[](https://badge.fury.io/rb/mdq)
|
6
|
+
|
5
7
|
MDQ stands for Mobile Device Query and is a command line tool for displaying information about Android and Apple devices.
|
6
8
|
|
7
9
|
# Usage
|
@@ -78,6 +80,34 @@ $ mdq list -q="select * from devices where platform='iOS'"
|
|
78
80
|
]
|
79
81
|
```
|
80
82
|
|
83
|
+
View apps installed on your device.
|
84
|
+
Apple Devices displays the apps installed with Xcode.
|
85
|
+
|
86
|
+
```
|
87
|
+
$ mdq list -q='select * from apps'
|
88
|
+
```
|
89
|
+
|
90
|
+
Take a screenshot on Android.
|
91
|
+
|
92
|
+
```
|
93
|
+
$ mdq list --cap='/Users/xxxxx/'
|
94
|
+
```
|
95
|
+
|
96
|
+
Install the app.
|
97
|
+
|
98
|
+
```
|
99
|
+
$ mdq list --install='/Users/xxxxx/example.apk'
|
100
|
+
$ mdq list --install='/Users/xxxxx/example.ipa'
|
101
|
+
```
|
102
|
+
|
103
|
+
Uninstall the app.
|
104
|
+
|
105
|
+
```
|
106
|
+
$ mdq list --uninstall='com.example.app'
|
107
|
+
```
|
108
|
+
|
109
|
+
|
110
|
+
|
81
111
|
# Specification
|
82
112
|
|
83
113
|
Details of the devices table.
|
@@ -94,5 +124,16 @@ Details of the devices table.
|
|
94
124
|
| build_version | ro.build.version.release | deviceProperties.osVersionNumber |
|
95
125
|
| build_id | ro.build.id | deviceProperties.osBuildUpdate |
|
96
126
|
| battery_level | battery | Always "null" |
|
97
|
-
| total_capacity | df |
|
98
|
-
| free_capacity | df | Always "null" |
|
127
|
+
| total_capacity | df | hardwareProperties.internalStorageCapacity |
|
128
|
+
| free_capacity | df | Always "null" |
|
129
|
+
|
130
|
+
|
131
|
+
Details of the apps table.
|
132
|
+
Apple Devices displays the apps installed with Xcode.
|
133
|
+
|
134
|
+
| name | android | apple devices |
|
135
|
+
| -- | -- | -- |
|
136
|
+
| udid | Serial number | hardwareProperties.udid |
|
137
|
+
| name | Always "null" | name |
|
138
|
+
| package_name | Package name | bundleIdentifier |
|
139
|
+
| version | Always "null" | version |
|
data/README.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
# mdq - Mobile Device Query
|
4
4
|
|
5
|
+
[](https://badge.fury.io/rb/mdq)
|
6
|
+
|
5
7
|
MDQ stands for Mobile Device Query and is a command line tool for displaying information about Android and Apple devices.
|
6
8
|
|
7
9
|
# Usage
|
@@ -78,6 +80,34 @@ $ mdq list -q="select * from devices where platform='iOS'"
|
|
78
80
|
]
|
79
81
|
```
|
80
82
|
|
83
|
+
View apps installed on your device.
|
84
|
+
Apple Devices displays the apps installed with Xcode.
|
85
|
+
|
86
|
+
```
|
87
|
+
$ mdq list -q='select * from apps'
|
88
|
+
```
|
89
|
+
|
90
|
+
Take a screenshot on Android.
|
91
|
+
|
92
|
+
```
|
93
|
+
$ mdq list --cap='/Users/xxxxx/'
|
94
|
+
```
|
95
|
+
|
96
|
+
Install the app.
|
97
|
+
|
98
|
+
```
|
99
|
+
$ mdq list --install='/Users/xxxxx/example.apk'
|
100
|
+
$ mdq list --install='/Users/xxxxx/example.ipa'
|
101
|
+
```
|
102
|
+
|
103
|
+
Uninstall the app.
|
104
|
+
|
105
|
+
```
|
106
|
+
$ mdq list --uninstall='com.example.app'
|
107
|
+
```
|
108
|
+
|
109
|
+
|
110
|
+
|
81
111
|
# Specification
|
82
112
|
|
83
113
|
Details of the devices table.
|
@@ -94,5 +124,16 @@ Details of the devices table.
|
|
94
124
|
| build_version | ro.build.version.release | deviceProperties.osVersionNumber |
|
95
125
|
| build_id | ro.build.id | deviceProperties.osBuildUpdate |
|
96
126
|
| battery_level | battery | Always "null" |
|
97
|
-
| total_capacity | df |
|
98
|
-
| free_capacity | df | Always "null" |
|
127
|
+
| total_capacity | df | hardwareProperties.internalStorageCapacity |
|
128
|
+
| free_capacity | df | Always "null" |
|
129
|
+
|
130
|
+
|
131
|
+
Details of the apps table.
|
132
|
+
Apple Devices displays the apps installed with Xcode.
|
133
|
+
|
134
|
+
| name | android | apple devices |
|
135
|
+
| -- | -- | -- |
|
136
|
+
| udid | Serial number | hardwareProperties.udid |
|
137
|
+
| name | Always "null" | name |
|
138
|
+
| package_name | Package name | bundleIdentifier |
|
139
|
+
| version | Always "null" | version |
|
data/lib/mdq/check.rb
CHANGED
@@ -7,9 +7,19 @@ module Mdq
|
|
7
7
|
# Check
|
8
8
|
class Check
|
9
9
|
def initialize
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
db = Mdq::DB.new
|
11
|
+
show_message('adb', db.android_discoverable?)
|
12
|
+
show_message('Xcode', db.apple_discoverable?)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def show_message(name, discoverable)
|
18
|
+
if discoverable
|
19
|
+
puts "# #{name} is installed."
|
20
|
+
else
|
21
|
+
puts "# #{name} is not installed."
|
22
|
+
end
|
13
23
|
end
|
14
24
|
end
|
15
25
|
end
|
data/lib/mdq/db.rb
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'mdq'
|
4
|
+
require 'active_record'
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
# Mdq
|
8
|
+
module Mdq
|
9
|
+
# DB
|
10
|
+
class DB < Discovery
|
11
|
+
# クエリの実行
|
12
|
+
def get(sql)
|
13
|
+
reset
|
14
|
+
# デバイスの発見
|
15
|
+
android_discover
|
16
|
+
apple_discover
|
17
|
+
|
18
|
+
if sql
|
19
|
+
Device.all.each do |model|
|
20
|
+
# インストール済みAppの取得
|
21
|
+
if model.android?
|
22
|
+
android_apps(model.udid)
|
23
|
+
else
|
24
|
+
apple_apps(model.udid)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
begin
|
29
|
+
ActiveRecord::Base.connection.execute(sql)
|
30
|
+
rescue StandardError
|
31
|
+
warn 'SQL Syntax Error.'
|
32
|
+
exit
|
33
|
+
end
|
34
|
+
else
|
35
|
+
Device.all
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# Androidデバイスのスクリーンショットを撮る
|
40
|
+
def device_screencap(output, udid, is_android)
|
41
|
+
return unless is_android
|
42
|
+
|
43
|
+
FileUtils.mkdir_p(output)
|
44
|
+
file = "/sdcard/#{udid}.png"
|
45
|
+
adb_command("shell screencap -p #{file}", udid)
|
46
|
+
adb_command("pull #{file} #{output}", udid)
|
47
|
+
adb_command("adb shell rm #{file}")
|
48
|
+
|
49
|
+
puts "# Screenshot of #{udid} to #{output}"
|
50
|
+
end
|
51
|
+
|
52
|
+
# Appをインストールする
|
53
|
+
def app_install(input, udid, is_android)
|
54
|
+
output, = adb_command("install #{input}", udid) if is_android && input.end_with?('.apk')
|
55
|
+
output, = apple_command("device install app #{input}", udid) if !is_android && input.end_with?('.ipa')
|
56
|
+
|
57
|
+
return unless output
|
58
|
+
|
59
|
+
puts "# Install #{input} to #{udid}"
|
60
|
+
puts output
|
61
|
+
end
|
62
|
+
|
63
|
+
# Appをアンインストールする
|
64
|
+
def app_uninstall(input, udid, is_android)
|
65
|
+
if is_android
|
66
|
+
output, = adb_command("uninstall #{input}", udid)
|
67
|
+
else
|
68
|
+
output, = apple_command("device uninstall app #{input}", udid)
|
69
|
+
end
|
70
|
+
|
71
|
+
return unless output
|
72
|
+
|
73
|
+
puts "# Uninstall #{input} from #{udid}"
|
74
|
+
puts output
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -6,73 +6,18 @@ require 'fileutils'
|
|
6
6
|
|
7
7
|
# Mdq
|
8
8
|
module Mdq
|
9
|
-
#
|
10
|
-
class
|
11
|
-
def
|
12
|
-
|
13
|
-
# 接続中のデバイスを取得する
|
14
|
-
def get(sql)
|
15
|
-
ActiveRecord::Schema.verbose = false
|
16
|
-
InitialSchema.migrate(:up)
|
17
|
-
|
18
|
-
android_discover
|
19
|
-
apple_discover
|
20
|
-
|
21
|
-
if sql
|
22
|
-
begin
|
23
|
-
ActiveRecord::Base.connection.execute(sql)
|
24
|
-
rescue StandardError
|
25
|
-
warn 'SQL Syntax Error.'
|
26
|
-
exit
|
27
|
-
end
|
28
|
-
else
|
29
|
-
Device.all
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
# 指定したソフトウェアのインストール状況を表示する
|
34
|
-
def show_version(name, command)
|
35
|
-
output, = Open3.capture3(command)
|
36
|
-
puts "# #{name} installed."
|
37
|
-
puts output
|
38
|
-
rescue StandardError
|
39
|
-
puts "# #{name} is not installed."
|
40
|
-
end
|
41
|
-
|
42
|
-
# Androidデバイスのスクリーンショットを撮る
|
43
|
-
def device_screencap(output, udid, is_android)
|
44
|
-
return unless is_android
|
45
|
-
|
46
|
-
FileUtils.mkdir_p(output)
|
47
|
-
file = "/sdcard/#{udid}.png"
|
48
|
-
adb_command("shell screencap -p #{file}", udid)
|
49
|
-
adb_command("pull #{file} #{output}", udid)
|
50
|
-
adb_command("adb shell rm #{file}")
|
51
|
-
|
52
|
-
puts "# Screenshot of #{udid} to #{output}"
|
9
|
+
# Discovery
|
10
|
+
class Discovery
|
11
|
+
def initialize
|
12
|
+
@home = FileUtils.mkdir_p([Dir.home, '.mdq'].join(File::Separator))
|
53
13
|
end
|
54
14
|
|
55
|
-
def
|
56
|
-
|
57
|
-
output, = apple_command("device install app #{input}", udid) if !is_android && input.end_with?('.ipa')
|
58
|
-
|
59
|
-
return unless output
|
60
|
-
|
61
|
-
puts "# Install #{input} to #{udid}"
|
62
|
-
puts output
|
15
|
+
def android_discoverable?
|
16
|
+
adb_command('version').present?
|
63
17
|
end
|
64
18
|
|
65
|
-
def
|
66
|
-
|
67
|
-
output, = adb_command("uninstall #{input}", udid)
|
68
|
-
else
|
69
|
-
output, = apple_command("device uninstall app #{input}", udid)
|
70
|
-
end
|
71
|
-
|
72
|
-
return unless output
|
73
|
-
|
74
|
-
puts "# Uninstall #{input} from #{udid}"
|
75
|
-
puts output
|
19
|
+
def apple_discoverable?
|
20
|
+
apple_command('--version').present?
|
76
21
|
end
|
77
22
|
|
78
23
|
private
|
@@ -108,7 +53,7 @@ module Mdq
|
|
108
53
|
end
|
109
54
|
|
110
55
|
# Androidデバイス一覧を取得する
|
111
|
-
def android_discover
|
56
|
+
def android_discover
|
112
57
|
output, = adb_command('devices -l')
|
113
58
|
return if output.nil?
|
114
59
|
|
@@ -160,6 +105,7 @@ module Mdq
|
|
160
105
|
free_capacity: free_capacity,
|
161
106
|
platform: 'Android'
|
162
107
|
})
|
108
|
+
|
163
109
|
else
|
164
110
|
Device.create({
|
165
111
|
udid: udid,
|
@@ -173,16 +119,17 @@ module Mdq
|
|
173
119
|
|
174
120
|
# Appleデバイス一覧を取得する
|
175
121
|
def apple_discover
|
176
|
-
file = [
|
122
|
+
file = [@home, 'mdq.json'].join(File::Separator)
|
177
123
|
result = apple_command("list devices -v -j #{file}")
|
178
|
-
|
124
|
+
|
179
125
|
return unless File.exist?(file)
|
180
126
|
|
181
127
|
File.open(file, 'r') do |f|
|
182
128
|
result = JSON.parse(f.read)
|
183
129
|
result['result']['devices'].each do |device|
|
130
|
+
udid = device['hardwareProperties']['udid']
|
184
131
|
Device.create({
|
185
|
-
udid:
|
132
|
+
udid: udid,
|
186
133
|
serial_number: device['hardwareProperties']['serialNumber'],
|
187
134
|
name: device['deviceProperties']['name'],
|
188
135
|
authorized: true,
|
@@ -190,44 +137,94 @@ module Mdq
|
|
190
137
|
marketing_name: device['hardwareProperties']['marketingName'],
|
191
138
|
model: device['hardwareProperties']['productType'],
|
192
139
|
build_version: device['deviceProperties']['osVersionNumber'],
|
193
|
-
build_id: device['deviceProperties']['osBuildUpdate']
|
140
|
+
build_id: device['deviceProperties']['osBuildUpdate'],
|
141
|
+
total_capacity: device['hardwareProperties']['internalStorageCapacity']
|
194
142
|
})
|
195
143
|
end
|
196
144
|
|
197
145
|
File.delete(file)
|
198
146
|
end
|
199
147
|
end
|
148
|
+
|
149
|
+
# Androidのアプリを取得する
|
150
|
+
def android_apps(udid)
|
151
|
+
apps, = adb_command('shell pm list packages', udid)
|
152
|
+
apps.split("\n").each do |line3|
|
153
|
+
App.create({
|
154
|
+
udid: udid,
|
155
|
+
package_name: line3.gsub('package:', '')
|
156
|
+
})
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
# Appleデバイスのアプリを取得する
|
161
|
+
def apple_apps(udid)
|
162
|
+
file = [@home, 'mdq-apps.json'].join(File::Separator)
|
163
|
+
apple_command("device info apps -j #{file}", udid)
|
164
|
+
File.open(file, 'r') do |f|
|
165
|
+
result = JSON.parse(f.read)
|
166
|
+
begin
|
167
|
+
result['result']['apps'].each do |app|
|
168
|
+
App.create({
|
169
|
+
udid: udid,
|
170
|
+
package_name: app['bundleIdentifier'],
|
171
|
+
name: app['name'],
|
172
|
+
version: app['version']
|
173
|
+
})
|
174
|
+
end
|
175
|
+
rescue StandardError
|
176
|
+
# none
|
177
|
+
end
|
178
|
+
end
|
179
|
+
File.delete(file)
|
180
|
+
end
|
181
|
+
|
182
|
+
def reset
|
183
|
+
Device.destroy_all
|
184
|
+
App.destroy_all
|
185
|
+
ActiveRecord::Base.connection.execute("delete from sqlite_sequence where name='devices'")
|
186
|
+
ActiveRecord::Base.connection.execute("delete from sqlite_sequence where name='apps'")
|
187
|
+
end
|
200
188
|
end
|
201
189
|
end
|
202
190
|
|
191
|
+
ActiveRecord::Schema.verbose = false
|
192
|
+
ActiveRecord::Migration.verbose = false
|
193
|
+
|
203
194
|
ActiveRecord::Base.establish_connection(
|
204
195
|
adapter: 'sqlite3',
|
205
196
|
database: ':memory:'
|
206
197
|
)
|
207
198
|
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
t.integer :total_capacity
|
223
|
-
t.integer :free_capacity
|
224
|
-
end
|
225
|
-
end
|
199
|
+
ActiveRecord::Migration.create_table :devices do |t|
|
200
|
+
t.string :udid
|
201
|
+
t.string :serial_number
|
202
|
+
t.string :name
|
203
|
+
t.boolean :authorized
|
204
|
+
t.string :platform
|
205
|
+
t.string :marketing_name
|
206
|
+
t.string :model
|
207
|
+
t.string :build_version
|
208
|
+
t.string :build_id
|
209
|
+
t.integer :battery_level
|
210
|
+
t.integer :total_capacity
|
211
|
+
t.integer :free_capacity
|
212
|
+
end
|
226
213
|
|
227
|
-
|
228
|
-
|
229
|
-
|
214
|
+
ActiveRecord::Migration.create_table :apps do |t|
|
215
|
+
t.string :udid
|
216
|
+
t.string :name
|
217
|
+
t.string :package_name
|
218
|
+
t.string :version
|
230
219
|
end
|
231
220
|
|
221
|
+
# Device
|
232
222
|
class Device < ActiveRecord::Base
|
223
|
+
def android?
|
224
|
+
platform == 'Android'
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
# App
|
229
|
+
class App < ActiveRecord::Base
|
233
230
|
end
|
data/lib/mdq/list.rb
CHANGED
@@ -7,10 +7,12 @@ module Mdq
|
|
7
7
|
# List
|
8
8
|
class List
|
9
9
|
def initialize(options)
|
10
|
-
|
11
|
-
devices = ddb.get(options['query'])
|
10
|
+
db = Mdq::DB.new
|
12
11
|
|
13
|
-
|
12
|
+
query = options['query']
|
13
|
+
models = db.get(query)
|
14
|
+
|
15
|
+
output = JSON.pretty_generate(models.as_json)
|
14
16
|
puts output
|
15
17
|
if options['output']
|
16
18
|
File.open(options['output'], 'w') do |f|
|
@@ -18,10 +20,10 @@ module Mdq
|
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
21
|
-
|
23
|
+
models.each do |device|
|
22
24
|
model = Device.find_by(udid: device.udid)
|
23
25
|
udid = model.udid
|
24
|
-
is_android = model.
|
26
|
+
is_android = model.android?
|
25
27
|
|
26
28
|
ddb.device_screencap(options[:cap], udid, is_android) if options[:cap]
|
27
29
|
ddb.app_install(options[:install], udid, is_android) if options[:install]
|
data/lib/mdq/version.rb
CHANGED
data/lib/mdq.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mdq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- arthur87
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|
@@ -87,7 +87,8 @@ files:
|
|
87
87
|
- lib/mdq.rb
|
88
88
|
- lib/mdq/check.rb
|
89
89
|
- lib/mdq/cli.rb
|
90
|
-
- lib/mdq/
|
90
|
+
- lib/mdq/db.rb
|
91
|
+
- lib/mdq/discovery.rb
|
91
92
|
- lib/mdq/list.rb
|
92
93
|
- lib/mdq/version.rb
|
93
94
|
homepage: https://github.com/arthur87/mdq
|