Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace *json* gem by *yajl-ruby* to speed up json encode and decode #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ruby '1.9.3'
gem 'sinatra','~> 1.4.2'
gem 'redis','~> 3.0.4'
gem 'hiredis', '~> 0.4.5'
gem 'json', '~> 1.7.7'
gem 'yajl-ruby', '~> 1.2.0'
gem 'ruby-hmac', '~> 0.4.0'

group :development, :test do
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ GEM
specs:
diff-lcs (1.2.5)
hiredis (0.4.5)
json (1.7.7)
rack (1.5.2)
rack-protection (1.5.1)
rack
Expand All @@ -25,16 +24,17 @@ GEM
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
tilt (1.4.1)
yajl-ruby (1.2.0)

PLATFORMS
ruby

DEPENDENCIES
hiredis (~> 0.4.5)
json (~> 1.7.7)
rack-test
rake
redis (~> 3.0.4)
rspec
ruby-hmac (~> 0.4.0)
sinatra (~> 1.4.2)
yajl-ruby (~> 1.2.0)
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
require 'redis'
require_relative 'page'
require 'sinatra'
require 'json'
require 'yajl/json_gem'
require 'digest/sha1'
require 'digest/md5'
require_relative 'comments'
Expand Down
2 changes: 1 addition & 1 deletion comments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# policies, either expressed or implied, of Salvatore Sanfilippo.

require 'rubygems'
require 'json'
require 'yajl/json_gem'

class RedisComments
def initialize(redis,namespace,sort_proc=nil)
Expand Down