crash_monkey 0.2.3 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e14de4958e93963d8dd683171c772f110fb4d46f
4
- data.tar.gz: 9817a004713bf1be90ca69a487a4e7d910a675b5
3
+ metadata.gz: c7d00bb3a12cb580d83c2657be12edc02cb36951
4
+ data.tar.gz: 87323a915276bb35fb28ea14360b234daf9f3168
5
5
  SHA512:
6
- metadata.gz: 61ee3ad3401b128f58cd2a2d813291a1fed19f0b9083cd9aed80fdc053f75c66cf924f9b67913af2017e5d542ad367ab070d283b3cb6db14e9b4c5cd9e789b9d
7
- data.tar.gz: 004365bf7bcdd1ffdf42cea3c93f910d03c549778fd2815dc287fccd238752fae8cdfe319f2e0a8b9632c56213ecb15b0ad67612fe779b10c759df01951d0c6e
6
+ metadata.gz: 550b847885f517508a8e334b2930e43c3f56b96f1d80899addad76852eae07da945d2d165d9916964adacdaf9181cb812abf13f3c871c8112245484322ca60b5
7
+ data.tar.gz: d127e2e77cd5585751ba030f04242bebba1516cc6c717f21ef50bd7ba5191ac688a86bb8a4791bc8d55a6982531f153834950f61d0f565f62392c17d9c5a0ed3
data/README.md CHANGED
@@ -83,9 +83,9 @@ Usage: crash_monkey [options]
83
83
  -t time_limit_sec Time limit of running(default: 100 sec)
84
84
  -c config_path Configuration JSON Path
85
85
  -e extend_javascript_path Extend Uiautomation Javascript for such Login scripts
86
- --show-config Show Current Configuration JSON
87
- --list-app Show List of Installed Apps in iOS Simulator
88
- --reset-iPhone-Simulator Reset iPhone Simulator
86
+ --show-config Show Current Configuration JSON
87
+ --list-app Show List of Installed Apps in iOS Simulator
88
+ --reset-iPhone-Simulator Reset iPhone Simulator
89
89
  ```
90
90
 
91
91
 
@@ -100,14 +100,14 @@ Timeout seconds for one monkey test.
100
100
 
101
101
  #### -c
102
102
  Specify configuration file(JSON format) for UIAutomation library.
103
- The template is shown by `--show-config` option.
103
+ The template is shown by `--show-config` option.([example](https://github.com/mokemokechicken/CrashMonkey/blob/master/example_config.js))
104
104
 
105
105
  #### -e
106
106
  Specify extend Javascript file for UIAutomation library.
107
107
  It could be used for login.([example](https://gist.github.com/jollychang/8972186))
108
108
 
109
109
  #### --show-config
110
- Output configuration for UIAutomation library by JSON format.
110
+ Output configuration for UIAutomation library by JSON format.([example](https://github.com/mokemokechicken/CrashMonkey/blob/master/example_config.js))
111
111
 
112
112
  #### --list-app
113
113
  List apps for iPhone Simulator.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.5
@@ -137,7 +137,7 @@ module UIAutoMonkey
137
137
  end
138
138
 
139
139
  def reset_iphone_simulator
140
- `rm -rf ~/Library/Application\ Support/iPhone\ Simulator/`
140
+ FileUtils.rm_rf("#{Dir.home}/Library/Application\ Support/iPhone\ Simulator/")
141
141
  puts 'reset iPhone Simulator successful'
142
142
  end
143
143
 
@@ -224,7 +224,7 @@ module UIAutoMonkey
224
224
  extend_javascript_flag, extend_javascript_path = show_extend_javascript
225
225
  orig = File.read(ui_auto_monkey_original_path)
226
226
  config = JSON.parse(File.read(config_json_path))
227
- replace_str = " config: #{JSON.pretty_generate(config, :indent => ' '*6)}, \n"
227
+ replace_str = " this.config = #{JSON.pretty_generate(config, :indent => ' '*6)}; \n"
228
228
  js = replace_text(orig, replace_str, '__UIAutoMonkey Configuration Begin__', '__UIAutoMonkey Configuration End__')
229
229
  if extend_javascript_flag
230
230
  js = File.read(extend_javascript_path) + "\n" + js
@@ -327,7 +327,7 @@ module UIAutoMonkey
327
327
  if log[LOG_TYPE] == 'Screenshot'
328
328
  if log[MESSAGE] =~ /^action/
329
329
  hash[:action_image] = log[MESSAGE]
330
- elsif log[MESSAGE] =~ /^screen/
330
+ elsif log[MESSAGE] =~ /^monkey/
331
331
  hash[:screen_image] = log[MESSAGE]
332
332
  hash[:timestamp] = log[TIMESTAMP]
333
333
  # emit and init
@@ -19,8 +19,8 @@
19
19
  // THE SOFTWARE.
20
20
 
21
21
  "use strict";
22
-
23
22
  function UIAutoMonkey() {
23
+ ///////////////////////// __UIAutoMonkey Configuration Begin__ ///////////////////////////////
24
24
 
25
25
  this.config = {
26
26
  numberOfEvents: 1000,
@@ -42,7 +42,7 @@ function UIAutoMonkey() {
42
42
  orientation: 1,
43
43
  clickVolumeUp: 1,
44
44
  clickVolumeDown: 1,
45
- lock: 1,
45
+ lock: 0,
46
46
  pinchClose: 10,
47
47
  pinchOpen: 10,
48
48
  shake: 1
@@ -65,6 +65,7 @@ function UIAutoMonkey() {
65
65
  */
66
66
 
67
67
  };
68
+ ///////////////////////// __UIAutoMonkey Configuration End__ ///////////////////////////////
68
69
 
69
70
  }
70
71
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crash_monkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Morishita