actir 1.0.5 → 1.1.0

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: 55d2de0515f074ce1f2c19a08d1a78cc75bdc50e
4
- data.tar.gz: dab76e4796b89fdacda52fb26c3a631acf86ace2
3
+ metadata.gz: 00404d5aea9546ffd7abdf543d300e2910547ac6
4
+ data.tar.gz: 829dba036ed2e748e49d7a44dba1dfd1b56141b7
5
5
  SHA512:
6
- metadata.gz: 831d2d11bae36eaeca6381ca6360fd6134074f8feada932a9f806404d7324eb6b0749e21510e91590dee7fdcef37995ad8147e35e3e5ee5f957f1dc7787f56c9
7
- data.tar.gz: 9b462c84fe3741415b26251304b82a9098ceb56830ef75e5de358351b0cb27f98a5be8315ffe1f497fa3994b7c18ae746dc8959a334814fccaf1e67e68d69c3c
6
+ metadata.gz: 60309c7aa5e470d61aa7e3a61165a9ced30cd76a837331d8bada82bf933b94a15c94d99176b71a19b3c5ca43aef241b4e274aa8ede322640be1692187db2d8af
7
+ data.tar.gz: 77219578816c605892b2b10b48f6a434368b8b20c4c1588a77d5889b7e9b8ec942c041975b05fb7ef82f3217355c0ebcc1b8a6ab6565e2e52d1794a8acd5dc02
@@ -4,6 +4,7 @@ require 'selenium-webdriver'
4
4
  lib = File.dirname(__FILE__)
5
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
6
  require 'actir/config'
7
+ require 'actir/data'
7
8
  require 'actir/initializer'
8
9
  require 'actir/remote'
9
10
  require 'actir/basic_page'
@@ -0,0 +1,43 @@
1
+ module Actir
2
+
3
+ module Data
4
+
5
+ class << self
6
+
7
+ def get(key)
8
+ #按照点分割字符串
9
+ key_array = key.split(".")
10
+ #先取出数组中的第一个元素当做配置文件名称,并从数组中移除此元素
11
+ file_name = key_array.shift
12
+ #再取出第二个元素,指定配置项,并移除
13
+ cfg_name = key_array.shift
14
+ hash = cfg_name ? load_file(file(file_name))[cfg_name] : load_file(file(file_name))
15
+ #遍历key数组
16
+ until key_array.empty? do
17
+ key = key_array.shift
18
+ hash = hash[key]
19
+ end
20
+ hash
21
+ end
22
+
23
+ private
24
+
25
+ def file(file_name)
26
+ File.expand_path(File.join(data_dir, "/#{file_name}.yaml"), __FILE__)
27
+ end
28
+
29
+ #默认配置文件夹路径
30
+ def data_dir
31
+ @data_dir ||= File.join($project_path, "data")
32
+ end
33
+
34
+ #读取yaml配置文件
35
+ def load_file(file)
36
+ YAML.load_file file
37
+ end
38
+
39
+ end
40
+
41
+ end
42
+
43
+ end
@@ -1,3 +1,3 @@
1
1
  module Actir
2
- VERSION = "1.0.5"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -58,11 +58,11 @@ class Browser
58
58
  for i in 1..3
59
59
  begin
60
60
  Timeout::timeout(10) do
61
- puts "Time #{i}"
61
+ # puts "Time #{i}"
62
62
  super(uri)
63
63
 
64
64
  if self.execute_script("return document.readyState;") == "complete"
65
- puts "has completed"
65
+ # puts "has completed"
66
66
  hasLoaded = 1
67
67
  break
68
68
  end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actir
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - hub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-29 00:00:00.000000000 Z
11
+ date: 2015-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: watir-webdriver
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.6.11
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.6.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: selenium-webdriver
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.45'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.45'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: parallel
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.4'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.4'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: facets
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2.9'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.9'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.7'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.7'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '10.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '10.0'
111
111
  description: Distribut automated testing framework for Web or App.
@@ -117,8 +117,8 @@ executables:
117
117
  extensions: []
118
118
  extra_rdoc_files: []
119
119
  files:
120
- - .gitignore
121
- - .travis.yml
120
+ - ".gitignore"
121
+ - ".travis.yml"
122
122
  - CODE_OF_CONDUCT.md
123
123
  - Gemfile
124
124
  - README.md
@@ -131,6 +131,7 @@ files:
131
131
  - lib/actir.rb
132
132
  - lib/actir/basic_page.rb
133
133
  - lib/actir/config.rb
134
+ - lib/actir/data.rb
134
135
  - lib/actir/initializer.rb
135
136
  - lib/actir/parallel_tests/cli.rb
136
137
  - lib/actir/parallel_tests/grouper.rb
@@ -158,17 +159,17 @@ require_paths:
158
159
  - lib
159
160
  required_ruby_version: !ruby/object:Gem::Requirement
160
161
  requirements:
161
- - - '>='
162
+ - - ">="
162
163
  - !ruby/object:Gem::Version
163
164
  version: '0'
164
165
  required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  requirements:
166
- - - '>='
167
+ - - ">="
167
168
  - !ruby/object:Gem::Version
168
169
  version: '0'
169
170
  requirements: []
170
171
  rubyforge_project:
171
- rubygems_version: 2.4.7
172
+ rubygems_version: 2.4.3
172
173
  signing_key:
173
174
  specification_version: 4
174
175
  summary: Application Concurrence Test in Ruby.