flick 0.4.4 → 0.4.5
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/README.md +3 -3
- data/bin/flick +11 -10
- data/lib/flick/applitools.rb +2 -0
- data/lib/flick/version.rb +1 -1
- data/lib/flick/video.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a28b0508d94949d4202e53bb6aa6c4b53fbe6b5
|
4
|
+
data.tar.gz: 464f2aa8261f94798b28f9569849004477ad5df1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2abbc94975b4164ef8a792b5e4de174df648595b849eef13f081353f5e1b2143b558ed1c78321a737ae132c0bc3ab95061e11fa64256ad3bd0458816ce75bdb
|
7
|
+
data.tar.gz: d9d29fc17010bb00c19e85446a963d632a44fe15043814f67e0a5c39c69e54ec91232d515560b483ba22e7659d329750fb702b848c68f89aa8fdd28b50a6df43
|
data/README.md
CHANGED
@@ -91,7 +91,7 @@ Usage:
|
|
91
91
|
screenshot Take a screenshot
|
92
92
|
video Record video
|
93
93
|
vitals Android Only! Get apps and device vitals - App Memory Used, App CPU %. System Stats: (User, System, IQW, IRQ)
|
94
|
-
applitools
|
94
|
+
applitools Validate images with Applitools
|
95
95
|
|
96
96
|
GLOBAL OPTIONS:
|
97
97
|
|
@@ -134,14 +134,14 @@ Usage:
|
|
134
134
|
$ flick vitals -p android -n com.awsome-package.name
|
135
135
|
|
136
136
|
$ flick applitools --help
|
137
|
-
$ flick
|
137
|
+
$ flick applitools -p android --appName Twitter --testName Messages
|
138
138
|
|
139
139
|
##Demo
|
140
140
|
<img src="https://www.dropbox.com/s/9be37gc1c2dlxa6/flick-demo.gif?raw=1" width="600">
|
141
141
|
|
142
142
|
## Contributing
|
143
143
|
|
144
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/isonic1/flick. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](
|
144
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/isonic1/flick. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](https://github.com/isonic1/Appium-Native-Crawler/blob/master/CODE_OF_CONDUCT.md) code of conduct.
|
145
145
|
|
146
146
|
## TODO
|
147
147
|
* Dry the code a bit.
|
data/bin/flick
CHANGED
@@ -3,7 +3,7 @@ require_relative '../lib/flick'
|
|
3
3
|
require 'commander/import'
|
4
4
|
require 'digest'
|
5
5
|
|
6
|
-
program :version, '0.4.
|
6
|
+
program :version, '0.4.5'
|
7
7
|
program :description, 'A CLI to capture screenshots, video, logs, and device info for Android (Devices & Emulators) and iOS (Devices).'
|
8
8
|
|
9
9
|
command :video do |c|
|
@@ -53,13 +53,13 @@ end
|
|
53
53
|
|
54
54
|
command :applitools do |c|
|
55
55
|
c.syntax = 'flick applitools [options]'
|
56
|
-
c.summary = '
|
56
|
+
c.summary = 'Validate images with Applitools'
|
57
57
|
c.description = c.summary
|
58
58
|
c.example 'description', "flick applitools -p android --appName Twitter --testName Messages"
|
59
59
|
c.option '-p', '--platform PLATFORM', String, 'Set platform: android or ios'
|
60
60
|
c.option '-u', '--udid UDID', String, 'Set device UDID.'
|
61
61
|
c.option '-o', '--outdir OUTDIR', String, "Set output directory. Default: #{Dir.pwd}"
|
62
|
-
c.option '
|
62
|
+
c.option '--keep', "Keep image after capture."
|
63
63
|
c.option '--appName appName', String, "Set your App Name. Example: --appName Twitter. Default is the platform value"
|
64
64
|
c.option '--testName testName', String, "Set Test Name. Example: --testName 'Home View'"
|
65
65
|
c.option '--autoSave autoSave', String, "Automatically save failed tests."
|
@@ -70,12 +70,10 @@ command :applitools do |c|
|
|
70
70
|
c.option '--proxy Proxy', String, "Set proxy address"
|
71
71
|
c.option '--baseline Baseline', String, "Set your baseline name"
|
72
72
|
c.option '--batchName BatchName', String, "Set your batch (folder) name"
|
73
|
-
c.option '--batchId BatchId', String, "Set a batch ID.
|
74
|
-
|
75
|
-
|
76
|
-
# c.option '--baseline', String, "Set baseline name"
|
73
|
+
c.option '--batchId BatchId', String, "Set a batch ID. If you want to put images into an existing batch you can set this ID. e.g. 1234"
|
74
|
+
c.option '--hostApp', String, "Set Host-app identifier for the screens under test"
|
75
|
+
c.option '--hostOs', String, "Set OS identifier for the screens under test"
|
77
76
|
# c.option '--branch', String, "Set branch name"
|
78
|
-
# c.option '--hostOs', String, "Set OS identifier for the screens under test"
|
79
77
|
# c.option '--parentBranch', String, "Set parent branch name, optional when working with branches"
|
80
78
|
c.action do |args, options|
|
81
79
|
options.default \
|
@@ -88,7 +86,8 @@ command :applitools do |c|
|
|
88
86
|
:appName => options.platform,
|
89
87
|
:baseline => nil,
|
90
88
|
:batchName => options.appName,
|
91
|
-
:
|
89
|
+
:hostApp => nil,
|
90
|
+
:hostOs => nil
|
92
91
|
|
93
92
|
[:testName, :apiKey].each do |o|
|
94
93
|
if options.default[o].nil?
|
@@ -102,7 +101,9 @@ command :applitools do |c|
|
|
102
101
|
puts "You entered an incorrect match level. Please choose any of these: #{match_levels}"
|
103
102
|
abort
|
104
103
|
end
|
105
|
-
|
104
|
+
|
105
|
+
options.batchId = options.batchId.to_i if options.batchId
|
106
|
+
|
106
107
|
Applitoolz.new(options.default).upload_to_applitools
|
107
108
|
end
|
108
109
|
end
|
data/lib/flick/applitools.rb
CHANGED
@@ -19,6 +19,8 @@ class Applitoolz
|
|
19
19
|
batch_info = Applitools::BatchInfo.new(options[:batchName])
|
20
20
|
batch_info.id = options[:batchId] #Date.today.to_time.to_i
|
21
21
|
eyes.batch = batch_info
|
22
|
+
eyes.host_app = options[:hostApp]
|
23
|
+
eyes.host_os = options[:hostOs]
|
22
24
|
self.keep = options[:keep]
|
23
25
|
end
|
24
26
|
|
data/lib/flick/version.rb
CHANGED
data/lib/flick/video.rb
CHANGED
@@ -144,7 +144,7 @@ class Video
|
|
144
144
|
|
145
145
|
def convert_images_to_mp4
|
146
146
|
remove_zero_byte_images
|
147
|
-
%x(ffmpeg -loglevel quiet -framerate #{rate} -pattern_type glob -i '#{driver.flick_dir}/screenshot-#{udid}*.png' -c:v libx264 -pix_fmt yuv420p #{driver.flick_dir}/#{driver.name}.mp4)
|
147
|
+
%x(ffmpeg -loglevel quiet -framerate #{rate} -pattern_type glob -i '#{driver.flick_dir}/screenshot-#{udid}*.png' -c:v libx264 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" #{driver.flick_dir}/#{driver.name}.mp4)
|
148
148
|
end
|
149
149
|
|
150
150
|
def remove_zero_byte_images
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|