Permalink
Browse files

cleanup

  • Loading branch information...
grosser committed Nov 13, 2012
1 parent a751cf3 commit 94defe0bf42ff67d78f46fdf12619b1da68506ed
View
12 Gemfile
@@ -1,9 +1,7 @@
source :rubygems
-group :dev do
- gem 'appraisal'
- gem 'actionpack'
- gem 'rake'
- gem 'rspec', '~>2'
- gem 'jeweler'
-end
+gem 'bump'
+gem 'appraisal'
+gem 'actionpack'
+gem 'rake'
+gem 'rspec', '~>2'
View
@@ -21,27 +21,19 @@ GEM
bundler
rake
builder (3.0.4)
+ bump (0.3.5)
diff-lcs (1.1.3)
erubis (2.7.0)
- git (1.2.5)
hike (1.2.1)
i18n (0.6.1)
- jeweler (1.8.4)
- bundler (~> 1.0)
- git (>= 1.2.5)
- rake
- rdoc
journey (1.0.4)
- json (1.7.5)
multi_json (1.3.7)
rack (1.4.1)
rack-cache (1.2)
rack (>= 0.4)
rack-test (0.6.2)
rack (>= 1.0)
rake (10.0.0)
- rdoc (3.12)
- json (~> 1.4)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
@@ -63,6 +55,6 @@ PLATFORMS
DEPENDENCIES
actionpack
appraisal
- jeweler
+ bump
rake
rspec (~> 2)
View
@@ -1,5 +1,6 @@
require 'rake/testtask'
require 'appraisal'
+require 'bump/tasks'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib'
@@ -10,19 +11,3 @@ end
task :default do
sh "bundle exec rake appraisal:install && bundle exec rake appraisal test"
end
-
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = 'easy_esi'
- gem.summary = "Rails: Cached pages with updated partials"
- gem.email = "michael@grosser.it"
- gem.homepage = "http://github.com/grosser/#{gem.name}"
- gem.authors = ["Michael Grosser"]
- gem.add_runtime_dependency 'activerecord'
- end
-
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler, or one of its dependencies, is not available. Install it with: gem install jeweler"
-end
View
@@ -11,9 +11,6 @@ Basics
[Rails 2 Version](http://github.com/grosser/easy_esi/tree/rails2)
gem install easy_esi
-Or
-
- rails plugin install git://github.com/grosser/easy_esi.git
### Action-cache the controller (5s)
class UsersController < ApplicationController
View
@@ -1 +0,0 @@
-0.2.3
View
@@ -1,53 +1,13 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
-# -*- encoding: utf-8 -*-
+$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
+name = "easy_esi"
+require "#{name}/version"
-Gem::Specification.new do |s|
- s.name = "easy_esi"
- s.version = "0.2.3"
-
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Michael Grosser"]
- s.date = "2011-10-27"
+Gem::Specification.new name, EasyEsi::VERSION do |s|
+ s.authors = "Michael Grosser"
s.email = "michael@grosser.it"
- s.files = [
- "CHANGELOG",
- "Gemfile",
- "Gemfile.lock",
- "Rakefile",
- "Readme.md",
- "VERSION",
- "easy_esi.gemspec",
- "init.rb",
- "lib/easy_esi.rb",
- "test/easy_esi_test.rb",
- "test/test_helper.rb",
- "test/views/esi_disabled/_a_partial.erb",
- "test/views/esi_disabled/show.erb",
- "test/views/esi_disabled/test_filter.erb",
- "test/views/esi_disabled/with_hash.erb",
- "test/views/esi_enabled/_a_partial.erb",
- "test/views/esi_enabled/_unserialize.erb",
- "test/views/esi_enabled/serialize.erb",
- "test/views/esi_enabled/show.erb",
- "test/views/esi_enabled/with_hash.erb"
- ]
- s.homepage = "http://github.com/grosser/easy_esi"
- s.require_paths = ["lib"]
- s.rubygems_version = "1.8.10"
+ s.files = `git ls-files`.split("\n")
+ s.homepage = "http://github.com/grosser/#{name}"
s.summary = "Rails: Cached pages with updated partials"
-
- 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<activerecord>, [">= 0"])
- else
- s.add_dependency(%q<activerecord>, [">= 0"])
- end
- else
- s.add_dependency(%q<activerecord>, [">= 0"])
- end
+ s.add_runtime_dependency "actionpack", ">= 2"
end
@@ -2,6 +2,7 @@
source :rubygems
+gem "bump"
gem "actionpack", "~>3.0.0"
gem "rake"
gem "appraisal"
@@ -21,6 +21,7 @@ GEM
bundler
rake
builder (2.1.2)
+ bump (0.3.5)
diff-lcs (1.1.3)
erubis (2.6.6)
abstract (>= 1.0.0)
@@ -47,5 +48,6 @@ PLATFORMS
DEPENDENCIES
actionpack (~> 3.0.0)
appraisal
+ bump
rake
rspec
@@ -2,6 +2,7 @@
source :rubygems
+gem "bump"
gem "actionpack", "~>3.1.0"
gem "rake"
gem "appraisal"
@@ -22,6 +22,7 @@ GEM
bundler
rake
builder (3.0.4)
+ bump (0.3.5)
diff-lcs (1.1.3)
erubis (2.7.0)
hike (1.2.1)
@@ -55,5 +56,6 @@ PLATFORMS
DEPENDENCIES
actionpack (~> 3.1.0)
appraisal
+ bump
rake
rspec
@@ -2,6 +2,7 @@
source :rubygems
+gem "bump"
gem "actionpack", "~>3.2.0"
gem "rake"
gem "appraisal"
@@ -21,6 +21,7 @@ GEM
bundler
rake
builder (3.0.4)
+ bump (0.3.5)
diff-lcs (1.1.3)
erubis (2.7.0)
hike (1.2.1)
@@ -54,5 +55,6 @@ PLATFORMS
DEPENDENCIES
actionpack (~> 3.2.0)
appraisal
+ bump
rake
rspec
View
@@ -1 +0,0 @@
-require 'easy_esi'
View
@@ -1,6 +1,6 @@
-class EasyEsi
- VERSION = File.read( File.join(File.dirname(__FILE__),'..','VERSION') ).strip
+require "easy_esi/version"
+module EasyEsi
def self.include_for(data)
%{<esi:include src="#{serialize(data)}"/>}.html_safe
end
View
@@ -0,0 +1,3 @@
+module EasyEsi
+ Version = VERSION = "0.2.3"
+end
View
@@ -72,7 +72,7 @@ def test_filter
end
def send_a_file
- send_file "VERSION"
+ send_file "Rakefile"
end
end
@@ -123,7 +123,7 @@ def setup
test "it can send a file" do
get :send_a_file
- @response.body.should == File.read('VERSION')
+ @response.body.should =~ /task :default/
end
end
View
@@ -5,63 +5,45 @@
require 'action_controller'
require 'test/unit'
$LOAD_PATH << 'lib'
-require './init'
-
-# rails 2 vs ruby 1.9.3
-MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1]
+require 'easy_esi'
ActionController::Base.cache_store = :memory_store
-if ActionPack::VERSION::MAJOR > 2
- require 'action_dispatch/testing/test_process'
+require 'action_dispatch/testing/test_process'
# fake checks
- require 'ostruct'
- module ActionController::UrlFor
- def _routes
- helpers = OpenStruct.new
- helpers.url_helpers = Module.new
- helpers
- end
+require 'ostruct'
+module ActionController::UrlFor
+ def _routes
+ helpers = OpenStruct.new
+ helpers.url_helpers = Module.new
+ helpers
end
+end
- ROUTES = ActionDispatch::Routing::RouteSet.new
- ROUTES.draw do
- match ':controller(/:action(/:id(.:format)))'
- end
- ROUTES.finalize!
+ROUTES = ActionDispatch::Routing::RouteSet.new
+ROUTES.draw do
+ match ':controller(/:action(/:id(.:format)))'
+end
+ROUTES.finalize!
# funky patch to get @routes working, in 'setup' did not work
- module ActionController::TestCase::Behavior
- def process_with_routes(*args)
- @routes = ROUTES
- process_without_routes(*args)
- end
- alias_method_chain :process, :routes
+module ActionController::TestCase::Behavior
+ def process_with_routes(*args)
+ @routes = ROUTES
+ process_without_routes(*args)
end
+ alias_method_chain :process, :routes
+end
- class ActionController::Base
- self.view_paths = 'test/views'
-
- def self._routes
- ROUTES
- end
+class ActionController::Base
+ self.view_paths = 'test/views'
- def url_for(*args)
- 'xxx'
- end
+ def self._routes
+ ROUTES
end
-else
- require 'action_controller/test_process'
-
- ActionController::Routing::Routes.reload rescue nil
- ActionController::Base.cache_store = :memory_store
-
- class ActionController::Base
- before_filter :set_view_paths
- def set_view_paths
- @template.view_paths = 'test/views'
- end
+ def url_for(*args)
+ 'xxx'
end
end

0 comments on commit 94defe0

Please sign in to comment.