munge 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/lib/munge.rb +32 -31
  3. data/lib/munge/application.rb +7 -7
  4. data/lib/munge/bootloader.rb +0 -11
  5. data/lib/munge/cli.rb +3 -3
  6. data/lib/munge/cli/commands/build.rb +17 -21
  7. data/lib/munge/cli/commands/clean.rb +28 -33
  8. data/lib/munge/cli/commands/init.rb +1 -1
  9. data/lib/munge/cli/commands/server.rb +3 -3
  10. data/lib/munge/cli/dispatch.rb +56 -13
  11. data/lib/munge/config.rb +2 -2
  12. data/lib/munge/{system.rb → conglomerate.rb} +21 -14
  13. data/lib/munge/{system → conglomerate}/collection.rb +5 -26
  14. data/lib/munge/{system → conglomerate}/item_factory.rb +1 -1
  15. data/lib/munge/{system → conglomerate}/item_factory/content_parser.rb +1 -1
  16. data/lib/munge/{system → conglomerate}/item_factory/item_identifier.rb +1 -1
  17. data/lib/munge/conglomerate/processor.rb +138 -0
  18. data/lib/munge/conglomerate/reader.rb +33 -0
  19. data/lib/munge/{system → conglomerate}/router.rb +3 -3
  20. data/lib/munge/{system → conglomerate}/router/itemish.rb +1 -1
  21. data/lib/munge/{errors.rb → error.rb} +1 -25
  22. data/lib/munge/{extras → extra}/livereload.rb +5 -5
  23. data/lib/munge/{extras → extra}/livereload/messaging.rb +1 -1
  24. data/lib/munge/{extras → extra}/livereload/server.rb +1 -1
  25. data/lib/munge/{extras → extra}/livereload/update_client.rb +1 -1
  26. data/lib/munge/{extras → extra}/livereload/update_server.rb +1 -1
  27. data/lib/munge/{extras → extra}/livereload/vendor/livereload.js +0 -0
  28. data/lib/munge/{formatters → formatter}/default.rb +1 -1
  29. data/lib/munge/{formatters → formatter}/dots.rb +1 -1
  30. data/lib/munge/{formatters → formatter}/silent.rb +1 -1
  31. data/lib/munge/function/clean.rb +18 -0
  32. data/lib/munge/function/write.rb +68 -0
  33. data/lib/munge/go/sass.rb +5 -5
  34. data/lib/munge/go/sass/asset_urls.rb +2 -2
  35. data/lib/munge/{helpers → helper}/asset_paths.rb +1 -1
  36. data/lib/munge/{helpers → helper}/asset_tags.rb +1 -1
  37. data/lib/munge/{helpers → helper}/capture.rb +1 -1
  38. data/lib/munge/helper/data.rb +21 -0
  39. data/lib/munge/helper/define_module.rb +13 -0
  40. data/lib/munge/{helpers → helper}/find.rb +3 -3
  41. data/lib/munge/{helpers → helper}/link.rb +3 -3
  42. data/lib/munge/{helpers → helper}/livereload.rb +1 -1
  43. data/lib/munge/helper/rendering.rb +51 -0
  44. data/lib/munge/{helpers → helper}/tag.rb +4 -8
  45. data/lib/munge/item.rb +4 -5
  46. data/lib/munge/load.rb +60 -0
  47. data/lib/munge/pre_init.rb +10 -7
  48. data/lib/munge/{routers → router}/add_directory_index.rb +1 -1
  49. data/lib/munge/{routers → router}/auto_add_extension.rb +1 -1
  50. data/lib/munge/{routers → router}/fingerprint.rb +1 -1
  51. data/lib/munge/{routers → router}/remove_index_basename.rb +1 -1
  52. data/lib/munge/version.rb +1 -1
  53. data/lib/munge/vfs/dry_run.rb +28 -0
  54. data/lib/munge/vfs/filesystem.rb +44 -0
  55. data/lib/munge/vfs/memory.rb +33 -0
  56. data/lib/munge/write_manager/all.rb +11 -11
  57. data/lib/munge/write_manager/only_needed.rb +9 -9
  58. data/munge.gemspec +25 -17
  59. data/seeds/boot.rb +21 -0
  60. data/seeds/boot.yml +10 -0
  61. data/seeds/config.rb +7 -0
  62. data/seeds/layouts/blog_archives.html.erb +1 -1
  63. data/seeds/layouts/blog_index.html.erb +1 -1
  64. data/seeds/layouts/default.html.erb +1 -1
  65. data/seeds/lib/routing.rb +8 -8
  66. data/seeds/lib/sass.rb +1 -1
  67. data/seeds/lib/view_helpers.rb +3 -11
  68. data/seeds/rules.rb +1 -1
  69. data/seeds/src/home/index.html.erb +1 -1
  70. metadata +64 -46
  71. data/lib/munge/cleaner.rb +0 -31
  72. data/lib/munge/helpers/rendering.rb +0 -100
  73. data/lib/munge/init.rb +0 -45
  74. data/lib/munge/io/dry_run.rb +0 -31
  75. data/lib/munge/io/filesystem.rb +0 -38
  76. data/lib/munge/io/noop.rb +0 -27
  77. data/lib/munge/runner.rb +0 -68
  78. data/lib/munge/system/processor.rb +0 -52
  79. data/lib/munge/system/readers/filesystem.rb +0 -52
  80. data/lib/munge/transformers/tilt_transformer.rb +0 -40
  81. data/lib/munge/util/import.rb +0 -15
  82. data/seeds/setup.rb +0 -3
@@ -1,40 +0,0 @@
1
- module Munge
2
- module Transformers
3
- class TiltTransformer
4
- def initialize(system)
5
- @system = system
6
- @registry = []
7
- @demands = Hash.new { Hash.new }
8
- end
9
-
10
- def name
11
- :tilt
12
- end
13
-
14
- def call(item, content, renderer = nil)
15
- scope = Scope.new(@system.clone, @demands)
16
- @registry.each { |helpers| scope.extend(helpers) }
17
-
18
- scope.render_with_layout(item, content_engines: renderer, content_override: content)
19
- end
20
-
21
- def register(helper)
22
- @registry.push(helper)
23
- end
24
-
25
- def demand(tilt_template, **options)
26
- @demands[tilt_template] = @demands[tilt_template].merge(options)
27
- end
28
-
29
- class Scope
30
- def initialize(system, tilt_options)
31
- @system = system
32
- @tilt_options = tilt_options
33
- end
34
-
35
- attr_reader :system
36
- attr_reader :tilt_options
37
- end
38
- end
39
- end
40
- end
@@ -1,15 +0,0 @@
1
- module Munge
2
- module Util
3
- module Import
4
- # Loads file into current scope. Similar to `load "filename.rb"`
5
- #
6
- # @param absolute_file_path [String]
7
- # @param execution_context [Binding]
8
- # @return [void]
9
- def import_to_context(absolute_file_path, execution_context)
10
- contents = File.read(absolute_file_path)
11
- execution_context.eval(contents, absolute_file_path)
12
- end
13
- end
14
- end
15
- end
@@ -1,3 +0,0 @@
1
- Dir.glob(File.join(lib_path, "*.rb")).sort.each do |file_path|
2
- import(file_path)
3
- end