Skip to content

Commit 1a7bc3c

Browse files
committed
Path Conflict Solved
1 parent 32d1732 commit 1a7bc3c

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JSONRecord
22

3-
JSONRecord is a minimal document storage for rails, with an active record style query interface.
3+
JSONRecord is a minimal document storage for ruby, with an active record style query interface.
44
It eventually aims to be as powerfull of other document stores like couchdb ... this is just a beginning.
55
Inventual Roadmap is to make it independent of rails.
66

bin/jsonrecord

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ require 'fileutils'
44
require 'optparse'
55
require 'active_support/inflector'
66

7-
tables_dir = File.expand_path('../../lib/tables',__FILE__)
7+
gempath = Gem::Specification.find_by_name('JSONRecord').gem_dir
8+
tables_dir = File.expand_path("#{gempath}/lib/tables",__FILE__)
89

910
if ARGV[0] == 'generate' and ARGV[1] == 'model'
1011
model_name = ARGV[2].to_s.pluralize

lib/JSONRecord/class_methods.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def column_names
5757
end
5858

5959
private
60-
Dir.glob File.expand_path("../../tables/**/*.json", __FILE__) do |file|
60+
gempath = Gem::Specification.find_by_name('JSONRecord').gem_dir
61+
Dir.glob File.expand_path("#{gempath}/lib/tables/**/*.json", __FILE__) do |file|
6162
JSON_TABLES[File.basename(file)] = file
6263
end
6364

lib/JSONRecord/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module JSONRecord
2-
VERSION = "0.0.11"
2+
VERSION = "0.0.12"
33
end

lib/loader.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
["../JSONRecord/"].each{ |dir| $LOAD_PATH << File.expand_path(dir,__FILE__) }
22

33
require 'version'
4+
require 'fileutils'
45
require 'yajl/json_gem'
56
require 'active_model'
67
require 'active_support/inflector'

0 commit comments

Comments
 (0)