I have to be to run the test for the time being
Put a default value for a lot of models that I am very
respond_to? method is not one argument
Refactoring to pass through all the tests
Add delay(:inline => true) option (not use proxy, receiver is self)

I wanted to run Resque is unstable, such as when to switch to foreground, in rare cases
Simple module hierarchy so deep
rake gemspec to version 0.1.3.1
file and directory refactoring

diff --git a/examples/sample1.rb b/examples/sample1.rb
new file mode 100644
index 0000000..021820e
--- /dev/null
+++ b/examples/sample1.rb
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+
+require "active_record"
+require_relative "../lib/wresque_wrapper"
+
+ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
+ActiveRecord::Migration.verbose = false
+ActiveRecord::Schema.define do
+  create_table :users do |t|
+  end
+end
+
+class User < ActiveRecord::Base
+  def foo
+    "ok"
+  end
+end
+
+user = User.create!
+
+p User.delay.foo
diff --git a/lib/wrapper/wrapper.rb b/lib/wrapper/wrapper.rb
deleted file mode 100644
index 1f8172f..0000000
--- a/lib/wrapper/wrapper.rb
+++ /dev/null
@@ -1,74 +0,0 @@
-require 'active_support/core_ext/module/attribute_accessors'
-require 'active_support/core_ext/class/attribute'
-require 'active_support/core_ext/hash/keys'
-require 'active_support/concern'
-
-module WresqueWrapper
-  extend ActiveSupport::Concern
-
-  mattr_accessor :default_queue
-  self.default_queue = :high
-
-  mattr_accessor :inline
-  self.inline = false
-
-  included do
-    class_attribute :queue, :default_queue
-  end
-
-  module ClassMethods
-    def perform(id, method, *args)
-      ActiveRecord::Base.verify_active_connections!
-      if id
-        self.find(id).send(method, *args)
-      else
-        self.send(method, *args)
-      end
-    end
-
-    def delay(options = {})
-      options = {
-        :inline => WresqueWrapper.inline,
-      }.merge(options.to_options)
-      if options[:inline]
-        self
-      else
-        WresqueWrapper::Proxy.new(self, self, nil, options[:queue])
-      end
-    end
-  end
-
-  def delay(options = {})
-    options = {
-      :inline => WresqueWrapper.inline,
-    }.merge(options.to_options)
-    if options[:inline]
-      self
-    else
-      WresqueWrapper::Proxy.new(self, self.class, self.id, options[:queue])
-    end
-  end
-
-  class Proxy
-    attr_reader :target
-
-    def initialize(target, klass, target_id, queue)
-      @target      = target
-      @klass       = klass
-      @target_id   = target_id
-      @klass.queue = queue || @klass.default_queue || WresqueWrapper.default_queue
-    end
-
-    def method_missing(method, *args)
-      if @target.respond_to?(method)
-        Resque.enqueue(@klass, @target_id, method, *args)
-      else
-        @target.send(method, *args)
-      end
-    end
-
-    def respond_to?(*args)
-      super || @target.respond_to?(*args)
-    end
-  end
-end
diff --git a/lib/wresque_wrapper.rb b/lib/wresque_wrapper.rb
index 5a1c918..0988834 100644
--- a/lib/wresque_wrapper.rb
+++ b/lib/wresque_wrapper.rb
@@ -1,3 +1,3 @@
-require File.dirname(__FILE__) + '/wrapper/wrapper'
+require_relative "wresque_wrapper/wresque_wrapper"

 ActiveRecord::Base.extend(WresqueWrapper)
diff --git a/lib/wresque_wrapper/wresque_wrapper.rb b/lib/wresque_wrapper/wresque_wrapper.rb
new file mode 100644
index 0000000..bf8d2cf
--- /dev/null
+++ b/lib/wresque_wrapper/wresque_wrapper.rb
@@ -0,0 +1,75 @@
+require 'active_support/core_ext/module/attribute_accessors'
+require 'active_support/core_ext/class/attribute'
+require 'active_support/core_ext/hash/keys'
+require 'active_support/concern'
+
+module WresqueWrapper
+  extend ActiveSupport::Concern
+
+  mattr_accessor :default_queue
+  self.default_queue = :high
+
+  mattr_accessor :inline
+  self.inline = false
+
+  included do
+    class_attribute :queue, :default_queue
+  end
+
+  module ClassMethods
+    def perform(id, method, *args)
+      ActiveRecord::Base.verify_active_connections!
+      if id
+        self.find(id).send(method, *args)
+      else
+        self.send(method, *args)
+      end
+    end
+
+    def delay(options = {})
+      options = {
+        :inline => WresqueWrapper.inline,
+      }.merge(options.to_options)
+
+      if options[:inline]
+        self
+      else
+        WresqueWrapper::Proxy.new(self, self, nil, options[:queue])
+      end
+    end
+  end
+
+  def delay(options = {})
+    options = {
+      :inline => WresqueWrapper.inline,
+    }.merge(options.to_options)
+    if options[:inline]
+      self
+    else
+      WresqueWrapper::Proxy.new(self, self.class, self.id, options[:queue])
+    end
+  end
+
+  class Proxy
+    attr_reader :target
+
+    def initialize(target, klass, target_id, queue)
+      @target      = target
+      @klass       = klass
+      @target_id   = target_id
+      @klass.queue = queue || @klass.default_queue || WresqueWrapper.default_queue
+    end
+
+    def method_missing(method, *args)
+      if @target.respond_to?(method)
+        Resque.enqueue(@klass, @target_id, method, *args)
+      else
+        @target.send(method, *args)
+      end
+    end
+
+    def respond_to?(*args)
+      super || @target.respond_to?(*args)
+    end
+  end
+end
diff --git a/spec/wresque_wrapper_spec.rb b/spec/wresque_wrapper_spec.rb
index 3360ebe..c0164ed 100644
--- a/spec/wresque_wrapper_spec.rb
+++ b/spec/wresque_wrapper_spec.rb
@@ -1,5 +1,5 @@
 require 'spec_helper'
-require 'wrapper/wrapper'
+require 'wresque_wrapper/wresque_wrapper'

 describe WresqueWrapper do
Did not run from other apps (version 0.1.3.2)
add attr_reader :queue, add examples/sample1.rb (version 0.1.3.3)
ActiveRecord::Base にいきなり include せず on_load 時に include するように変更など(v0.1.4)