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.
- checksums.yaml +4 -4
- data/README.md +8 -2
- data/lib/sitepress/build_paths/directory_index_path.rb +12 -0
- data/lib/sitepress/build_paths/index_path.rb +20 -0
- data/lib/sitepress/build_paths/root_path.rb +40 -0
- data/lib/sitepress/compiler.rb +68 -0
- data/lib/sitepress/engine.rb +44 -12
- data/lib/sitepress/rails.rb +12 -10
- data/lib/sitepress/rails_configuration.rb +8 -6
- data/lib/sitepress/renderers/controller.rb +51 -0
- data/lib/sitepress/renderers/server.rb +25 -0
- data/spec/dummy/config/application.rb +3 -1
- data/spec/dummy/config/environments/development.rb +1 -1
- data/spec/dummy/config/environments/production.rb +1 -1
- data/spec/dummy/log/test.log +2374 -78341
- data/spec/sitepress-rails_spec.rb +1 -30
- data/spec/sitepress/compiler_spec.rb +19 -0
- data/spec/sitepress/sitepress_site_controller_spec.rb +47 -6
- metadata +98 -84
- data/app/controllers/concerns/sitepress/site_pages.rb +0 -98
- data/app/controllers/sitepress/site_controller.rb +0 -7
- data/app/helpers/sitepress/application_helper.rb +0 -4
- data/config/routes.rb +0 -7
- data/lib/sitepress/extensions/index_request_path.rb +0 -24
- data/lib/sitepress/extensions/partials_remover.rb +0 -19
- data/lib/sitepress/extensions/rails_request_paths.rb +0 -20
- data/spec/dummy/app/models/application_record.rb +0 -3
- data/spec/dummy/db/production.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/production.log +0 -1360
- data/spec/sitepress/extensions/index_request_path_spec.rb +0 -15
- data/spec/sitepress/extensions/partials_remover_spec.rb +0 -12
- 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
|