oulu-rails 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +22 -0
  3. data/README.md +23 -0
  4. data/lib/oulu-rails/version.rb +3 -0
  5. data/lib/oulu-rails.rb +27 -0
  6. data/vendor/assets/javascripts/oulu/dev/positions-p.js.coffee +34 -0
  7. data/vendor/assets/javascripts/oulu/dev/positions-pp.js.coffee +57 -0
  8. data/vendor/assets/javascripts/oulu/dev/positions.js.coffee +6 -0
  9. data/vendor/assets/javascripts/oulu/helpers/js-autosize.js.coffee +2 -0
  10. data/vendor/assets/javascripts/oulu/helpers/js-checkbox.js.coffee +6 -0
  11. data/vendor/assets/javascripts/oulu/helpers/js-click-animate.js.coffee +8 -0
  12. data/vendor/assets/javascripts/oulu/helpers/js-delay-hidden.js.coffee +4 -0
  13. data/vendor/assets/javascripts/oulu/helpers/js-focused.js.coffee +7 -0
  14. data/vendor/assets/javascripts/oulu/helpers/js-hack.js.coffee +8 -0
  15. data/vendor/assets/javascripts/oulu/helpers/js-hide-after.j.coffee +5 -0
  16. data/vendor/assets/javascripts/oulu/helpers/js-hover-z-index.js.coffee +5 -0
  17. data/vendor/assets/javascripts/oulu/helpers/js-hovered.js.coffee +17 -0
  18. data/vendor/assets/javascripts/oulu/helpers/js-one-animate.js.coffee +5 -0
  19. data/vendor/assets/javascripts/oulu/helpers/js-open-children.js.coffee +28 -0
  20. data/vendor/assets/javascripts/oulu/helpers/js-open.js.coffee +51 -0
  21. data/vendor/assets/javascripts/oulu/helpers/js-scroll-to-top.js.coffee +11 -0
  22. data/vendor/assets/javascripts/oulu/helpers/js-scroll.js.coffee +9 -0
  23. data/vendor/assets/javascripts/oulu/helpers/js-side-slide.js.coffee +6 -0
  24. data/vendor/assets/javascripts/oulu/helpers/js-window-loading.js.coffee +15 -0
  25. data/vendor/assets/javascripts/oulu/helpers/js-window-sizes.js.coffee +6 -0
  26. data/vendor/assets/javascripts/oulu/helpers/open-close.js.coffee +23 -0
  27. data/vendor/assets/javascripts/oulu/ie/PIE_IE678.js +72 -0
  28. data/vendor/assets/javascripts/oulu/ie/PIE_IE9.js +46 -0
  29. data/vendor/assets/javascripts/oulu/ie/ie-selectors.js.coffee +3 -0
  30. data/vendor/assets/javascripts/oulu/ie/ie8-selectors.js.coffee +3 -0
  31. data/vendor/assets/javascripts/oulu/ie/ie9-selectors.js.coffee +6 -0
  32. data/vendor/assets/javascripts/oulu/ie/jquery.belatedPNG.min.js +29 -0
  33. data/vendor/assets/javascripts/oulu/ie/jquery.linkscubber.js +7 -0
  34. data/vendor/assets/javascripts/oulu/ie/svgeezy.min.js +12 -0
  35. data/vendor/assets/javascripts/oulu/plugins/check-box.js.coffee +34 -0
  36. data/vendor/assets/javascripts/oulu/plugins/footerFixed.js +74 -0
  37. data/vendor/assets/javascripts/oulu/plugins/jquery.autosize.min.js +7 -0
  38. data/vendor/assets/javascripts/oulu/plugins/jquery.cheat-code.js +63 -0
  39. data/vendor/assets/javascripts/oulu/plugins/jquery.css3form.js +195 -0
  40. data/vendor/assets/javascripts/oulu/plugins/jquery.depend.min.js +13 -0
  41. data/vendor/assets/javascripts/oulu/plugins/sns-buttons.js +339 -0
  42. data/vendor/assets/javascripts/oulu-ie8.js +6 -0
  43. data/vendor/assets/javascripts/oulu-ie9.js +2 -0
  44. data/vendor/assets/javascripts/oulu.js +2 -0
  45. data/vendor/assets/stylesheets/_oulu-base.css.sass +86 -0
  46. data/vendor/assets/stylesheets/_oulu.css.sass +13 -0
  47. data/vendor/assets/stylesheets/bootcamp/CHANGELOG.md +70 -0
  48. data/vendor/assets/stylesheets/bootcamp/CONTRIBUTING.md +72 -0
  49. data/vendor/assets/stylesheets/bootcamp/Gruntfile.coffee +34 -0
  50. data/vendor/assets/stylesheets/bootcamp/LICENSE.md +7 -0
  51. data/vendor/assets/stylesheets/bootcamp/README.md +52 -0
  52. data/vendor/assets/stylesheets/bootcamp/bower.json +15 -0
  53. data/vendor/assets/stylesheets/bootcamp/dist/_bootcamp.scss +46 -0
  54. data/vendor/assets/stylesheets/bootcamp/dist/bootcamp.coffee +101 -0
  55. data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_actual.scss +3 -0
  56. data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_error.scss +29 -0
  57. data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_expect.scss +6 -0
  58. data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_not-to.scss +5 -0
  59. data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_should.scss +6 -0
  60. data/vendor/assets/stylesheets/bootcamp/dist/core/functions/_to.scss +5 -0
  61. data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_describe.scss +31 -0
  62. data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_it.scss +31 -0
  63. data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_runner.scss +28 -0
  64. data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_should.scss +46 -0
  65. data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_xdescribe.scss +9 -0
  66. data/vendor/assets/stylesheets/bootcamp/dist/core/mixins/_xit.scss +9 -0
  67. data/vendor/assets/stylesheets/bootcamp/dist/core/variables/_helpers.scss +5 -0
  68. data/vendor/assets/stylesheets/bootcamp/dist/core/variables/_settings.scss +2 -0
  69. data/vendor/assets/stylesheets/bootcamp/dist/core/variables/_should.scss +6 -0
  70. data/vendor/assets/stylesheets/bootcamp/dist/core/variables/_trackers.scss +6 -0
  71. data/vendor/assets/stylesheets/bootcamp/dist/lib/_sassyjson.scss +1075 -0
  72. data/vendor/assets/stylesheets/bootcamp/dist/matchers/_be.scss +3 -0
  73. data/vendor/assets/stylesheets/bootcamp/dist/matchers/_equal.scss +3 -0
  74. data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_be-empty.scss +3 -0
  75. data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_be-longer-than.scss +3 -0
  76. data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_be-shorter-than.scss +3 -0
  77. data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_contain.scss +3 -0
  78. data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_deep-contain.scss +3 -0
  79. data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_deep-equal.scss +47 -0
  80. data/vendor/assets/stylesheets/bootcamp/dist/matchers/lists/_have-length-of.scss +3 -0
  81. data/vendor/assets/stylesheets/bootcamp/dist/matchers/numbers/_be-close-to.scss +12 -0
  82. data/vendor/assets/stylesheets/bootcamp/dist/matchers/numbers/_be-greater-than.scss +12 -0
  83. data/vendor/assets/stylesheets/bootcamp/dist/matchers/numbers/_be-less-than.scss +12 -0
  84. data/vendor/assets/stylesheets/bootcamp/dist/matchers/types/_be-falsy.scss +3 -0
  85. data/vendor/assets/stylesheets/bootcamp/dist/matchers/types/_be-null.scss +3 -0
  86. data/vendor/assets/stylesheets/bootcamp/dist/matchers/types/_be-truthy.scss +3 -0
  87. data/vendor/assets/stylesheets/bootcamp/dist/matchers/types/_have-type-of.scss +3 -0
  88. data/vendor/assets/stylesheets/bootcamp/dist/utils/_contain.scss +15 -0
  89. data/vendor/assets/stylesheets/bootcamp/dist/utils/_equal.scss +23 -0
  90. data/vendor/assets/stylesheets/bootcamp/dist/utils/_list-join.scss +35 -0
  91. data/vendor/assets/stylesheets/bootcamp/dist/utils/_power.scss +15 -0
  92. data/vendor/assets/stylesheets/bootcamp/package.json +63 -0
  93. data/vendor/assets/stylesheets/bootcamp/tasks/bootcamp.coffee +83 -0
  94. data/vendor/assets/stylesheets/bootcamp/test/core/functions/_actual.scss +10 -0
  95. data/vendor/assets/stylesheets/bootcamp/test/core/functions/_expect.scss +6 -0
  96. data/vendor/assets/stylesheets/bootcamp/test/core/functions/_not-to.scss +5 -0
  97. data/vendor/assets/stylesheets/bootcamp/test/core/functions/_should.scss +10 -0
  98. data/vendor/assets/stylesheets/bootcamp/test/core/functions/_to.scss +5 -0
  99. data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_describe.scss +11 -0
  100. data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_it.scss +5 -0
  101. data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_should.scss +5 -0
  102. data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_xdescribe.scss +28 -0
  103. data/vendor/assets/stylesheets/bootcamp/test/core/mixins/_xit.scss +12 -0
  104. data/vendor/assets/stylesheets/bootcamp/test/matchers/_be.scss +90 -0
  105. data/vendor/assets/stylesheets/bootcamp/test/matchers/_equal.scss +33 -0
  106. data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_be-empty.scss +12 -0
  107. data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_be-longer-than.scss +29 -0
  108. data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_be-shorter-than.scss +29 -0
  109. data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_contain.scss +39 -0
  110. data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_deep-contain.scss +51 -0
  111. data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_deep-equal.scss +151 -0
  112. data/vendor/assets/stylesheets/bootcamp/test/matchers/lists/_have-length-of.scss +31 -0
  113. data/vendor/assets/stylesheets/bootcamp/test/matchers/numbers/_be-close-to.scss +24 -0
  114. data/vendor/assets/stylesheets/bootcamp/test/matchers/numbers/_be-greater-than.scss +16 -0
  115. data/vendor/assets/stylesheets/bootcamp/test/matchers/numbers/_be-less-than.scss +16 -0
  116. data/vendor/assets/stylesheets/bootcamp/test/matchers/types/_be-falsy.scss +14 -0
  117. data/vendor/assets/stylesheets/bootcamp/test/matchers/types/_be-null.scss +13 -0
  118. data/vendor/assets/stylesheets/bootcamp/test/matchers/types/_be-truthy.scss +13 -0
  119. data/vendor/assets/stylesheets/bootcamp/test/matchers/types/_have-type-of.scss +17 -0
  120. data/vendor/assets/stylesheets/bootcamp/test/specs.scss +45 -0
  121. data/vendor/assets/stylesheets/bootcamp/test/utils/_contain.scss +41 -0
  122. data/vendor/assets/stylesheets/bootcamp/test/utils/_equal.scss +79 -0
  123. data/vendor/assets/stylesheets/bootcamp/test/utils/_list-join.scss +39 -0
  124. data/vendor/assets/stylesheets/bootcamp/test/utils/_power.scss +13 -0
  125. data/vendor/assets/stylesheets/helper/_base-helper.css.sass +133 -0
  126. data/vendor/assets/stylesheets/helper/_click-actions.css.sass +188 -0
  127. data/vendor/assets/stylesheets/helper/_fade-actions.css.sass +30 -0
  128. data/vendor/assets/stylesheets/helper/_margin-padding.css.sass +16 -0
  129. data/vendor/assets/stylesheets/helper/_typoglaphy.css.sass +9 -0
  130. data/vendor/assets/stylesheets/options/amazlet/_amazlet.css.sass +32 -0
  131. data/vendor/assets/stylesheets/options/glitch/_glitch.css.sass +31 -0
  132. data/vendor/assets/stylesheets/options/oulu-buttons/_button-basic.css.sass +31 -0
  133. data/vendor/assets/stylesheets/options/web-fonts/_cousine.css.sass +12 -0
  134. data/vendor/assets/stylesheets/options/web-fonts/_font-awsome.css.sass +8 -0
  135. data/vendor/assets/stylesheets/options/web-fonts/_icomoon.css.sass +10 -0
  136. data/vendor/assets/stylesheets/options/web-fonts/_lato.css.sass +12 -0
  137. data/vendor/assets/stylesheets/options/web-fonts/_montserrat.css.sass +13 -0
  138. data/vendor/assets/stylesheets/options/web-fonts/_old-standard.css.sass +12 -0
  139. data/vendor/assets/stylesheets/options/web-fonts/_open-sans.css.sass +11 -0
  140. data/vendor/assets/stylesheets/options/web-fonts/_podkova.css.sass +12 -0
  141. data/vendor/assets/stylesheets/options/web-fonts/_pt-sans.css.sass +12 -0
  142. data/vendor/assets/stylesheets/options/web-fonts/_roboto.css.sass +11 -0
  143. data/vendor/assets/stylesheets/options/web-fonts/_satisfy.css.sass +13 -0
  144. data/vendor/assets/stylesheets/options/web-fonts/_source-code-pro.css.sass +13 -0
  145. data/vendor/assets/stylesheets/options/web-fonts/_source-sans-pro.css.sass +13 -0
  146. data/vendor/assets/stylesheets/options/web-fonts/_special-elite.css.sass +12 -0
  147. data/vendor/assets/stylesheets/options/web-fonts/_tauri.css.sass +11 -0
  148. data/vendor/assets/stylesheets/options/web-fonts/_ubuntu.css.sass +12 -0
  149. data/vendor/assets/stylesheets/settings/functions/_background.css.sass +60 -0
  150. data/vendor/assets/stylesheets/settings/functions/_bool.css.sass +5 -0
  151. data/vendor/assets/stylesheets/settings/functions/_border.css.sass +47 -0
  152. data/vendor/assets/stylesheets/settings/functions/_color.css.sass +65 -0
  153. data/vendor/assets/stylesheets/settings/functions/_content.css.sass +5 -0
  154. data/vendor/assets/stylesheets/settings/functions/_cursor.css.sass +5 -0
  155. data/vendor/assets/stylesheets/settings/functions/_direction.css.sass +8 -0
  156. data/vendor/assets/stylesheets/settings/functions/_image.css.sass +8 -0
  157. data/vendor/assets/stylesheets/settings/functions/_length.css.sass +20 -0
  158. data/vendor/assets/stylesheets/settings/functions/_list.css.sass +11 -0
  159. data/vendor/assets/stylesheets/settings/functions/_map.css.sass +5 -0
  160. data/vendor/assets/stylesheets/settings/functions/_number.css.sass +63 -0
  161. data/vendor/assets/stylesheets/settings/functions/_position.css.sass +47 -0
  162. data/vendor/assets/stylesheets/settings/functions/_reverse.css.sass +22 -0
  163. data/vendor/assets/stylesheets/settings/functions/_string.css.sass +5 -0
  164. data/vendor/assets/stylesheets/settings/functions/_text.css.sass +34 -0
  165. data/vendor/assets/stylesheets/settings/initializers/_reset.css.sass +85 -0
  166. data/vendor/assets/stylesheets/settings/mixins/_animation.css.sass +15 -0
  167. data/vendor/assets/stylesheets/settings/mixins/_background.css.sass +33 -0
  168. data/vendor/assets/stylesheets/settings/mixins/_balloon-tale.css.sass +111 -0
  169. data/vendor/assets/stylesheets/settings/mixins/_basic-font.css.sass +40 -0
  170. data/vendor/assets/stylesheets/settings/mixins/_block.css.sass +30 -0
  171. data/vendor/assets/stylesheets/settings/mixins/_border.css.sass +28 -0
  172. data/vendor/assets/stylesheets/settings/mixins/_button-base.css.sass +27 -0
  173. data/vendor/assets/stylesheets/settings/mixins/_clear-type.css.sass +4 -0
  174. data/vendor/assets/stylesheets/settings/mixins/_color.css.sass +9 -0
  175. data/vendor/assets/stylesheets/settings/mixins/_filters.css.sass +5 -0
  176. data/vendor/assets/stylesheets/settings/mixins/_form.css.sass +7 -0
  177. data/vendor/assets/stylesheets/settings/mixins/_grids.css.sass +149 -0
  178. data/vendor/assets/stylesheets/settings/mixins/_html5-input-types.scss +118 -0
  179. data/vendor/assets/stylesheets/settings/mixins/_ie-hacks.css.sass +8 -0
  180. data/vendor/assets/stylesheets/settings/mixins/_lines.css.sass +18 -0
  181. data/vendor/assets/stylesheets/settings/mixins/_link.css.sass +11 -0
  182. data/vendor/assets/stylesheets/settings/mixins/_list.css.sass +21 -0
  183. data/vendor/assets/stylesheets/settings/mixins/_margin-padding.css.sass +69 -0
  184. data/vendor/assets/stylesheets/settings/mixins/_overlay.css.sass +5 -0
  185. data/vendor/assets/stylesheets/settings/mixins/_positions.css.sass +28 -0
  186. data/vendor/assets/stylesheets/settings/mixins/_rem.css.sass +53 -0
  187. data/vendor/assets/stylesheets/settings/mixins/_resets.css.sass +17 -0
  188. data/vendor/assets/stylesheets/settings/mixins/_responsive-utilities.css.sass +160 -0
  189. data/vendor/assets/stylesheets/settings/mixins/_sassmatic.css.sass +172 -0
  190. data/vendor/assets/stylesheets/settings/mixins/_sprite-background.css.sass +18 -0
  191. data/vendor/assets/stylesheets/settings/mixins/_tables.css.sass +14 -0
  192. data/vendor/assets/stylesheets/settings/mixins/_text.css.sass +21 -0
  193. data/vendor/assets/stylesheets/settings/variables/_default.css.sass +69 -0
  194. metadata +362 -0
