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.
@@ -109,7 +109,7 @@ module RTM
109
109
  end
110
110
 
111
111
  if __FILE__ == $0
112
- puts "Generating SQLite3 Databse tmdm.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/backend/active_record/001_initial_schema'
6
- require "rtm/backend/active_record/io/from_xtm2"
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 RTMAR
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
- RTM::AR::TMDM::InitialSchema.migrate(:up)
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
@@ -3,7 +3,7 @@
3
3
 
4
4
  # Ruby Topic Maps (RTM) http://rtm.rubyforge.org/
5
5
 
6
- class RTM::RTMAR
6
+ module RTM::AR
7
7
  def from_xtm2(*args)
8
8
  RTM::AR::IO::FROMXTM2.from_xtm2(self, *args)
9
9
  end
@@ -2,20 +2,12 @@
2
2
  # License: Apache License, Version 2.0
3
3
 
4
4
 
5
- class RTM::RTMAR
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.
@@ -135,7 +135,7 @@ module RTM::AR::IO
135
135
  alias :to_json :to_jtm
136
136
  end
137
137
 
138
- RTM::AR.register_extension self
138
+ RTM.register_extension self
139
139
  end
140
140
  end
141
141
 
@@ -124,7 +124,7 @@ module RTM::AR:IO
124
124
  end
125
125
  end
126
126
 
127
- RTM::AR.register_extension self
127
+ RTM.register_extension self
128
128
  end
129
129
  end
130
130
 
@@ -156,7 +156,7 @@ module RTM::AR::IO
156
156
  end
157
157
  end
158
158
 
159
- RTM::AR.register_extension self
159
+ RTM.register_extension self
160
160
  end
161
161
  end
162
162
 
@@ -157,7 +157,7 @@ module RTM::AR::IO
157
157
  end
158
158
  end
159
159
 
160
- RTM::AR.register_extension self
160
+ RTM.register_extension self
161
161
  end
162
162
  end
163
163
 
@@ -126,7 +126,7 @@ module RTM::AR::IO
126
126
  end
127
127
  end
128
128
 
129
- RTM::AR.register_extension self
129
+ RTM.register_extension self
130
130
  end
131
131
  end
132
132
 
@@ -106,7 +106,7 @@ module RTM
106
106
  end
107
107
 
108
108
  #if __FILE__ == $0
109
- # puts "Generating SQLite3 Databse tmdm.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 Databse tmdm.sqlite3."
130
+ # puts "Generating SQLite3 Database tmdm.sqlite3."
131
131
  # ActiveRecord::Base.establish_connection(
132
132
  # :adapter => "sqlite3",
133
133
  # :database => "tmdm.sqlite3"
@@ -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
- begin
4
+ if Object.const_defined?("Gem") && rtmgem = Gem.loaded_specs["rtm-activerecord"]
5
5
  require 'rtm'
6
- rescue LoadError
6
+ else
7
7
  rtm_path = File.expand_path(File.join(File.dirname(__FILE__), "../../../rtm/lib"))
8
8
  if File.directory?(rtm_path)
9
- $:.unshift rtm_path
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::RTMAR.instance
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/locator_helpers"
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.0
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-05 00:00:00 +01:00
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.0
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: "#rtm+rtm-activerecord-gem-20100205@topicmapslab.de"
46
+ email: rtm+rtm-activerecord-gem-20100221@topicmapslab.de
47
47
  executables: []
48
48
 
49
49
  extensions: []