cuke4php 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -6,3 +6,4 @@ group :development do
6
6
  end
7
7
 
8
8
  gem 'cucumber'
9
+ # TODO: once the patch for erb templating in the .wire files is released, we should set a minimum version for it
data/HISTORY ADDED
@@ -0,0 +1,5 @@
1
+ 2011-01-27 -- 0.9.0
2
+ * first gem release
3
+
4
+ 2011-01-27 -- 0.9.1
5
+ * allow cuke4php to accept a feature filename instead of a path name so users can run just one feature file at a time
data/README.md CHANGED
@@ -10,17 +10,21 @@ Install
10
10
  -------
11
11
  To install Cuke4Php, follow these steps:
12
12
 
13
- * clone
14
- * install dependencies with bundler
15
- * run rake build
16
- * install gem under pkg/ folder
13
+ [sudo] gem install cuke4php
14
+
15
+ Note: I realize the irony inherent in a gem being used to distribute PHP code.
17
16
 
18
17
  Usage
19
18
  -----
20
19
  * run 'cuke4php path/to/features' from the command line
21
- * make sure your cucumber features has a 'Cuke4Php.wire' file containing the appropriate information (copy the one in cuke4php/features/step_definitions)
20
+ * all parameters get passed to cucumber when it starts, but the last parameter on the command line should be the path to your features directory
21
+ * make sure your cucumber features has a 'Cuke4Php.wire' file in step_definitions containing something like:
22
+
23
+ host: localhost
24
+ port: 16816
25
+
22
26
  * you can write both Ruby and PHP steps
23
- * you should load phpunit from a file in step_definitions/support/
27
+ * you __must__ require the PHPUnit library from a file in your features/support/ directory (e.g., features/support/Env.php) for cuke4php to work
24
28
 
25
29
  Roadmap
26
30
  -------
@@ -30,13 +34,14 @@ Roadmap
30
34
  * support an option like 'cuke4php --init' which will generate the directory structure and support files necessary to use cuke4php with a php project.
31
35
  * autodetect an available port and then use it to run the cuke4php server pass this on to cucumber by setting an environment variable (requires a modification to cucumber)
32
36
 
33
- ### Rakefile
37
+ ### Gemfile
34
38
 
35
- * once the patch for erb templating in .wire files is released, we should set a minimum version for it
39
+ * once the patch for erb templating in .wire files in cucumber is released, we should set a minimum version for it
36
40
 
37
41
  Dependencies
38
42
  ------------