@@ -0,0 +1,52 @@
1
+ Bootcamp [![NPM version](https://badge.fury.io/js/bootcamp.png)](http://badge.fury.io/js/bootcamp) [![Build Status](https://travis-ci.org/thejameskyle/bootcamp.png?branch=master)](https://travis-ci.org/thejameskyle/bootcamp) [![Dependency Status](https://david-dm.org/thejameskyle/bootcamp.png)](https://david-dm.org/thejameskyle/bootcamp) [![devDependency Status](https://david-dm.org/thejameskyle/bootcamp/dev-status.png)](https://david-dm.org/thejameskyle/bootcamp#info=devDependencies)
2
+ ========
3
+
4
+ Jasmine-style BDD testing written in Sass for Sass.
5
+
6
+ #### [Read Introduction >](https://github.com/thejameskyle/bootcamp/wiki/Introduction)
7
+
8
+ #### [Read Setup >](https://github.com/thejameskyle/bootcamp/wiki/Setup)
9
+
10
+ #### [See Example Test Suite >](https://github.com/thejameskyle/bootcamp/wiki/Example-Test-Suite)
11
+
12
+ #### [Authoring Matchers >](https://github.com/thejameskyle/bootcamp/wiki/Authoring-Matchers)
13
+
14
+ ## Install
15
+
16
+ In the future, Bootcamp will hopefully be available in more ways, for now you can either clone the repo yourself, install via [bower](http://bower.io/), or install via [npm](https://npmjs.org/) as a grunt plugin. If you would like, please help create a [yeoman generator](http://yeoman.io/), a [ruby gem](http://rubygems.org/), or any other package manager you'd like out there.
17
+
18
+ #### Git
19
+
20
+ ```
21
+ git clone git@github.com:thejameskyle/bootcamp.git && cd bootcamp
22
+ ```
23
+
24
+ #### Bower
25
+
26
+ ```
27
+ bower install bootcamp --save-dev
28
+ ```
29
+
30
+ #### npm
31
+
32
+ ```
33
+ npm install bootcamp --save-dev
34
+ ```
35
+
36
+ ## Support
37
+
38
+ Have a question or need help? Tweet [@thejameskyle](https://twitter.com/thejameskyle).
39
+
40
+ ## Contributing
41
+
42
+ As an open-source project, contributions are more than welcome, they're extremely helpful and actively encouraged. If you see any room for improvement, open an [issue](https://github.com/thejameskyle/bootcamp/issues) or submit a [pull request](https://github.com/thejameskyle/bootcamp/pulls). Also make sure to take a look at the [contributing doc](CONTRIBUTING.md).
43
+
44
+ ## License
45
+
46
+ This project is provided under the terms of the [MIT License](LICENSE.md).
47
+
48
+ ---
49
+
50
+ Authored by **James Kyle** · [Github](https://github.com/thejameskyle) · [Twitter](https://twitter.com/thejameskyle) · [CodePen](https://codepen.com/thejameskyle)
51
+
52
+ [Built Equal >](http://www.hrc.org/donate) · [Made in Boston >](http://bostonbuilt.org/)
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "bootcamp",
3
+ "version": "1.1.7",
4
+ "homepage": "http://github.com/thejameskyle/bootcamp",
5
+ "main": "dist/bootcamp.scss",
6
+ "ignore": [
7
+ "test",
8
+ ".editorconfig",
9
+ ".gitattributes",
10
+ ".gitignore",
11
+ ".jshintrc",
12
+ ".travis.yml",
13
+ "Gruntfile.coffee"
14
+ ]
15
+ }
@@ -0,0 +1,46 @@
1
+ @import "lib/sassyjson";
2
+
3
+ @import "core/variables/settings";
4
+
5
+ @import "core/variables/helpers";
6
+ @import "core/variables/should";
7
+ @import "core/variables/trackers";
8
+
9
+ @import "core/mixins/describe";
10
+ @import "core/mixins/it";
11
+ @import "core/mixins/runner";
12
+ @import "core/mixins/should";
13
+ @import "core/mixins/xdescribe";
14
+ @import "core/mixins/xit";
15
+
16
+ @import "core/functions/actual";
17
+ @import "core/functions/error";
18
+ @import "core/functions/expect";
19
+ @import "core/functions/not-to";
20
+ @import "core/functions/should";
21
+ @import "core/functions/to";
22
+
23
+ @import "utils/contain";
24
+ @import "utils/equal";
25
+ @import "utils/list-join";
26
+ @import "utils/power";
27
+
28
+ @import "matchers/be";
29
+ @import "matchers/equal";
30
+
31
+ @import "matchers/lists/be-empty";
32
+ @import "matchers/lists/be-longer-than";
33
+ @import "matchers/lists/be-shorter-than";
34
+ @import "matchers/lists/contain";
35
+ @import "matchers/lists/deep-contain";
36
+ @import "matchers/lists/deep-equal";
37
+ @import "matchers/lists/have-length-of";
38
+
39
+ @import "matchers/numbers/be-close-to";
40
+ @import "matchers/numbers/be-greater-than";
41
+ @import "matchers/numbers/be-less-than";
42
+
43
+ @import "matchers/types/be-falsy";
44
+ @import "matchers/types/be-null";
45
+ @import "matchers/types/be-truthy";
46
+ @import "matchers/types/have-type-of";
@@ -0,0 +1,101 @@
1
+ 'use strict'
2
+
3
+ fs = require 'fs'
4
+
5
+ module.exports =
6
+ test: (filepath) ->
7
+ error = null
8
+
9
+ file = fs.readFileSync filepath, 'utf8'
10
+
11
+ ###
12
+ # Get Camp
13
+ ###
14
+
15
+ camp = file.match /\/\* >> Bootcamp >> \*\/((.|\n|\r)*)\/\* << Bootcamp << \*\//
16
+
17
+ unless camp?
18
+ return incomplete: true, error: 'No Test Suite Found'
19
+ else
20
+ camp = camp[1]
21
+
22
+ ###
23
+ # Get Results
24
+ ###
25
+
26
+ results = camp.match /Test Results \{((.|\n|\r)*)\}/
27
+
28
+ unless results?
29
+ return incomplete: true, error: 'No Test Results Found'
30
+ else
31
+ results = results[1]
32
+
33
+ ###
34
+ # Get Specs
35
+ ###
36
+
37
+ specs = camp.replace( results, '' ).replace( /Test Results \{\}|\{|\}|;|:/g, '' )
38
+
39
+ ###
40
+ # method: getProperty
41
+ ###
42
+
43
+ getProperty = (property, force) ->
44
+ values = results.match new RegExp property + ': ((.|\n|\r)*?);', 'g'
45
+ property = []
46
+
47
+ if force and !values? then return property
48
+
49
+ unless values?
50
+ error = incomplete: true, error: "No #{property} Found"
51
+ return false
52
+ else
53
+ for value in values
54
+ value = value.replace(/;/, '')
55
+ value = value.replace(/(.*:)/, '')
56
+ value = value.trim()
57
+ value = parseInt value unless isNaN value
58
+ property.push value
59
+
60
+ return property
61
+
62
+ ###
63
+ # Get Properties
64
+ ###
65
+
66
+ success = getProperty('Success').indexOf('true') > -1
67
+ stats = getProperty 'Stats'
68
+ tests = getProperty 'Tests'
69
+ asserts = getProperty 'Asserts'
70
+ passed = getProperty 'Passed'
71
+ failed = getProperty 'Failed'
72
+ skipped = getProperty 'Skipped'
73
+ errors = getProperty 'Error', true
74
+
75
+ ###
76
+ # Return Any Errors
77
+ ###
78
+
79
+ return error if error
80
+
81
+ ###
82
+ # Return Final Values
83
+ ###
84
+
85
+ return {
86
+ camp: camp
87
+ results: results
88
+ specs: specs
89
+
90
+ success: success
91
+ stats: stats
92
+ details: "#{tests} Tests, #{asserts} assertions, #{failed} failures, #{skipped} skipped"
93
+
94
+ tests: tests
95
+ asserts: asserts
96
+ passed: passed
97
+ failed: failed
98
+ skipped: skipped
99
+
100
+ errors: errors
101
+ }
@@ -0,0 +1,3 @@
1
+ @function actual() {
2
+ @return $bc-actual;
3
+ }
@@ -0,0 +1,29 @@
1
+ @function error($type, $message) {
2
+ $title: null;
3
+
4
+ @if $type == "type" {
5
+ $title: "TYPE ERROR";
6
+ }
7
+
8
+ @else if $type == "warn" {
9
+ $title: "WARNING"
10
+ }
11
+
12
+ @else if $type == "dep" {
13
+ $title: "DEPRECATED"
14
+ }
15
+
16
+ @else if $type == "fatal" {
17
+ $bc-error: true !global;
18
+ $title: "FATAL ERROR";
19
+ }
20
+
21
+ @else {
22
+ $bc-error: true !global;
23
+ $title: "ERROR";
24
+ }
25
+
26
+ $bc-error-text: "!#{$title}! #{$message}." !global;
27
+
28
+ @return false;
29
+ }
@@ -0,0 +1,6 @@
1
+ @function expect($this) {
2
+ $bc-actual: $this !global;
3
+ $bc-actual-text: "Expected" !global;
4
+
5
+ @return null;
6
+ }
@@ -0,0 +1,5 @@
1
+ @function not-to($this) {
2
+ $bc-expect-text: "not to " + $bc-expect-text !global;
3
+
4
+ @return not $this;
5
+ }
@@ -0,0 +1,6 @@
1
+ @function should($be, $something, $when) {
2
+ $bc-expect: $something !global;
3
+ $bc-expect-text: $be !global;
4
+
5
+ @return $when;
6
+ }
@@ -0,0 +1,5 @@
1
+ @function to($this) {
2
+ $bc-expect-text: "to " + $bc-expect-text !global;
3
+
4
+ @return $this;
5
+ }
@@ -0,0 +1,31 @@
1
+ @mixin describe($bc-describe-new) {
2
+ @if not $bc-skipping {
3
+ $bc-describe-old: $bc-describe !global !default;
4
+ $bc-describe-old: append($bc-describe-old, $bc-describe-new) !global;
5
+
6
+ @if $bc-describe-depth > 0 {
7
+ $bc-describe: bc-util-list-join($bc-describe-old, " ", 2) !global;
8
+ } @else {
9
+ $bc-describe: "#{$bc-describe-new}" !global;
10
+ }
11
+
12
+ $bc-describe-depth: $bc-describe-depth + 1 !global;
13
+
14
+ @content;
15
+
16
+ $bc-describe: "" !global;
17
+
18
+ $_tmp: ();
19
+
20
+ @for $i from 1 through $bc-describe-depth {
21
+ $_tmp: append($_tmp, nth($bc-describe-old, $i));
22
+ }
23
+
24
+ $bc-describe-old: $_tmp !global;
25
+ $bc-describe: nth($bc-describe-old, 1) !global;
26
+ $bc-describe-depth: $bc-describe-depth - 1 !global;
27
+
28
+ } @else {
29
+ @content;
30
+ }
31
+ }
@@ -0,0 +1,31 @@
1
+ @mixin it($statement) {
2
+ $bc-total: $bc-total + 1 !global;
3
+
4
+ @if not $bc-skipping {
5
+ $bc-passing: true !global;
6
+
7
+ #{$bc-describe} #{$statement} {
8
+ @content;
9
+
10
+ @if $bc-passing {
11
+ @if $bc-setting-verbose {
12
+ Test: Passed;
13
+ }
14
+
15
+ $bc-stats: "#{$bc-stats} ✔" !global;
16
+ $bc-passed: $bc-passed + 1 !global;
17
+ }
18
+
19
+ @else {
20
+ Test: Failed;
21
+
22
+ $bc-stats: "#{$bc-stats} ✗" !global;
23
+ $bc-failed: $bc-failed + 1 !global;
24
+ }
25
+ }
26
+
27
+ $bc-passing: null !global;
28
+ } @else {
29
+ $bc-skipped: $bc-skipped + 1 !global;
30
+ }
31
+ }
@@ -0,0 +1,28 @@
1
+ @mixin runner-start {
2
+ /* >> Bootcamp >> */
3
+ }
4
+
5
+ @mixin runner-end {
6
+
7
+ @if $bc-total == 0 {
8
+ $bc-stats: "No tests were found" !global;
9
+ }
10
+
11
+ Test Results {
12
+ Success: $bc-failed == 0;
13
+ Stats: #{ $bc-stats };
14
+ Tests: #{ $bc-total };
15
+ Asserts: #{ $bc-asserts };
16
+ Passed: #{ $bc-passed };
17
+ Failed: #{ $bc-failed };
18
+ Skipped: #{ $bc-skipped };
19
+
20
+ @if $bc-errors != () and $bc-setting-warnings {
21
+ @each $error in $bc-errors {
22
+ Error: #{$error};
23
+ }
24
+ }
25
+ }
26
+
27
+ /* << Bootcamp << */
28
+ }
@@ -0,0 +1,46 @@
1
+ @mixin should($actual, $expect) {
2
+ @if $bc-error {
3
+ $expect: false !global;
4
+ }
5
+
6
+ $bc-asserts: $bc-asserts + 1 !global;
7
+
8
+ $bc-actual: json-encode($bc-actual) !global;
9
+ $bc-expect: json-encode($bc-expect) !global;
10
+
11
+ @if not $expect {
12
+ $bc-passing: false !global;
13
+ }
14
+
15
+ @if not $expect or $bc-setting-verbose {
16
+ $status: " ✗";
17
+
18
+ @if $bc-passing {
19
+ $status: " ✔";
20
+ }
21
+
22
+ @if $bc-error-text {
23
+ #{$status}:
24
+ #{$bc-error-text}
25
+ #{$bc-actual-text} #{$bc-actual}
26
+ #{$bc-expect-text} #{$bc-expect};
27
+ } @else {
28
+ #{$status}:
29
+ #{$bc-actual-text} #{$bc-actual}
30
+ #{$bc-expect-text} #{$bc-expect};
31
+ }
32
+ }
33
+
34
+ @if $bc-error-text {
35
+ @if not index($bc-errors, $bc-error-text) {
36
+ $bc-errors: append($bc-errors, $bc-error-text) !global;
37
+ }
38
+ }
39
+
40
+ $bc-actual-text: null !global;
41
+ $bc-expect-text: null !global;
42
+ $bc-actual: null !global;
43
+ $bc-expect: null !global;
44
+ $bc-error-text: null !global;
45
+ $bc-error: false !global;
46
+ }
@@ -0,0 +1,9 @@
1
+ @mixin xdescribe($statement) {
2
+ $bc-skipping: true !global;
3
+
4
+ @include describe($statement) {
5
+ @content;
6
+ }
7
+
8
+ $bc-skipping: false !global;
9
+ }
@@ -0,0 +1,9 @@
1
+ @mixin xit($statement) {
2
+ $bc-skipping: true !global;
3
+
4
+ @include it($statement) {
5
+ @content;
6
+ }
7
+
8
+ $bc-skipping: false !global;
9
+ }
@@ -0,0 +1,5 @@
1
+ $bc-describe: "It";
2
+ $bc-describe-depth: 0;
3
+ $bc-passing: null;
4
+ $bc-skipping: false;
5
+ $bc-errors: ();
@@ -0,0 +1,2 @@
1
+ $bc-setting-verbose: false !default;
2
+ $bc-setting-warnings: false !default;
@@ -0,0 +1,6 @@
1
+ $bc-actual: null;
2
+ $bc-actual-text: null;
3
+ $bc-expect-text: null;
4
+ $bc-expect: null;
5
+ $bc-error-text: null;
6
+ $bc-error: false;
@@ -0,0 +1,6 @@
1
+ $bc-total: 0;
2
+ $bc-asserts: 0;
3
+ $bc-passed: 0;
4
+ $bc-failed: 0;
5
+ $bc-skipped: 0;
6
+ $bc-stats: "";