Permalink
Browse files

Getting a release of 1.7.1 ready.

Minimal changes to get the gem to load without warnings and the specs to run using
current versions of JRuby.
  • Loading branch information...
1 parent 6660f7e commit 06c5709269d59e9a4ad96b18d8dde659d897557f @fredjean fredjean committed Jan 25, 2013
Showing with 63 additions and 8 deletions.
  1. +1 −0 .gitignore
  2. +7 −0 Gemfile
  3. +44 −0 Gemfile.lock
  4. +5 −2 Rakefile
  5. +4 −4 lib/memcache.rb
  6. +2 −2 spec/jruby_memcache_spec.rb
View
@@ -4,4 +4,5 @@ nbproject/private
*.orig
pkg
*.gem
+.ruby-version
View
@@ -0,0 +1,7 @@
+source 'https://rubygems.org'
+
+gem 'jeweler'
+gem 'rake'
+gem 'rspec'
+gem 'pry'
+gem 'pry-nav'
View
@@ -0,0 +1,44 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ coderay (1.0.8)
+ diff-lcs (1.1.3)
+ git (1.2.5)
+ jeweler (1.8.4)
+ bundler (~> 1.0)
+ git (>= 1.2.5)
+ rake
+ rdoc
+ json (1.7.6)
+ json (1.7.6-java)
+ method_source (0.8.1)
+ pry (0.9.11.4-java)
+ coderay (~> 1.0.5)
+ method_source (~> 0.8)
+ slop (~> 3.4)
+ spoon (~> 0.0)
+ pry-nav (0.2.3)
+ pry (~> 0.9.10)
+ rake (10.0.3)
+ rdoc (3.12)
+ json (~> 1.4)
+ rspec (2.12.0)
+ rspec-core (~> 2.12.0)
+ rspec-expectations (~> 2.12.0)
+ rspec-mocks (~> 2.12.0)
+ rspec-core (2.12.2)
+ rspec-expectations (2.12.1)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.12.1)
+ slop (3.4.3)
+ spoon (0.0.1)
+
+PLATFORMS
+ java
+
+DEPENDENCIES
+ jeweler
+ pry
+ pry-nav
+ rake
+ rspec
View
@@ -15,13 +15,16 @@ end
if RUBY_PLATFORM =~ /java/i
begin
- require 'spec/rake/spectask'
+ require 'rspec/core/rake_task'
task :default => :spec
desc "Run the specs for the jruby-memcache-client gem"
- Spec::Rake::SpecTask.new
+ RSpec::Core::RakeTask.new(:spec)
rescue LoadError
+
+ require 'pry'; binding.pry
+
puts "You must have rspec installed in order to run the tests."
end
else
View
@@ -4,11 +4,11 @@
require File.dirname(__FILE__) + '/java/java_memcached-release_2.5.1.jar'
class MemCache
- include_class 'com.danga.MemCached.MemCachedClient'
- include_class 'com.danga.MemCached.SockIOPool'
- include_class 'com.danga.MemCached.Logger'
+ java_import 'com.danga.MemCached.MemCachedClient'
+ java_import 'com.danga.MemCached.SockIOPool'
+ java_import 'com.danga.MemCached.Logger'
- VERSION = '1.7.0'
+ VERSION = '1.7.1'
##
# Default options for the cache object.
@@ -5,7 +5,7 @@
hostname = `hostname`.strip
- ["127.0.0.1:11211", "127.0.0.1", hostname, "#{hostname}:11211"].each do |server|
+ ["127.0.0.1:11211", "127.0.0.1", "localhost:11211", "localhost"].each do |server|
before :all do
@server = server
@normalized_server = @server =~ /(.+):(\d+)/ ? @server : "#{@server}:11211"
@@ -47,7 +47,7 @@
end
it "should work with an error handler" do
- include_class 'com.danga.MemCached.MemCachedClient'
+ java_import 'com.danga.MemCached.MemCachedClient'
java_memcache_client = mock.as_null_object
MemCachedClient.stub!(:new => java_memcache_client)
error_handler = Object.new

0 comments on commit 06c5709

Please sign in to comment.