diff --git a/Gemfile b/Gemfile index 03b33ca..516b68f 100644 --- a/Gemfile +++ b/Gemfile @@ -6,7 +6,7 @@ source "http://rubygems.org" gemspec # jquery-rails is used by the dummy application -gem "jquery-rails" + gem 'rspec-mocks' # Declare any dependencies that are still in development here instead of in diff --git a/Gemfile.lock b/Gemfile.lock index 824fc09..0ce084c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - rabl-fast-json (0.0.1) + rabl-fast-json (0.1.0) rails (~> 3.2.1) GEM @@ -40,15 +40,12 @@ GEM hike (1.2.1) i18n (0.6.0) journey (1.0.3) - jquery-rails (2.0.0) - railties (>= 3.2.0.beta, < 5.0) - thor (~> 0.14) json (1.6.5) - mail (2.4.1) + mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) - mime-types (1.17.2) + mime-types (1.18) multi_json (1.1.0) polyglot (0.3.3) rack (1.4.1) @@ -87,13 +84,12 @@ GEM treetop (1.4.10) polyglot polyglot (>= 0.3.1) - tzinfo (0.3.31) + tzinfo (0.3.32) PLATFORMS ruby DEPENDENCIES - jquery-rails rabl-fast-json! rspec-mocks sqlite3 diff --git a/lib/rabl-fast-json.rb b/lib/rabl-fast-json.rb index 8aed86f..f3c43fd 100644 --- a/lib/rabl-fast-json.rb +++ b/lib/rabl-fast-json.rb @@ -13,14 +13,16 @@ require 'rabl-fast-json/handler' require 'rabl-fast-json/railtie' module RablFastJson + extend self + mattr_accessor :cache_templates @@cache_templates = true - def self.configure + def configure yield self end - def self.cache_templates? + def cache_templates? ActionController::Base.perform_caching && @@cache_templates end end diff --git a/lib/rabl-fast-json/version.rb b/lib/rabl-fast-json/version.rb index e060eb2..37c0dc8 100644 --- a/lib/rabl-fast-json/version.rb +++ b/lib/rabl-fast-json/version.rb @@ -1,3 +1,3 @@ module RablFastJson - VERSION = "0.0.1" + VERSION = '0.1.0' end