sitepress-rails 0.1.27 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +8 -2
  3. data/app/controllers/concerns/sitepress/site_pages.rb +82 -11
  4. data/app/controllers/sitepress/site_controller.rb +1 -1
  5. data/config/routes.rb +5 -0
  6. data/lib/sitepress/build_paths/directory_index_path.rb +12 -0
  7. data/lib/sitepress/build_paths/index_path.rb +20 -0
  8. data/lib/sitepress/build_paths/root_path.rb +40 -0
  9. data/lib/sitepress/compiler.rb +68 -0
  10. data/lib/sitepress/engine.rb +40 -17
  11. data/lib/sitepress/rails.rb +12 -10
  12. data/lib/sitepress/rails_configuration.rb +8 -6
  13. data/lib/sitepress/renderers/controller.rb +51 -0
  14. data/lib/sitepress/renderers/server.rb +25 -0
  15. data/spec/dummy/config/application.rb +3 -1
  16. data/spec/dummy/config/environments/development.rb +1 -1
  17. data/spec/dummy/config/environments/production.rb +1 -1
  18. data/spec/dummy/log/test.log +2692 -57880
  19. data/spec/sitepress-rails_spec.rb +11 -33
  20. data/spec/sitepress/compiler_spec.rb +19 -0
  21. data/spec/sitepress/sitepress_site_controller_spec.rb +59 -9
  22. metadata +61 -44
  23. data/app/helpers/sitepress/application_helper.rb +0 -4
  24. data/lib/sitepress/extensions/index_request_path.rb +0 -24
  25. data/lib/sitepress/extensions/partials_remover.rb +0 -19
  26. data/lib/sitepress/extensions/rails_request_paths.rb +0 -20
  27. data/spec/dummy/app/models/application_record.rb +0 -3
  28. data/spec/dummy/db/production.sqlite3 +0 -0
  29. data/spec/dummy/db/test.sqlite3 +0 -0
  30. data/spec/dummy/log/production.log +0 -392
  31. data/spec/sitepress/extensions/index_request_path_spec.rb +0 -15
  32. data/spec/sitepress/extensions/partials_remover_spec.rb +0 -12
  33. data/spec/sitepress/extensions/rails_request_paths_spec.rb +0 -9
@@ -1,12 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe Sitepress::Extensions::PartialsRemover do
4
- context ".partial?" do
5
- it "is true if begins with _" do
6
- expect(Sitepress::Extensions::PartialsRemover.partial?("/foo.bar/_buzz.haml")).to be true
7
- end
8
- it "is false if does not being with _" do
9
- expect(Sitepress::Extensions::PartialsRemover.partial?("/foo.bar/buzz.haml")).to be false
10
- end
11
- end
12
- end
@@ -1,9 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe Sitepress::Extensions::RailsRequestPaths do
4
- context ".format_path" do
5
- it "converts /foo.bar/buzz.html to /foo.bar/buzz" do
6
- expect(Sitepress::Extensions::RailsRequestPaths.format_path("/foo.bar/buzz"))
7
- end
8
- end
9
- end