oreflect 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.7.1
@@ -26,6 +26,8 @@ module OReflect
26
26
  instance_variable_set("@#{attr_name}", []) unless instance_variable_get("@#{attr_name}")
27
27
  if values.empty?
28
28
  instance_variable_get "@#{attr_name}"
29
+ elsif values.length == 1 && values.first.is_a?(Array)
30
+ instance_variable_get("@#{attr_name}").concat(values.first)
29
31
  else
30
32
  instance_variable_get("@#{attr_name}").concat(values)
31
33
  end
data/oreflect.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{oreflect}
8
- s.version = "0.7.0"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Carsten Nielsen"]
12
- s.date = %q{2010-05-26}
12
+ s.date = %q{2010-05-31}
13
13
  s.description = %q{A library for building reflection endpoints to REST services and consuming them.}
14
14
  s.email = %q{heycarsten@gmail.com}
15
15
  s.extra_rdoc_files = [
data/test/test_param.rb CHANGED
@@ -42,4 +42,16 @@ class TestParam < Test::Unit::TestCase
42
42
  end
43
43
  end
44
44
 
45
+ context 'when passing an array to accepted_values' do
46
+ setup do
47
+ @param = OReflect::Param.new(:test) do
48
+ accepted_values ['a', 'b', 'c']
49
+ end
50
+ end
51
+
52
+ should "behave as if the array's elements were passed as arguments" do
53
+ assert_equal ['a', 'b', 'c'], @param.accepted_values
54
+ end
55
+ end
56
+
45
57
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 0
9
- version: 0.7.0
8
+ - 1
9
+ version: 0.7.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Carsten Nielsen
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-26 00:00:00 -04:00
17
+ date: 2010-05-31 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency