rtm 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rtm.rb CHANGED
@@ -70,7 +70,7 @@ require 'rtm/io/to_xtm2'
70
70
  require 'rtm/io/to_yaml'
71
71
  require 'rtm/io/from_xtm2'
72
72
  begin
73
- require 'rtm/io/from_xtm2_libxml.rb'
73
+ #require 'rtm/io/from_xtm2_libxml.rb'
74
74
  rescue Exception
75
75
  warn("LibXML could not be loaded, only (slow) REXML import available")
76
76
  end
@@ -79,3 +79,4 @@ require 'rtm/merging/merging'
79
79
  require 'rtm/pimp_my_api'
80
80
  require 'rtm/backend/active_record'
81
81
  require 'rtm/connect'
82
+ require 'rtm/backward_compatibility'
@@ -1,5 +1,6 @@
1
1
  module RTM::AR
2
2
  module TraverseAssociations
3
+ # defines methods to traverse a specific assocation for all topics
3
4
  def define_association(prop, options={})
4
5
  r = options[:rule]
5
6
  module_eval(<<-EOS, "(__AR_DELEGATOR_DEFINE_ASSOCIATION__)", 1)
@@ -0,0 +1,6 @@
1
+ class RTM::AR::Topic
2
+ extend RTM::AR::TraverseAssociations
3
+ def self.index_property_set(*args)
4
+ define_association(*args)
5
+ end
6
+ end
File without changes
@@ -16,6 +16,7 @@ module RTM::Sugar
16
16
  def []=(cref, value)
17
17
  is_name, type_reference, scope_reference = resolve_characteristic(cref)
18
18
  if is_name
19
+ type_reference = nil if type_reference == :any
19
20
  nametype = type_reference || topic_map.get!(RTM::PSI[:name_type])
20
21
  n = create_name(value, nametype)
21
22
  n
@@ -35,7 +36,7 @@ module RTM::Sugar
35
36
  end
36
37
 
37
38
  def resolve_type_and_scope(ref)
38
- return [:any, :ucs] unless ref
39
+ return [:any, :any] unless ref
39
40
  return [ref, :ucs] if ref.is_a? Topic
40
41
  type, scope = ref.split('@', -1)
41
42
  if type.blank?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Bock
@@ -50,14 +50,15 @@ files:
50
50
  - lib/rtm/backend/active_record/quaaxtm2rtm.rb
51
51
  - lib/rtm/backend/active_record/quaaxtm2rtmviews.rb
52
52
  - lib/rtm/backend/active_record/set_wrapper.rb
53
- - lib/rtm/backend/active_record/tmdm.rb
54
53
  - lib/rtm/backend/active_record/tm_construct.rb
55
54
  - lib/rtm/backend/active_record/tm_delegator.rb
56
55
  - lib/rtm/backend/active_record/tm_set_delegator.rb
56
+ - lib/rtm/backend/active_record/tmdm.rb
57
57
  - lib/rtm/backend/active_record/topic.rb
58
58
  - lib/rtm/backend/active_record/topic_map.rb
59
59
  - lib/rtm/backend/active_record/traverse_associations.rb
60
60
  - lib/rtm/backend/active_record.rb
61
+ - lib/rtm/backward_compatibility.rb
61
62
  - lib/rtm/base.rb
62
63
  - lib/rtm/connect.rb
63
64
  - lib/rtm/core_ext.rb
@@ -110,7 +111,7 @@ requirements:
110
111
  - sqlite3-ruby >= 1.2.2
111
112
  - libxml-ruby >= 0.6.0
112
113
  rubyforge_project: rtm
113
- rubygems_version: 1.2.0
114
+ rubygems_version: 1.3.1
114
115
  signing_key:
115
116
  specification_version: 2
116
117
  summary: Ruby Topic Maps is a Topic Maps engine written in Ruby.