supernova 0.3.4 → 0.3.5

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.4
1
+ 0.3.5
@@ -126,6 +126,9 @@ class Supernova::Criteria
126
126
  if value.is_a?(Hash)
127
127
  reference[key] ||= Hash.new
128
128
  reference[key].merge!(value)
129
+ elsif key == :select
130
+ reference[key] ||= Array.new
131
+ reference[key] += (value || [])
129
132
  else
130
133
  reference[key] = value
131
134
  end
@@ -223,6 +223,10 @@ describe "Supernova::Criteria" do
223
223
  new_crit.merge(criteria).search_options[:search].should == ["New Search"]
224
224
  end
225
225
 
226
+ it "correctly merges select statements" do
227
+ Supernova::Criteria.new.select(:title).merge(Supernova::Criteria.new.select(:name)).search_options[:select].should == [:title, :name]
228
+ end
229
+
226
230
  it "correctly merges the named_scope_class" do
227
231
  new_crit.named_scope_class(String)
228
232
  new_crit.merge(criteria).search_options[:named_scope_class].should == String
data/supernova.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{supernova}
8
- s.version = "0.3.4"
8
+ s.version = "0.3.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tobias Schwab"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supernova
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 4
10
- version: 0.3.4
9
+ - 5
10
+ version: 0.3.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tobias Schwab