openuri_memcached 0.0.3 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/{README.txt → README} +14 -3
- data/lib/openuri_memcached.rb +87 -2
- metadata +16 -36
- data/History.txt +0 -12
- data/License.txt +0 -20
- data/Manifest.txt +0 -19
- data/Rakefile +0 -4
- data/config/hoe.rb +0 -71
- data/config/requirements.rb +0 -17
- data/lib/openuri_memcached/._openuri_memcached.rb +0 -0
- data/lib/openuri_memcached/._version.rb +0 -0
- data/lib/openuri_memcached/openuri_memcached.rb +0 -82
- data/lib/openuri_memcached/version.rb +0 -11
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/setup.rb +0 -1585
- data/spec/openuri_cache_spec.rb +0 -51
- data/tasks/deployment.rake +0 -34
- data/tasks/environment.rake +0 -7
- data/tasks/website.rake +0 -9
data/spec/openuri_cache_spec.rb
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), '..', 'lib', 'openuri_memcached')
|
2
|
-
|
3
|
-
describe OpenURI::Cache, "init" do
|
4
|
-
it "should be disabled" do
|
5
|
-
OpenURI::Cache.should be_disabled
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
describe OpenURI, "module" do
|
10
|
-
it "should query a resource without cache" do
|
11
|
-
open('http://google.com').read.should =~ /html/
|
12
|
-
end
|
13
|
-
|
14
|
-
it "should query a resource with cache" do
|
15
|
-
OpenURI::Cache.enable!
|
16
|
-
OpenURI::Cache.should be_enabled
|
17
|
-
open('http://google.com').read.should =~ /html/
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe OpenURI::Cache, "class" do
|
22
|
-
it "should be able to be enabled" do
|
23
|
-
OpenURI::Cache.enable!
|
24
|
-
OpenURI::Cache.should be_enabled
|
25
|
-
end
|
26
|
-
|
27
|
-
it "should be able to be disabled" do
|
28
|
-
OpenURI::Cache.enable!
|
29
|
-
OpenURI::Cache.disable!
|
30
|
-
OpenURI::Cache.should be_disabled
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should cache for a default of 10 minutes" do
|
34
|
-
OpenURI::Cache.expiry.should eql 60 * 10
|
35
|
-
end
|
36
|
-
|
37
|
-
it "should allow a userset cache expiry timeframe" do
|
38
|
-
OpenURI::Cache.expiry = 60 * 15
|
39
|
-
OpenURI::Cache.expiry.should eql 60 * 15
|
40
|
-
end
|
41
|
-
|
42
|
-
it "should allow a userset host" do
|
43
|
-
server = "10.1.1.1:11211"
|
44
|
-
OpenURI::Cache.host.should eql "localhost:11211"
|
45
|
-
OpenURI::Cache.host = server
|
46
|
-
OpenURI::Cache.host.should eql server
|
47
|
-
end
|
48
|
-
|
49
|
-
# Not actually sure how I could implement this spec!
|
50
|
-
it "should allow instant cache expiry"
|
51
|
-
end
|
data/tasks/deployment.rake
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
desc 'Release the website and new gem version'
|
2
|
-
task :deploy => [:check_version, :website, :release] do
|
3
|
-
puts "Remember to create SVN tag:"
|
4
|
-
puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " +
|
5
|
-
"svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
|
6
|
-
puts "Suggested comment:"
|
7
|
-
puts "Tagging release #{CHANGES}"
|
8
|
-
end
|
9
|
-
|
10
|
-
desc 'Runs tasks website_generate and install_gem as a local deployment of the gem'
|
11
|
-
task :local_deploy => [:website_generate, :install_gem]
|
12
|
-
|
13
|
-
task :check_version do
|
14
|
-
unless ENV['VERSION']
|
15
|
-
puts 'Must pass a VERSION=x.y.z release version'
|
16
|
-
exit
|
17
|
-
end
|
18
|
-
unless ENV['VERSION'] == VERS
|
19
|
-
puts "Please update your version.rb to match the release version, currently #{VERS}"
|
20
|
-
exit
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
desc 'Install the package as a gem, without generating documentation(ri/rdoc)'
|
25
|
-
task :install_gem_no_doc => [:clean, :package] do
|
26
|
-
sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri"
|
27
|
-
end
|
28
|
-
|
29
|
-
namespace :manifest do
|
30
|
-
desc 'Recreate Manifest.txt to include ALL files'
|
31
|
-
task :refresh do
|
32
|
-
`rake check_manifest | patch -p0 > Manifest.txt`
|
33
|
-
end
|
34
|
-
end
|
data/tasks/environment.rake
DELETED