capy 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/lib/capy.rb +19 -1
- data/lib/capy/version.rb +1 -1
- metadata +62 -97
data/README.md
CHANGED
data/lib/capy.rb
CHANGED
@@ -103,7 +103,7 @@ module Capy
|
|
103
103
|
begin
|
104
104
|
result = evaluater.eval_script(buf, mode)
|
105
105
|
puts "=> #{result.inspect}".cyan
|
106
|
-
rescue => e
|
106
|
+
rescue Exception => e
|
107
107
|
error e
|
108
108
|
end
|
109
109
|
end
|
@@ -150,6 +150,24 @@ module Capy
|
|
150
150
|
instance_eval script
|
151
151
|
end
|
152
152
|
|
153
|
+
def iframe(id)
|
154
|
+
raise 'no block given' unless block_given?
|
155
|
+
browser.switch_to.frame(id)
|
156
|
+
begin
|
157
|
+
yield
|
158
|
+
ensure
|
159
|
+
browser.switch_to.default_content
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
def driver
|
164
|
+
page.driver
|
165
|
+
end
|
166
|
+
|
167
|
+
def browser
|
168
|
+
driver.browser
|
169
|
+
end
|
170
|
+
|
153
171
|
def host(app_host)
|
154
172
|
Capybara.app_host = app_host
|
155
173
|
end
|
data/lib/capy/version.rb
CHANGED
metadata
CHANGED
@@ -1,104 +1,79 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: capy
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 4
|
9
|
-
- 0
|
10
|
-
version: 1.4.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.4.1
|
5
|
+
prerelease:
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- jugyo
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-04-25 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: slop
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70334156038120 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
18
|
+
requirements:
|
27
19
|
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 3
|
32
|
-
- 1
|
33
|
-
version: "3.1"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.1'
|
34
22
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: capybara
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: *70334156038120
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: capybara
|
27
|
+
requirement: &70334156037580 !ruby/object:Gem::Requirement
|
40
28
|
none: false
|
41
|
-
requirements:
|
42
|
-
- -
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
|
45
|
-
segments:
|
46
|
-
- 0
|
47
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
48
33
|
type: :runtime
|
49
|
-
version_requirements: *id002
|
50
|
-
- !ruby/object:Gem::Dependency
|
51
|
-
name: colored
|
52
34
|
prerelease: false
|
53
|
-
|
35
|
+
version_requirements: *70334156037580
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: colored
|
38
|
+
requirement: &70334156036960 !ruby/object:Gem::Requirement
|
54
39
|
none: false
|
55
|
-
requirements:
|
56
|
-
- -
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
segments:
|
60
|
-
- 0
|
61
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
62
44
|
type: :runtime
|
63
|
-
version_requirements: *id003
|
64
|
-
- !ruby/object:Gem::Dependency
|
65
|
-
name: rspec
|
66
45
|
prerelease: false
|
67
|
-
|
46
|
+
version_requirements: *70334156036960
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: &70334156036200 !ruby/object:Gem::Requirement
|
68
50
|
none: false
|
69
|
-
requirements:
|
70
|
-
- -
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
|
73
|
-
segments:
|
74
|
-
- 0
|
75
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
76
55
|
type: :development
|
77
|
-
version_requirements: *id004
|
78
|
-
- !ruby/object:Gem::Dependency
|
79
|
-
name: rr
|
80
56
|
prerelease: false
|
81
|
-
|
57
|
+
version_requirements: *70334156036200
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rr
|
60
|
+
requirement: &70334156035780 !ruby/object:Gem::Requirement
|
82
61
|
none: false
|
83
|
-
requirements:
|
84
|
-
- -
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
|
87
|
-
segments:
|
88
|
-
- 0
|
89
|
-
version: "0"
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
90
66
|
type: :development
|
91
|
-
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70334156035780
|
92
69
|
description: Capybara Script Runner
|
93
|
-
email:
|
70
|
+
email:
|
94
71
|
- jugyo.org@gmail.com
|
95
|
-
executables:
|
72
|
+
executables:
|
96
73
|
- capy
|
97
74
|
extensions: []
|
98
|
-
|
99
75
|
extra_rdoc_files: []
|
100
|
-
|
101
|
-
files:
|
76
|
+
files:
|
102
77
|
- .gitignore
|
103
78
|
- Gemfile
|
104
79
|
- LICENSE
|
@@ -115,41 +90,31 @@ files:
|
|
115
90
|
- spec/fixtures/foo.capy
|
116
91
|
- spec/fixtures/foo.js
|
117
92
|
- spec/spec_helper.rb
|
118
|
-
has_rdoc: true
|
119
93
|
homepage: https://github.com/jugyo
|
120
94
|
licenses: []
|
121
|
-
|
122
95
|
post_install_message:
|
123
96
|
rdoc_options: []
|
124
|
-
|
125
|
-
require_paths:
|
97
|
+
require_paths:
|
126
98
|
- lib
|
127
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
100
|
none: false
|
129
|
-
requirements:
|
130
|
-
- -
|
131
|
-
- !ruby/object:Gem::Version
|
132
|
-
|
133
|
-
|
134
|
-
- 0
|
135
|
-
version: "0"
|
136
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
106
|
none: false
|
138
|
-
requirements:
|
139
|
-
- -
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
142
|
-
segments:
|
143
|
-
- 0
|
144
|
-
version: "0"
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
145
111
|
requirements: []
|
146
|
-
|
147
112
|
rubyforge_project:
|
148
|
-
rubygems_version: 1.
|
113
|
+
rubygems_version: 1.8.10
|
149
114
|
signing_key:
|
150
115
|
specification_version: 3
|
151
116
|
summary: The capy command to run the script written in Capybara DSL.
|
152
|
-
test_files:
|
117
|
+
test_files:
|
153
118
|
- spec/capy_spec.rb
|
154
119
|
- spec/fixtures/foo.capy
|
155
120
|
- spec/fixtures/foo.js
|