question-simpleChoice 0.0.1

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.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/#question-simpleChoice.gemspec# +27 -0
  3. data/.coveralls.yml +1 -0
  4. data/.gitignore +15 -0
  5. data/.rspec +2 -0
  6. data/.travis.yml +3 -0
  7. data/.yardoc/checksums +13 -0
  8. data/.yardoc/object_types +0 -0
  9. data/.yardoc/objects/root.dat +0 -0
  10. data/.yardoc/proxy_types +0 -0
  11. data/Gemfile +7 -0
  12. data/Guardfile +7 -0
  13. data/LICENSE.txt +22 -0
  14. data/README.md +32 -0
  15. data/Rakefile +15 -0
  16. data/doc/Examen.html +766 -0
  17. data/doc/Interfaz.html +440 -0
  18. data/doc/Lista.html +929 -0
  19. data/doc/Lista/Node.html +397 -0
  20. data/doc/Node.html +516 -0
  21. data/doc/Question.html +117 -0
  22. data/doc/Question/SimpleChoice.html +132 -0
  23. data/doc/Question/TrueOrFalse.html +134 -0
  24. data/doc/QuestionFather.html +565 -0
  25. data/doc/SimpleChoice.html +505 -0
  26. data/doc/TrueOrFalse.html +279 -0
  27. data/doc/_index.html +207 -0
  28. data/doc/class_list.html +58 -0
  29. data/doc/css/common.css +1 -0
  30. data/doc/css/full_list.css +57 -0
  31. data/doc/css/style.css +339 -0
  32. data/doc/file.README.html +110 -0
  33. data/doc/file_list.html +60 -0
  34. data/doc/frames.html +26 -0
  35. data/doc/index.html +110 -0
  36. data/doc/js/app.js +219 -0
  37. data/doc/js/full_list.js +181 -0
  38. data/doc/js/jquery.js +4 -0
  39. data/doc/method_list.html +309 -0
  40. data/doc/top-level-namespace.html +114 -0
  41. data/lib/exam/examen.rb +85 -0
  42. data/lib/interfaz/interfaz.rb +49 -0
  43. data/lib/interfaz/interfazV2.rb +38 -0
  44. data/lib/node/node.rb +9 -0
  45. data/lib/nodelist/list.rb +119 -0
  46. data/lib/question/questionFather.rb +2 -0
  47. data/lib/question/questionFather/base.rb +16 -0
  48. data/lib/question/questionFather/version.rb +5 -0
  49. data/lib/question/simpleChoice.rb +2 -0
  50. data/lib/question/simpleChoice/base.rb +17 -0
  51. data/lib/question/simpleChoice/version.rb +5 -0
  52. data/lib/question/trueOrFalse.rb +2 -0
  53. data/lib/question/trueOrFalse/base.rb +10 -0
  54. data/lib/question/trueOrFalse/version.rb +5 -0
  55. data/lib/quiz/quiz.rb +58 -0
  56. data/prueba.html +1 -0
  57. data/prueba.rb +48 -0
  58. data/question-simpleChoice.gemspec +27 -0
  59. data/spec/list_spec.rb +51 -0
  60. data/spec/quiz_spec.rb +31 -0
  61. data/spec/simpleChoice_spec.rb +106 -0
  62. data/spec/spec_examen.rb +21 -0
  63. data/spec/spec_helper.rb +93 -0
  64. data/test.html +310 -0
  65. metadata +183 -0
