Permalink
Browse files

! Make have_categories.rb work correctly. Reference the data from boo…

…k.rb correctly.
  • Loading branch information...
1 parent 1186d38 commit fd9cf488f7989a8bcfd07f937f7fe818e66a7bcc @floere committed Jan 19, 2014
@@ -1,3 +1,4 @@
+require 'rspec/matchers' rescue nil
if defined? RSpec::Matchers
RSpec::Matchers.define :have_categories do |*expected|
@@ -24,6 +24,6 @@ Gem::Specification.new do |s|
s.test_files = Dir["spec/**/*_spec.rb"]
s.extra_rdoc_files = ['README.rdoc']
- s.add_runtime_dependency 'yajl-ruby' # We suggest to use Yajl.
- s.add_runtime_dependency 'activesupport', '~> 3.0'
+ s.add_runtime_dependency 'yajl-ruby', '~> 1.2' # We suggest to use Yajl.
+ s.add_runtime_dependency 'activesupport', '~> 4.0'
end
@@ -19,7 +19,7 @@ gem 'multi_json'
# Optional.
#
-gem 'yajl-ruby', :require => 'yajl' # For faster JSON handling
+gem 'yajl-ruby', '~> 1.2', :require => 'yajl' # For faster JSON handling
gem 'activerecord', '~> 3', :require => 'active_record' # If you use AR for the DB
gem 'procrastinate', '~> 0.4' # Parallel indexing
@@ -8,6 +8,6 @@ gem 'sinatra'
gem 'haml'
group :development do
- gem 'sinatra-reloader'
+ gem 'sinatra-contrib', :require => 'sinatra/reloader'
gem 'rake'
end
@@ -10,7 +10,7 @@ gem 'multi_json'
# Optional.
#
-gem 'yajl-ruby', :require => 'yajl' # For faster JSON handling
+gem 'yajl-ruby', '~> 1.2', :require => 'yajl' # For faster JSON handling
gem 'activerecord', '~> 3', :require => 'active_record' # If you use AR for the DB
gem 'procrastinate', '~> 0.4' # Parallel indexing
@@ -14,7 +14,7 @@ class Book
# Load the books on startup.
#
- file_name = File.expand_path "../both/data/#{PICKY_ENVIRONMENT}/library.csv", File.dirname(__FILE__)
+ file_name = File.expand_path "../data/#{PICKY_ENVIRONMENT}/library.csv", __FILE__
CSV.open(file_name, 'r').each do |row|
@@books_mapping[row.shift.to_i] = row
end

0 comments on commit fd9cf48

Please sign in to comment.