joosy 1.1.2 → 1.2.0.alpha.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +6 -7
  3. data/Gemfile +1 -11
  4. data/Gruntfile.coffee +138 -0
  5. data/README.md +65 -24
  6. data/bin/joosy +21 -0
  7. data/bower.json +23 -0
  8. data/joosy.gemspec +6 -12
  9. data/lib/joosy.js +3754 -0
  10. data/lib/joosy.rb +8 -9
  11. data/package.json +37 -0
  12. data/spec/{javascripts/helpers/spec_helper.js.coffee → helpers/helper.coffee} +0 -0
  13. data/spec/{javascripts/joosy/core/application_spec.js.coffee → joosy/core/application_spec.coffee} +0 -0
  14. data/spec/{javascripts/joosy/core/form_spec.js.coffee → joosy/core/form_spec.coffee} +30 -30
  15. data/spec/{javascripts/joosy/core/helpers/forms_spec.js.coffee → joosy/core/helpers/forms_spec.coffee} +0 -0
  16. data/spec/{javascripts/joosy/core/helpers/view_spec.js.coffee → joosy/core/helpers/view_spec.coffee} +0 -0
  17. data/spec/{javascripts/joosy/core/helpers/widgets_spec.js.coffee → joosy/core/helpers/widgets_spec.coffee} +0 -0
  18. data/spec/{javascripts/joosy/core/joosy_spec.js.coffee → joosy/core/joosy_spec.coffee} +0 -0
  19. data/spec/{javascripts/joosy/core/layout_spec.js.coffee → joosy/core/layout_spec.coffee} +0 -0
  20. data/spec/{javascripts/joosy/core/modules/container_spec.js.coffee → joosy/core/modules/container_spec.coffee} +1 -1
  21. data/spec/{javascripts/joosy/core/modules/events_spec.js.coffee → joosy/core/modules/events_spec.coffee} +0 -0
  22. data/spec/{javascripts/joosy/core/modules/filters_spec.js.coffee → joosy/core/modules/filters_spec.coffee} +0 -0
  23. data/spec/{javascripts/joosy/core/modules/log_spec.js.coffee → joosy/core/modules/log_spec.coffee} +0 -0
  24. data/spec/{javascripts/joosy/core/modules/module_spec.js.coffee → joosy/core/modules/module_spec.coffee} +0 -0
  25. data/spec/{javascripts/joosy/core/modules/renderer_spec.js.coffee → joosy/core/modules/renderer_spec.coffee} +35 -0
  26. data/spec/{javascripts/joosy/core/modules/time_manager_spec.js.coffee → joosy/core/modules/time_manager_spec.coffee} +0 -0
  27. data/spec/{javascripts/joosy/core/modules/widget_manager_spec.js.coffee → joosy/core/modules/widget_manager_spec.coffee} +0 -0
  28. data/spec/{javascripts/joosy/core/page_spec.js.coffee → joosy/core/page_spec.coffee} +0 -0
  29. data/spec/{javascripts/joosy/core/resource/collection_spec.js.coffee → joosy/core/resource/collection_spec.coffee} +0 -0
  30. data/spec/{javascripts/joosy/core/resource/generic_spec.js.coffee → joosy/core/resource/generic_spec.coffee} +0 -0
  31. data/spec/{javascripts/joosy/core/resource/rest_collection_spec.js.coffee → joosy/core/resource/rest_collection_spec.coffee} +0 -0
  32. data/spec/{javascripts/joosy/core/resource/rest_spec.js.coffee → joosy/core/resource/rest_spec.coffee} +0 -8
  33. data/spec/{javascripts/joosy/core/router_spec.js.coffee → joosy/core/router_spec.coffee} +19 -22
  34. data/spec/{javascripts/joosy/core/templaters/rails_jst_spec.js.coffee → joosy/core/templaters/rails_jst_spec.coffee} +0 -0
  35. data/spec/{javascripts/joosy/core/widget_spec.js.coffee → joosy/core/widget_spec.coffee} +0 -0
  36. data/spec/{javascripts/joosy/preloaders/caching_spec.js.coffee → joosy/preloaders/caching_spec.coffee} +2 -2
  37. data/spec/{javascripts/joosy/preloaders/inline_spec.js.coffee → joosy/preloaders/inline_spec.coffee} +1 -1
  38. data/spec/support/test.js +1 -0
  39. data/{app/assets/javascripts/joosy/core/application.js.coffee → src/joosy/core/application.coffee} +0 -0
  40. data/{app/assets/javascripts/joosy/core/form.js.coffee → src/joosy/core/form.coffee} +5 -5
  41. data/{app/assets/javascripts/joosy/core/helpers/form.js.coffee → src/joosy/core/helpers/form.coffee} +0 -0
  42. data/{app/assets/javascripts/joosy/core/helpers/view.js.coffee → src/joosy/core/helpers/view.coffee} +0 -0
  43. data/{app/assets/javascripts/joosy/core/helpers/widgets.js.coffee → src/joosy/core/helpers/widgets.coffee} +0 -0
  44. data/{app/assets/javascripts/joosy/core/joosy.js.coffee → src/joosy/core/joosy.coffee} +1 -1
  45. data/{app/assets/javascripts/joosy/core/layout.js.coffee → src/joosy/core/layout.coffee} +0 -0
  46. data/{app/assets/javascripts/joosy/core/modules/container.js.coffee → src/joosy/core/modules/container.coffee} +1 -1
  47. data/{app/assets/javascripts/joosy/core/modules/events.js.coffee → src/joosy/core/modules/events.coffee} +4 -6
  48. data/{app/assets/javascripts/joosy/core/modules/filters.js.coffee → src/joosy/core/modules/filters.coffee} +0 -0
  49. data/{app/assets/javascripts/joosy/core/modules/log.js.coffee → src/joosy/core/modules/log.coffee} +0 -0
  50. data/{app/assets/javascripts/joosy/core/modules/module.js.coffee → src/joosy/core/modules/module.coffee} +0 -0
  51. data/{app/assets/javascripts/joosy/core/modules/renderer.js.coffee → src/joosy/core/modules/renderer.coffee} +1 -1
  52. data/{app/assets/javascripts/joosy/core/modules/time_manager.js.coffee → src/joosy/core/modules/time_manager.coffee} +0 -0
  53. data/{app/assets/javascripts/joosy/core/modules/widgets_manager.js.coffee → src/joosy/core/modules/widgets_manager.coffee} +0 -0
  54. data/{app/assets/javascripts/joosy/core/page.js.coffee → src/joosy/core/page.coffee} +0 -1
  55. data/{app/assets/javascripts/joosy/core/preloader.js.coffee → src/joosy/core/preloader.coffee} +0 -0
  56. data/{app/assets/javascripts/joosy/core/resource/collection.js.coffee → src/joosy/core/resource/collection.coffee} +0 -0
  57. data/{app/assets/javascripts/joosy/core/resource/generic.js.coffee → src/joosy/core/resource/generic.coffee} +5 -5
  58. data/{app/assets/javascripts/joosy/core/resource/rest.js.coffee → src/joosy/core/resource/rest.coffee} +5 -5
  59. data/{app/assets/javascripts/joosy/core/resource/rest_collection.js.coffee → src/joosy/core/resource/rest_collection.coffee} +0 -0
  60. data/src/joosy/core/resource/watcher.coffee +50 -0
  61. data/{app/assets/javascripts/joosy/core/router.js.coffee → src/joosy/core/router.coffee} +28 -30
  62. data/{app/assets/javascripts/joosy/core/templaters/rails_jst.js.coffee → src/joosy/core/templaters/rails_jst.coffee} +12 -2
  63. data/{app/assets/javascripts/joosy/core/widget.js.coffee → src/joosy/core/widget.coffee} +0 -0
  64. data/src/joosy/generators/command.coffee +49 -0
  65. data/src/joosy/generators/generator.coffee +93 -0
  66. data/src/joosy/generators/layout.coffee +20 -0
  67. data/src/joosy/generators/page.coffee +20 -0
  68. data/src/joosy/generators/project/base.coffee +28 -0
  69. data/src/joosy/generators/project/standalone.coffee +25 -0
  70. data/src/joosy/generators/project.coffee +16 -0
  71. data/src/joosy/generators/widget.coffee +20 -0
  72. data/{app/assets/javascripts/joosy/preloaders/caching.js.coffee → src/joosy/preloaders/caching.coffee} +0 -0
  73. data/{app/assets/javascripts/joosy/preloaders/inline.js.coffee → src/joosy/preloaders/inline.coffee} +0 -0
  74. data/src/joosy.coffee +2 -0
  75. data/src/vendor/metamorph.coffee +410 -0
  76. data/tasks/joosy.coffee +63 -0
  77. data/templates/application/base/application.coffee +11 -0
  78. data/{lib/rails/generators/joosy/templates/app/helpers/application.js.coffee → templates/application/base/helpers/application.coffee} +0 -0
  79. data/{lib/rails/generators/joosy/templates/app/layouts/application.js.coffee → templates/application/base/layouts/application.coffee} +0 -0
  80. data/{lib/rails/generators/joosy/templates/app/pages/application.js.coffee → templates/application/base/pages/application.coffee} +0 -0
  81. data/{lib/rails/generators/joosy/templates/app/pages/welcome/index.js.coffee → templates/application/base/pages/welcome/index.coffee} +3 -3
  82. data/templates/application/base/routes.coffee +3 -0
  83. data/{lib/rails/generators/joosy/templates/app → templates/application/base}/templates/layouts/application.jst.hamlc +0 -0
  84. data/{lib/rails/generators/joosy/templates/app → templates/application/base}/templates/pages/welcome/index.jst.hamlc +1 -2
  85. data/templates/application/standalone/.gitignore +5 -0
  86. data/templates/application/standalone/Gruntfile.coffee +40 -0
  87. data/templates/application/standalone/Procfile +1 -0
  88. data/templates/application/standalone/bower.json +7 -0
  89. data/templates/application/standalone/package.json +24 -0
  90. data/templates/application/standalone/source/index.haml +7 -0
  91. data/templates/application/standalone/stylesheets/application.styl +2 -0
  92. data/templates/layout/basic.coffee +2 -0
  93. data/templates/layout/namespaced.coffee +4 -0
  94. data/templates/page/basic.coffee +3 -0
  95. data/templates/page/namespaced.coffee +5 -0
  96. data/templates/widget/basic.coffee +2 -0
  97. data/templates/widget/namespaced.coffee +4 -0
  98. metadata +98 -179
  99. data/.codoopts +0 -5
  100. data/Gemfile.lock +0 -157
  101. data/Guardfile +0 -32
  102. data/LICENSE +0 -22
  103. data/MIT-LICENSE +0 -21
  104. data/Rakefile +0 -14
  105. data/app/assets/javascripts/joosy.js.coffee +0 -5
  106. data/app/helpers/joosy/sprockets_helper.rb +0 -41
  107. data/app/views/layouts/json_wrapper.json.erb +0 -1
  108. data/lib/joosy/rails/engine.rb +0 -24
  109. data/lib/joosy/version.rb +0 -3
  110. data/lib/rails/generators/joosy/application_generator.rb +0 -43
  111. data/lib/rails/generators/joosy/joosy_base.rb +0 -30
  112. data/lib/rails/generators/joosy/layout_generator.rb +0 -30
  113. data/lib/rails/generators/joosy/page_generator.rb +0 -42
  114. data/lib/rails/generators/joosy/preloader_generator.rb +0 -30
  115. data/lib/rails/generators/joosy/resource_generator.rb +0 -40
  116. data/lib/rails/generators/joosy/templates/app/layouts/template.js.coffee +0 -2
  117. data/lib/rails/generators/joosy/templates/app/pages/template.js.coffee +0 -5
  118. data/lib/rails/generators/joosy/templates/app/resources/template.js.coffee +0 -2
  119. data/lib/rails/generators/joosy/templates/app/resources/template_with_namespace.js.coffee +0 -4
  120. data/lib/rails/generators/joosy/templates/app/routes.js.coffee +0 -8
  121. data/lib/rails/generators/joosy/templates/app/widgets/template.js.coffee +0 -2
  122. data/lib/rails/generators/joosy/templates/app.js.coffee +0 -11
  123. data/lib/rails/generators/joosy/templates/app_controller.rb +0 -9
  124. data/lib/rails/generators/joosy/templates/app_preloader.js.coffee.erb +0 -13
  125. data/lib/rails/generators/joosy/templates/app_railties.js.coffee.erb +0 -11
  126. data/lib/rails/generators/joosy/templates/preload.html.erb +0 -26
  127. data/lib/rails/generators/joosy/templates/preload.html.haml +0 -19
  128. data/lib/rails/generators/joosy/templates/preload.html.slim +0 -19
  129. data/lib/rails/generators/joosy/widget_generator.rb +0 -30
  130. data/lib/rails/resources_with_joosy.rb +0 -11
  131. data/spec/javascripts/support/assets/coolface.jpg +0 -0
  132. data/spec/javascripts/support/assets/okay.jpg +0 -0
  133. data/spec/javascripts/support/assets/test.js +0 -1
  134. data/spec/javascripts/support/jasmine.yml +0 -74
  135. data/spec/javascripts/support/jasmine_config.rb +0 -23
  136. data/spec/javascripts/support/jasmine_runner.rb +0 -32
  137. data/spec/javascripts/support/sinon-1.3.1.js +0 -3469
  138. data/spec/javascripts/support/sinon-ie-1.3.1.js.skip +0 -82
  139. data/vendor/assets/javascripts/jquery.form.js +0 -1190
  140. data/vendor/assets/javascripts/jquery.hashchange.js +0 -390
  141. data/vendor/assets/javascripts/metamorph.js +0 -409
  142. data/vendor/assets/javascripts/sugar.js +0 -8637
