active-fedora 6.6.0.rc1 → 6.6.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 964d99013806f9b52b6b916d277df38d6dbea927
4
- data.tar.gz: 10f8ff33c035ecccb052c23d2c77166f8f605240
3
+ metadata.gz: e34459d1ad716b37cd7174ec1312abe1ca33cd87
4
+ data.tar.gz: 85f71b569ee2010337e1733092c982b4b4021809
5
5
  SHA512:
6
- metadata.gz: 07707c2080d608e9ed4a3ecadf8e88f64ff4a0867bc8b79f1a63d92383d21152fc67b16c8db191d8987697fd516d99aed3b8d7c8d205ea1caeb6cf017d0bea8e
7
- data.tar.gz: aae37c986f98847630f0f9e98d3f8a52fee97a7cc2ab725983478d1d1b3e0e05630e8507528c7986fdfbde7ad84a2f44feffb0b6c5b8cb8d17194886598fcf69
6
+ metadata.gz: 535fc44e507b82bfcd884033bf95e40df1207b484540eb952c7f1a7163545819a4f6afcfc47636ca6f98865c59ee6441517031d22f25d7fb552a0094af7f8643
7
+ data.tar.gz: d34bcfcd2d6326a34726337ab744ee284c4ae8dbce9750a9cf1be370ca16a0e7793dc80aef87aecd687ce1fba9e326ef3a1ddb09197a7766d55cd434f0674a1b
@@ -1,5 +1,10 @@
1
+ v6.6.0 (rc2)
2
+ 2013-10-02: Cast relationship results if class is ActiveFedora::Base [Justin
3
+ Coyne]
4
+
1
5
  v6.5.1 (2013-09-10)
2
6
 
7
+
3
8
  ActiveFedora::Predicates.set_predicates allows you to set predicates
4
9
  without wiping out existing configs [Matt Zumwalt]
5
10
 
@@ -60,9 +60,10 @@ module ActiveFedora
60
60
  # @param [Hash] opts
61
61
  # @option opts [Boolean] :cast when true, examine the model and cast it to the first known cModel
62
62
  def find_each( conditions={}, opts={})
63
+ cast = opts.delete(:cast)
63
64
  find_in_batches(conditions, opts.merge({:fl=>SOLR_DOCUMENT_ID})) do |group|
64
65
  group.each do |hit|
65
- yield(find_one(hit[SOLR_DOCUMENT_ID], opts[:cast]))
66
+ yield(find_one(hit[SOLR_DOCUMENT_ID], cast))
66
67
  end
67
68
  end
68
69
  end
@@ -162,7 +162,7 @@ module ActiveFedora
162
162
 
163
163
  def to_a
164
164
  return @records if loaded?
165
- args = {} #:cast=>true}
165
+ args = @klass == ActiveFedora::Base ? {:cast=>true} : {}
166
166
  args[:rows] = @limit_value if @limit_value
167
167
  args[:sort] = @order_values if @order_values
168
168
 
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "6.6.0.rc1"
2
+ VERSION = "6.6.0.rc2"
3
3
  end
@@ -49,8 +49,8 @@ describe ActiveFedora::Base do
49
49
  end
50
50
  describe "called without a specific class" do
51
51
  it "should specify a q parameter" do
52
- ActiveFedora::Base.should_receive(:find_one).with("changeme:30", nil).and_return("Fake Object1")
53
- ActiveFedora::Base.should_receive(:find_one).with("changeme:22", nil).and_return("Fake Object2")
52
+ ActiveFedora::Base.should_receive(:find_one).with("changeme:30", true).and_return("Fake Object1")
53
+ ActiveFedora::Base.should_receive(:find_one).with("changeme:22", true).and_return("Fake Object2")
54
54
  mock_docs = [{"id" => "changeme:30"},{"id" => "changeme:22"}]
55
55
  mock_docs.should_receive(:has_next?).and_return(false)
56
56
  ActiveFedora::SolrService.instance.conn.should_receive(:paginate).with(1, 1000, 'select', :params=>{:q=>'*:*', :qt => 'standard', :sort => [@sort_query], :fl=> 'id', }).and_return('response'=>{'docs'=>mock_docs})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.6.0.rc1
4
+ version: 6.6.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-30 00:00:00.000000000 Z
13
+ date: 2013-10-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr