smart_monkey 0.3 → 0.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea506829e3508d4adf2a11e13cf22bada2cda897
4
- data.tar.gz: ebb80b94aa4a2e215b34370c4027ccb00c44213c
3
+ metadata.gz: 5f43f6aa20e6eedb6e5c28de2b98bfdc86e608a9
4
+ data.tar.gz: c32bb2694836f6d8116d320526e88eff3ea5c2d7
5
5
  SHA512:
6
- metadata.gz: 5e5bb54348596c81767bc5779906b4e95f5ccfb2f9ffa07d30778a14c8d6c3ac99fd718e532d6b1eadf2a1d7f791f5bcdfc89e07eb8b9d4605afb54bea7f7e1f
7
- data.tar.gz: 5ebb96ea3bb80901d263334b87226e08eb88d5bccaf3a74cd4de77ee4df2c4afaaaefacd225fd9d8bf013617632c8a22e13588d4820a9d0ea71880d68106fa23
6
+ metadata.gz: cff1fbd4a22560d4c8b6eb6c1df2b170be4b8cddc52b2f5a9d68c9e06dbb8b34a80daf950284f639d5b4d2aef31d66c439d0315adbf4286316b4465bb98c3d9e
7
+ data.tar.gz: 9f53613758f53e3cc5cabf072917f4d08238bff2fcec5140c4bcb303c7878796a77f979cceac941070ba332bba4d18ac2cbab532a0763790ee457b6c551c5006
data/README.md CHANGED
@@ -39,7 +39,7 @@ iOS Monkey Test Tool.
39
39
  $ smart_monkey -h
40
40
  Usage: smart_monkey [options]
41
41
  -a app_name Bundle ID of the desired target on device(Required)
42
- -w device Target Device UDID(Required)
42
+ -w device Target device udid or device describe will match" (Required)
43
43
  -n run_count How many times monkeys run(default: 1)
44
44
  -d result_dir Where to output result(default: ./smart_monkey_result)
45
45
  -t time_limit_sec Time limit of running
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3
1
+ 0.4.1
data/bin/smart_monkey CHANGED
@@ -30,6 +30,8 @@ ARGV.options do |o|
30
30
  o.parse!
31
31
  end
32
32
 
33
+ MonkeyDoctor.run_env_doctor
34
+
33
35
  if opts[:version]
34
36
  dirname = File.dirname(File.dirname(__FILE__))
35
37
  filepath = File.join(dirname, "VERSION")
@@ -0,0 +1,18 @@
1
+ # coding: utf-8
2
+
3
+ module MonkeyDoctor
4
+
5
+ def MonkeyDoctor.run_env_doctor
6
+ doctor_list = []
7
+ doctor_list << `hash idevice_id 2>/dev/null || { echo "Require 'libimobiledevice' but it's not installed. Please run 'brew install libimobiledevice' to install it."; exit 1; };`.strip
8
+ doctor_list << `hash ideviceinstaller 2>/dev/null || { echo "Require 'ideviceinstaller' but it's not installed. Please run 'brew install ideviceinstaller' to install it."; exit 1; };`.strip
9
+ doctor_list << `hash mogrify 2>/dev/null || { echo "Require 'imagemagick' but it's not installed. Please run 'brew install imagemagick' to install it."; exit 1; }; `.strip
10
+ doctor_list.each do |item|
11
+ if !item.empty?
12
+ puts item
13
+ exit(1)
14
+ end
15
+ end
16
+ end
17
+
18
+ end
@@ -129,6 +129,7 @@ module UIAutoMonkey
129
129
  if @options[:compress_rate]
130
130
  compress_image(result_history_dir(@times))
131
131
  end
132
+ rotate_imgs(result_history_dir(@times))
132
133
  rm_instruments_trace(INSTRUMENTS_TRACE_PATH)
133
134
  kill_all('iPhone Simulator')
134
135
  sleep 3
@@ -170,8 +171,8 @@ module UIAutoMonkey
170
171
  def list_app
171
172
  puts "============For iPhone Simulator:"
172
173
  puts find_apps('*.app').map{|n| File.basename n}.uniq.sort.join("\n")
173
- puts "============For iPhone Device:"
174
- if device
174
+ if !is_simulator
175
+ puts "============For iPhone Device:"
175
176
  puts `ideviceinstaller -u #{device} -l`
176
177
  end
177
178
  end
@@ -194,7 +195,11 @@ module UIAutoMonkey
194
195
  end
195
196
 
196
197
  def device
197
- @options[:device] || (devices[0].strip.split("[")[1].delete "]")
198
+ if @options[:device]
199
+ find_device(@options[:device])
200
+ else
201
+ (devices[0].strip.split("[")[1].delete "]")
202
+ end
198
203
  end
199
204
 
200
205
  def app_path
@@ -213,8 +218,18 @@ module UIAutoMonkey
213
218
  `"instruments" -s devices`.strip.split(/\n/).drop(2)
214
219
  end
215
220
 
221
+ def find_device(device)
222
+ device_line = `"instruments" -s devices | grep "#{device}"`.strip.split(/\n/)[0]
223
+ if device_line.nil?
224
+ puts "Invalid device, Please given a vaild device!"
225
+ puts `"instruments" -s devices`
226
+ exit(1)
227
+ end
228
+ device_line.strip.split("[")[1].delete "]"
229
+ end
230
+
216
231
  def instruments_deviceinfo(device)
217
- `"instruments" -s devices | grep #{device}`.strip
232
+ `"instruments" -s devices | grep "#{device}"`.strip
218
233
  end
219
234
 
220
235
  def is_simulator
@@ -228,20 +243,51 @@ module UIAutoMonkey
228
243
 
229
244
  def product_type(device)
