sitepress-rails 0.1.29 → 2.0.0.beta3

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 +4 -4
  2. data/README.md +8 -2
  3. data/lib/sitepress/build_paths/directory_index_path.rb +12 -0
  4. data/lib/sitepress/build_paths/index_path.rb +20 -0
  5. data/lib/sitepress/build_paths/root_path.rb +40 -0
  6. data/lib/sitepress/compiler.rb +68 -0
  7. data/lib/sitepress/engine.rb +44 -12
  8. data/lib/sitepress/rails.rb +12 -10
  9. data/lib/sitepress/rails_configuration.rb +8 -6
  10. data/lib/sitepress/renderers/controller.rb +51 -0
  11. data/lib/sitepress/renderers/server.rb +25 -0
  12. data/spec/dummy/config/application.rb +3 -1
  13. data/spec/dummy/config/environments/development.rb +1 -1
  14. data/spec/dummy/config/environments/production.rb +1 -1
  15. data/spec/dummy/log/test.log +2374 -78341
  16. data/spec/sitepress-rails_spec.rb +1 -30
  17. data/spec/sitepress/compiler_spec.rb +19 -0
  18. data/spec/sitepress/sitepress_site_controller_spec.rb +47 -6
  19. metadata +98 -84
  20. data/app/controllers/concerns/sitepress/site_pages.rb +0 -98
  21. data/app/controllers/sitepress/site_controller.rb +0 -7
  22. data/app/helpers/sitepress/application_helper.rb +0 -4
  23. data/config/routes.rb +0 -7
  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 -1360
  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,15 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe Sitepress::Extensions::IndexRequestPath do
4
- subject { Sitepress::Extensions::IndexRequestPath.new }
5
- let(:site) { Sitepress::Site.new(root_path: "spec/sites/sample") }
6
- let(:root) { site.root }
7
-
8
- context "#process_resources" do
9
- before { subject.process_resources(root) }
10
- it "changes /index.html request_path to /" do
11
- # require "pry" ; binding.pry
12
- expect(root.get("/").request_path).to eql("/")
13
- end
14
- end
15
- end
@@ -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