primedia-endeca 0.9.25 → 0.9.26

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.
@@ -1,10 +1,12 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = %q{endeca}
3
- s.version = "0.9.25"
5
+ s.version = "0.9.26"
4
6
 
5
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
8
  s.authors = ["Rein Henrichs", "Andy Stone"]
7
- s.date = %q{2009-02-12}
9
+ s.date = %q{2009-02-16}
8
10
  s.description = %q{An Endeca client library for Ruby.}
9
11
  s.email = %q{}
10
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.rdoc"]
@@ -14,19 +16,19 @@ Gem::Specification.new do |s|
14
16
  s.rdoc_options = ["--main", "README.rdoc"]
15
17
  s.require_paths = ["lib"]
16
18
  s.rubyforge_project = %q{endeca}
17
- s.rubygems_version = %q{1.2.0}
19
+ s.rubygems_version = %q{1.3.1}
18
20
  s.summary = %q{An Endeca client library for Ruby}
19
21
 
20
22
  if s.respond_to? :specification_version then
21
23
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
22
24
  s.specification_version = 2
23
25
 
24
- if current_version >= 3 then
25
- s.add_development_dependency(%q<bones>, [">= 2.3.1"])
26
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
27
+ s.add_development_dependency(%q<bones>, [">= 2.4.0"])
26
28
  else
27
- s.add_dependency(%q<bones>, [">= 2.3.1"])
29
+ s.add_dependency(%q<bones>, [">= 2.4.0"])
28
30
  end
29
31
  else
30
- s.add_dependency(%q<bones>, [">= 2.3.1"])
32
+ s.add_dependency(%q<bones>, [">= 2.4.0"])
31
33
  end
32
34
  end
@@ -59,8 +59,7 @@ class Class
59
59
  @#{accessor} = default
60
60
 
61
61
  def #{accessor}
62
- return @#{accessor} if instance_variable_defined?(:@#{accessor})
63
- superclass.send(:#{accessor})
62
+ @#{accessor} ||= superclass.send(:#{accessor}).dup
64
63
  end
65
64
  RUBY
66
65
  end
@@ -25,7 +25,7 @@ module Endeca
25
25
  extend Logging
26
26
 
27
27
  # :stopdoc:
28
- VERSION = '0.9.25'
28
+ VERSION = '0.9.26'
29
29
  # :startdoc:
30
30
 
31
31
  # Returns the version string for the library.
@@ -73,4 +73,62 @@ describe String do
73
73
  end
74
74
  end
75
75
 
76
+ describe "#inherited_accessor" do
77
+
78
+ class SomeParent
79
+ inherited_accessor :a_hash, {:m => "my_value"}
80
+ inherited_accessor :a_string, "fibby foo"
81
+ inherited_accessor :a_array, ["atlanta"]
82
+ end
83
+
84
+ class A < SomeParent; end
85
+ class B < SomeParent; end
86
+
87
+ before do
88
+ A.a_hash[:a] = "a_value"
89
+ A.a_string = "a_string"
90
+
91
+ B.a_hash[:a] = "b_value"
92
+ B.a_string = "b_string"
93
+ end
94
+
95
+ it "should retrieve default value" do
96
+ SomeParent.a_hash[:m].should == "my_value"
97
+ SomeParent.a_string.should == "fibby foo"
98
+ end
99
+
100
+ it "should retrieve A hash value correctly" do
101
+ A.a_hash[:a].should == "a_value"
102
+ end
103
+
104
+ it "should retrieve A string value correctly" do
105
+ A.a_string.should == "a_string"
106
+ end
107
+
108
+ it "should retrieve A array value correctly" do
109
+ original = A.a_array
110
+
111
+ A.a_array << "jacksonville"
112
+ A.a_array.should == ["atlanta", "jacksonville"]
113
+
114
+ A.a_array = original
115
+ end
116
+
117
+ it "should retrieve B hash value correctly" do
118
+ B.a_hash[:a].should == "b_value"
119
+ end
120
+
121
+ it "should retrieve B string value correctly" do
122
+ B.a_string.should == "b_string"
123
+ end
124
+
125
+ it "should retrieve B array value correctly" do
126
+ original = B.a_array
127
+
128
+ B.a_array << "new york"
129
+ B.a_array.should == ["atlanta", "new york"]
130
+
131
+ B.a_array = original
132
+ end
133
+ end
76
134
  # EOF
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: primedia-endeca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.25
4
+ version: 0.9.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rein Henrichs
@@ -10,17 +10,18 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-02-12 00:00:00 -08:00
13
+ date: 2009-02-16 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bones
18
+ type: :development
18
19
  version_requirement:
19
20
  version_requirements: !ruby/object:Gem::Requirement
20
21
  requirements:
21
22
  - - ">="
22
23
  - !ruby/object:Gem::Version
23
- version: 2.3.1
24
+ version: 2.4.0
24
25
  version:
25
26
  description: An Endeca client library for Ruby.
26
27
  email: ""