39
43
  * PHPUnit >= 3.0 (see http://www.phpunit.de/)
44
+ * PHP 5.2.x
40
45
 
41
46
  Goals
42
47
  -----
@@ -46,9 +51,9 @@ This project was developed against the 5.2.x versions of PHP, to ensure compatib
46
51
 
47
52
  Support
48
53
  -------
49
- Support for this project was provided by iContact, inc. (http://www.icontact.com)
54
+ Support for this project was provided by iContact, inc. (http://www.icontact.com)
50
55
 
51
56
  Contributors
52
57
  ------------
53
- Kevin Olbrich, Ph.D. (kevin.olbrich+cuke4php@gmail.com)
54
- Alessandro Dal Grande (aledelgrande@gmail.com)
58
+ * Kevin Olbrich, Ph.D. (kevin.olbrich+cuke4php@gmail.com)
59
+ * Alessandro Dal Grande (aledelgrande@gmail.com)
data/Rakefile CHANGED
@@ -11,10 +11,6 @@ begin
11
11
  gem.email = ["kevin.olbrich+cuke4php@gmail.com", "aledalgrande@gmail.com"]
12
12
  gem.homepage = "http://github.com/olbrich/cuke4php"
13
13
  gem.executables = 'cuke4php'
14
- gem.add_dependency('cucumber')
15
- # TODO: once the patch for erb templating in the .wire files is released, we should set a minimum version for it
16
- gem.add_development_dependency('bundler')
17
- gem.add_development_dependency('jeweler')
18
14
  gem.files.exclude 'phpdoc'
19
15
  gem.has_rdoc = false
20
16
  gem.requirements << "PHP 5.2+"
@@ -41,7 +37,6 @@ rescue LoadError
41
37
  end
42
38
 
43
39
  require 'cucumber/rake/task'
44
- #Cucumber::Rake::Task.new(:features)
45
40
 
46
41
  task :default => [:features, :phpunit]
47
42
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.1
data/bin/cuke4php CHANGED
@@ -12,10 +12,9 @@ CUKE4PHP_PORT=ENV['CUKE4PHP_PORT'] || 16816
12
12
  server = fork do
13
13
  exec "#{File.dirname(__FILE__)}/../php_bin/cuke4php_server -p #{CUKE4PHP_PORT} #{ARGV.last ? ARGV.last : 'features'}"
14
14
  end
15
- #Process.detach(pid)
16
15
  sleep 1
17
16
  cucumber = fork do
18
- exec "CUKE4PHP_PORT=#{CUKE4PHP_PORT} && cucumber #{ARGV.join(' ')}" #"; echo 'quit' | nc localhost #{CUKE4PHP_PORT}"
17
+ exec "CUKE4PHP_PORT=#{CUKE4PHP_PORT} && cucumber #{ARGV.join(' ')}"
19
18
  end
20
19
  pid, status = Process.wait2(cucumber,0)
21
20
  Process.kill("TERM",server)
data/cuke4php.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cuke4php}
8
- s.version = "0.9.0"
8
+ s.version = "0.9.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kevin Olbrich", "Alessandro Dal Grande"]
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.files = [
22
22
  ".document",
23
23
  "Gemfile",
24
+ "HISTORY",
24
25
  "LICENSE",
25
26
  "README.md",
26
27
  "Rakefile",
@@ -41,6 +42,7 @@ Gem::Specification.new do |s|
41
42
  "tests/lib/CucumberScenarioTest.php",
42
43
  "tests/lib/Cuke4PhpTest.php"
43
44
  ]
45
+ s.has_rdoc = false
44
46
  s.homepage = %q{http://github.com/olbrich/cuke4php}
45
47
  s.post_install_message = %q{********************************************************************************
46
48
 
@@ -69,24 +71,15 @@ Gem::Specification.new do |s|
69
71
  s.add_runtime_dependency(%q<cucumber>, [">= 0"])
70
72
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
71
73
  s.add_development_dependency(%q<jeweler>, [">= 0"])
72
- s.add_runtime_dependency(%q<cucumber>, [">= 0"])
73
- s.add_development_dependency(%q<bundler>, [">= 0"])
74
- s.add_development_dependency(%q<jeweler>, [">= 0"])
75
74
  else
76
75
  s.add_dependency(%q<cucumber>, [">= 0"])
77
76
  s.add_dependency(%q<bundler>, ["~> 1.0"])
78
77
  s.add_dependency(%q<jeweler>, [">= 0"])
79
- s.add_dependency(%q<cucumber>, [">= 0"])
80
- s.add_dependency(%q<bundler>, [">= 0"])
81
- s.add_dependency(%q<jeweler>, [">= 0"])
82
78
  end
83
79
  else
84
80
  s.add_dependency(%q<cucumber>, [">= 0"])
85
81
  s.add_dependency(%q<bundler>, ["~> 1.0"])
86
82
  s.add_dependency(%q<jeweler>, [">= 0"])
87
- s.add_dependency(%q<cucumber>, [">= 0"])
88
- s.add_dependency(%q<bundler>, [">= 0"])
89
- s.add_dependency(%q<jeweler>, [">= 0"])
90
83
  end
91
84
  end
92
85
 
data/lib/Cuke4Php.php CHANGED
@@ -25,6 +25,8 @@ class Cuke4Php {
25
25
  );
26
26
 
27
27
  function __construct($_sFeaturePath, $_iPort = 16816) {
28
+ $_sFeaturePath = dirname($_sFeaturePath);
29
+
28
30
  if ($_iPort > 0) {
29
31
  $this->iPort = $_iPort;
30
32
  } else {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cuke4php
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 0
10
- version: 0.9.0
9
+ - 1
10
+ version: 0.9.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin Olbrich
@@ -20,10 +20,7 @@ date: 2011-01-27 00:00:00 -05:00
20
20
  default_executable: cuke4php
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
- type: :runtime
24
- prerelease: false
25
- name: cucumber
26
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
27
24
  none: false
28
25
  requirements:
29
26
  - - ">="
@@ -32,12 +29,12 @@ dependencies:
32
29
  segments:
33
30
  - 0
34
31
  version: "0"
35
- requirement: *id001
36
- - !ruby/object:Gem::Dependency
37
- type: :development
32
+ type: :runtime
33
+ name: cucumber
38
34
  prerelease: false
39
- name: bundler
40
- version_requirements: &id002 !ruby/object:Gem::Requirement
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ requirement: &id002 !ruby/object:Gem::Requirement
41
38
  none: false
42
39
  requirements:
43
40
  - - ~>
@@ -47,26 +44,12 @@ dependencies:
47
44
  - 1
48
45
  - 0
49
46
  version: "1.0"
50
- requirement: *id002
51
- - !ruby/object:Gem::Dependency
52
47
  type: :development
48
+ name: bundler
53
49
  prerelease: false
54
- name: jeweler
55
- version_requirements: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 3
61
- segments:
62
- - 0
63
- version: "0"
64
- requirement: *id003
50
+ version_requirements: *id002
65
51
  - !ruby/object:Gem::Dependency
66
- type: :runtime
67
- prerelease: false
68
- name: cucumber
69
- version_requirements: &id004 !ruby/object:Gem::Requirement
52
+ requirement: &id003 !ruby/object:Gem::Requirement
70
53
  none: false
71
54
  requirements:
72
55
  - - ">="
@@ -75,35 +58,10 @@ dependencies:
75
58
  segments:
76
59
  - 0
77
60
  version: "0"
78
- requirement: *id004
79
- - !ruby/object:Gem::Dependency
80
61
  type: :development
81
- prerelease: false
82
- name: bundler
83
- version_requirements: &id005 !ruby/object:Gem::Requirement
84
- none: false
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- hash: 3
89
- segments:
90
- - 0
91
- version: "0"
92
- requirement: *id005
93
- - !ruby/object:Gem::Dependency
94
- type: :development
95
- prerelease: false
96
62
  name: jeweler
97
- version_requirements: &id006 !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- hash: 3
103
- segments:
104
- - 0
105
- version: "0"
106
- requirement: *id006
63
+ prerelease: false
64
+ version_requirements: *id003
107
65
  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.
108
66
  email:
109
67
  - kevin.olbrich+cuke4php@gmail.com
@@ -118,6 +76,7 @@ extra_rdoc_files:
118
76
  files:
119
77
  - .document
120
78
  - Gemfile
79
+ - HISTORY
121
80
  - LICENSE
122
81
  - README.md
123
82
  - Rakefile
@@ -137,7 +96,7 @@ files:
137
96
  - php_bin/cuke4php_server
138
97
  - tests/lib/CucumberScenarioTest.php
139
98
  - tests/lib/Cuke4PhpTest.php
140
- has_rdoc: true
99
+ has_rdoc: false
141
100
  homepage: http://github.com/olbrich/cuke4php
142
101
  licenses: []
143
102