rtm-activerecord 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rtm/activerecord/001_initial_schema.rb +1 -1
- data/lib/rtm/activerecord/connect.rb +6 -10
- data/lib/rtm/activerecord/io/from_xtm2.rb +1 -1
- data/lib/rtm/activerecord/io/from_xtm2_libxml.rb +1 -9
- data/lib/rtm/activerecord/io/to_jtm.rb +1 -1
- data/lib/rtm/activerecord/io/to_string.rb +1 -1
- data/lib/rtm/activerecord/io/to_xtm1.rb +1 -1
- data/lib/rtm/activerecord/io/to_xtm2.rb +1 -1
- data/lib/rtm/activerecord/io/to_yaml.rb +1 -1
- data/lib/rtm/activerecord/quaaxtm2rtm.rb +1 -1
- data/lib/rtm/activerecord/quaaxtm2rtmviews.rb +1 -1
- data/lib/rtm/activerecord.rb +8 -9
- metadata +4 -4
@@ -109,7 +109,7 @@ module RTM
|
|
109
109
|
end
|
110
110
|
|
111
111
|
if __FILE__ == $0
|
112
|
-
puts "Generating SQLite3
|
112
|
+
puts "Generating SQLite3 Database tmdm.sqlite3."
|
113
113
|
ActiveRecord::Base.establish_connection(
|
114
114
|
:adapter => "sqlite3",
|
115
115
|
:database => "tmdm.sqlite3"
|
@@ -2,13 +2,14 @@
|
|
2
2
|
# License: Apache License, Version 2.0
|
3
3
|
|
4
4
|
require 'active_record'
|
5
|
-
require 'rtm/
|
6
|
-
require "rtm/
|
5
|
+
require 'rtm/activerecord/001_initial_schema'
|
6
|
+
require "rtm/activerecord/io/from_xtm2"
|
7
7
|
# require "rtm/backend/active_record/io/from_xtm2_libxml"
|
8
8
|
|
9
9
|
module RTM
|
10
|
+
module AR
|
10
11
|
|
11
|
-
class
|
12
|
+
class TMS
|
12
13
|
include Singleton
|
13
14
|
include RTM::TopicMapSystem
|
14
15
|
|
@@ -37,7 +38,7 @@ module RTM
|
|
37
38
|
# This function generates the database schema using the default
|
38
39
|
# ActiveRecord connection.
|
39
40
|
def generate_database
|
40
|
-
|
41
|
+
TMDM::InitialSchema.migrate(:up)
|
41
42
|
end
|
42
43
|
|
43
44
|
# Connects to the sqlite3 database given in the path or to
|
@@ -97,10 +98,5 @@ module RTM
|
|
97
98
|
end
|
98
99
|
|
99
100
|
end
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
101
|
+
end
|
106
102
|
end
|
@@ -2,20 +2,12 @@
|
|
2
2
|
# License: Apache License, Version 2.0
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
module RTM::AR
|
6
6
|
def from_xtm2lx(*args)
|
7
7
|
RTM::AR::IO::FROMXTM2LX.from_xtm2(self, *args)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
|
-
# class RTM::RTMAR
|
12
|
-
# def self.from_xtm2lx(*args)
|
13
|
-
# RTM::AR::IO::FROMXTM2LX.from_xtm2(self, *args)
|
14
|
-
# end
|
15
|
-
# end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
11
|
module RTM::AR::IO
|
20
12
|
# XTM2 Export.
|
21
13
|
# Each Topic Maps Construct gets a to_xtm2 method.
|
@@ -106,7 +106,7 @@ module RTM
|
|
106
106
|
end
|
107
107
|
|
108
108
|
#if __FILE__ == $0
|
109
|
-
# puts "Generating SQLite3
|
109
|
+
# puts "Generating SQLite3 Database tmdm.sqlite3."
|
110
110
|
# ActiveRecord::Base.establish_connection(
|
111
111
|
# :adapter => "sqlite3",
|
112
112
|
# :database => "tmdm.sqlite3"
|
@@ -127,7 +127,7 @@ module RTM
|
|
127
127
|
end
|
128
128
|
|
129
129
|
#if __FILE__ == $0
|
130
|
-
# puts "Generating SQLite3
|
130
|
+
# puts "Generating SQLite3 Database tmdm.sqlite3."
|
131
131
|
# ActiveRecord::Base.establish_connection(
|
132
132
|
# :adapter => "sqlite3",
|
133
133
|
# :database => "tmdm.sqlite3"
|
data/lib/rtm/activerecord.rb
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
# Copyright: Copyright 2009 Topic Maps Lab, University of Leipzig.
|
2
2
|
# License: Apache License, Version 2.0
|
3
3
|
|
4
|
-
|
4
|
+
if Object.const_defined?("Gem") && rtmgem = Gem.loaded_specs["rtm-activerecord"]
|
5
5
|
require 'rtm'
|
6
|
-
|
6
|
+
else
|
7
7
|
rtm_path = File.expand_path(File.join(File.dirname(__FILE__), "../../../rtm/lib"))
|
8
8
|
if File.directory?(rtm_path)
|
9
|
-
|
9
|
+
$LOAD_PATH.unshift rtm_path
|
10
10
|
require 'rtm'
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
$:.unshift File.expand_path(File.join(File.dirname(__FILE__), ".."))
|
15
|
-
|
16
14
|
# class Class
|
17
15
|
# alias :rtm_old_const_missing :const_missing
|
18
16
|
# def const_missing(*const_name,&b)
|
@@ -31,7 +29,7 @@ module RTM
|
|
31
29
|
super
|
32
30
|
|
33
31
|
# code from old monolithic rtm.rb
|
34
|
-
@instance = RTM::
|
32
|
+
@instance = ::RTM::AR::TMS.instance
|
35
33
|
@instance.connect *args
|
36
34
|
end
|
37
35
|
|
@@ -65,10 +63,11 @@ module RTM::AR
|
|
65
63
|
base
|
66
64
|
literal_index
|
67
65
|
].each {|f| require "rtm/activerecord/#{f}" }
|
68
|
-
require "rtm/connect"
|
69
|
-
require "rtm/helpers"
|
66
|
+
require "rtm/activerecord/connect"
|
70
67
|
require "rtm/validation"
|
71
|
-
require "rtm/
|
68
|
+
require "rtm/helpers/locator"
|
69
|
+
require "rtm/helpers/no_output"
|
70
|
+
require "rtm/helpers/uri"
|
72
71
|
|
73
72
|
|
74
73
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtm-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Bock
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-21 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.2.
|
23
|
+
version: 0.2.1
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: activesupport
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 2.3.5
|
44
44
|
version:
|
45
45
|
description: " Ruby Topic Maps is a Topic Maps engine written in Ruby.\n This is the backend engine which holds all data in ActiveRecord objects.\n It's available on all ruby platforms but currently does not pass all specs.\n"
|
46
|
-
email:
|
46
|
+
email: rtm+rtm-activerecord-gem-20100221@topicmapslab.de
|
47
47
|
executables: []
|
48
48
|
|
49
49
|
extensions: []
|