cuke4php 0.9.6.b → 0.9.6.c
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/cucumber.yml +1 -1
- data/cuke4php.gemspec +3 -2
- data/features/step_definitions/WireSteps.php +8 -1
- data/features/transform.feature +12 -0
- data/lib/CucumberScenario.php +2 -2
- metadata +19 -19
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.6.
|
1
|
+
0.9.6.c
|
data/cucumber.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
default: --format pretty
|
1
|
+
default: --format pretty --color --no-source
|
data/cuke4php.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{cuke4php}
|
8
|
-
s.version = "0.9.6.
|
8
|
+
s.version = "0.9.6.c"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kevin Olbrich", "Alessandro Dal Grande"]
|
12
|
-
s.date = %q{2011-05-
|
12
|
+
s.date = %q{2011-05-07}
|
13
13
|
s.description = %q{Using this protocol it is possible to directly interact with PHP code at any level without the need for a web server. To accomplish this, when cucumber is running against a directory containing feature files and it cannot resolve a particular step definition, it will ask a known wire server (as defined in a .wire file) to interpret and run those steps.}
|
14
14
|
s.email = ["kevin.olbrich+cuke4php@gmail.com", "aledalgrande@gmail.com"]
|
15
15
|
s.executables = ["cuke4php_server", "cuke4php"]
|
@@ -44,6 +44,7 @@ Gem::Specification.new do |s|
|
|
44
44
|
"tests/lib/CucumberScenarioTest.php",
|
45
45
|
"tests/lib/Cuke4PhpTest.php"
|
46
46
|
]
|
47
|
+
s.has_rdoc = false
|
47
48
|
s.homepage = %q{http://github.com/olbrich/cuke4php}
|
48
49
|
s.post_install_message = %q{********************************************************************************
|
49
50
|
|
@@ -213,7 +213,14 @@ class WireSteps extends CucumberSteps {
|
|
213
213
|
* Transform /^table:reverse$/
|
214
214
|
**/
|
215
215
|
public function transformReverseTable($aTable) {
|
216
|
-
return array_reverse($aTable);
|
216
|
+
return array_reverse($aTable[0]);
|
217
|
+
}
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Transform /^table:KEY,VALUE$/
|
221
|
+
**/
|
222
|
+
public function transformKeyValueTable($aTable) {
|
223
|
+
return array_map("strtoupper",$aTable[0]);
|
217
224
|
}
|
218
225
|
|
219
226
|
|
data/features/transform.feature
CHANGED
@@ -28,3 +28,15 @@ Scenario: transform a table
|
|
28
28
|
| three |
|
29
29
|
| two |
|
30
30
|
| one |
|
31
|
+
|
32
|
+
Scenario: transform a table with two columns
|
33
|
+
Given "table" is:
|
34
|
+
| KEY | VALUE |
|
35
|
+
| one | a |
|
36
|
+
| two | b |
|
37
|
+
| three | c |
|
38
|
+
Then "table" should equal:
|
39
|
+
| KEY | VALUE |
|
40
|
+
| ONE | A |
|
41
|
+
| TWO | B |
|
42
|
+
| THREE | C |
|
data/lib/CucumberScenario.php
CHANGED
@@ -114,7 +114,7 @@ class CucumberScenario {
|
|
114
114
|
$oStep = new $aStep['class']($this->aGlobals);
|
115
115
|
foreach ($aArgs as &$sArg) {
|
116
116
|
$sArgTest = $sArg;
|
117
|
-
if (is_array($
|
117
|
+
if (is_array($sArg)) {
|
118
118
|
$sArgTest = "table:" . implode(",",$sArgTest[0]);
|
119
119
|
}
|
120
120
|
foreach (array_reverse($this->aWorld['transform'],true) as $aTransform) {
|
@@ -122,7 +122,7 @@ class CucumberScenario {
|
|
122
122
|
if (preg_match_all($aTransform['regexp'], $sArgTest, $aMatches, PREG_OFFSET_CAPTURE)) {
|
123
123
|
$oTransform = new $aTransform['class']($this->aGlobals);
|
124
124
|
if (is_array($sArg)) {
|
125
|
-
$sArg = call_user_func_array(array($oTransform, $aTransform['method'])
|
125
|
+
$sArg = call_user_func_array(array($oTransform, $aTransform['method']),array($sArg));
|
126
126
|
} else {
|
127
127
|
$sArg = call_user_func_array(array($oTransform, $aTransform['method']),$aMatches[1][0]);
|
128
128
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuke4php
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 120
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 6
|
10
|
-
-
|
11
|
-
version: 0.9.6.
|
10
|
+
- c
|
11
|
+
version: 0.9.6.c
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Kevin Olbrich
|
@@ -17,14 +17,11 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-05-
|
20
|
+
date: 2011-05-07 00:00:00 -04:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
|
-
|
25
|
-
prerelease: false
|
26
|
-
name: cucumber
|
27
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
28
25
|
none: false
|
29
26
|
requirements:
|
30
27
|
- - ">="
|
@@ -35,12 +32,12 @@ dependencies:
|
|
35
32
|
- 10
|
36
33
|
- 2
|
37
34
|
version: 0.10.2
|
38
|
-
|
39
|
-
|
40
|
-
type: :development
|
35
|
+
type: :runtime
|
36
|
+
name: cucumber
|
41
37
|
prerelease: false
|
42
|
-
|
43
|
-
|
38
|
+
version_requirements: *id001
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
44
41
|
none: false
|
45
42
|
requirements:
|
46
43
|
- - ~>
|
@@ -50,12 +47,12 @@ dependencies:
|
|
50
47
|
- 1
|
51
48
|
- 0
|
52
49
|
version: "1.0"
|
53
|
-
requirement: *id002
|
54
|
-
- !ruby/object:Gem::Dependency
|
55
50
|
type: :development
|
51
|
+
name: bundler
|
56
52
|
prerelease: false
|
57
|
-
|
58
|
-
|
53
|
+
version_requirements: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
59
56
|
none: false
|
60
57
|
requirements:
|
61
58
|
- - ">="
|
@@ -64,7 +61,10 @@ dependencies:
|
|
64
61
|
segments:
|
65
62
|
- 0
|
66
63
|
version: "0"
|
67
|
-
|
64
|
+
type: :development
|
65
|
+
name: jeweler
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: *id003
|
68
68
|
description: Using this protocol it is possible to directly interact with PHP code at any level without the need for a web server. To accomplish this, when cucumber is running against a directory containing feature files and it cannot resolve a particular step definition, it will ask a known wire server (as defined in a .wire file) to interpret and run those steps.
|
69
69
|
email:
|
70
70
|
- kevin.olbrich+cuke4php@gmail.com
|
@@ -103,7 +103,7 @@ files:
|
|
103
103
|
- php_bin/cuke4php_server.php
|
104
104
|
- tests/lib/CucumberScenarioTest.php
|
105
105
|
- tests/lib/Cuke4PhpTest.php
|
106
|
-
has_rdoc:
|
106
|
+
has_rdoc: false
|
107
107
|
homepage: http://github.com/olbrich/cuke4php
|
108
108
|
licenses: []
|
109
109
|
|