ende 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (314) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-gemset +1 -0
  3. data/.ruby-version +1 -0
  4. data/build/build.css +112 -0
  5. data/build/build.js +36465 -0
  6. data/component.json +11 -15
  7. data/components/chaijs/assertion-error/1.0.0/component.json +18 -0
  8. data/components/chaijs/chai/1.9.1/.gitignore +22 -0
  9. data/components/chaijs/chai/1.9.1/.mailmap +1 -0
  10. data/components/chaijs/chai/1.9.1/.npmignore +14 -0
  11. data/components/chaijs/chai/1.9.1/.travis.yml +14 -0
  12. data/components/chaijs/chai/1.9.1/CONTRIBUTING.md +173 -0
  13. data/components/chaijs/chai/1.9.1/History.md +895 -0
  14. data/components/chaijs/chai/1.9.1/Makefile +93 -0
  15. data/components/chaijs/chai/1.9.1/README.md +99 -0
  16. data/components/chaijs/chai/1.9.1/ReleaseNotes.md +482 -0
  17. data/components/chaijs/chai/1.9.1/bower.json +27 -0
  18. data/components/chaijs/chai/1.9.1/chai.js +4782 -0
  19. data/components/chaijs/chai/1.9.1/component.json +50 -0
  20. data/components/chaijs/chai/1.9.1/karma.conf.js +28 -0
  21. data/components/chaijs/chai/1.9.1/karma.sauce.js +41 -0
  22. data/components/chaijs/chai/1.9.1/lib/chai/assertion.js +130 -0
  23. data/components/chaijs/chai/1.9.1/lib/chai/config.js +50 -0
  24. data/components/chaijs/chai/1.9.1/lib/chai/core/assertions.js +1314 -0
  25. data/components/chaijs/chai/1.9.1/lib/chai/interface/assert.js +1056 -0
  26. data/components/chaijs/chai/1.9.1/lib/chai/interface/expect.js +12 -0
  27. data/components/chaijs/chai/1.9.1/lib/chai/interface/should.js +78 -0
  28. data/components/chaijs/chai/1.9.1/lib/chai/utils/addChainableMethod.js +111 -0
  29. data/components/chaijs/chai/1.9.1/lib/chai/utils/addMethod.js +43 -0
  30. data/components/chaijs/chai/1.9.1/lib/chai/utils/addProperty.js +40 -0
  31. data/components/chaijs/chai/1.9.1/lib/chai/utils/flag.js +32 -0
  32. data/components/chaijs/chai/1.9.1/lib/chai/utils/getActual.js +18 -0
  33. data/components/chaijs/chai/1.9.1/lib/chai/utils/getEnumerableProperties.js +25 -0
  34. data/components/chaijs/chai/1.9.1/lib/chai/utils/getMessage.js +49 -0
  35. data/components/chaijs/chai/1.9.1/lib/chai/utils/getName.js +20 -0
  36. data/components/chaijs/chai/1.9.1/lib/chai/utils/getPathValue.js +102 -0
  37. data/components/chaijs/chai/1.9.1/lib/chai/utils/getProperties.js +35 -0
  38. data/components/chaijs/chai/1.9.1/lib/chai/utils/index.js +114 -0
  39. data/components/chaijs/chai/1.9.1/lib/chai/utils/objDisplay.js +49 -0
  40. data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteChainableMethod.js +53 -0
  41. data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteMethod.js +51 -0
  42. data/components/chaijs/chai/1.9.1/lib/chai/utils/overwriteProperty.js +54 -0
  43. data/components/chaijs/chai/1.9.1/lib/chai/utils/test.js +26 -0
  44. data/components/chaijs/chai/1.9.1/lib/chai/utils/transferFlags.js +44 -0
  45. data/components/chaijs/chai/1.9.1/lib/chai/utils/type.js +45 -0
  46. data/components/chaijs/chai/1.9.1/lib/chai.js +87 -0
  47. data/components/chaijs/chai/1.9.1/package.json +42 -0
  48. data/components/chaijs/chai/1.9.1/sauce.browsers.js +128 -0
  49. data/components/chaijs/chai/1.9.1/support/sauce/sauce_connect_block.sh +7 -0
  50. data/components/chaijs/chai/1.9.1/support/sauce/sauce_connect_setup.sh +53 -0
  51. data/components/chaijs/chai/1.9.1/test/assert.js +638 -0
  52. data/components/chaijs/chai/1.9.1/test/bootstrap/index.js +22 -0
  53. data/components/chaijs/chai/1.9.1/test/bootstrap/karma.js +22 -0
  54. data/components/chaijs/chai/1.9.1/test/configuration.js +133 -0
  55. data/components/chaijs/chai/1.9.1/test/display/errors.js +14 -0
  56. data/components/chaijs/chai/1.9.1/test/display/message.js +47 -0
  57. data/components/chaijs/chai/1.9.1/test/expect.js +814 -0
  58. data/components/chaijs/chai/1.9.1/test/globalShould.js +15 -0
  59. data/components/chaijs/chai/1.9.1/test/plugins.js +24 -0
  60. data/components/chaijs/chai/1.9.1/test/should.js +744 -0
  61. data/components/chaijs/chai/1.9.1/test/utilities.js +309 -0
  62. data/components/chaijs/deep-eql/0.1.3/component.json +20 -0
  63. data/components/chaijs/deep-eql/0.1.3/lib/eql.js +257 -0
  64. data/components/chaijs/type-detect/0.1.1/component.json +18 -0
  65. data/components/chaijs/type-detect/0.1.1/lib/type.js +142 -0
  66. data/{vendor/components/indefinido-indemma/components/component-bind → components/component/bind/0.0.1}/component.json +1 -1
  67. data/{vendor/components/component-classes → components/component/classes/1.1.2}/component.json +1 -1
  68. data/components/component/classes/1.2.1/component.json +19 -0
  69. data/components/component/classes/1.2.1/index.js +184 -0
  70. data/{vendor/components/component-css → components/component/css/0.0.2}/component.json +2 -2
  71. data/{vendor/components/component-delegate → components/component/delegate/0.1.0}/component.json +2 -2
  72. data/components/component/dialog/0.2.0/component.json +35 -0
  73. data/{vendor/components/component-dialog → components/component/dialog/0.2.0}/index.js +74 -40
  74. data/components/component/dialog/0.2.0/template.html +9 -0
  75. data/{vendor/components/component-dom → components/component/dom/0.7.1}/component.json +6 -4
  76. data/{vendor/components/component-domify → components/component/domify/1.0.0}/component.json +6 -4
  77. data/components/component/domify/1.2.2/component.json +22 -0
  78. data/components/component/domify/1.2.2/index.js +87 -0
  79. data/{vendor/components/component-emitter → components/component/emitter/1.0.0}/component.json +1 -1
  80. data/{vendor/components/component-event → components/component/event/0.1.0}/component.json +3 -3
  81. data/components/component/event/0.1.0/index.js +40 -0
  82. data/components/component/event/0.1.3/component.json +13 -0
  83. data/{vendor/components/component-event → components/component/event/0.1.3}/index.js +3 -5
  84. data/{vendor/components/component-indexof → components/component/indexof/0.0.1}/component.json +1 -1
  85. data/{vendor/components/indefinido-indemma/components/component-jquery → components/component/jquery/1.9.1}/component.json +1 -1
  86. data/{vendor/components/component-matches-selector → components/component/matches-selector/0.1.2}/component.json +6 -4
  87. data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/component.json +1 -1
  88. data/{vendor/components/component-query → components/component/query/0.0.1}/component.json +6 -4
  89. data/components/component/query/0.0.3/component.json +23 -0
  90. data/components/component/query/0.0.3/index.js +21 -0
  91. data/{vendor/components/component-querystring → components/component/querystring/1.3.0}/component.json +4 -3
  92. data/{vendor/components/component-querystring → components/component/querystring/1.3.0}/index.js +26 -2
  93. data/{vendor/components/component-sort → components/component/sort/0.0.3}/component.json +2 -2
  94. data/{vendor/components/component-trim → components/component/trim/0.0.1}/component.json +1 -1
  95. data/{vendor/components/indefinido-indemma/components/component-type → components/component/type/1.0.0}/component.json +4 -2
  96. data/{vendor/components/component-value → components/component/value/1.1.0}/component.json +6 -4
  97. data/{vendor/components/components-modernizr → components/components/modernizr/2.6.2}/component.json +2 -3
  98. data/{vendor/components/indefinido-indemma/components/indefinido-advisable → components/indefinido/advisable/master}/component.json +2 -2
  99. data/components/indefinido/indemma/master/History.md +0 -0
  100. data/components/indefinido/indemma/master/build/build.js +26288 -0
  101. data/components/indefinido/indemma/master/build/development.js +22200 -0
  102. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/build/release.js +264 -273
  103. data/components/indefinido/indemma/master/build/test.js +22200 -0
  104. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/component.json +6 -6
  105. data/components/indefinido/indemma/master/components/chaijs-assertion-error/index.js +110 -0
  106. data/components/indefinido/indemma/master/components/chaijs-chai/index.js +1 -0
  107. data/components/indefinido/indemma/master/components/chaijs-chai/lib/chai/utils/inspect.js +320 -0
  108. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/associable.js +2 -14
  109. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/rest.js +2 -7
  110. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/restfulable.js +9 -33
  111. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/scopable.js +45 -16
  112. data/components/indefinido/indemma/master/lib/record/validatable.js +1100 -0
  113. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/associable_spec.js +2 -3
  114. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/scopable_spec.js +53 -83
  115. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/cpf_spec.js +6 -5
  116. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/associable.coffee +0 -6
  117. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/persistable.coffee +0 -2
  118. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/queryable.coffee +2 -1
  119. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/resource.coffee +2 -3
  120. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/rest.coffee +1 -7
  121. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/restfulable.coffee +8 -34
  122. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/scopable.coffee +31 -32
  123. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validatable.coffee +1 -12
  124. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/associable_spec.coffee +2 -3
  125. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/scopable_spec.coffee +43 -76
  126. data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/cpf_spec.coffee +4 -3
  127. data/{vendor/components/mikeric-rivets → components/mikeric/rivets/v0.5.12}/component.json +2 -2
  128. data/{vendor/components/paulmillr-es6-shim → components/paulmillr/es6-shim/0.10.1}/component.json +11 -4
  129. data/components/paulmillr/es6-shim/0.10.1/es6-shim.js +1833 -0
  130. data/{vendor/components/pluma-assimilate → components/pluma/assimilate/0.3.0}/component.json +3 -3
  131. data/{vendor/components/segmentio-extend → components/segmentio/extend/1.0.0}/component.json +3 -3
  132. data/lib/assets/javascripts/aura/extensions/models.js.coffee.erb +14 -14
  133. data/lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee +1 -1
  134. data/lib/assets/javascripts/aura/extensions/rivets.js.coffee +3 -3
  135. data/lib/assets/javascripts/aura/extensions/stamps/stampit.js +568 -242
  136. data/lib/assets/javascripts/aura/extensions/widget/#composable.js.coffee# +135 -0
  137. data/lib/assets/javascripts/aura/extensions/widget/composable.js.coffee +2 -2
  138. data/lib/assets/javascripts/config/load_components.js.coffee +10 -10
  139. data/lib/assets/javascripts/ende.js.coffee +21 -18
  140. data/lib/assets/javascripts/widgets/support/adapters/olark.js +1 -4
  141. data/lib/assets/javascripts/widgets/viewer/main.js.coffee +8 -4
  142. data/lib/assets/javascripts/widgets/viewer/plugins/scopable.js.coffee +6 -7
  143. data/lib/ende/version.rb +1 -1
  144. data/vendor/assets/components/build.css +4 -3
  145. data/vendor/assets/components/ende_build.js +29772 -21943
  146. metadata +284 -217
  147. data/vendor/components/KapIT-observe-utils/component.json +0 -16
  148. data/vendor/components/KapIT-observe-utils/lib/observe-utils.js +0 -780
  149. data/vendor/components/component-dialog/component.json +0 -23
  150. data/vendor/components/component-dialog/template.js +0 -1
  151. data/vendor/components/indefinido-indemma/build/development.js +0 -343
  152. data/vendor/components/indefinido-indemma/build/test.js +0 -343
  153. data/vendor/components/indefinido-indemma/lib/record/validatable.js +0 -224
  154. data/vendor/components/indefinido-observable/component.json +0 -24
  155. data/vendor/components/indefinido-observable/index.js +0 -1
  156. data/vendor/components/indefinido-observable/lib/adapters/rivets.js +0 -28
  157. data/vendor/components/indefinido-observable/lib/observable.js +0 -390
  158. data/vendor/components/indefinido-observable/vendor/shims/accessors-legacy.js +0 -92
  159. data/vendor/components/indefinido-observable/vendor/shims/accessors.js +0 -248
  160. data/vendor/components/indefinido-observable/vendor/shims/array.indexOf.js +0 -8
  161. data/vendor/components/indefinido-observable/vendor/shims/object.create.js +0 -77
  162. data/vendor/components/paulmillr-es6-shim/es6-shim.js +0 -996
  163. /data/{vendor/components/indefinido-indemma/components/chaijs-assertion-error → components/chaijs/assertion-error/1.0.0}/index.js +0 -0
  164. /data/{vendor/components/indefinido-indemma/components/chaijs-chai → components/chaijs/chai/1.9.1}/index.js +0 -0
  165. /data/{vendor/components/indefinido-indemma/components/chaijs-chai → components/chaijs/chai/1.9.1}/lib/chai/utils/inspect.js +0 -0
  166. /data/{vendor/components/indefinido-indemma/History.md → components/chaijs/chai/1.9.1/test/auth/.gitkeep} +0 -0
  167. /data/{vendor/components/component-bind → components/component/bind/0.0.1}/index.js +0 -0
  168. /data/{vendor/components/component-classes → components/component/classes/1.1.2}/index.js +0 -0
  169. /data/{vendor/components/component-css → components/component/css/0.0.2}/index.js +0 -0
  170. /data/{vendor/components/component-delegate → components/component/delegate/0.1.0}/index.js +0 -0
  171. /data/{vendor/components/component-dialog → components/component/dialog/0.2.0}/dialog.css +0 -0
  172. /data/{vendor/components/component-dom → components/component/dom/0.7.1}/index.js +0 -0
  173. /data/{vendor/components/component-domify → components/component/domify/1.0.0}/index.js +0 -0
  174. /data/{vendor/components/component-emitter → components/component/emitter/1.0.0}/index.js +0 -0
  175. /data/{vendor/components/component-indexof → components/component/indexof/0.0.1}/index.js +0 -0
  176. /data/{vendor/components/component-jquery → components/component/jquery/1.9.1}/index.js +0 -0
  177. /data/{vendor/components/component-matches-selector → components/component/matches-selector/0.1.2}/index.js +0 -0
  178. /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/index.js +0 -0
  179. /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/overlay.css +0 -0
  180. /data/{vendor/components/component-overlay → components/component/overlay/0.1.1}/template.js +0 -0
  181. /data/{vendor/components/component-query → components/component/query/0.0.1}/index.js +0 -0
  182. /data/{vendor/components/component-sort → components/component/sort/0.0.3}/index.js +0 -0
  183. /data/{vendor/components/component-trim → components/component/trim/0.0.1}/index.js +0 -0
  184. /data/{vendor/components/component-type → components/component/type/1.0.0}/index.js +0 -0
  185. /data/{vendor/components/component-value → components/component/value/1.1.0}/index.js +0 -0
  186. /data/{vendor/components/components-modernizr → components/components/modernizr/2.6.2}/modernizr.js +0 -0
  187. /data/{vendor/components/indefinido-advisable → components/indefinido/advisable/master}/index.js +0 -0
  188. /data/{vendor/components/indefinido-advisable → components/indefinido/advisable/master}/lib/advisable.js +0 -0
  189. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.gitignore +0 -0
  190. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.ruby-gemset +0 -0
  191. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/.ruby-version +0 -0
  192. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Gemfile +0 -0
  193. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Guardfile +0 -0
  194. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/Readme.md +0 -0
  195. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-assertion-error/component.json +0 -0
  196. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/component.json +0 -0
  197. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/assertion.js +0 -0
  198. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/core/assertions.js +0 -0
  199. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/assert.js +0 -0
  200. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/expect.js +0 -0
  201. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/interface/should.js +0 -0
  202. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addChainableMethod.js +0 -0
  203. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addMethod.js +0 -0
  204. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/addProperty.js +0 -0
  205. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/eql.js +0 -0
  206. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/flag.js +0 -0
  207. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getActual.js +0 -0
  208. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getEnumerableProperties.js +0 -0
  209. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getMessage.js +0 -0
  210. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getName.js +0 -0
  211. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getPathValue.js +0 -0
  212. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/getProperties.js +0 -0
  213. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/index.js +0 -0
  214. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/objDisplay.js +0 -0
  215. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/overwriteMethod.js +0 -0
  216. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/overwriteProperty.js +0 -0
  217. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/test.js +0 -0
  218. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/transferFlags.js +0 -0
  219. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai/utils/type.js +0 -0
  220. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/chaijs-chai/lib/chai.js +0 -0
  221. /data/{vendor → components/indefinido/indemma/master}/components/component-bind/component.json +0 -0
  222. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-bind/index.js +0 -0
  223. /data/{vendor → components/indefinido/indemma/master}/components/component-jquery/component.json +0 -0
  224. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-jquery/index.js +0 -0
  225. /data/{vendor → components/indefinido/indemma/master}/components/component-type/component.json +0 -0
  226. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/component-type/index.js +0 -0
  227. /data/{vendor → components/indefinido/indemma/master}/components/indefinido-advisable/component.json +0 -0
  228. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-advisable/index.js +0 -0
  229. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-advisable/lib/advisable.js +0 -0
  230. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/component.json +0 -0
  231. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/components/cjohansen-sinon/sinon.js +0 -0
  232. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/index.js +0 -0
  233. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/lib/adapters/rivets.js +0 -0
  234. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/lib/observable.js +0 -0
  235. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/accessors-legacy.js +0 -0
  236. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/accessors.js +0 -0
  237. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/array.indexOf.js +0 -0
  238. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/indefinido-observable/vendor/shims/object.create.js +0 -0
  239. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/kapit-observe-utils/component.json +0 -0
  240. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/paulmillr-es6-shim/component.json +0 -0
  241. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/paulmillr-es6-shim/es6-shim.js +0 -0
  242. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/pluma-assimilate/component.json +0 -0
  243. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/components/pluma-assimilate/dist/assimilate.js +0 -0
  244. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/index.js +0 -0
  245. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/karma.conf.js +0 -0
  246. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/extensions/rivets.js +0 -0
  247. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/errors.js +0 -0
  248. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/maid.js +0 -0
  249. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/persistable.js +0 -0
  250. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/queryable.js +0 -0
  251. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/resource.js +0 -0
  252. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/storable.js +0 -0
  253. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/translationable.js +0 -0
  254. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/associated.js +0 -0
  255. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/confirmation.js +0 -0
  256. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/cpf.js +0 -0
  257. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/presence.js +0 -0
  258. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/remote.js +0 -0
  259. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/type.js +0 -0
  260. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record/validations/validatorable.js +0 -0
  261. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/lib/record.js +0 -0
  262. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/package.json +0 -0
  263. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/persistable_spec.js +0 -0
  264. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/queryable_spec.js +0 -0
  265. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/resource_spec.js +0 -0
  266. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/rest_spec.js +0 -0
  267. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/restfulable_spec.js +0 -0
  268. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/storable_spec.js +0 -0
  269. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/translationable.js +0 -0
  270. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validatable_spec.js +0 -0
  271. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/associated_spec.js +0 -0
  272. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/confirmation_spec.js +0 -0
  273. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/presence_spec.js +0 -0
  274. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/remote_spec.js +0 -0
  275. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record/validations/type_spec.js +0 -0
  276. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/record_spec.js +0 -0
  277. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/spec_helper.js +0 -0
  278. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/spec/support/value_objects/phone.js +0 -0
  279. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/extensions/rivets.coffee +0 -0
  280. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/errors.coffee +0 -0
  281. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/maid.coffee +0 -0
  282. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/storable.coffee +0 -0
  283. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/translationable.coffee +0 -0
  284. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/associated.coffee +0 -0
  285. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/confirmation.coffee +0 -0
  286. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/cpf.coffee +0 -0
  287. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/presence.coffee +0 -0
  288. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/remote.coffee +0 -0
  289. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/type.coffee +0 -0
  290. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record/validations/validatorable.coffee +0 -0
  291. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/lib/record.coffee +0 -0
  292. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/persistable_spec.coffee +0 -0
  293. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/queryable_spec.coffee +0 -0
  294. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/resource_spec.coffee +0 -0
  295. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/rest_spec.coffee +0 -0
  296. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/restfulable_spec.coffee +0 -0
  297. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/storable_spec.coffee +0 -0
  298. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/translationable.coffee +0 -0
  299. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validatable_spec.coffee +0 -0
  300. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/associated_spec.coffee +0 -0
  301. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/confirmation_spec.coffee +0 -0
  302. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/presence_spec.coffee +0 -0
  303. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/remote_spec.coffee +0 -0
  304. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record/validations/type_spec.coffee +0 -0
  305. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/record_spec.coffee +0 -0
  306. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/spec_helper.coffee +0 -0
  307. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/src/spec/support/value_objects/phone.coffee +0 -0
  308. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/object/mixin.js +0 -0
  309. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/owl/pluralize.js +0 -0
  310. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/sinon.js +0 -0
  311. /data/{vendor/components/indefinido-indemma → components/indefinido/indemma/master}/vendor/stampit.js +0 -0
  312. /data/{vendor/components/mikeric-rivets → components/mikeric/rivets/v0.5.12}/dist/rivets.js +0 -0
  313. /data/{vendor/components/pluma-assimilate → components/pluma/assimilate/0.3.0}/dist/assimilate.js +0 -0
  314. /data/{vendor/components/segmentio-extend → components/segmentio/extend/1.0.0}/index.js +0 -0