230
245
  product_hash={
231
- "iPhone7,2"=>"iPhone 6",
232
- "iPhone7,1"=>"iPhone 6 Plus",
233
- "iPhone6,2"=>"iPhone 5S (CDMA)",
234
- "iPhone6,1"=>"iPhone 5S (GSM)",
235
- "iPhone5,4"=>"iPhone 5C (CDMA)",
236
- "iPhone5,3"=>"iPhone 5C (GSM)",
237
- "iPhone5,2"=>"iPhone 5",
238
- "iPhone5,1"=>"iPhone 5",
239
- "iPhone4,1"=>"iPhone 4S",
240
- "iPhone3,2"=>"iPhone 4 - CDMA",
241
- "iPhone3,1"=>"iPhone 4 - GSM",
242
- "iPhone2,1"=>"iPhone 3GS",
243
- "iPhone1,2"=>"iPhone 3G",
244
246
  "iPhone1,1"=>"iPhone",
247
+ "iPhone1,2"=>"iPhone 3G",
248
+ "iPhone2,1"=>"iPhone 3GS",
249
+ "iPhone3,1"=>"iPhone 4 - GSM",
250
+ "iPhone3,2"=>"iPhone 4 - CDMA",
251
+ "iPhone3,3"=>"iPhone 4 - CDMA",
252
+ "iPhone4,1"=>"iPhone 4S",
253
+ "iPhone5,1"=>"iPhone 5",
254
+ "iPhone5,2"=>"iPhone 5",
255
+ "iPhone5,3"=>"iPhone 5C (GSM)",
256
+ "iPhone5,4"=>"iPhone 5C (CDMA)",
257
+ "iPhone6,1"=>"iPhone 5S (GSM)",
258
+ "iPhone6,2"=>"iPhone 5S (CDMA)",
259
+ "iPhone7,1"=>"iPhone 6 Plus",
260
+ "iPhone7,2"=>"iPhone 6",
261
+ "iPad1,1"=>"iPad",
262
+ "iPad2,1"=>"iPad 2 (Wi-Fi)",
263
+ "iPad2,2"=>"iPad 2 (GSM)",
264
+ "iPad2,3"=>"iPad 2 (CDMA)",
265
+ "iPad2,4"=>"iPad 2 (Wi-Fi, revised)",
266
+ "iPad2,5"=>"iPad mini (Wi-Fi)",
267
+ "iPad2,6"=>"iPad mini (A1454)",
268
+ "iPad2,7"=>"iPad mini (A1455)",
269
+ "iPad3,1"=>"iPad (3rd gen, Wi-Fi)",
270
+ "iPad3,2"=>"iPad (3rd gen, Wi-Fi+LTE Verizon)",
271
+ "iPad3,3"=>"iPad (3rd gen, Wi-Fi+LTE AT&T)",
272
+ "iPad3,4"=>"iPad (4th gen, Wi-Fi)",
273
+ "iPad3,5"=>"iPad (4th gen, A1459)",
274
+ "iPad3,6"=>"iPad (4th gen, A1460)",
275
+ "iPad4,1"=>"iPad Air (Wi-Fi)",
276
+ "iPad4,2"=>"iPad Air (Wi-Fi+LTE)",
277
+ "iPad4,3"=>"iPad Air (Rev)",
278
+ "iPad4,4"=>"iPad mini 2 (Wi-Fi)",
279
+ "iPad4,5"=>"iPad mini 2 (Wi-Fi+LTE)",
280
+ "iPad4,6"=>"iPad mini 2 (Rev)",
281
+ "iPad4,7"=>"iPad mini 3 (Wi-Fi)",
282
+ "iPad4,8"=>"iPad mini 3 (A1600)",
283
+ "iPad4,9"=>"iPad mini 3 (A1601)",
284
+ "iPad5,3"=>"iPad Air 2 (Wi-Fi)",
285
+ "iPad5,4"=>"iPad Air 2 (Wi-Fi+LTE)",
286
+ "iPod1,1"=>"iPod touch",
287
+ "iPod2,1"=>"iPod touch (2nd gen)",
288
+ "iPod3,1"=>"iPod touch (3rd gen)",
289
+ "iPod4,1"=>"iPod touch (4th gen)",
290
+ "iPod5,1"=>"iPod touch (5th gen)",
245
291
  }
246
292
 
247
293
  if is_simulator
@@ -271,6 +317,20 @@ module UIAutoMonkey
271
317
  `mogrify -resize #{compress_rate} "#{path}/*.png"`
272
318
  end
273
319
 
320
+ def rotate_imgs(path)
321
+ rotated_map={
322
+ "1"=>nil,
323
+ "2"=>"180",
324
+ "3"=>"270",
325
+ "4"=>"90",
326
+ }
327
+ orientationNum = File.read(File.join(result_base_dir,"orientation")).strip
328
+ value = rotated_map[orientationNum]
329
+ unless value.nil?
330
+ `mogrify -rotate #{value} "#{path}/*.png"`
331
+ end
332
+ end
333
+
274
334
  def kill_all_need
275
335
  kill_all('instruments', '9')
276
336
  kill_all('Instruments', '9')
@@ -425,7 +485,7 @@ module UIAutoMonkey
425
485
  # if extend_javascript_flag
426
486
  # js = File.read(extend_javascript_path) + "\n" + js
427
487
  # end
428
- envs_str="UniqueDeviceID=\"#{device}\";"
488
+ envs_str="UniqueDeviceID=\"#{device}\";\nResultBaseDir=\"#{result_base_dir}\";\n"
429
489
  File.open(File.join(result_base_dir,"Env.js"), 'w') {|f| f.write(envs_str)}
430
490
  FileUtils.copy(config_custom_path, result_base_dir)
431
491
  FileUtils.copy(ui_auto_monkey_original_path, result_base_dir)
@@ -541,7 +601,7 @@ module UIAutoMonkey
541
601
  if log[LOG_TYPE] == 'Screenshot'
542
602
  if log[MESSAGE] =~ /^action/
543
603
  hash[:action_image] = log[MESSAGE]
544
- elsif log[MESSAGE] =~ /^monkey/
604
+ elsif log[MESSAGE] =~ /^monkey[^external]*$/
545
605
  hash[:screen_image] = log[MESSAGE]
546
606
  used_imgs << log[MESSAGE]
547
607
  hash[:timestamp] = log[TIMESTAMP]
@@ -556,9 +616,8 @@ module UIAutoMonkey
556
616
  num -= 1
557
617
  end
558
618
  elsif log[LOG_TYPE] == 'Debug' && log[MESSAGE] =~ /^target./
559
- hash[:message] = log[MESSAGE] unless log[MESSAGE] =~ /^target.captureRectWithName/ && log[MESSAGE] =~ /switcherScrollView/
560
- # elsif log[LOG_TYPE] == 'Default' && log[MESSAGE] =~ /^DeviceInfo/
561
- # hash[:screen_size] = log[MESSAGE]
619
+ # hash[:message] = log[MESSAGE] unless log[MESSAGE] =~ /^target.captureRectWithName/ && log[MESSAGE] =~ /switcherScrollView/
620
+ hash[:message] = log[MESSAGE] unless log[MESSAGE] =~ /size:{height:0.00,width:0.00}/ || log[MESSAGE] =~ /switcherScrollView/
562
621
  end
563
622
  end
564
623
  #drop unused imgs
data/lib/smart_monkey.rb CHANGED
@@ -1,2 +1,3 @@
1
1
  require 'smart_monkey/command_helper'
2
+ require 'smart_monkey/monkey_doctor'
2
3
  require 'smart_monkey/monkey_runner'
@@ -104,7 +104,7 @@ function UIAutoMonkey() {
104
104
  },
105
105
 
106
106
  targetBundleId: UIATarget.localTarget().frontMostApp().bundleID(),
107
-
107
+ orientationNum: UIATarget.localTarget().frontMostApp().interfaceOrientation().toString(),
108
108
 
109
109
 
110
110
  // Uncomment the following to restrict events to a rectangluar area of
@@ -125,7 +125,14 @@ function UIAutoMonkey() {
125
125
  return false;
126
126
  }
127
127
 
128
- }
128
+ };
129
+
130
+ //Array class addon func.
131
+ Array.prototype.S=String.fromCharCode(2);
132
+ Array.prototype.in_array=function(e){
133
+ var r=new RegExp(this.S+e+this.S);
134
+ return (r.test(this.S+this.join(this.S)+this.S));
135
+ };
129
136
 
130
137
  // --- --- --- ---
131
138
  // Event Methods
@@ -178,7 +185,7 @@ UIAutoMonkey.prototype.allEvents = {
178
185
  var i = Math.floor(Math.random() * 10) % orientations.length;
179
186
  var newOrientation = orientations[i];
180
187
  this.target().setDeviceOrientation(newOrientation);
181
- this.delay(0.9);
188
+ this.delay(1);
182
189
  },
183
190
 
184
191
  clickVolumeUp: function() {
@@ -225,6 +232,7 @@ UIAutoMonkey.prototype.RELEASE_THE_MONKEY = function() {
225
232
  if (this.config.minutesToRun && this.config.numberOfEvents) {
226
233
  throw "invalid configuration. You cannot define both minutesToRun and numberOfEvents"
227
234
  }
235
+ this.saveDeviceOrientation(); //save current app orientation number.
228
236
  var conditionHandlers = this.config.conditionHandlers || []; //For legacy configs, if not present default to empty.
229
237
  var useConditionHandlers = conditionHandlers.length > 0;
230
238
  var checkTime = false;
@@ -244,9 +252,9 @@ UIAutoMonkey.prototype.RELEASE_THE_MONKEY = function() {
244
252
  var anrDebug = this.config.anrSettings.debug;
245
253
  this.anrMaxElapsedCount = -1;
246
254
  }
247
-
248
- UIALogger.logMessage(JSON.stringify(UIATarget.localTarget().rect().size));
249
255
 
256
+ UIALogger.logMessage(JSON.stringify(UIATarget.localTarget().rect().size));
257
+
250
258
  for (var i = 0; i < localNumberOfEvents; i++) {
251
259
  if (checkTime && (i % checkTimeEvery == 0)) { //check the time if needed
252
260
  var currTime = new Date().getTime();
@@ -288,7 +296,6 @@ UIAutoMonkey.prototype.RELEASE_THE_MONKEY = function() {
288
296
 
289
297
 
290
298
  UIAutoMonkey.prototype.anrCheck = function(i, fingerprintFunction, debugFlag){
291
-
292
299
  var newSnapshot = fingerprintFunction();
293
300
  if (newSnapshot != this.anrSnapshot) {
294
301
  //all is good, we're moving along
@@ -328,6 +335,7 @@ UIAutoMonkey.prototype.processConditionHandlers = function(conditionHandlers, ev
328
335
  }
329
336
  if (isConditionTrue) {
330
337
  aCondition.handle(target, mainWindow);
338
+ this.takeScreenShotIfItIsTime();
331
339
  if (aCondition.isExclusive()) {
332
340
  break;
333
341
  } else {
@@ -386,12 +394,12 @@ UIAutoMonkey.prototype.chooseEventName = function() {
386
394
 
387
395
  UIAutoMonkey.prototype.screenWidth = function() {
388
396
  // Need to adjust by one to stay within rectangle
389
- return this.target().rect().size.width - 1;
397
+ return parseInt(this.target().rect().size.width - 1);
390
398
  };
391
399
 
392
400
  UIAutoMonkey.prototype.screenHeight = function() {
393
401
  // Need to adjust by one to stay within rectangle
394
- return this.target().rect().size.height - 1;
402
+ return parseInt(this.target().rect().size.height - 1);
395
403
  };
396
404
 
397
405
  UIAutoMonkey.prototype.randomX = function() {
@@ -399,9 +407,15 @@ UIAutoMonkey.prototype.randomX = function() {
399
407
  var r = Math.random();
400
408
 
401
409
  if (this.config.frame){
402
- // Limits coordinates to given frame if set in config
403
- min = this.config.frame.origin.x;
404
- max = this.config.frame.size.width + min;
410
+ if(this.screenRectSafe()){
411
+ // Limits coordinates to given frame if set in config
412
+ min = this.config.frame.origin.x;
413
+ max = this.config.frame.size.width + min;
414
+ }else{
415
+ // Limits coordinates to given frame if set in config
416
+ min = parseInt(this.target().rect().origin.x);
417
+ max = this.screenWidth() + min;
418
+ }
405
419
  } else {
406
420
  // Returns a random X coordinate within the screen rectangle
407
421
  min = 0;
@@ -415,9 +429,15 @@ UIAutoMonkey.prototype.randomY = function() {
415
429
  var r = Math.random();
416
430
 
417
431
  if (this.config.frame){
418
- // Limits coordinates to given frame if set in config
419
- min = this.config.frame.origin.y;
420
- max = this.config.frame.size.height + min;
432
+ if(this.screenRectSafe()){
433
+ // Limits coordinates to given frame if set in config
434
+ min = this.config.frame.origin.y;
435
+ max = this.config.frame.size.height + min;
436
+ }else{
437
+ // Limits coordinates to given frame if set in config
438
+ min = parseInt(this.target().rect().origin.y);
439
+ max = this.screenHeight() + min;
440
+ }
421
441
  } else {
422
442
  // Returns a random Y coordinate within the screen rectangle
423
443
  min = 0;
@@ -477,6 +497,22 @@ UIAutoMonkey.prototype.reLaunchApp = function() {
477
497
  this.target().host().performTaskWithPathArgumentsTimeout(idevicedebug_original_path, ["-u", UniqueDeviceID, "run", this.config.targetBundleId, ">/dev/null", "2>&1", "&"], 5);
478
498
  };
479
499
 
500
+ UIAutoMonkey.prototype.saveDeviceOrientation = function() {
501
+ var saveFile = ResultBaseDir + "/" + "orientation";
502
+ var command = "echo " + this.config.orientationNum + " > " + saveFile
503
+ this.target().host().performTaskWithPathArgumentsTimeout("/bin/bash", ["-c", command], 5);
504
+ };
505
+
506
+ UIAutoMonkey.prototype.screenRectSafe = function() {
507
+ var vertical_arr = ["1", "2"];
508
+ var horizontal_arr = ["3" ,"4"];
509
+ var current_orientation = this.target().frontMostApp().interfaceOrientation().toString();
510
+ var config_orientation = this.config.orientationNum;
511
+ var condition_allin_vertical = vertical_arr.in_array(current_orientation) && vertical_arr.in_array(config_orientation);
512
+ var condition_allin_horizontal = horizontal_arr.in_array(current_orientation) && horizontal_arr.in_array(config_orientation);
513
+ return condition_allin_vertical || condition_allin_horizontal
514
+ };
515
+
480
516
  // Commodity function to call RELEASE_THE_MONKEY directly on UIAutoMonkey
481
517
  // if you don't need to customize your instance
482
518
  UIAutoMonkey.RELEASE_THE_MONKEY = function() {
@@ -27,12 +27,12 @@ monkey.config.touchProbability = {
27
27
  monkey.config.frame = {
28
28
  origin:
29
29
  {
30
- x: parseInt(UIATarget.localTarget().frontMostApp().rect().origin.x),
31
- y: parseInt(UIATarget.localTarget().frontMostApp().rect().origin.y)+10
30
+ x: parseInt(UIATarget.localTarget().rect().origin.x),
31
+ y: parseInt(UIATarget.localTarget().rect().origin.y)+20
32
32
  },
33
33
  size: {
34
- width: parseInt(UIATarget.localTarget().frontMostApp().rect().size.width),
35
- height: parseInt(UIATarget.localTarget().frontMostApp().rect().size.height)-20
34
+ width: parseInt(UIATarget.localTarget().rect().size.width),
35
+ height: parseInt(UIATarget.localTarget().rect().size.height)-20
36
36
  }
37
37
  };// Ignore the UIAStatusBar area, avoid to drag out the notification page.
38
38
 
data/reset.sh ADDED
@@ -0,0 +1,42 @@
1
+ #!/bin/bash
2
+
3
+ function gem_installer()
4
+ {
5
+ gem_name=$1
6
+ gem_info=`gem list | grep $gem_name`
7
+ if [ "$gem_info" = "" ]; then
8
+ echo "gem install ruby library $gem_name..."
9
+ gem install $gem_name
10
+ echo "gem install ruby library $gem_name done."
11
+ else
12
+ echo "gem already installed ruby library $gem_name."
13
+ fi
14
+
15
+ }
16
+
17
+ function brew_installer()
18
+ {
19
+ module_name=$1
20
+ module_info=`brew list $module_name 2>&1`
21
+ if [[ "$module_info" =~ "Error: No such keg: /usr/local/Cellar/$module_name" ]]; then
22
+ echo "install depends $module_name..."
23
+ brew update >/dev/null 2>&1
24
+ wait
25
+ brew install $module_name
26
+ wait
27
+ echo "install depends $module_name done."
28
+ else
29
+ echo "$module_name already install."
30
+ echo "upgrade $module_name..."
31
+ brew upgrade $module_name >/dev/null 2>&1
32
+ echo "upgrade $module_name done."
33
+ fi
34
+ }
35
+
36
+ # install ruby library via gem
37
+ gem_installer erubis
38
+
39
+ # install 3rd depends library via brew
40
+ brew_installer libimobiledevice
41
+ brew_installer imagemagick
42
+ brew_installer ideviceinstaller
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_monkey
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vigossjjj
@@ -117,8 +117,6 @@ extra_rdoc_files:
117
117
  - LICENSE.txt
118
118
  - README.md
119
119
  files:
120
- - ".rspec"
121
- - Gemfile
122
120
  - LICENSE.txt
123
121
  - README.md
124
122
  - Rakefile
@@ -136,6 +134,7 @@ files:
136
134
  - lib/ios_device_log/deviceconsole
137
135
  - lib/smart_monkey.rb
138
136
  - lib/smart_monkey/command_helper.rb
137
+ - lib/smart_monkey/monkey_doctor.rb
139
138
  - lib/smart_monkey/monkey_runner.rb
140
139
  - lib/smart_monkey/templates/automation_result.xsl
141
140
  - lib/smart_monkey/templates/index.html.erb
@@ -164,7 +163,7 @@ files:
164
163
  - lib/ui-auto-monkey/tuneup/tuneup.js
165
164
  - lib/ui-auto-monkey/tuneup/tuneup_js.podspec
166
165
  - lib/ui-auto-monkey/tuneup/uiautomation-ext.js
167
- - smart_monkey.gemspec
166
+ - reset.sh
168
167
  - spec/spec_helper.rb
169
168
  homepage: https://github.com/vigossjjj/CrashMonkey4IOS
170
169
  licenses:
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/Gemfile DELETED
@@ -1,17 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in smart_monkey.gemspec
4
- gem 'erubis', '>= 2.7.0'
5
- gem 'json', '>= 1.7.0'
6
-
7
- group :development do
8
- gem 'rspec', '~> 2.8.0'
9
- gem 'rdoc', '~> 3.12'
10
- gem 'bundler', '> 1.0.0'
11
- gem 'jeweler', '~> 1.8.4'
12
- if RUBY_VERSION > '1.9' then
13
- gem 'simplecov', '>= 0.8.2'
14
- else
15
- gem 'rcov', '>= 0'
16
- end
17
- end
data/smart_monkey.gemspec DELETED
@@ -1,113 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{smart_monkey}
8
- version_path = File.join(File.dirname(__FILE__), "VERSION")
9
- s.version = File.read(version_path)
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.authors = ["vigossjjj"]
13
- s.date = %q{2015-06-01}
14
- s.default_executable = %q{smart_monkey}
15
- s.description = %q{iOS Monkey test tool base on UIAutomation.}
16
- s.email = %q{jiangyunpeng@58.com}
17
- s.executables = ["smart_monkey"]
18
- s.extra_rdoc_files = [
19
- "LICENSE.txt",
20
- "README.md",
21
- ]
22
- s.files = [
23
- ".rspec",
24
- "Gemfile",
25
- "LICENSE.txt",
26
- "README.md",
27
- "Rakefile",
28
- "Troubleshooting.md",
29
- "VERSION",
30
- "bin/smart_monkey",
31
- "smart_monkey.gemspec",
32
- "lib/bootstrap/css/bootstrap-responsive.css",
33
- "lib/bootstrap/css/bootstrap-responsive.min.css",
34
- "lib/bootstrap/css/bootstrap.css",
35
- "lib/bootstrap/css/bootstrap.min.css",
36
- "lib/bootstrap/img/glyphicons-halflings-white.png",
37
- "lib/bootstrap/img/glyphicons-halflings.png",
38
- "lib/bootstrap/js/bootstrap.js",
39
- "lib/bootstrap/js/bootstrap.min.js",
40
- "lib/ios_device_log/deviceconsole",
41
- "lib/smart_monkey.rb",
42
- "lib/smart_monkey/command_helper.rb",
43
- "lib/smart_monkey/monkey_runner.rb",
44
- "lib/smart_monkey/templates/automation_result.xsl",
45
- "lib/smart_monkey/templates/index.html.erb",
46
- "lib/smart_monkey/templates/result.html.erb",
47
- "lib/smart_monkey/templates/result_view.coffee",
48
- "lib/smart_monkey/templates/result_view.js",
49
- "lib/smart_monkey/templates/jquery.min.js",
50
- "lib/ui-auto-monkey/custom.js",
51
- "lib/ui-auto-monkey/UIAutoMonkey.js",
52
- "lib/ui-auto-monkey/handler/buttonHandler.js",
53
- "lib/ui-auto-monkey/handler/wbScrollViewButtonHandler.js",
54
- "lib/ui-auto-monkey/tuneup/assertions.js",
55
- "lib/ui-auto-monkey/tuneup/image_asserter",
56
- "lib/ui-auto-monkey/tuneup/image_assertion.js",
57
- "lib/ui-auto-monkey/tuneup/image_assertion.rb",
58
- "lib/ui-auto-monkey/tuneup/lang-ext.js",
59
- "lib/ui-auto-monkey/tuneup/LICENSE",
60
- "lib/ui-auto-monkey/tuneup/screen.js",
61
- "lib/ui-auto-monkey/tuneup/test.js",
62
- "lib/ui-auto-monkey/tuneup/tuneup_js.podspec",
63
- "lib/ui-auto-monkey/tuneup/tuneup.js",
64
- "lib/ui-auto-monkey/tuneup/uiautomation-ext.js",
65
- "lib/ui-auto-monkey/tuneup/test_runner/abbreviated_console_output.rb",
66
- "lib/ui-auto-monkey/tuneup/test_runner/colored_console_output.rb",
67
- "lib/ui-auto-monkey/tuneup/test_runner/console_output.rb",
68
- "lib/ui-auto-monkey/tuneup/test_runner/preprocessor.rb",
69
- "lib/ui-auto-monkey/tuneup/test_runner/run",
70
- "lib/ui-auto-monkey/tuneup/test_runner/xunit_output.rb",
71
- "spec/spec_helper.rb"
72
- ]
73
- s.homepage = %q{https://github.com/vigossjjj/CrashMonkey4IOS}
74
- s.licenses = ["MIT"]
75
- s.require_paths = ["lib"]
76
- s.rubygems_version = %q{1.6.2}
77
- s.summary = %q{Monkey Test For iOS Application}
78
-
79
- if s.respond_to? :specification_version then
80
- s.specification_version = 3
81
-
82
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
83
- s.add_runtime_dependency(%q<erubis>, [">= 2.7.0"])
84
- s.add_runtime_dependency(%q<json>, [">= 1.7.0"])
85
- s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
86
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
87
- s.add_development_dependency(%q<bundler>, ["> 1.0.0"])
88
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
89
- s.add_development_dependency(%q<rcov>, [">= 0"])
90
- else
91
- s.add_dependency(%q<erubis>, [">= 2.7.0"])
92
- s.add_dependency(%q<json>, [">= 1.7.0"])
93
- s.add_dependency(%q<rspec>, ["~> 2.8.0"])
94
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
95
- s.add_dependency(%q<bundler>, ["> 1.0.0"])
96
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
97
- if RUBY_VERSION > '1.9' then
98
- s.add_dependency(%q<simplecov>, [">= 0"])
99
- else
100
- s.add_dependency(%q<rcov>, [">= 0"])
101
- end
102
- end
103
- else
104
- s.add_dependency(%q<erubis>, [">= 2.7.0"])
105
- s.add_dependency(%q<json>, [">= 1.7.0"])
106
- s.add_dependency(%q<rspec>, ["~> 2.8.0"])
107
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
108
- s.add_dependency(%q<bundler>, ["> 1.0.0"])
109
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
110
- s.add_dependency(%q<rcov>, [">= 0"])
111
- end
112
- end
113
-