bpm 1.0.0.beta.8 → 1.0.0.beta.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG.md +9 -0
  3. data/bpm.gemspec +2 -7
  4. data/lib/bpm/pipeline/generated_asset.rb +19 -21
  5. data/lib/bpm/pipeline/plugin_context.rb +7 -7
  6. data/lib/bpm/pipeline/plugin_processor.rb +11 -20
  7. data/lib/bpm/pipeline/transport_processor.rb +8 -13
  8. data/lib/bpm/pipeline.rb +47 -42
  9. data/lib/bpm/project_generator.rb +2 -2
  10. data/lib/bpm/version.rb +1 -1
  11. data/lib/bpm.rb +0 -3
  12. data/spec/cli/init_spec.rb +48 -48
  13. data/spec/cli/rebuild_spec.rb +30 -30
  14. data/spec/fixtures/projects/init_app/assets/bpm_libs.js +1 -1
  15. data/spec/fixtures/projects/init_app/assets/bpm_styles.css +1 -1
  16. data/spec/fixtures/projects/init_default/assets/bpm_libs.js +1 -1
  17. data/spec/fixtures/projects/init_default/assets/bpm_styles.css +1 -1
  18. data/spec/plugins/minifier_spec.rb +8 -8
  19. data/templates/project/index.html +0 -2
  20. data/templates/project/{app → lib}/main.js +0 -0
  21. metadata +24 -209
  22. data/.gitmodules +0 -3
  23. data/vendor/sprockets/.gitignore +0 -7
  24. data/vendor/sprockets/.travis.yml +0 -7
  25. data/vendor/sprockets/Gemfile +0 -2
  26. data/vendor/sprockets/LICENSE +0 -20
  27. data/vendor/sprockets/README.md +0 -22
  28. data/vendor/sprockets/Rakefile +0 -8
  29. data/vendor/sprockets/lib/sprockets/asset.rb +0 -198
  30. data/vendor/sprockets/lib/sprockets/asset_attributes.rb +0 -178
  31. data/vendor/sprockets/lib/sprockets/base.rb +0 -134
  32. data/vendor/sprockets/lib/sprockets/bundled_asset.rb +0 -249
  33. data/vendor/sprockets/lib/sprockets/cache/file_store.rb +0 -41
  34. data/vendor/sprockets/lib/sprockets/caching.rb +0 -126
  35. data/vendor/sprockets/lib/sprockets/charset_normalizer.rb +0 -41
  36. data/vendor/sprockets/lib/sprockets/context.rb +0 -221
  37. data/vendor/sprockets/lib/sprockets/digest.rb +0 -73
  38. data/vendor/sprockets/lib/sprockets/directive_processor.rb +0 -397
  39. data/vendor/sprockets/lib/sprockets/eco_template.rb +0 -38
  40. data/vendor/sprockets/lib/sprockets/ejs_template.rb +0 -37
  41. data/vendor/sprockets/lib/sprockets/engines.rb +0 -117
  42. data/vendor/sprockets/lib/sprockets/environment.rb +0 -94
  43. data/vendor/sprockets/lib/sprockets/errors.rb +0 -17
  44. data/vendor/sprockets/lib/sprockets/index.rb +0 -81
  45. data/vendor/sprockets/lib/sprockets/jst_processor.rb +0 -26
  46. data/vendor/sprockets/lib/sprockets/mime.rb +0 -38
  47. data/vendor/sprockets/lib/sprockets/processing.rb +0 -269
  48. data/vendor/sprockets/lib/sprockets/processor.rb +0 -32
  49. data/vendor/sprockets/lib/sprockets/safety_colons.rb +0 -28
  50. data/vendor/sprockets/lib/sprockets/server.rb +0 -270
  51. data/vendor/sprockets/lib/sprockets/static_asset.rb +0 -86
  52. data/vendor/sprockets/lib/sprockets/static_compilation.rb +0 -74
  53. data/vendor/sprockets/lib/sprockets/trail.rb +0 -123
  54. data/vendor/sprockets/lib/sprockets/utils.rb +0 -67
  55. data/vendor/sprockets/lib/sprockets/version.rb +0 -3
  56. data/vendor/sprockets/lib/sprockets.rb +0 -31
  57. data/vendor/sprockets/sprockets.gemspec +0 -30
  58. data/vendor/sprockets/test/fixtures/asset/POW.png +0 -0
  59. data/vendor/sprockets/test/fixtures/asset/application.js +0 -6
  60. data/vendor/sprockets/test/fixtures/asset/bar-utf8.css +0 -2
  61. data/vendor/sprockets/test/fixtures/asset/charset.css +0 -2
  62. data/vendor/sprockets/test/fixtures/asset/circle/a.js +0 -2
  63. data/vendor/sprockets/test/fixtures/asset/circle/b.js +0 -2
  64. data/vendor/sprockets/test/fixtures/asset/circle/c.js +0 -2
  65. data/vendor/sprockets/test/fixtures/asset/compat.js +0 -4
  66. data/vendor/sprockets/test/fixtures/asset/constants.js +0 -2
  67. data/vendor/sprockets/test/fixtures/asset/constants.yml +0 -1
  68. data/vendor/sprockets/test/fixtures/asset/default_mime_type.js +0 -1
  69. data/vendor/sprockets/test/fixtures/asset/filename.js.erb +0 -1
  70. data/vendor/sprockets/test/fixtures/asset/foo-utf8.css +0 -2
  71. data/vendor/sprockets/test/fixtures/asset/included_header.js +0 -4
  72. data/vendor/sprockets/test/fixtures/asset/jquery.tmpl.min.js +0 -1
  73. data/vendor/sprockets/test/fixtures/asset/mismatch.js +0 -1
  74. data/vendor/sprockets/test/fixtures/asset/multiple.js +0 -2
  75. data/vendor/sprockets/test/fixtures/asset/multipleengine.js +0 -1
  76. data/vendor/sprockets/test/fixtures/asset/noengine.js +0 -1
  77. data/vendor/sprockets/test/fixtures/asset/noformat.coffee +0 -1
  78. data/vendor/sprockets/test/fixtures/asset/one.css +0 -1
  79. data/vendor/sprockets/test/fixtures/asset/oneengine.js +0 -1
  80. data/vendor/sprockets/test/fixtures/asset/project.css +0 -1
  81. data/vendor/sprockets/test/fixtures/asset/project.js.erb +0 -4
  82. data/vendor/sprockets/test/fixtures/asset/relative/include.js +0 -4
  83. data/vendor/sprockets/test/fixtures/asset/relative/require.js +0 -1
  84. data/vendor/sprockets/test/fixtures/asset/relative/require_outside_path.js +0 -1
  85. data/vendor/sprockets/test/fixtures/asset/require_self.css +0 -9
  86. data/vendor/sprockets/test/fixtures/asset/require_self_twice.css +0 -8
  87. data/vendor/sprockets/test/fixtures/asset/semicolons/bar.js +0 -1
  88. data/vendor/sprockets/test/fixtures/asset/semicolons/index.js +0 -5
  89. data/vendor/sprockets/test/fixtures/asset/sprite.css.erb +0 -12
  90. data/vendor/sprockets/test/fixtures/asset/tree/all/b/c/d.js +0 -2
  91. data/vendor/sprockets/test/fixtures/asset/tree/all/b/c/e.js +0 -1
  92. data/vendor/sprockets/test/fixtures/asset/tree/all/b/c.js +0 -1
  93. data/vendor/sprockets/test/fixtures/asset/tree/all/b.css +0 -2
  94. data/vendor/sprockets/test/fixtures/asset/tree/all/b.js.erb +0 -1
  95. data/vendor/sprockets/test/fixtures/asset/tree/all/d/c.js.coffee +0 -1
  96. data/vendor/sprockets/test/fixtures/asset/tree/all/d/e.js +0 -1
  97. data/vendor/sprockets/test/fixtures/asset/tree/all_with_require.js +0 -7
  98. data/vendor/sprockets/test/fixtures/asset/tree/all_with_require_directory.js +0 -1
  99. data/vendor/sprockets/test/fixtures/asset/tree/all_with_require_tree.js +0 -2
  100. data/vendor/sprockets/test/fixtures/asset/tree/directory/application.js +0 -2
  101. data/vendor/sprockets/test/fixtures/asset/tree/directory/bar.js +0 -1
  102. data/vendor/sprockets/test/fixtures/asset/tree/directory/foo.js +0 -1
  103. data/vendor/sprockets/test/fixtures/asset/tree/tree/application.js +0 -2
  104. data/vendor/sprockets/test/fixtures/asset/tree/tree/bar.js +0 -1
  105. data/vendor/sprockets/test/fixtures/asset/tree/tree/foo.js +0 -1
  106. data/vendor/sprockets/test/fixtures/asset/tree/with_logical_path/a/a.js +0 -1
  107. data/vendor/sprockets/test/fixtures/asset/tree/with_logical_path/require_tree_with_logical_path.js +0 -1
  108. data/vendor/sprockets/test/fixtures/asset/tree/without_argument/a.js +0 -1
  109. data/vendor/sprockets/test/fixtures/asset/tree/without_argument/b.js +0 -1
  110. data/vendor/sprockets/test/fixtures/asset/tree/without_argument/require_tree_without_argument.js +0 -1
  111. data/vendor/sprockets/test/fixtures/asset/two.css +0 -1
  112. data/vendor/sprockets/test/fixtures/asset/unicode.js +0 -2
  113. data/vendor/sprockets/test/fixtures/asset/unknownexts.min.js +0 -2
  114. data/vendor/sprockets/test/fixtures/asset/users.js.erb.str +0 -4
  115. data/vendor/sprockets/test/fixtures/context/POW.png +0 -0
  116. data/vendor/sprockets/test/fixtures/context/application.js.yml +0 -3
  117. data/vendor/sprockets/test/fixtures/context/bar.js +0 -1
  118. data/vendor/sprockets/test/fixtures/context/foo.js +0 -2
  119. data/vendor/sprockets/test/fixtures/context/helpers.css.erb +0 -3
  120. data/vendor/sprockets/test/fixtures/context/properties.js.erb +0 -7
  121. data/vendor/sprockets/test/fixtures/context/require_glob.js +0 -1
  122. data/vendor/sprockets/test/fixtures/context/resolve_content_type.js.erb +0 -4
  123. data/vendor/sprockets/test/fixtures/context/sprite.css.embed +0 -3
  124. data/vendor/sprockets/test/fixtures/default/application.js.coffee +0 -4
  125. data/vendor/sprockets/test/fixtures/default/blank.gif +0 -0
  126. data/vendor/sprockets/test/fixtures/default/coffee/foo.coffee +0 -1
  127. data/vendor/sprockets/test/fixtures/default/coffee/index.js +0 -3
  128. data/vendor/sprockets/test/fixtures/default/empty +0 -0
  129. data/vendor/sprockets/test/fixtures/default/gallery.css.erb +0 -3
  130. data/vendor/sprockets/test/fixtures/default/gallery.js +0 -1
  131. data/vendor/sprockets/test/fixtures/default/goodbye.jst.eco +0 -1
  132. data/vendor/sprockets/test/fixtures/default/hello.jst.ejs +0 -1
  133. data/vendor/sprockets/test/fixtures/default/hello.txt +0 -1
  134. data/vendor/sprockets/test/fixtures/default/interpolation.js +0 -1
  135. data/vendor/sprockets/test/fixtures/default/missing_require.js +0 -1
  136. data/vendor/sprockets/test/fixtures/default/mobile/a.js +0 -1
  137. data/vendor/sprockets/test/fixtures/default/mobile/b.js +0 -1
  138. data/vendor/sprockets/test/fixtures/default/mobile/c.css +0 -1
  139. data/vendor/sprockets/test/fixtures/default/mobile/d.css +0 -1
  140. data/vendor/sprockets/test/fixtures/default/mobile/index.css +0 -3
  141. data/vendor/sprockets/test/fixtures/default/mobile/index.js +0 -1
  142. data/vendor/sprockets/test/fixtures/default/noreturn.js +0 -1
  143. data/vendor/sprockets/test/fixtures/default/project.js.coffee.erb +0 -2
  144. data/vendor/sprockets/test/fixtures/default/with_data_uri.css.erb +0 -3
  145. data/vendor/sprockets/test/fixtures/directives/code_before_comment +0 -3
  146. data/vendor/sprockets/test/fixtures/directives/comment_without_directives +0 -6
  147. data/vendor/sprockets/test/fixtures/directives/directive_word_splitting +0 -6
  148. data/vendor/sprockets/test/fixtures/directives/directives_after_header +0 -16
  149. data/vendor/sprockets/test/fixtures/directives/double_slash +0 -9
  150. data/vendor/sprockets/test/fixtures/directives/hash +0 -8
  151. data/vendor/sprockets/test/fixtures/directives/no_header +0 -2
  152. data/vendor/sprockets/test/fixtures/directives/slash_star +0 -10
  153. data/vendor/sprockets/test/fixtures/directives/slash_star_single +0 -4
  154. data/vendor/sprockets/test/fixtures/directives/space_between_directive_word +0 -2
  155. data/vendor/sprockets/test/fixtures/directives/triple_hash +0 -10
  156. data/vendor/sprockets/test/fixtures/encoding/ascii.js +0 -1
  157. data/vendor/sprockets/test/fixtures/encoding/ascii_utf8.js +0 -2
  158. data/vendor/sprockets/test/fixtures/encoding/utf16.js +0 -0
  159. data/vendor/sprockets/test/fixtures/encoding/utf8.js +0 -1
  160. data/vendor/sprockets/test/fixtures/encoding/utf8_bom.js +0 -1
  161. data/vendor/sprockets/test/fixtures/engines/hello.alert +0 -1
  162. data/vendor/sprockets/test/fixtures/engines/moo.js.str +0 -1
  163. data/vendor/sprockets/test/fixtures/public/compiled-digest-0aa2105d29558f3eb790d411d7d8fb66.js +0 -3
  164. data/vendor/sprockets/test/fixtures/public/compiled-digest-1c41eb0cf934a0c76babe875f982f9d1.js +0 -1
  165. data/vendor/sprockets/test/fixtures/server/app/javascripts/application.js +0 -5
  166. data/vendor/sprockets/test/fixtures/server/app/javascripts/bar.js +0 -1
  167. data/vendor/sprockets/test/fixtures/server/app/javascripts/foo.js +0 -1
  168. data/vendor/sprockets/test/fixtures/server/app/javascripts/hello.txt +0 -2
  169. data/vendor/sprockets/test/fixtures/server/app/javascripts/tree.js +0 -1
  170. data/vendor/sprockets/test/fixtures/server/vendor/javascripts/missing_require.js +0 -1
  171. data/vendor/sprockets/test/fixtures/server/vendor/stylesheets/missing_require.css +0 -1
  172. data/vendor/sprockets/test/sprockets_test.rb +0 -56
  173. data/vendor/sprockets/test/test_asset.rb +0 -699
  174. data/vendor/sprockets/test/test_asset_attributes.rb +0 -150
  175. data/vendor/sprockets/test/test_caching.rb +0 -62
  176. data/vendor/sprockets/test/test_context.rb +0 -115
  177. data/vendor/sprockets/test/test_directive_processor.rb +0 -124
  178. data/vendor/sprockets/test/test_encoding.rb +0 -65
  179. data/vendor/sprockets/test/test_engines.rb +0 -73
  180. data/vendor/sprockets/test/test_environment.rb +0 -587
  181. data/vendor/sprockets/test/test_server.rb +0 -227
