sitepress-rails 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,11 +43,6 @@ describe "Sitepress.configuration" do
43
43
  end
44
44
  end
45
45
  end
46
- context "Sitepress::Middleware::RequestCache" do
47
- it "is in Rails middleware stack" do
48
- expect(Rails.configuration.middleware).to include(Sitepress::Middleware::RequestCache)
49
- end
50
- end
51
46
  context "Rails.configuration.paths" do
52
47
  subject { Rails.configuration.paths[path].to_a }
53
48
  context "views" do
@@ -61,4 +61,28 @@ describe Sitepress::SiteController, type: :controller do
61
61
  }.to raise_exception(ActionController::RoutingError)
62
62
  end
63
63
  end
64
+
65
+ context "render cache" do
66
+ context "cache_resources=true" do
67
+ before { Sitepress.site.cache_resources = true }
68
+ it "enables cache" do
69
+ expect(Sitepress.site.cache_resources).to be true
70
+ expect(Sitepress.site).to receive(:cache_resources=).with(true)
71
+ expect(Sitepress.site).to receive(:cache_resources=).with(true)
72
+ get_resource "/time"
73
+ expect(Sitepress.site.cache_resources).to be true
74
+ end
75
+ end
76
+ context "cache_resources=false" do
77
+ before { Sitepress.site.cache_resources = false }
78
+ it "enables cache" do
79
+ expect(Sitepress.site.cache_resources).to be false
80
+ expect(Sitepress.site).to receive(:cache_resources=).with(true)
81
+ expect(Sitepress.site).to receive(:cache_resources=).with(false)
82
+ get_resource "/time"
83
+ expect(Sitepress.site.cache_resources).to be false
84
+ end
85
+ end
86
+
87
+ end
64
88
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sitepress-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-03 00:00:00.000000000 Z
11
+ date: 2020-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-rails
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0
61
+ version: 1.0.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.0
68
+ version: 1.0.1
69
69
  description:
70
70
  email:
71
71
  - bradgessler@gmail.com
@@ -86,6 +86,7 @@ files:
86
86
  - lib/sitepress/extensions/rails_request_paths.rb
87
87
  - lib/sitepress/rails.rb
88
88
  - lib/sitepress/rails_configuration.rb
89
+ - lib/sitepress/rails_configuration.rb.orig
89
90
  - lib/sitepress/route_constraint.rb
90
91
  - lib/tasks/sitepress_tasks.rake
91
92
  - spec/dummy/Rakefile