rails-no-cache 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ source "http://rubygems.org"
2
+ gem "actionpack", "~> 3.2.6"
3
+
4
+ group :development do
5
+ gem "bundler", ">= 1.1.4"
6
+ gem "jeweler", ">= 1.8.4"
7
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,53 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionpack (3.2.7)
5
+ activemodel (= 3.2.7)
6
+ activesupport (= 3.2.7)
7
+ builder (~> 3.0.0)
8
+ erubis (~> 2.7.0)
9
+ journey (~> 1.0.4)
10
+ rack (~> 1.4.0)
11
+ rack-cache (~> 1.2)
12
+ rack-test (~> 0.6.1)
13
+ sprockets (~> 2.1.3)
14
+ activemodel (3.2.7)
15
+ activesupport (= 3.2.7)
16
+ builder (~> 3.0.0)
17
+ activesupport (3.2.7)
18
+ i18n (~> 0.6)
19
+ multi_json (~> 1.0)
20
+ builder (3.0.0)
21
+ erubis (2.7.0)
22
+ git (1.2.5)
23
+ hike (1.2.1)
24
+ i18n (0.6.0)
25
+ jeweler (1.8.4)
26
+ bundler (~> 1.0)
27
+ git (>= 1.2.5)
28
+ rake
29
+ rdoc
30
+ journey (1.0.4)
31
+ json (1.7.4)
32
+ multi_json (1.3.6)
33
+ rack (1.4.1)
34
+ rack-cache (1.2)
35
+ rack (>= 0.4)
36
+ rack-test (0.6.1)
37
+ rack (>= 1.0)
38
+ rake (0.9.2.2)
39
+ rdoc (3.12)
40
+ json (~> 1.4)
41
+ sprockets (2.1.3)
42
+ hike (~> 1.2)
43
+ rack (~> 1.0)
44
+ tilt (~> 1.1, != 1.3.0)
45
+ tilt (1.3.3)
46
+
47
+ PLATFORMS
48
+ ruby
49
+
50
+ DEPENDENCIES
51
+ actionpack (~> 3.2.6)
52
+ bundler (>= 1.1.4)
53
+ jeweler (>= 1.8.4)
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 Wharsojo
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,2 @@
1
+ = rails-no-cache
2
+
data/Rakefile ADDED
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "autocomplete-off"
18
+ gem.homepage = "http://github.com/wharsojo/rails-no-cache"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Adds `Header="no-cache"`}
21
+ gem.description = %Q{Adds `Header="no-cache"`}
22
+ gem.email = "wharsojo@gmail.com"
23
+ gem.authors = ["Wharsojo"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'rails-no-cache'
@@ -0,0 +1,16 @@
1
+ require 'action_controller'
2
+
3
+ module ActionController
4
+ module Rendering
5
+ # rename original method for extending
6
+ alias_method :render_original_no_cache, :render
7
+
8
+ # This re-opens render
9
+ def render(*args) #:nodoc:
10
+ render_original_no_cache(*args)
11
+ self.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
12
+ response_body
13
+ end
14
+ end
15
+ end
16
+
@@ -0,0 +1,48 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{rails-no-cache}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = [%q{Wharsojo}]
12
+ s.date = %q{2012-07-31}
13
+ s.description = %q{Adds `Header="no-cache"`}
14
+ s.email = %q{wharsojo@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ "Gemfile",
21
+ "Gemfile.lock",
22
+ "LICENSE.txt",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "rails-no-cache.gemspec",
27
+ "init.rb",
28
+ "lib/rails-no-cache.rb"
29
+ ]
30
+ s.homepage = %q{http://github.com/wharsojo/rails-no-cache}
31
+ s.licenses = [%q{MIT}]
32
+ s.require_paths = [%q{lib}]
33
+ s.rubygems_version = %q{1.9}
34
+ s.summary = %q{Adds `Header="no-cache"`}
35
+
36
+ if s.respond_to? :specification_version then
37
+ s.specification_version = 3
38
+
39
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
40
+ s.add_runtime_dependency(%q<actionpack>, [">= 3.0.0"])
41
+ else
42
+ s.add_dependency(%q<actionpack>, [">= 3.0.0"])
43
+ end
44
+ else
45
+ s.add_dependency(%q<actionpack>, [">= 3.0.0"])
46
+ end
47
+ end
48
+
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails-no-cache
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Wharsojo
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-07-31 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: actionpack
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 3.0.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.0.0
30
+ description: Adds `Header="no-cache"`
31
+ email: wharsojo@gmail.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files:
35
+ - LICENSE.txt
36
+ - README.rdoc
37
+ files:
38
+ - Gemfile
39
+ - Gemfile.lock
40
+ - LICENSE.txt
41
+ - README.rdoc
42
+ - Rakefile
43
+ - VERSION
44
+ - rails-no-cache.gemspec
45
+ - init.rb
46
+ - lib/rails-no-cache.rb
47
+ homepage: http://github.com/wharsojo/rails-no-cache
48
+ licenses:
49
+ - MIT
50
+ post_install_message:
51
+ rdoc_options: []
52
+ require_paths:
53
+ - lib
54
+ required_ruby_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ requirements: []
67
+ rubyforge_project:
68
+ rubygems_version: 1.8.24
69
+ signing_key:
70
+ specification_version: 3
71
+ summary: Adds `Header="no-cache"`
72
+ test_files: []