lib/riak.rb in riak-client-0.8.2 vs lib/riak.rb in riak-client-0.8.3

- old
+ new

@@ -11,20 +11,29 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. $KCODE = "UTF8" if RUBY_VERSION < "1.9" -require 'active_support/all' -require 'active_support/json' -require 'active_support/version' require 'base64' require 'uri' require 'cgi' +require 'set' require 'net/http' require 'yaml' require 'riak/i18n' +# Load JSON +unless defined? JSON + begin + require 'yajl/json_gem' + rescue LoadError + require 'json' + end +end + +require 'riak/core_ext' + # The Riak module contains all aspects of the HTTP client interface # to Riak. module Riak # Domain objects autoload :Bucket, "riak/bucket" @@ -33,12 +42,10 @@ autoload :WalkSpec, "riak/walk_spec" autoload :RObject, "riak/robject" autoload :MapReduce, "riak/map_reduce" # Cache store - only supports Rails 3 style - if ActiveSupport::VERSION::STRING >= "3.0.0" - autoload :CacheStore, "riak/cache_store" - end + autoload :CacheStore, "riak/cache_store" # Exceptions autoload :FailedRequest, "riak/failed_request" autoload :InvalidResponse, "riak/invalid_response" autoload :MapReduceError, "riak/map_reduce_error"