features 0.1.4 → 0.2.0

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.

Potentially problematic release.


This version of features might be problematic. Click here for more details.

Files changed (77) hide show
  1. data/Manifest +59 -0
  2. data/README.markdown +31 -1
  3. data/Rakefile +1 -1
  4. data/features.gemspec +3 -3
  5. data/generators/features/templates/run_features.rb +27 -0
  6. data/lib/ObjC/objc_feature.rb +4 -27
  7. data/lib/ObjC/objc_scenario.rb +1 -58
  8. data/lib/ObjC/objc_step.rb +0 -31
  9. data/lib/ObjC/objc_suite.rb +14 -122
  10. data/lib/Rails/rails_feature.rb +7 -30
  11. data/lib/Rails/rails_scenario.rb +0 -57
  12. data/lib/Rails/rails_step.rb +1 -30
  13. data/lib/Rails/rails_suite.rb +16 -132
  14. data/lib/feature.rb +29 -1
  15. data/lib/scenario.rb +99 -0
  16. data/lib/step.rb +28 -0
  17. data/lib/suite.rb +124 -0
  18. data/website/README +10 -0
  19. data/website/Rakefile +44 -0
  20. data/website/config.yaml +18 -0
  21. data/website/deploy.rb +29 -0
  22. data/website/deploy/1251795725/features/browserfix.css +7 -0
  23. data/website/deploy/1251795725/features/default.css +257 -0
  24. data/website/deploy/1251795725/features/images/bodybg.gif +0 -0
  25. data/website/deploy/1251795725/features/images/header-bg.gif +0 -0
  26. data/website/deploy/1251795725/features/images/logo.png +0 -0
  27. data/website/deploy/1251795725/features/images/minus.png +0 -0
  28. data/website/deploy/1251795725/features/images/plus.png +0 -0
  29. data/website/deploy/1251795725/features/images/sidebarbg.gif +0 -0
  30. data/website/deploy/1251795725/features/index.html +229 -0
  31. data/website/deploy/1251796894/features/browserfix.css +7 -0
  32. data/website/deploy/1251796894/features/default.css +257 -0
  33. data/website/deploy/1251796894/features/images/bodybg.gif +0 -0
  34. data/website/deploy/1251796894/features/images/header-bg.gif +0 -0
  35. data/website/deploy/1251796894/features/images/logo.png +0 -0
  36. data/website/deploy/1251796894/features/images/minus.png +0 -0
  37. data/website/deploy/1251796894/features/images/output-screen-1.png +0 -0
  38. data/website/deploy/1251796894/features/images/plus.png +0 -0
  39. data/website/deploy/1251796894/features/images/sidebarbg.gif +0 -0
  40. data/website/deploy/1251796894/features/index.html +229 -0
  41. data/website/deploy/1251822430/features/browserfix.css +7 -0
  42. data/website/deploy/1251822430/features/default.css +257 -0
  43. data/website/deploy/1251822430/features/images/bodybg.gif +0 -0
  44. data/website/deploy/1251822430/features/images/header-bg.gif +0 -0
  45. data/website/deploy/1251822430/features/images/logo.png +0 -0
  46. data/website/deploy/1251822430/features/images/minus.png +0 -0
  47. data/website/deploy/1251822430/features/images/output-screen-1.png +0 -0
  48. data/website/deploy/1251822430/features/images/plus.png +0 -0
  49. data/website/deploy/1251822430/features/images/sidebarbg.gif +0 -0
  50. data/website/deploy/1251822430/features/index.html +229 -0
  51. data/website/ext/init.rb +10 -0
  52. data/website/out/browserfix.css +7 -0
  53. data/website/out/default.css +257 -0
  54. data/website/out/images/bodybg.gif +0 -0
  55. data/website/out/images/header-bg.gif +0 -0
  56. data/website/out/images/logo.png +0 -0
  57. data/website/out/images/minus.png +0 -0
  58. data/website/out/images/output-screen-1.png +0 -0
  59. data/website/out/images/plus.png +0 -0
  60. data/website/out/images/sidebarbg.gif +0 -0
  61. data/website/out/index.html +229 -0
  62. data/website/src/browserfix.css +7 -0
  63. data/website/src/default.css +257 -0
  64. data/website/src/default.template +92 -0
  65. data/website/src/images/bodybg.gif +0 -0
  66. data/website/src/images/deploy.rb +29 -0
  67. data/website/src/images/header-bg.gif +0 -0
  68. data/website/src/images/logo.png +0 -0
  69. data/website/src/images/minus.png +0 -0
  70. data/website/src/images/output-screen-1.png +0 -0
  71. data/website/src/images/plus.png +0 -0
  72. data/website/src/images/sidebarbg.gif +0 -0
  73. data/website/src/images/webgen.rb +3 -0
  74. data/website/src/index.page +139 -0
  75. data/website/webgen.cache +0 -0
  76. data/website/webgen.rb +3 -0
  77. metadata +61 -2