@@ -0,0 +1,310 @@
1
+ <!DOCTYPE html>
2
+ <html lang='en'>
3
+ <head>
4
+ <title>RSpec results</title>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <meta http-equiv="Expires" content="-1" />
7
+ <meta http-equiv="Pragma" content="no-cache" />
8
+ <style type="text/css">
9
+ body {
10
+ margin: 0;
11
+ padding: 0;
12
+ background: #fff;
13
+ font-size: 80%;
14
+ }
15
+ </style>
16
+ <script type="text/javascript">
17
+ // <![CDATA[
18
+
19
+ function addClass(element_id, classname) {
20
+ document.getElementById(element_id).className += (" " + classname);
21
+ }
22
+
23
+ function removeClass(element_id, classname) {
24
+ var elem = document.getElementById(element_id);
25
+ var classlist = elem.className.replace(classname,'');
26
+ elem.className = classlist;
27
+ }
28
+
29
+ function moveProgressBar(percentDone) {
30
+ document.getElementById("rspec-header").style.width = percentDone +"%";
31
+ }
32
+
33
+ function makeRed(element_id) {
34
+ removeClass(element_id, 'passed');
35
+ removeClass(element_id, 'not_implemented');
36
+ addClass(element_id,'failed');
37
+ }
38
+
39
+ function makeYellow(element_id) {
40
+ var elem = document.getElementById(element_id);
41
+ if (elem.className.indexOf("failed") == -1) { // class doesn't includes failed
42
+ if (elem.className.indexOf("not_implemented") == -1) { // class doesn't include not_implemented
43
+ removeClass(element_id, 'passed');
44
+ addClass(element_id,'not_implemented');
45
+ }
46
+ }
47
+ }
48
+
49
+ function apply_filters() {
50
+ var passed_filter = document.getElementById('passed_checkbox').checked;
51
+ var failed_filter = document.getElementById('failed_checkbox').checked;
52
+ var pending_filter = document.getElementById('pending_checkbox').checked;
53
+
54
+ assign_display_style("example passed", passed_filter);
55
+ assign_display_style("example failed", failed_filter);
56
+ assign_display_style("example not_implemented", pending_filter);
57
+
58
+ assign_display_style_for_group("example_group passed", passed_filter);
59
+ assign_display_style_for_group("example_group not_implemented", pending_filter, pending_filter || passed_filter);
60
+ assign_display_style_for_group("example_group failed", failed_filter, failed_filter || pending_filter || passed_filter);
61
+ }
62
+
63
+ function get_display_style(display_flag) {
64
+ var style_mode = 'none';
65
+ if (display_flag == true) {
66
+ style_mode = 'block';
67
+ }
68
+ return style_mode;
69
+ }
70
+
71
+ function assign_display_style(classname, display_flag) {
72
+ var style_mode = get_display_style(display_flag);
73
+ var elems = document.getElementsByClassName(classname)
74
+ for (var i=0; i<elems.length;i++) {
75
+ elems[i].style.display = style_mode;
76
+ }
77
+ }
78
+
79
+ function assign_display_style_for_group(classname, display_flag, subgroup_flag) {
80
+ var display_style_mode = get_display_style(display_flag);
81
+ var subgroup_style_mode = get_display_style(subgroup_flag);
82
+ var elems = document.getElementsByClassName(classname)
83
+ for (var i=0; i<elems.length;i++) {
84
+ var style_mode = display_style_mode;
85
+ if ((display_flag != subgroup_flag) && (elems[i].getElementsByTagName('dt')[0].innerHTML.indexOf(", ") != -1)) {
86
+ elems[i].style.display = subgroup_style_mode;
87
+ } else {
88
+ elems[i].style.display = display_style_mode;
89
+ }
90
+ }
91
+ }
92
+
93
+ // ]]>
94
+ </script>
95
+ <style type="text/css">
96
+ #rspec-header {
97
+ background: #65C400; color: #fff; height: 4em;
98
+ }
99
+
100
+ .rspec-report h1 {
101
+ margin: 0px 10px 0px 10px;
102
+ padding: 10px;
103
+ font-family: "Lucida Grande", Helvetica, sans-serif;
104
+ font-size: 1.8em;
105
+ position: absolute;
106
+ }
107
+
108
+ #label {
109
+ float:left;
110
+ }
111
+
112
+ #display-filters {
113
+ float:left;
114
+ padding: 28px 0 0 40%;
115
+ font-family: "Lucida Grande", Helvetica, sans-serif;
116
+ }
117
+
118
+ #summary {
119
+ float:right;
120
+ padding: 5px 10px;
121
+ font-family: "Lucida Grande", Helvetica, sans-serif;
122
+ text-align: right;
123
+ }
124
+
125
+ #summary p {
126
+ margin: 0 0 0 2px;
127
+ }
128
+
129
+ #summary #totals {
130
+ font-size: 1.2em;
131
+ }
132
+
133
+ .example_group {
134
+ margin: 0 10px 5px;
135
+ background: #fff;
136
+ }
137
+
138
+ dl {
139
+ margin: 0; padding: 0 0 5px;
140
+ font: normal 11px "Lucida Grande", Helvetica, sans-serif;
141
+ }
142
+
143
+ dt {
144
+ padding: 3px;
145
+ background: #65C400;
146
+ color: #fff;
147
+ font-weight: bold;
148
+ }
149
+
150
+ dd {
151
+ margin: 5px 0 5px 5px;
152
+ padding: 3px 3px 3px 18px;
153
+ }
154
+
155
+ dd .duration {
156
+ padding-left: 5px;
157
+ text-align: right;
158
+ right: 0px;
159
+ float:right;
160
+ }
161
+
162
+ dd.example.passed {
163
+ border-left: 5px solid #65C400;
164
+ border-bottom: 1px solid #65C400;
165
+ background: #DBFFB4; color: #3D7700;
166
+ }
167
+
168
+ dd.example.not_implemented {
169
+ border-left: 5px solid #FAF834;
170
+ border-bottom: 1px solid #FAF834;
171
+ background: #FCFB98; color: #131313;
172
+ }
173
+
174
+ dd.example.pending_fixed {
175
+ border-left: 5px solid #0000C2;
176
+ border-bottom: 1px solid #0000C2;
177
+ color: #0000C2; background: #D3FBFF;
178
+ }
179
+
180
+ dd.example.failed {
181
+ border-left: 5px solid #C20000;
182
+ border-bottom: 1px solid #C20000;
183
+ color: #C20000; background: #FFFBD3;
184
+ }
185
+
186
+
187
+ dt.not_implemented {
188
+ color: #000000; background: #FAF834;
189
+ }
190
+
191
+ dt.pending_fixed {
192
+ color: #FFFFFF; background: #C40D0D;
193
+ }
194
+
195
+ dt.failed {
196
+ color: #FFFFFF; background: #C40D0D;
197
+ }
198
+
199
+
200
+ #rspec-header.not_implemented {
201
+ color: #000000; background: #FAF834;
202
+ }
203
+
204
+ #rspec-header.pending_fixed {
205
+ color: #FFFFFF; background: #C40D0D;
206
+ }
207
+
208
+ #rspec-header.failed {
209
+ color: #FFFFFF; background: #C40D0D;
210
+ }
211
+
212
+
213
+ .backtrace {
214
+ color: #000;
215
+ font-size: 12px;
216
+ }
217
+
218
+ a {
219
+ color: #BE5C00;
220
+ }
221
+
222
+ /* Ruby code, style similar to vibrant ink */
223
+ .ruby {
224
+ font-size: 12px;
225
+ font-family: monospace;
226
+ color: white;
227
+ background-color: black;
228
+ padding: 0.1em 0 0.2em 0;
229
+ }
230
+
231
+ .ruby .keyword { color: #FF6600; }
232
+ .ruby .constant { color: #339999; }
233
+ .ruby .attribute { color: white; }
234
+ .ruby .global { color: white; }
235
+ .ruby .module { color: white; }
236
+ .ruby .class { color: white; }
237
+ .ruby .string { color: #66FF00; }
238
+ .ruby .ident { color: white; }
239
+ .ruby .method { color: #FFCC00; }
240
+ .ruby .number { color: white; }
241
+ .ruby .char { color: white; }
242
+ .ruby .comment { color: #9933CC; }
243
+ .ruby .symbol { color: white; }
244
+ .ruby .regex { color: #44B4CC; }
245
+ .ruby .punct { color: white; }
246
+ .ruby .escape { color: white; }
247
+ .ruby .interp { color: white; }
248
+ .ruby .expr { color: white; }
249
+
250
+ .ruby .offending { background-color: gray; }
251
+ .ruby .linenum {
252
+ width: 75px;
253
+ padding: 0.1em 1em 0.2em 0;
254
+ color: #000000;
255
+ background-color: #FFFBD3;
256
+ }
257
+
258
+ </style>
259
+ </head>
260
+ <body>
261
+ <div class="rspec-report">
262
+
263
+ <div id="rspec-header">
264
+ <div id="label">
265
+ <h1>RSpec Code Examples</h1>
266
+ </div>
267
+
268
+ <div id="display-filters">
269
+ <input id="passed_checkbox" name="passed_checkbox" type="checkbox" checked="checked" onchange="apply_filters()" value="1" /> <label for="passed_checkbox">Passed</label>
270
+ <input id="failed_checkbox" name="failed_checkbox" type="checkbox" checked="checked" onchange="apply_filters()" value="2" /> <label for="failed_checkbox">Failed</label>
271
+ <input id="pending_checkbox" name="pending_checkbox" type="checkbox" checked="checked" onchange="apply_filters()" value="3" /> <label for="pending_checkbox">Pending</label>
272
+ </div>
273
+
274
+ <div id="summary">
275
+ <p id="totals">&#160;</p>
276
+ <p id="duration">&#160;</p>
277
+ </div>
278
+ </div>
279
+
280
+
281
+ <div class="results">
282
+ <div id="div_group_1" class="example_group passed">
283
+ <dl style="margin-left: 0px;">
284
+ <dt id="example_group_1" class="passed">Question::SimpleChoice</dt>
285
+ </dl>
286
+ </div>
287
+ <div id="div_group_2" class="example_group passed">
288
+ <dl style="margin-left: 15px;">
289
+ <dt id="example_group_2" class="passed">Creando una pregunta</dt>
290
+ <script type="text/javascript">moveProgressBar('25.0');</script>
291
+ <dd class="example passed"><span class="passed_spec_name">Se crea correctamente</span><span class='duration'>0.00029s</span></dd>
292
+ <script type="text/javascript">moveProgressBar('50.0');</script>
293
+ <dd class="example passed"><span class="passed_spec_name">Has to have the three components</span><span class='duration'>0.00201s</span></dd>
294
+ </dl>
295
+ </div>
296
+ <div id="div_group_3" class="example_group passed">
297
+ <dl style="margin-left: 15px;">
298
+ <dt id="example_group_3" class="passed">Whene converting</dt>
299
+ <script type="text/javascript">moveProgressBar('75.0');</script>
300
+ <dd class="example passed"><span class="passed_spec_name">can be converted to html</span><span class='duration'>0.00154s</span></dd>
301
+ <script type="text/javascript">moveProgressBar('100.0');</script>
302
+ <dd class="example passed"><span class="passed_spec_name">has to produce a reasonable HTML</span><span class='duration'>0.00097s</span></dd>
303
+ </dl>
304
+ </div>
305
+ <script type="text/javascript">document.getElementById('duration').innerHTML = "Finished in <strong>0.00693 seconds</strong>";</script>
306
+ <script type="text/javascript">document.getElementById('totals').innerHTML = "4 examples, 0 failures";</script>
307
+ </div>
308
+ </div>
309
+ </body>
310
+ </html>
metadata ADDED
@@ -0,0 +1,183 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: question-simpleChoice
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Eduardo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-12-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: guard
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: guard-rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: guard-bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: creador de examenes
84
+ email:
85
+ - edudioniz@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - '#question-simpleChoice.gemspec#'
91
+ - .coveralls.yml
92
+ - .gitignore
93
+ - .rspec
94
+ - .travis.yml
95
+ - .yardoc/checksums
96
+ - .yardoc/object_types
97
+ - .yardoc/objects/root.dat
98
+ - .yardoc/proxy_types
99
+ - Gemfile
100
+ - Guardfile
101
+ - LICENSE.txt
102
+ - README.md
103
+ - Rakefile
104
+ - doc/Examen.html
105
+ - doc/Interfaz.html
106
+ - doc/Lista.html
107
+ - doc/Lista/Node.html
108
+ - doc/Node.html
109
+ - doc/Question.html
110
+ - doc/Question/SimpleChoice.html
111
+ - doc/Question/TrueOrFalse.html
112
+ - doc/QuestionFather.html
113
+ - doc/SimpleChoice.html
114
+ - doc/TrueOrFalse.html
115
+ - doc/_index.html
116
+ - doc/class_list.html
117
+ - doc/css/common.css
118
+ - doc/css/full_list.css
119
+ - doc/css/style.css
120
+ - doc/file.README.html
121
+ - doc/file_list.html
122
+ - doc/frames.html
123
+ - doc/index.html
124
+ - doc/js/app.js
125
+ - doc/js/full_list.js
126
+ - doc/js/jquery.js
127
+ - doc/method_list.html
128
+ - doc/top-level-namespace.html
129
+ - lib/exam/examen.rb
130
+ - lib/interfaz/interfaz.rb
131
+ - lib/interfaz/interfazV2.rb
132
+ - lib/node/node.rb
133
+ - lib/nodelist/list.rb
134
+ - lib/question/questionFather.rb
135
+ - lib/question/questionFather/base.rb
136
+ - lib/question/questionFather/version.rb
137
+ - lib/question/simpleChoice.rb
138
+ - lib/question/simpleChoice/base.rb
139
+ - lib/question/simpleChoice/version.rb
140
+ - lib/question/trueOrFalse.rb
141
+ - lib/question/trueOrFalse/base.rb
142
+ - lib/question/trueOrFalse/version.rb
143
+ - lib/quiz/quiz.rb
144
+ - prueba.html
145
+ - prueba.rb
146
+ - question-simpleChoice.gemspec
147
+ - spec/list_spec.rb
148
+ - spec/quiz_spec.rb
149
+ - spec/simpleChoice_spec.rb
150
+ - spec/spec_examen.rb
151
+ - spec/spec_helper.rb
152
+ - test.html
153
+ homepage: http://www.creaexamen.com
154
+ licenses:
155
+ - MIT
156
+ metadata: {}
157
+ post_install_message:
158
+ rdoc_options: []
159
+ require_paths:
160
+ - lib
161
+ required_ruby_version: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ required_rubygems_version: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - '>='
169
+ - !ruby/object:Gem::Version
170
+ version: '0'
171
+ requirements: []
172
+ rubyforge_project:
173
+ rubygems_version: 2.0.14
174
+ signing_key:
175
+ specification_version: 4
176
+ summary: creador de examenes
177
+ test_files:
178
+ - spec/list_spec.rb
179
+ - spec/quiz_spec.rb
180
+ - spec/simpleChoice_spec.rb
181
+ - spec/spec_examen.rb
182
+ - spec/spec_helper.rb
183
+ has_rdoc: