Skip to content

Commit

Permalink
first release
Browse files Browse the repository at this point in the history
  • Loading branch information
Widi Harsojo authored and Widi Harsojo committed Jul 31, 2012
0 parents commit 11abce1
Show file tree
Hide file tree
Showing 11 changed files with 174 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "http://rubygems.org"
gem "actionpack", "~> 3.2.6"

group :development do
gem "bundler", ">= 1.1.4"
gem "jeweler", ">= 1.8.4"
end
53 changes: 53 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
GEM
remote: http://rubygems.org/
specs:
actionpack (3.2.7)
activemodel (= 3.2.7)
activesupport (= 3.2.7)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.1.3)
activemodel (3.2.7)
activesupport (= 3.2.7)
builder (~> 3.0.0)
activesupport (3.2.7)
i18n (~> 0.6)
multi_json (~> 1.0)
builder (3.0.0)
erubis (2.7.0)
git (1.2.5)
hike (1.2.1)
i18n (0.6.0)
jeweler (1.8.4)
bundler (~> 1.0)
git (>= 1.2.5)
rake
rdoc
journey (1.0.4)
json (1.7.4)
multi_json (1.3.6)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-test (0.6.1)
rack (>= 1.0)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
tilt (1.3.3)

PLATFORMS
ruby

DEPENDENCIES
actionpack (~> 3.2.6)
bundler (>= 1.1.4)
jeweler (>= 1.8.4)
20 changes: 20 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2012 Wharsojo

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 2 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
= rails-no-cache

26 changes: 26 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# encoding: utf-8

require 'rubygems'
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'

require 'jeweler'
Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
gem.name = "autocomplete-off"
gem.homepage = "http://github.com/wharsojo/rails-no-cache"
gem.license = "MIT"
gem.summary = %Q{Adds `Header="no-cache"`}
gem.description = %Q{Adds `Header="no-cache"`}
gem.email = "wharsojo@gmail.com"
gem.authors = ["Wharsojo"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
1 change: 1 addition & 0 deletions init.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'rails-no-cache'
16 changes: 16 additions & 0 deletions lib/rails-no-cache.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require 'action_controller'

module ActionController
module Rendering
# rename original method for extending
alias_method :render_original_no_cache, :render

# This re-opens render
def render(*args) #:nodoc:
render_original_no_cache(*args)
self.headers["Cache-Control"] = "no-cache, no-store, max-age=0, must-revalidate"
response_body
end
end
end

Binary file added rails-no-cache-0.1.0.gem
Binary file not shown.
Binary file added rails-no-cache-0.2.0.gem
Binary file not shown.
48 changes: 48 additions & 0 deletions rails-no-cache.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{rails-no-cache}
s.version = "0.1.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = [%q{Wharsojo}]
s.date = %q{2012-07-31}
s.description = %q{Adds `Header="no-cache"`}
s.email = %q{wharsojo@gmail.com}
s.extra_rdoc_files = [
"LICENSE.txt",
"README.rdoc"
]
s.files = [
"Gemfile",
"Gemfile.lock",
"LICENSE.txt",
"README.rdoc",
"Rakefile",
"VERSION",
"rails-no-cache.gemspec",
"init.rb",
"lib/rails-no-cache.rb"
]
s.homepage = %q{http://github.com/wharsojo/rails-no-cache}
s.licenses = [%q{MIT}]
s.require_paths = [%q{lib}]
s.rubygems_version = %q{1.9}
s.summary = %q{Adds `Header="no-cache"`}

if s.respond_to? :specification_version then
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<actionpack>, [">= 3.0.0"])
else
s.add_dependency(%q<actionpack>, [">= 3.0.0"])
end
else
s.add_dependency(%q<actionpack>, [">= 3.0.0"])
end
end

0 comments on commit 11abce1

Please sign in to comment.