@@ -1,82 +0,0 @@
1
- /**
2
- * Sinon.JS 1.3.1, 2012/01/04
3
- *
4
- * @author Christian Johansen (christian@cjohansen.no)
5
- *
6
- * (The BSD License)
7
- *
8
- * Copyright (c) 2010-2011, Christian Johansen, christian@cjohansen.no
9
- * All rights reserved.
10
- *
11
- * Redistribution and use in source and binary forms, with or without modification,
12
- * are permitted provided that the following conditions are met:
13
- *
14
- * * Redistributions of source code must retain the above copyright notice,
15
- * this list of conditions and the following disclaimer.
16
- * * Redistributions in binary form must reproduce the above copyright notice,
17
- * this list of conditions and the following disclaimer in the documentation
18
- * and/or other materials provided with the distribution.
19
- * * Neither the name of Christian Johansen nor the names of his contributors
20
- * may be used to endorse or promote products derived from this software
21
- * without specific prior written permission.
22
- *
23
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
- */
34
-
35
- "use strict";
36
- /*global sinon, setTimeout, setInterval, clearTimeout, clearInterval, Date*/
37
- /**
38
- * Helps IE run the fake timers. By defining global functions, IE allows
39
- * them to be overwritten at a later point. If these are not defined like
40
- * this, overwriting them will result in anything from an exception to browser
41
- * crash.
42
- *
43
- * If you don't require fake timers to work in IE, don't include this file.
44
- *
45
- * @author Christian Johansen (christian@cjohansen.no)
46
- * @license BSD
47
- *
48
- * Copyright (c) 2010-2011 Christian Johansen
49
- */
50
- function setTimeout() {}
51
- function clearTimeout() {}
52
- function setInterval() {}
53
- function clearInterval() {}
54
- function Date() {}
55
-
56
- // Reassign the original functions. Now their writable attribute
57
- // should be true. Hackish, I know, but it works.
58
- setTimeout = sinon.timers.setTimeout;
59
- clearTimeout = sinon.timers.clearTimeout;
60
- setInterval = sinon.timers.setInterval;
61
- clearInterval = sinon.timers.clearInterval;
62
- Date = sinon.timers.Date;
63
-
64
- /*global sinon*/
65
- /**
66
- * Helps IE run the fake XMLHttpRequest. By defining global functions, IE allows
67
- * them to be overwritten at a later point. If these are not defined like
68
- * this, overwriting them will result in anything from an exception to browser
69
- * crash.
70
- *
71
- * If you don't require fake XHR to work in IE, don't include this file.
72
- *
73
- * @author Christian Johansen (christian@cjohansen.no)
74
- * @license BSD
75
- *
76
- * Copyright (c) 2010-2011 Christian Johansen
77
- */
78
- function XMLHttpRequest() {}
79
-
80
- // Reassign the original function. Now its writable attribute
81
- // should be true. Hackish, I know, but it works.
82
- XMLHttpRequest = sinon.xhr.XMLHttpRequest || undefined;