@@ -1,2 +0,0 @@
1
- @charset "UTF-8";
2
- .bar {}
@@ -1,2 +0,0 @@
1
- //= require foo-utf8
2
- //= require bar-utf8
@@ -1,2 +0,0 @@
1
- //= require circle/b
2
- var A;
@@ -1,2 +0,0 @@
1
- //= require circle/c
2
- var B;
@@ -1,2 +0,0 @@
1
- //= require circle/a
2
- var C;
@@ -1,4 +0,0 @@
1
- //= compat
2
- //= require "project"
3
- //= require <users>
4
- //= provide "../images"
@@ -1,2 +0,0 @@
1
- //= compat
2
- var Prototype = { version: '<%= VERSION %>' };
@@ -1 +0,0 @@
1
- VERSION: 2.0
@@ -1 +0,0 @@
1
- // =require "noformat"
@@ -1 +0,0 @@
1
- var filename = "<%= __FILE__ %>";
@@ -1,2 +0,0 @@
1
- @charset "UTF-8";
2
- .foo {}
@@ -1,4 +0,0 @@
1
- # My Application
2
- # =include "project.js"
3
-
4
- hello();
@@ -1 +0,0 @@
1
- var jQuery;
@@ -1 +0,0 @@
1
- // =require "project.css"
@@ -1,2 +0,0 @@
1
- // =require "project"
2
- // =require "project.js"
@@ -1 +0,0 @@
1
- // =require "users.js.erb.str"
@@ -1 +0,0 @@
1
- // =require "users.js"
@@ -1 +0,0 @@
1
- "CoffeeScript"
@@ -1 +0,0 @@
1
- .one {}
@@ -1 +0,0 @@
1
- // =require "users.js.erb"
@@ -1 +0,0 @@
1
- .project {}
@@ -1,4 +0,0 @@
1
- var Project = {
2
- find: function(id) {
3
- }
4
- };
@@ -1,4 +0,0 @@
1
- // Included relatively
2
- // =include ../project.js
3
-
4
- hello();
@@ -1 +0,0 @@
1
- //= require ../project
@@ -1 +0,0 @@
1
- //= require ../../default/gallery
@@ -1,9 +0,0 @@
1
- /*
2
- *= require tree/all/b
3
- *= include one
4
- *= require_self
5
- *= require project
6
- *= include two
7
- */
8
-
9
- body {}
@@ -1,8 +0,0 @@
1
- /*
2
- *= require tree/all/b
3
- *= require_self
4
- *= require project
5
- *= require_self
6
- */
7
-
8
- body {}
@@ -1,5 +0,0 @@
1
- //= require ./bar
2
-
3
- (function() {
4
- var Foo
5
- })
@@ -1,12 +0,0 @@
1
- /*
2
- *= depend_on "POW.png"
3
- */
4
-
5
- <%
6
- require 'base64'
7
- path = File.expand_path("../POW.png", __FILE__)
8
- data = Base64.encode64(File.open(path, "rb") { |f| f.read })
9
- %>
10
- .pow {
11
- background: url(data:image/png;base64,<%= data %>) no-repeat;
12
- }
@@ -1,2 +0,0 @@
1
- // =require ../c
2
- ok("b/c/d.js");
@@ -1 +0,0 @@
1
- ok("b/c/e.js");
@@ -1 +0,0 @@
1
- ok("b/c.js");
@@ -1,2 +0,0 @@
1
- /* b.css */
2
- b { display: none }
@@ -1 +0,0 @@
1
- ok("b.js.erb");
@@ -1 +0,0 @@
1
- ok "d/c.js.coffee"
@@ -1 +0,0 @@
1
- ok("d/e.js");
@@ -1,7 +0,0 @@
1
- // =require ./all/b
2
- // =require ./all/b/c
3
- // =require ./all/b/c/d
4
- // =require ./all/b/c/e
5
- // =require ./all/d/c
6
- // =require ./all/d/e
7
-
@@ -1 +0,0 @@
1
- // =require_directory ./all
@@ -1,2 +0,0 @@
1
- // =require_tree ./all
2
-
@@ -1,2 +0,0 @@
1
- //= require_directory .
2
- var App;
@@ -1,2 +0,0 @@
1
- //= require_tree .
2
- var App;
@@ -1 +0,0 @@
1
- var Bar;
@@ -1 +0,0 @@
1
- var Foo;
@@ -1 +0,0 @@
1
- .two {}
@@ -1,2 +0,0 @@
1
- "☃";
2
-
@@ -1,2 +0,0 @@
1
- // =require "users.js.erb.str"
2
- // =require "jquery.tmpl.min"
@@ -1,4 +0,0 @@
1
- var Users = {
2
- find: function(id) {
3
- }
4
- };
@@ -1,3 +0,0 @@
1
- require:
2
- - foo.js
3
- - bar.js
@@ -1 +0,0 @@
1
- var Bar = {};
@@ -1,2 +0,0 @@
1
- var Foo = {};
2
-
@@ -1,3 +0,0 @@
1
- .pow {
2
- background: url(data:image/png;base64,<%= datauri File.expand_path("../POW.png", __FILE__) %>) no-repeat;
3
- }
@@ -1,7 +0,0 @@
1
- {
2
- "pathname" : "<%= pathname %>",
3
- "__FILE__" : "<%= __FILE__ %>",
4
- "root_path" : "<%= root_path %>",
5
- "logical_path" : "<%= logical_path %>",
6
- "content_type" : "<%= content_type %>"
7
- };
@@ -1 +0,0 @@
1
- //= require_glob "fo*.js"
@@ -1,4 +0,0 @@
1
- <%= resolve("foo.js") %>,
2
- <%= resolve("foo.js", :content_type => "application/javascript") %>,
3
- <%= resolve("foo.js", :content_type => :self) %>,
4
- <%= begin; resolve("foo.js", :content_type => "text/css"); rescue Exception => e; e end %>;
@@ -1,3 +0,0 @@
1
- .pow {
2
- background: url("POW.png") no-repeat;
3
- }
@@ -1,4 +0,0 @@
1
- # My Application
2
- # =require "project.js"
3
-
4
- hello()
@@ -1 +0,0 @@
1
- foo = 'hello'
@@ -1,3 +0,0 @@
1
- //= require ./foo
2
-
3
- return typeof foo;
File without changes
@@ -1,3 +0,0 @@
1
- .gallery {
2
- color: red;
3
- }
@@ -1 +0,0 @@
1
- var Gallery = {};
@@ -1 +0,0 @@
1
- Goodbye <%= @name %>
@@ -1 +0,0 @@
1
- hello: <%= name %>
@@ -1 +0,0 @@
1
- Hello world
@@ -1 +0,0 @@
1
- var Interpolation = <%= 1 + 1 %>;
@@ -1 +0,0 @@
1
- // =require "notfound"
@@ -1 +0,0 @@
1
- var A;
@@ -1 +0,0 @@
1
- var B;
@@ -1,3 +0,0 @@
1
- /*
2
- *= require_tree .
3
- */
@@ -1 +0,0 @@
1
- //= require_tree .
@@ -1 +0,0 @@
1
- var Foo;
@@ -1,2 +0,0 @@
1
- window.Project = class Project
2
- VERSION: <%= "1.0" %>
@@ -1,3 +0,0 @@
1
- body {
2
- background-image: url(<%= asset_data_uri 'blank.gif' %>) no-repeat;
3
- }
@@ -1,3 +0,0 @@
1
- <% VERSION = "1.0" %>
2
- // comment
3
- var VERSION = "<%= VERSION %>";
@@ -1,6 +0,0 @@
1
- /*
2
- * Comment
3
- */
4
-
5
- (function() {
6
- })();
@@ -1,6 +0,0 @@
1
- // =one
2
- // =one "two"
3
- // =one two three
4
- // =one "two three"
5
- // ="four" five
6
- // =six 'seven'
@@ -1,16 +0,0 @@
1
- /*
2
- * Header
3
- *= require a
4
- */
5
-
6
- // =require b
7
- // =require c
8
-
9
- /*= require d */
10
-
11
- /* Not a directive */
12
-
13
- (function() {
14
- })();
15
-
16
- /*= require e */
@@ -1,9 +0,0 @@
1
- // Header
2
- //
3
- // =require "a"
4
- // =require "b"
5
- //
6
- // =require "c"
7
-
8
- (function() {
9
- })();
@@ -1,8 +0,0 @@
1
- # Header
2
- #
3
- # =require "a"
4
- # =require "b"
5
- #
6
- # =require "c"
7
-
8
- (->)()
@@ -1,2 +0,0 @@
1
- (function() {
2
- })();
@@ -1,10 +0,0 @@
1
- /* Header
2
- *
3
- * =require "a"
4
- * =require "b"
5
- *
6
- * =require "c"
7
- */
8
-
9
- (function() {
10
- })();
@@ -1,4 +0,0 @@
1
- /*= require "a" */
2
-
3
- (function() {
4
- })();
@@ -1,2 +0,0 @@
1
- //= require "foo"
2
- var foo;
@@ -1,10 +0,0 @@
1
- ###
2
- Header
3
-
4
- =require "a"
5
- =require "b"
6
-
7
- =require "c"
8
- ###
9
-
10
- (->)()
@@ -1 +0,0 @@
1
- var foo = "bar";
@@ -1,2 +0,0 @@
1
- //= require ascii
2
- //= require utf8
@@ -1 +0,0 @@
1
- var snowman = "☃";
@@ -1 +0,0 @@
1
- var snowman = "☃";
@@ -1 +0,0 @@
1
- Hello world!
@@ -1 +0,0 @@
1
- console.log("Moo, #{RUBY_VERSION}");
@@ -1,3 +0,0 @@
1
- (function() {
2
- application.boot();
3
- })();
@@ -1,5 +0,0 @@
1
- // =require "foo"
2
-
3
- (function() {
4
- application.boot();
5
- })();
@@ -1,2 +0,0 @@
1
- # =require "nothing"
2
- Hello world
@@ -1 +0,0 @@
1
- // =require_tree "."
@@ -1 +0,0 @@
1
- /*= require nonexistent */
@@ -1,56 +0,0 @@
1
- require "test/unit"
2
- require "sprockets"
3
- require "tilt"
4
- require "fileutils"
5
-
6
- if defined? Encoding
7
- Encoding.default_external = 'utf-8'
8
- Encoding.default_internal = 'utf-8'
9
- end
10
-
11
- class Sprockets::TestCase < Test::Unit::TestCase
12
- FIXTURE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "fixtures"))
13
-
14
- undef_method :default_test if method_defined? :default_test
15
-
16
- def self.test(name, &block)
17
- define_method("test #{name.inspect}", &block)
18
- end
19
-
20
- def fixture(path)
21
- IO.read(fixture_path(path))
22
- end
23
-
24
- def fixture_path(path)
25
- File.join(FIXTURE_ROOT, path)
26
- end
27
-
28
- def sandbox(*paths)
29
- backup_paths = paths.select { |path| File.exist?(path) }
30
- remove_paths = paths.select { |path| !File.exist?(path) }
31
-
32
- begin
33
- backup_paths.each do |path|
34
- FileUtils.cp(path, "#{path}.orig")
35
- end
36
-
37
- yield
38
- ensure
39
- backup_paths.each do |path|
40
- if File.exist?("#{path}.orig")
41
- FileUtils.mv("#{path}.orig", path)
42
- end
43
-
44
- assert !File.exist?("#{path}.orig")
45
- end
46
-
47
- remove_paths.each do |path|
48
- if File.exist?(path)
49
- FileUtils.rm_rf(path)
50
- end
51
-
52
- assert !File.exist?(path)
53
- end
54
- end
55
- end
56
- end