@@ -0,0 +1,1100 @@
1
+ // Generated by CoffeeScript 1.6.3
2
+ (function() {
3
+ var errorsable, extensions, initializers, manager, messages, observable, root, stampit, type;
4
+
5
+ require('./translationable');
6
+
7
+ root = typeof exports !== "undefined" && exports !== null ? exports : this;
8
+
9
+ stampit = require('../../vendor/stampit');
10
+
11
+ observable = require('observable');
12
+
13
+ type = require('type');
14
+
15
+ messages = {
16
+ blank: function(attribute_name) {
17
+ attribute_name = this.human_attribute_name(attribute_name);
18
+ return "O campo " + attribute_name + " não pode ficar em branco.";
19
+ },
20
+ cpf: function(attribute_name) {
21
+ attribute_name = this.human_attribute_name(attribute_name);
22
+ return "O campo " + attribute_name + " não está válido.";
23
+ },
24
+ confirmation: function(attribute_name) {
25
+ var confirmation_attribute_name;
26
+ confirmation_attribute_name = this.human_attribute_name(attribute_name);
27
+ attribute_name = this.human_attribute_name(attribute_name.replace('_confirmation', ''));
28
+ return "O campo " + attribute_name + " não está de acordo com o campo " + confirmation_attribute_name + ".";
29
+ },
30
+ associated: function(attribute_name) {
31
+ attribute_name = this.human_attribute_name(attribute_name);
32
+ return "O registro associado " + attribute_name + " não é válido.";
33
+ },
34
+ server: function(attribute_name, options) {
35
+ if (attribute_name === 'base') {
36
+ return options.server_message;
37
+ } else {
38
+ attribute_name = this.human_attribute_name(attribute_name);
39
+ return "" + attribute_name + " " + options.server_message + ".";
40
+ }
41
+ },
42
+ type: function(attribute_name, options) {
43
+ attribute_name = this.human_attribute_name(attribute_name);
44
+ return "O campo " + attribute_name + " não está válido.";
45
+ }
46
+ };
47
+
48
+ errorsable = stampit({
49
+ add: function(attribute_name, message_key, options) {
50
+ var translator;
51
+ this.push([attribute_name, message_key, options]);
52
+ this.messages[attribute_name] = '';
53
+ translator = messages[message_key];
54
+ if (translator != null) {
55
+ return this.messages[attribute_name] += translator.call(this.model, attribute_name, options);
56
+ } else {
57
+ return this.messages[attribute_name] += message_key;
58
+ }
59
+ },
60
+ clear: function() {
61
+ var attribute_name, _results;
62
+ if (this.length) {
63
+ this.length = 0;
64
+ _results = [];
65
+ for (attribute_name in this.messages) {
66
+ _results.push(this.messages[attribute_name] = null);
67
+ }
68
+ return _results;
69
+ }
70
+ },
71
+ push: Array.prototype.push,
72
+ splice: Array.prototype.splice,
73
+ indexOf: Array.prototype.indexOf
74
+ }, {
75
+ model: null,
76
+ messages: null,
77
+ length: 0
78
+ }, function() {
79
+ this.messages = {};
80
+ return this;
81
+ });
82
+
83
+ initializers = {
84
+ define_triggers: function() {
85
+ this.errors = errorsable({
86
+ model: model[this.resource]
87
+ });
88
+ this.before('save', function() {
89
+ if (this.save) {
90
+ return this.validate();
91
+ }
92
+ });
93
+ this.validated = false;
94
+ this.subscribe('dirty', function(value) {
95
+ return value && (this.validated = false);
96
+ });
97
+ return Object.defineProperty(this, 'valid', {
98
+ get: function() {
99
+ this.validate();
100
+ if (this.validation.state() === 'resolved') {
101
+ return !this.errors.length;
102
+ } else {
103
+ return null;
104
+ }
105
+ },
106
+ set: function() {
107
+ throw new TypeError("You can't set the value for the valid property.");
108
+ },
109
+ enumerable: false
110
+ });
111
+ },
112
+ create_validators: function(definitions) {
113
+ var definition, name, validator, validator_options, _ref, _results;
114
+ this.validators = [];
115
+ _ref = manager.validators;
116
+ _results = [];
117
+ for (name in _ref) {
118
+ validator = _ref[name];
119
+ definition = definitions[validator.definition_key];
120
+ if (definition) {
121
+ if (type(definition) !== 'array') {
122
+ definition = [definition];
123
+ }
124
+ _results.push((function() {
125
+ var _i, _len, _results1;
126
+ _results1 = [];
127
+ for (_i = 0, _len = definition.length; _i < _len; _i++) {
128
+ validator_options = definition[_i];
129
+ if (type(validator_options) !== 'object') {
130
+ validator_options = {
131
+ attribute_name: validator_options
132
+ };
133
+ }
134
+ validator_options.model = this;
135
+ this.validators.push(validator(validator_options));
136
+ _results1.push(delete definitions[validator.definition_key]);
137
+ }
138
+ return _results1;
139
+ }).call(this));
140
+ } else {
141
+ _results.push(void 0);
142
+ }
143
+ }
144
+ return _results;
145
+ }
146
+ };
147
+
148
+ extensions = {
149
+ model: {
150
+ validators: null
151
+ },
152
+ record: {
153
+ validate_attribute: function(attribute, doned, failed) {
154
+ var results, validation, validator, _i, _len, _ref;
155
+ this.errors.messages[attribute] = null;
156
+ results = [this, attribute];
157
+ _ref = model[this.resource.toString()].validators;
158
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
159
+ validator = _ref[_i];
160
+ if (validator.attribute_name === attribute) {
161
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
162
+ }
163
+ }
164
+ validation = jQuery.when.apply(jQuery, results);
165
+ validation.done(doned);
166
+ validation.fail(failed);
167
+ return validation;
168
+ },
169
+ validate: function(doned, failed) {
170
+ var results, validator, _i, _len, _ref;
171
+ if (this.validated) {
172
+ return this.validation;
173
+ }
174
+ this.errors.clear();
175
+ results = [this];
176
+ _ref = model[this.resource.toString()].validators;
177
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
178
+ validator = _ref[_i];
179
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
180
+ }
181
+ this.validation = jQuery.when.apply(jQuery, results);
182
+ this.validation.done(doned);
183
+ this.validation.fail(failed);
184
+ return this.validation.done(function(record) {
185
+ var old_dirty;
186
+ old_dirty = record.dirty;
187
+ record.dirty = null;
188
+ record.validated || (record.validated = true);
189
+ record.observed.dirty = old_dirty;
190
+ return record;
191
+ });
192
+ }
193
+ }
194
+ };
195
+
196
+ manager = {
197
+ validators: {}
198
+ };
199
+
200
+ model.mix(function(modelable) {
201
+ jQuery.extend(modelable, extensions.model);
202
+ jQuery.extend(modelable.record, extensions.record);
203
+ modelable.after_mix.unshift(initializers.create_validators);
204
+ modelable.record.after_initialize.push(initializers.define_triggers);
205
+ return model.validators = manager.validators;
206
+ });
207
+
208
+ manager.validators.confirmation = require('./validations/confirmation');
209
+
210
+ manager.validators.associated = require('./validations/associated');
211
+
212
+ manager.validators.presence = require('./validations/presence');
213
+
214
+ manager.validators.remote = require('./validations/remote');
215
+
216
+ manager.validators.type = require('./validations/type');
217
+
218
+ manager.validators.cpf = require('./validations/cpf');
219
+
220
+ }).call(this);
221
+ // Generated by CoffeeScript 1.6.3
222
+ (function() {
223
+ var errorsable, extensions, initializers, manager, messages, observable, root, stampit, type;
224
+
225
+ require('./translationable');
226
+
227
+ root = typeof exports !== "undefined" && exports !== null ? exports : this;
228
+
229
+ stampit = require('../../vendor/stampit');
230
+
231
+ observable = require('observable');
232
+
233
+ type = require('type');
234
+
235
+ messages = {
236
+ blank: function(attribute_name) {
237
+ attribute_name = this.human_attribute_name(attribute_name);
238
+ return "O campo " + attribute_name + " não pode ficar em branco.";
239
+ },
240
+ cpf: function(attribute_name) {
241
+ attribute_name = this.human_attribute_name(attribute_name);
242
+ return "O campo " + attribute_name + " não está válido.";
243
+ },
244
+ confirmation: function(attribute_name) {
245
+ var confirmation_attribute_name;
246
+ confirmation_attribute_name = this.human_attribute_name(attribute_name);
247
+ attribute_name = this.human_attribute_name(attribute_name.replace('_confirmation', ''));
248
+ return "O campo " + attribute_name + " não está de acordo com o campo " + confirmation_attribute_name + ".";
249
+ },
250
+ associated: function(attribute_name) {
251
+ attribute_name = this.human_attribute_name(attribute_name);
252
+ return "O registro associado " + attribute_name + " não é válido.";
253
+ },
254
+ server: function(attribute_name, options) {
255
+ if (attribute_name === 'base') {
256
+ return options.server_message;
257
+ } else {
258
+ attribute_name = this.human_attribute_name(attribute_name);
259
+ return "" + attribute_name + " " + options.server_message + ".";
260
+ }
261
+ },
262
+ type: function(attribute_name, options) {
263
+ attribute_name = this.human_attribute_name(attribute_name);
264
+ return "O campo " + attribute_name + " não está válido.";
265
+ }
266
+ };
267
+
268
+ errorsable = stampit({
269
+ add: function(attribute_name, message_key, options) {
270
+ var translator;
271
+ this.push([attribute_name, message_key, options]);
272
+ this.messages[attribute_name] = '';
273
+ translator = messages[message_key];
274
+ if (translator != null) {
275
+ return this.messages[attribute_name] += translator.call(this.model, attribute_name, options);
276
+ } else {
277
+ return this.messages[attribute_name] += message_key;
278
+ }
279
+ },
280
+ clear: function() {
281
+ var attribute_name, _results;
282
+ if (this.length) {
283
+ this.length = 0;
284
+ _results = [];
285
+ for (attribute_name in this.messages) {
286
+ _results.push(this.messages[attribute_name] = null);
287
+ }
288
+ return _results;
289
+ }
290
+ },
291
+ push: Array.prototype.push,
292
+ splice: Array.prototype.splice,
293
+ indexOf: Array.prototype.indexOf
294
+ }, {
295
+ model: null,
296
+ messages: null,
297
+ length: 0
298
+ }, function() {
299
+ this.messages = {};
300
+ return this;
301
+ });
302
+
303
+ initializers = {
304
+ define_triggers: function() {
305
+ this.errors = errorsable({
306
+ model: model[this.resource]
307
+ });
308
+ this.before('save', function() {
309
+ if (this.save) {
310
+ return this.validate();
311
+ }
312
+ });
313
+ this.validated = false;
314
+ this.subscribe('dirty', function(value) {
315
+ return value && (this.validated = false);
316
+ });
317
+ return Object.defineProperty(this, 'valid', {
318
+ get: function() {
319
+ this.validate();
320
+ if (this.validation.state() === 'resolved') {
321
+ return !this.errors.length;
322
+ } else {
323
+ return null;
324
+ }
325
+ },
326
+ set: function() {
327
+ throw new TypeError("You can't set the value for the valid property.");
328
+ },
329
+ enumerable: false
330
+ });
331
+ },
332
+ create_validators: function(definitions) {
333
+ var definition, name, validator, validator_options, _ref, _results;
334
+ this.validators = [];
335
+ _ref = manager.validators;
336
+ _results = [];
337
+ for (name in _ref) {
338
+ validator = _ref[name];
339
+ definition = definitions[validator.definition_key];
340
+ if (definition) {
341
+ if (type(definition) !== 'array') {
342
+ definition = [definition];
343
+ }
344
+ _results.push((function() {
345
+ var _i, _len, _results1;
346
+ _results1 = [];
347
+ for (_i = 0, _len = definition.length; _i < _len; _i++) {
348
+ validator_options = definition[_i];
349
+ if (type(validator_options) !== 'object') {
350
+ validator_options = {
351
+ attribute_name: validator_options
352
+ };
353
+ }
354
+ validator_options.model = this;
355
+ this.validators.push(validator(validator_options));
356
+ _results1.push(delete definitions[validator.definition_key]);
357
+ }
358
+ return _results1;
359
+ }).call(this));
360
+ } else {
361
+ _results.push(void 0);
362
+ }
363
+ }
364
+ return _results;
365
+ }
366
+ };
367
+
368
+ extensions = {
369
+ model: {
370
+ validators: null
371
+ },
372
+ record: {
373
+ validate_attribute: function(attribute, doned, failed) {
374
+ var results, validation, validator, _i, _len, _ref;
375
+ this.errors.messages[attribute] = null;
376
+ results = [this, attribute];
377
+ _ref = model[this.resource.toString()].validators;
378
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
379
+ validator = _ref[_i];
380
+ if (validator.attribute_name === attribute) {
381
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
382
+ }
383
+ }
384
+ validation = jQuery.when.apply(jQuery, results);
385
+ validation.done(doned);
386
+ validation.fail(failed);
387
+ return validation;
388
+ },
389
+ validate: function(doned, failed) {
390
+ var results, validator, _i, _len, _ref;
391
+ if (this.validated) {
392
+ return this.validation;
393
+ }
394
+ this.errors.clear();
395
+ results = [this];
396
+ _ref = model[this.resource.toString()].validators;
397
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
398
+ validator = _ref[_i];
399
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
400
+ }
401
+ this.validation = jQuery.when.apply(jQuery, results);
402
+ this.validation.done(doned);
403
+ this.validation.fail(failed);
404
+ return this.validation.done(function(record) {
405
+ var old_dirty;
406
+ old_dirty = record.dirty;
407
+ record.dirty = null;
408
+ record.validated || (record.validated = true);
409
+ record.observed.dirty = old_dirty;
410
+ return record;
411
+ });
412
+ }
413
+ }
414
+ };
415
+
416
+ manager = {
417
+ validators: {}
418
+ };
419
+
420
+ model.mix(function(modelable) {
421
+ jQuery.extend(modelable, extensions.model);
422
+ jQuery.extend(modelable.record, extensions.record);
423
+ modelable.after_mix.unshift(initializers.create_validators);
424
+ modelable.record.after_initialize.push(initializers.define_triggers);
425
+ return model.validators = manager.validators;
426
+ });
427
+
428
+ manager.validators.confirmation = require('./validations/confirmation');
429
+
430
+ manager.validators.associated = require('./validations/associated');
431
+
432
+ manager.validators.presence = require('./validations/presence');
433
+
434
+ manager.validators.remote = require('./validations/remote');
435
+
436
+ manager.validators.type = require('./validations/type');
437
+
438
+ manager.validators.cpf = require('./validations/cpf');
439
+
440
+ }).call(this);
441
+ // Generated by CoffeeScript 1.6.3
442
+ (function() {
443
+ var errorsable, extensions, initializers, manager, messages, observable, root, stampit, type;
444
+
445
+ require('./translationable');
446
+
447
+ root = typeof exports !== "undefined" && exports !== null ? exports : this;
448
+
449
+ stampit = require('../../vendor/stampit');
450
+
451
+ observable = require('observable');
452
+
453
+ type = require('type');
454
+
455
+ messages = {
456
+ blank: function(attribute_name) {
457
+ attribute_name = this.human_attribute_name(attribute_name);
458
+ return "O campo " + attribute_name + " não pode ficar em branco.";
459
+ },
460
+ cpf: function(attribute_name) {
461
+ attribute_name = this.human_attribute_name(attribute_name);
462
+ return "O campo " + attribute_name + " não está válido.";
463
+ },
464
+ confirmation: function(attribute_name) {
465
+ var confirmation_attribute_name;
466
+ confirmation_attribute_name = this.human_attribute_name(attribute_name);
467
+ attribute_name = this.human_attribute_name(attribute_name.replace('_confirmation', ''));
468
+ return "O campo " + attribute_name + " não está de acordo com o campo " + confirmation_attribute_name + ".";
469
+ },
470
+ associated: function(attribute_name) {
471
+ attribute_name = this.human_attribute_name(attribute_name);
472
+ return "O registro associado " + attribute_name + " não é válido.";
473
+ },
474
+ server: function(attribute_name, options) {
475
+ if (attribute_name === 'base') {
476
+ return options.server_message;
477
+ } else {
478
+ attribute_name = this.human_attribute_name(attribute_name);
479
+ return "" + attribute_name + " " + options.server_message + ".";
480
+ }
481
+ },
482
+ type: function(attribute_name, options) {
483
+ attribute_name = this.human_attribute_name(attribute_name);
484
+ return "O campo " + attribute_name + " não está válido.";
485
+ }
486
+ };
487
+
488
+ errorsable = stampit({
489
+ add: function(attribute_name, message_key, options) {
490
+ var translator;
491
+ this.push([attribute_name, message_key, options]);
492
+ this.messages[attribute_name] = '';
493
+ translator = messages[message_key];
494
+ if (translator != null) {
495
+ return this.messages[attribute_name] += translator.call(this.model, attribute_name, options);
496
+ } else {
497
+ return this.messages[attribute_name] += message_key;
498
+ }
499
+ },
500
+ clear: function() {
501
+ var attribute_name, _results;
502
+ if (this.length) {
503
+ this.length = 0;
504
+ _results = [];
505
+ for (attribute_name in this.messages) {
506
+ _results.push(this.messages[attribute_name] = null);
507
+ }
508
+ return _results;
509
+ }
510
+ },
511
+ push: Array.prototype.push,
512
+ splice: Array.prototype.splice,
513
+ indexOf: Array.prototype.indexOf
514
+ }, {
515
+ model: null,
516
+ messages: null,
517
+ length: 0
518
+ }, function() {
519
+ this.messages = {};
520
+ return this;
521
+ });
522
+
523
+ initializers = {
524
+ define_triggers: function() {
525
+ this.errors = errorsable({
526
+ model: model[this.resource]
527
+ });
528
+ this.before('save', function() {
529
+ if (this.save) {
530
+ return this.validate();
531
+ }
532
+ });
533
+ this.validated = false;
534
+ this.subscribe('dirty', function(value) {
535
+ return value && (this.validated = false);
536
+ });
537
+ return Object.defineProperty(this, 'valid', {
538
+ get: function() {
539
+ this.validate();
540
+ if (this.validation.state() === 'resolved') {
541
+ return !this.errors.length;
542
+ } else {
543
+ return null;
544
+ }
545
+ },
546
+ set: function() {
547
+ throw new TypeError("You can't set the value for the valid property.");
548
+ },
549
+ enumerable: false
550
+ });
551
+ },
552
+ create_validators: function(definitions) {
553
+ var definition, name, validator, validator_options, _ref, _results;
554
+ this.validators = [];
555
+ _ref = manager.validators;
556
+ _results = [];
557
+ for (name in _ref) {
558
+ validator = _ref[name];
559
+ definition = definitions[validator.definition_key];
560
+ if (definition) {
561
+ if (type(definition) !== 'array') {
562
+ definition = [definition];
563
+ }
564
+ _results.push((function() {
565
+ var _i, _len, _results1;
566
+ _results1 = [];
567
+ for (_i = 0, _len = definition.length; _i < _len; _i++) {
568
+ validator_options = definition[_i];
569
+ if (type(validator_options) !== 'object') {
570
+ validator_options = {
571
+ attribute_name: validator_options
572
+ };
573
+ }
574
+ validator_options.model = this;
575
+ this.validators.push(validator(validator_options));
576
+ _results1.push(delete definitions[validator.definition_key]);
577
+ }
578
+ return _results1;
579
+ }).call(this));
580
+ } else {
581
+ _results.push(void 0);
582
+ }
583
+ }
584
+ return _results;
585
+ }
586
+ };
587
+
588
+ extensions = {
589
+ model: {
590
+ validators: null
591
+ },
592
+ record: {
593
+ validate_attribute: function(attribute, doned, failed) {
594
+ var results, validation, validator, _i, _len, _ref;
595
+ this.errors.messages[attribute] = null;
596
+ results = [this, attribute];
597
+ _ref = model[this.resource.toString()].validators;
598
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
599
+ validator = _ref[_i];
600
+ if (validator.attribute_name === attribute) {
601
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
602
+ }
603
+ }
604
+ validation = jQuery.when.apply(jQuery, results);
605
+ validation.done(doned);
606
+ validation.fail(failed);
607
+ return validation;
608
+ },
609
+ validate: function(doned, failed) {
610
+ var results, validator, _i, _len, _ref;
611
+ if (this.validated) {
612
+ return this.validation;
613
+ }
614
+ this.errors.clear();
615
+ results = [this];
616
+ _ref = model[this.resource.toString()].validators;
617
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
618
+ validator = _ref[_i];
619
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
620
+ }
621
+ this.validation = jQuery.when.apply(jQuery, results);
622
+ this.validation.done(doned);
623
+ this.validation.fail(failed);
624
+ return this.validation.done(function(record) {
625
+ var old_dirty;
626
+ old_dirty = record.dirty;
627
+ record.dirty = null;
628
+ record.validated || (record.validated = true);
629
+ record.observed.dirty = old_dirty;
630
+ return record;
631
+ });
632
+ }
633
+ }
634
+ };
635
+
636
+ manager = {
637
+ validators: {}
638
+ };
639
+
640
+ model.mix(function(modelable) {
641
+ jQuery.extend(modelable, extensions.model);
642
+ jQuery.extend(modelable.record, extensions.record);
643
+ modelable.after_mix.unshift(initializers.create_validators);
644
+ modelable.record.after_initialize.push(initializers.define_triggers);
645
+ return model.validators = manager.validators;
646
+ });
647
+
648
+ manager.validators.confirmation = require('./validations/confirmation');
649
+
650
+ manager.validators.associated = require('./validations/associated');
651
+
652
+ manager.validators.presence = require('./validations/presence');
653
+
654
+ manager.validators.remote = require('./validations/remote');
655
+
656
+ manager.validators.type = require('./validations/type');
657
+
658
+ manager.validators.cpf = require('./validations/cpf');
659
+
660
+ }).call(this);
661
+ // Generated by CoffeeScript 1.6.3
662
+ (function() {
663
+ var errorsable, extensions, initializers, manager, messages, observable, root, stampit, type;
664
+
665
+ require('./translationable');
666
+
667
+ root = typeof exports !== "undefined" && exports !== null ? exports : this;
668
+
669
+ stampit = require('../../vendor/stampit');
670
+
671
+ observable = require('observable');
672
+
673
+ type = require('type');
674
+
675
+ messages = {
676
+ blank: function(attribute_name) {
677
+ attribute_name = this.human_attribute_name(attribute_name);
678
+ return "O campo " + attribute_name + " não pode ficar em branco.";
679
+ },
680
+ cpf: function(attribute_name) {
681
+ attribute_name = this.human_attribute_name(attribute_name);
682
+ return "O campo " + attribute_name + " não está válido.";
683
+ },
684
+ confirmation: function(attribute_name) {
685
+ var confirmation_attribute_name;
686
+ confirmation_attribute_name = this.human_attribute_name(attribute_name);
687
+ attribute_name = this.human_attribute_name(attribute_name.replace('_confirmation', ''));
688
+ return "O campo " + attribute_name + " não está de acordo com o campo " + confirmation_attribute_name + ".";
689
+ },
690
+ associated: function(attribute_name) {
691
+ attribute_name = this.human_attribute_name(attribute_name);
692
+ return "O registro associado " + attribute_name + " não é válido.";
693
+ },
694
+ server: function(attribute_name, options) {
695
+ if (attribute_name === 'base') {
696
+ return options.server_message;
697
+ } else {
698
+ attribute_name = this.human_attribute_name(attribute_name);
699
+ return "" + attribute_name + " " + options.server_message + ".";
700
+ }
701
+ },
702
+ type: function(attribute_name, options) {
703
+ attribute_name = this.human_attribute_name(attribute_name);
704
+ return "O campo " + attribute_name + " não está válido.";
705
+ }
706
+ };
707
+
708
+ errorsable = stampit({
709
+ add: function(attribute_name, message_key, options) {
710
+ var translator;
711
+ this.push([attribute_name, message_key, options]);
712
+ this.messages[attribute_name] = '';
713
+ translator = messages[message_key];
714
+ if (translator != null) {
715
+ return this.messages[attribute_name] += translator.call(this.model, attribute_name, options);
716
+ } else {
717
+ return this.messages[attribute_name] += message_key;
718
+ }
719
+ },
720
+ clear: function() {
721
+ var attribute_name, _results;
722
+ if (this.length) {
723
+ this.length = 0;
724
+ _results = [];
725
+ for (attribute_name in this.messages) {
726
+ _results.push(this.messages[attribute_name] = null);
727
+ }
728
+ return _results;
729
+ }
730
+ },
731
+ push: Array.prototype.push,
732
+ splice: Array.prototype.splice,
733
+ indexOf: Array.prototype.indexOf
734
+ }, {
735
+ model: null,
736
+ messages: null,
737
+ length: 0
738
+ }, function() {
739
+ this.messages = {};
740
+ return this;
741
+ });
742
+
743
+ initializers = {
744
+ define_triggers: function() {
745
+ this.errors = errorsable({
746
+ model: model[this.resource]
747
+ });
748
+ this.before('save', function() {
749
+ if (this.save) {
750
+ return this.validate();
751
+ }
752
+ });
753
+ this.validated = false;
754
+ this.subscribe('dirty', function(value) {
755
+ return value && (this.validated = false);
756
+ });
757
+ return Object.defineProperty(this, 'valid', {
758
+ get: function() {
759
+ this.validate();
760
+ if (this.validation.state() === 'resolved') {
761
+ return !this.errors.length;
762
+ } else {
763
+ return null;
764
+ }
765
+ },
766
+ set: function() {
767
+ throw new TypeError("You can't set the value for the valid property.");
768
+ },
769
+ enumerable: false
770
+ });
771
+ },
772
+ create_validators: function(definitions) {
773
+ var definition, name, validator, validator_options, _ref, _results;
774
+ this.validators = [];
775
+ _ref = manager.validators;
776
+ _results = [];
777
+ for (name in _ref) {
778
+ validator = _ref[name];
779
+ definition = definitions[validator.definition_key];
780
+ if (definition) {
781
+ if (type(definition) !== 'array') {
782
+ definition = [definition];
783
+ }
784
+ _results.push((function() {
785
+ var _i, _len, _results1;
786
+ _results1 = [];
787
+ for (_i = 0, _len = definition.length; _i < _len; _i++) {
788
+ validator_options = definition[_i];
789
+ if (type(validator_options) !== 'object') {
790
+ validator_options = {
791
+ attribute_name: validator_options
792
+ };
793
+ }
794
+ validator_options.model = this;
795
+ this.validators.push(validator(validator_options));
796
+ _results1.push(delete definitions[validator.definition_key]);
797
+ }
798
+ return _results1;
799
+ }).call(this));
800
+ } else {
801
+ _results.push(void 0);
802
+ }
803
+ }
804
+ return _results;
805
+ }
806
+ };
807
+
808
+ extensions = {
809
+ model: {
810
+ validators: null
811
+ },
812
+ record: {
813
+ validate_attribute: function(attribute, doned, failed) {
814
+ var results, validation, validator, _i, _len, _ref;
815
+ this.errors.messages[attribute] = null;
816
+ results = [this, attribute];
817
+ _ref = model[this.resource.toString()].validators;
818
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
819
+ validator = _ref[_i];
820
+ if (validator.attribute_name === attribute) {
821
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
822
+ }
823
+ }
824
+ validation = jQuery.when.apply(jQuery, results);
825
+ validation.done(doned);
826
+ validation.fail(failed);
827
+ return validation;
828
+ },
829
+ validate: function(doned, failed) {
830
+ var results, validator, _i, _len, _ref;
831
+ if (this.validated) {
832
+ return this.validation;
833
+ }
834
+ this.errors.clear();
835
+ results = [this];
836
+ _ref = model[this.resource.toString()].validators;
837
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
838
+ validator = _ref[_i];
839
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
840
+ }
841
+ this.validation = jQuery.when.apply(jQuery, results);
842
+ this.validation.done(doned);
843
+ this.validation.fail(failed);
844
+ return this.validation.done(function(record) {
845
+ var old_dirty;
846
+ old_dirty = record.dirty;
847
+ record.dirty = null;
848
+ record.validated || (record.validated = true);
849
+ record.observed.dirty = old_dirty;
850
+ return record;
851
+ });
852
+ }
853
+ }
854
+ };
855
+
856
+ manager = {
857
+ validators: {}
858
+ };
859
+
860
+ model.mix(function(modelable) {
861
+ jQuery.extend(modelable, extensions.model);
862
+ jQuery.extend(modelable.record, extensions.record);
863
+ modelable.after_mix.unshift(initializers.create_validators);
864
+ modelable.record.after_initialize.push(initializers.define_triggers);
865
+ return model.validators = manager.validators;
866
+ });
867
+
868
+ manager.validators.confirmation = require('./validations/confirmation');
869
+
870
+ manager.validators.associated = require('./validations/associated');
871
+
872
+ manager.validators.presence = require('./validations/presence');
873
+
874
+ manager.validators.remote = require('./validations/remote');
875
+
876
+ manager.validators.type = require('./validations/type');
877
+
878
+ manager.validators.cpf = require('./validations/cpf');
879
+
880
+ }).call(this);
881
+ // Generated by CoffeeScript 1.6.3
882
+ (function() {
883
+ var errorsable, extensions, initializers, manager, messages, observable, root, stampit, type;
884
+
885
+ require('./translationable');
886
+
887
+ root = typeof exports !== "undefined" && exports !== null ? exports : this;
888
+
889
+ stampit = require('../../vendor/stampit');
890
+
891
+ observable = require('observable');
892
+
893
+ type = require('type');
894
+
895
+ messages = {
896
+ blank: function(attribute_name) {
897
+ attribute_name = this.human_attribute_name(attribute_name);
898
+ return "O campo " + attribute_name + " não pode ficar em branco.";
899
+ },
900
+ cpf: function(attribute_name) {
901
+ attribute_name = this.human_attribute_name(attribute_name);
902
+ return "O campo " + attribute_name + " não está válido.";
903
+ },
904
+ confirmation: function(attribute_name) {
905
+ var confirmation_attribute_name;
906
+ confirmation_attribute_name = this.human_attribute_name(attribute_name);
907
+ attribute_name = this.human_attribute_name(attribute_name.replace('_confirmation', ''));
908
+ return "O campo " + attribute_name + " não está de acordo com o campo " + confirmation_attribute_name + ".";
909
+ },
910
+ associated: function(attribute_name) {
911
+ attribute_name = this.human_attribute_name(attribute_name);
912
+ return "O registro associado " + attribute_name + " não é válido.";
913
+ },
914
+ server: function(attribute_name, options) {
915
+ if (attribute_name === 'base') {
916
+ return options.server_message;
917
+ } else {
918
+ attribute_name = this.human_attribute_name(attribute_name);
919
+ return "" + attribute_name + " " + options.server_message + ".";
920
+ }
921
+ },
922
+ type: function(attribute_name, options) {
923
+ attribute_name = this.human_attribute_name(attribute_name);
924
+ return "O campo " + attribute_name + " não está válido.";
925
+ }
926
+ };
927
+
928
+ errorsable = stampit({
929
+ add: function(attribute_name, message_key, options) {
930
+ var translator;
931
+ this.push([attribute_name, message_key, options]);
932
+ this.messages[attribute_name] = '';
933
+ translator = messages[message_key];
934
+ if (translator != null) {
935
+ return this.messages[attribute_name] += translator.call(this.model, attribute_name, options);
936
+ } else {
937
+ return this.messages[attribute_name] += message_key;
938
+ }
939
+ },
940
+ clear: function() {
941
+ var attribute_name, _results;
942
+ if (this.length) {
943
+ this.length = 0;
944
+ _results = [];
945
+ for (attribute_name in this.messages) {
946
+ _results.push(this.messages[attribute_name] = null);
947
+ }
948
+ return _results;
949
+ }
950
+ },
951
+ push: Array.prototype.push,
952
+ splice: Array.prototype.splice,
953
+ indexOf: Array.prototype.indexOf
954
+ }, {
955
+ model: null,
956
+ messages: null,
957
+ length: 0
958
+ }, function() {
959
+ this.messages = {};
960
+ return this;
961
+ });
962
+
963
+ initializers = {
964
+ define_triggers: function() {
965
+ this.errors = errorsable({
966
+ model: model[this.resource]
967
+ });
968
+ this.before('save', function() {
969
+ if (this.save) {
970
+ return this.validate();
971
+ }
972
+ });
973
+ this.validated = false;
974
+ this.subscribe('dirty', function(value) {
975
+ return value && (this.validated = false);
976
+ });
977
+ return Object.defineProperty(this, 'valid', {
978
+ get: function() {
979
+ this.validate();
980
+ if (this.validation.state() === 'resolved') {
981
+ return !this.errors.length;
982
+ } else {
983
+ return null;
984
+ }
985
+ },
986
+ set: function() {
987
+ throw new TypeError("You can't set the value for the valid property.");
988
+ },
989
+ enumerable: false
990
+ });
991
+ },
992
+ create_validators: function(definitions) {
993
+ var definition, name, validator, validator_options, _ref, _results;
994
+ this.validators = [];
995
+ _ref = manager.validators;
996
+ _results = [];
997
+ for (name in _ref) {
998
+ validator = _ref[name];
999
+ definition = definitions[validator.definition_key];
1000
+ if (definition) {
1001
+ if (type(definition) !== 'array') {
1002
+ definition = [definition];
1003
+ }
1004
+ _results.push((function() {
1005
+ var _i, _len, _results1;
1006
+ _results1 = [];
1007
+ for (_i = 0, _len = definition.length; _i < _len; _i++) {
1008
+ validator_options = definition[_i];
1009
+ if (type(validator_options) !== 'object') {
1010
+ validator_options = {
1011
+ attribute_name: validator_options
1012
+ };
1013
+ }
1014
+ validator_options.model = this;
1015
+ this.validators.push(validator(validator_options));
1016
+ _results1.push(delete definitions[validator.definition_key]);
1017
+ }
1018
+ return _results1;
1019
+ }).call(this));
1020
+ } else {
1021
+ _results.push(void 0);
1022
+ }
1023
+ }
1024
+ return _results;
1025
+ }
1026
+ };
1027
+
1028
+ extensions = {
1029
+ model: {
1030
+ validators: null
1031
+ },
1032
+ record: {
1033
+ validate_attribute: function(attribute, doned, failed) {
1034
+ var results, validation, validator, _i, _len, _ref;
1035
+ this.errors.messages[attribute] = null;
1036
+ results = [this, attribute];
1037
+ _ref = model[this.resource.toString()].validators;
1038
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1039
+ validator = _ref[_i];
1040
+ if (validator.attribute_name === attribute) {
1041
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
1042
+ }
1043
+ }
1044
+ validation = jQuery.when.apply(jQuery, results);
1045
+ validation.done(doned);
1046
+ validation.fail(failed);
1047
+ return validation;
1048
+ },
1049
+ validate: function(doned, failed) {
1050
+ var results, validator, _i, _len, _ref;
1051
+ if (this.validated) {
1052
+ return this.validation;
1053
+ }
1054
+ this.errors.clear();
1055
+ results = [this];
1056
+ _ref = model[this.resource.toString()].validators;
1057
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1058
+ validator = _ref[_i];
1059
+ results.push(validator.validate_each(this, validator.attribute_name, this[validator.attribute_name]));
1060
+ }
1061
+ this.validation = jQuery.when.apply(jQuery, results);
1062
+ this.validation.done(doned);
1063
+ this.validation.fail(failed);
1064
+ return this.validation.done(function(record) {
1065
+ var old_dirty;
1066
+ old_dirty = record.dirty;
1067
+ record.dirty = null;
1068
+ record.validated || (record.validated = true);
1069
+ record.observed.dirty = old_dirty;
1070
+ return record;
1071
+ });
1072
+ }
1073
+ }
1074
+ };
1075
+
1076
+ manager = {
1077
+ validators: {}
1078
+ };
1079
+
1080
+ model.mix(function(modelable) {
1081
+ jQuery.extend(modelable, extensions.model);
1082
+ jQuery.extend(modelable.record, extensions.record);
1083
+ modelable.after_mix.unshift(initializers.create_validators);
1084
+ modelable.record.after_initialize.push(initializers.define_triggers);
1085
+ return model.validators = manager.validators;
1086
+ });
1087
+
1088
+ manager.validators.confirmation = require('./validations/confirmation');
1089
+
1090
+ manager.validators.associated = require('./validations/associated');
1091
+
1092
+ manager.validators.presence = require('./validations/presence');
1093
+
1094
+ manager.validators.remote = require('./validations/remote');
1095
+
1096
+ manager.validators.type = require('./validations/type');
1097
+
1098
+ manager.validators.cpf = require('./validations/cpf');
1099
+
1100
+ }).call(this);