infopark_reactor 1.5.2 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/reactor/attributes.rb +11 -2
- data/lib/reactor/version.rb +1 -1
- metadata +5 -5
data/lib/reactor/attributes.rb
CHANGED
@@ -196,6 +196,14 @@ module Reactor
|
|
196
196
|
set(:title, value)
|
197
197
|
end
|
198
198
|
|
199
|
+
def channels=(value)
|
200
|
+
set(:channels, value)
|
201
|
+
end
|
202
|
+
|
203
|
+
def channels
|
204
|
+
self[:channels] || []
|
205
|
+
end
|
206
|
+
|
199
207
|
# Sets given attribute, to given value. Converts values if neccessary
|
200
208
|
# @see [Reactor::Attributes]
|
201
209
|
# @note options are passed to underlying xml interface, but as of now have no effect
|
@@ -251,7 +259,7 @@ module Reactor
|
|
251
259
|
end
|
252
260
|
|
253
261
|
def builtin_attr?(attr)
|
254
|
-
[:valid_from, :valid_until, :name, :obj_class, :content_type, :body, :blob, :permalink, :title].include?(attr)
|
262
|
+
[:channels, :valid_from, :valid_until, :name, :obj_class, :content_type, :body, :blob, :permalink, :title].include?(attr)
|
255
263
|
end
|
256
264
|
|
257
265
|
def allowed_attr?(attr)
|
@@ -331,6 +339,7 @@ module Reactor
|
|
331
339
|
return :html if [:body, :blob, :main_content].include?(attr.to_sym)
|
332
340
|
return :date if [:valid_from, :valid_until, :last_changed].include?(attr.to_sym)
|
333
341
|
return :string if [:name, :title, :obj_class, :permalink].include?(attr.to_sym)
|
342
|
+
return :multienum if [:channels].include?(attr.to_sym)
|
334
343
|
|
335
344
|
custom_attr = self.obj_class_def.try(:custom_attributes).try(:[],attr.to_s)
|
336
345
|
raise TypeError, "obj_class_def is nil for: #{obj_class}" if self.obj_class_def.nil?
|
@@ -362,4 +371,4 @@ module Reactor
|
|
362
371
|
end
|
363
372
|
end
|
364
373
|
end
|
365
|
-
end
|
374
|
+
end
|
data/lib/reactor/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 1.
|
8
|
+
- 6
|
9
|
+
- 1
|
10
|
+
version: 1.6.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tomasz Przedmojski
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-01-
|
18
|
+
date: 2013-01-17 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|