File tree 5 files changed +7
-4
lines changed
5 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
# JSONRecord
2
2
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.
4
4
It eventually aims to be as powerfull of other document stores like couchdb ... this is just a beginning.
5
5
Inventual Roadmap is to make it independent of rails.
6
6
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ require 'fileutils'
4
4
require 'optparse'
5
5
require 'active_support/inflector'
6
6
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__ )
8
9
9
10
if ARGV [ 0 ] == 'generate' and ARGV [ 1 ] == 'model'
10
11
model_name = ARGV [ 2 ] . to_s . pluralize
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ def column_names
57
57
end
58
58
59
59
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 |
61
62
JSON_TABLES [ File . basename ( file ) ] = file
62
63
end
63
64
Original file line number Diff line number Diff line change 1
1
module JSONRecord
2
- VERSION = "0.0.11 "
2
+ VERSION = "0.0.12 "
3
3
end
Original file line number Diff line number Diff line change 1
1
[ "../JSONRecord/" ] . each { |dir | $LOAD_PATH << File . expand_path ( dir , __FILE__ ) }
2
2
3
3
require 'version'
4
+ require 'fileutils'
4
5
require 'yajl/json_gem'
5
6
require 'active_model'
6
7
require 'active_support/inflector'
You can’t perform that action at this time.
0 commit comments