@@ -0,0 +1,92 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang:}">
4
+ <head>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+ <meta name="description" content="description goes here" />
7
+ <meta name="keywords" content="keywords,goes,here" />
8
+ <meta name="author" content="Your Name" />
9
+ <meta name="generator" content="webgen - http://webgen.rubyforge.org" />
10
+ <link rel="stylesheet" type="text/css" href="{relocatable: default.css}" />
11
+ <!--[if IE 6]>
12
+ <link rel="stylesheet" href="{relocatable: browserfix.css}" type="text/css" />
13
+ <![endif]-->
14
+ <title>{title:}</title>
15
+ </head>
16
+
17
+
18
+
19
+ <body>
20
+ <a name="top"></a>
21
+ <div id="page">
22
+
23
+ <div id="page-inner">
24
+ <div id="header">
25
+ <div id="header-inner">
26
+
27
+ <a href="index.html">
28
+ <div id="logo">
29
+ <div id="logo-inner">
30
+ </div>
31
+ </div>
32
+ <div id="site-name">
33
+ <div id="site-name-inner">
34
+ <h1 id="site-name-inner-title">features</h1>
35
+ <p id="site-name-inner-slogan">A Plain Text User Stories Parser Supporting native Programming Languages</p>
36
+ </div>
37
+ </div>
38
+ </a>
39
+
40
+ <div class="clearer">&nbsp;</div>
41
+
42
+ <div id="tabs">
43
+ <div id="tabs-inner">
44
+
45
+ </div>
46
+ <div class="clearer">&nbsp;</div>
47
+ </div>
48
+ <div class="clearer">&nbsp;</div>
49
+ </div>
50
+ </div>
51
+
52
+
53
+
54
+ <div class="clearer">&nbsp;</div>
55
+
56
+ <div id="main">
57
+ <div id="main-inner">
58
+
59
+ <div id="content">
60
+ <div id="content-inner">
61
+ <div id="content-container">
62
+ <webgen:block name="content" />
63
+ </div>
64
+ </div>
65
+ </div>
66
+
67
+ <div id="sidebar">
68
+ <div id="sidebar-inner">
69
+ {menu: {max_levels: 1, used_nodes: files}}
70
+ </div>
71
+ </div>
72
+
73
+ <div class="clearer">&nbsp;</div>
74
+ </div>
75
+ <div class="clearer">&nbsp;</div>
76
+ </div>
77
+
78
+ <div class="clearer">&nbsp;</div>
79
+
80
+ </div>
81
+
82
+ <div id="footer">
83
+ <div id="footer-inner">
84
+ &copy; 2009 Matthias Hennemeyer. All Rights Reserved.
85
+ </div>
86
+ </div>
87
+
88
+ </div>
89
+
90
+ </body>
91
+ </html>
92
+
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby -wKU
2
+
3
+ site_folder = File.expand_path(".")
4
+ puts "In #{site_folder}.:"
5
+ puts `webgen`
6
+
7
+
8
+ timestamp = Time.now.to_i
9
+ deploy_folder = "#{site_folder}/deploy/#{timestamp}/kitabuntersandkasten"
10
+
11
+
12
+ `mkdir -p #{deploy_folder}`
13
+ if File.directory?(deploy_folder)
14
+ puts "Local Deploy Folder: #{deploy_folder}"
15
+ else
16
+ raise "Couldn't make deploy dir: #{deploy_folder}."
17
+ end
18
+
19
+ `cd #{site_folder}/out && cp -r * #{deploy_folder}`
20
+ puts Dir.entries(deploy_folder).join(" ")
21
+ if Dir.entries(deploy_folder).join(" ") =~ /\s*index.html\s*/
22
+ puts "Output moved to #{deploy_folder}"
23
+ else
24
+ raise "Couldn't copy output to #{deploy_folder}"
25
+ end
26
+
27
+ puts `cd #{deploy_folder} && cd .. && scp -r kitabuntersandkasten root@chocolateco.de:/var/www/`
28
+
29
+ puts "Finished"
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby -wKU
2
+
3
+ puts `webgen`
@@ -0,0 +1,139 @@
1
+ ---
2
+ title: Home
3
+ in_menu: true
4
+ ---
5
+
6
+ This is just the README. A real Website will follow.
7
+
8
+ # Features
9
+
10
+ A Plain Text User Stories Parser that supports native Programming Languages.
11
+
12
+ ## Usage
13
+
14
+ ### Ruby on Rails
15
+
16
+ 1. Install features:
17
+
18
+ $ gem install features
19
+
20
+ 2. Generate the supporting folders from your rails apps root folder:
21
+
22
+ $ script/generate features
23
+
24
+ 3. Run the HelloWorld.feature:
25
+ * (OS X): There is a `run_features.rb` script that will open its results in Safari:
26
+
27
+ $ ruby test/features/run_features.rb
28
+
29
+ * (Other OS): INSTRUCTIONS WILL FOLLOW SOON ...
30
+ 4. Here is what the Html Output looks like:
31
+
32
+ <img src="images/output-screen-1.png" width="400px">
33
+
34
+
35
+ ### Objective-C
36
+
37
+ 1. Install features:
38
+
39
+ $ sudo gem install
40
+
41
+ 2. Download and install ObjectiveMatchy
42
+
43
+ 3. ObjectiveMatchy provides Xcode Project Templates that have a Feature Target. Create a new Xcode Project and choose one of the ObjectiveMatchy Templates.
44
+
45
+
46
+ 4. ...
47
+
48
+ ### More Languages will follow ...
49
+
50
+
51
+
52
+ ## How it works
53
+
54
+ ### Features parses plain-text user story files
55
+ That files are made up of keywords (Feature:, Scenario:)
56
+ and step definitions (When I say 'Hello, World!'):
57
+
58
+ Feature: Hello World
59
+
60
+ Scenario: Say Hello World
61
+ When I say 'Hello, World!'
62
+
63
+ ### Next, a TestCase File will be generated
64
+
65
+ Each Feature (User Story) will be generated as a TestCase.
66
+ Each Scenario as a test method.
67
+ The step definitions provide the test method implementations.
68
+ Regarding the above Feature, here is what the autogenerated testcases
69
+ will look like in the different languages:
70
+
71
+ * Rails:
72
+
73
+ require "/path/to/project/support/features_helper.rb"
74
+
75
+ class HelloWorldTest < FeaturesTestCaseClass
76
+ def test_SayHelloWorld
77
+ when_I_say___("Hello, World!")
78
+ end
79
+ end
80
+
81
+ * Objective C:
82
+
83
+ #import "OMFeature.h"
84
+
85
+ @interface HelloWorldTest : OMFeature
86
+ @end
87
+
88
+ @implementation HelloWorldTest
89
+ -(void) testSayHelloWorld
90
+ {
91
+ [self When_I_say___:@"Hello, World!"];
92
+ }
93
+ @end
94
+
95
+ * Other Languages (Java, C#, C++, Python) will follow soon ...
96
+
97
+
98
+ ### Provide Step Implementations
99
+
100
+ Steps are instance method of the intermediate TestCase class (eg 'FeaturesTestCaseClass' in Rails)
101
+ that inherits from the language specific TestCase class (eg 'ActionController::IntegrationTest' in Rails)
102
+ and that itself is the parent of the generated TestCases. This way, all test method implementations (aka Scenarios)
103
+ will have access to the steps.
104
+
105
+ ## Installation
106
+
107
+ gem install features
108
+
109
+ ## Contribution
110
+
111
+ * Idea?, Feature Request?, Bug? -> [Lighthouse](http://300.lighthouseapp.com/projects/36609-features/overview)
112
+ * source -> [GitHub](http://github.com/mhennemeyer/features)
113
+ * talk? -> [GoogleGroup](http://groups.google.de/group/featuresgroup)
114
+
115
+
116
+ ## Licence
117
+
118
+ (The MIT License)
119
+
120
+ Copyright (c) Matthias Hennemeyer
121
+
122
+ Permission is hereby granted, free of charge, to any person obtaining
123
+ a copy of this software and associated documentation files (the
124
+ 'Software'), to deal in the Software without restriction, including
125
+ without limitation the rights to use, copy, modify, merge, publish,
126
+ distribute, sublicense, and/or sell copies of the Software, and to
127
+ permit persons to whom the Software is furnished to do so, subject to
128
+ the following conditions:
129
+
130
+ The above copyright notice and this permission notice shall be
131
+ included in all copies or substantial portions of the Software.
132
+
133
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
134
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
135
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
136
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
137
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
138
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
139
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Binary file
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby -wKU
2
+
3
+ puts `webgen`
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: features
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Hennemeyer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-04 00:00:00 +02:00
12
+ date: 2009-09-05 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -67,6 +67,65 @@ files:
67
67
  - lib/step.rb
68
68
  - lib/string_extension.rb
69
69
  - lib/suite.rb
70
+ - website/README
71
+ - website/Rakefile
72
+ - website/config.yaml
73
+ - website/deploy.rb
74
+ - website/deploy/1251795725/features/browserfix.css
75
+ - website/deploy/1251795725/features/default.css
76
+ - website/deploy/1251795725/features/images/bodybg.gif
77
+ - website/deploy/1251795725/features/images/header-bg.gif
78
+ - website/deploy/1251795725/features/images/logo.png
79
+ - website/deploy/1251795725/features/images/minus.png
80
+ - website/deploy/1251795725/features/images/plus.png
81
+ - website/deploy/1251795725/features/images/sidebarbg.gif
82
+ - website/deploy/1251795725/features/index.html
83
+ - website/deploy/1251796894/features/browserfix.css
84
+ - website/deploy/1251796894/features/default.css
85
+ - website/deploy/1251796894/features/images/bodybg.gif
86
+ - website/deploy/1251796894/features/images/header-bg.gif
87
+ - website/deploy/1251796894/features/images/logo.png
88
+ - website/deploy/1251796894/features/images/minus.png
89
+ - website/deploy/1251796894/features/images/output-screen-1.png
90
+ - website/deploy/1251796894/features/images/plus.png
91
+ - website/deploy/1251796894/features/images/sidebarbg.gif
92
+ - website/deploy/1251796894/features/index.html
93
+ - website/deploy/1251822430/features/browserfix.css
94
+ - website/deploy/1251822430/features/default.css
95
+ - website/deploy/1251822430/features/images/bodybg.gif
96
+ - website/deploy/1251822430/features/images/header-bg.gif
97
+ - website/deploy/1251822430/features/images/logo.png
98
+ - website/deploy/1251822430/features/images/minus.png
99
+ - website/deploy/1251822430/features/images/output-screen-1.png
100
+ - website/deploy/1251822430/features/images/plus.png
101
+ - website/deploy/1251822430/features/images/sidebarbg.gif
102
+ - website/deploy/1251822430/features/index.html
103
+ - website/ext/init.rb
104
+ - website/out/browserfix.css
105
+ - website/out/default.css
106
+ - website/out/images/bodybg.gif
107
+ - website/out/images/header-bg.gif
108
+ - website/out/images/logo.png
109
+ - website/out/images/minus.png
110
+ - website/out/images/output-screen-1.png
111
+ - website/out/images/plus.png
112
+ - website/out/images/sidebarbg.gif
113
+ - website/out/index.html
114
+ - website/src/browserfix.css
115
+ - website/src/default.css
116
+ - website/src/default.template
117
+ - website/src/images/bodybg.gif
118
+ - website/src/images/deploy.rb
119
+ - website/src/images/header-bg.gif
120
+ - website/src/images/logo.png
121
+ - website/src/images/minus.png
122
+ - website/src/images/output-screen-1.png
123
+ - website/src/images/plus.png
124
+ - website/src/images/sidebarbg.gif
125
+ - website/src/images/webgen.rb
126
+ - website/src/index.page
127
+ - website/webgen.cache
128
+ - website/webgen.rb
70
129
  - features.gemspec
71
130
  has_rdoc: true
72
131
  homepage: http://features.rubyforge.org