active-fedora 3.1.0.pre1 → 3.1.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,7 +45,7 @@ GEM
45
45
  httpi (0.9.5)
46
46
  rack
47
47
  i18n (0.5.0)
48
- jettywrapper (1.0.0)
48
+ jettywrapper (1.0.1)
49
49
  activesupport (>= 3.0.0)
50
50
  childprocess
51
51
  i18n
@@ -121,7 +121,7 @@ PLATFORMS
121
121
  DEPENDENCIES
122
122
  RedCloth
123
123
  active-fedora!
124
- jettywrapper (>= 1.0.0)
124
+ jettywrapper (>= 1.0.1)
125
125
  mocha (>= 0.9.8)
126
126
  rake
127
127
  rcov
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
33
33
  s.add_development_dependency("rake")
34
34
  s.add_development_dependency("rcov")
35
35
  s.add_development_dependency("solrizer-fedora", ">=1.1.2") # used by the fixtures rake tasks
36
- s.add_development_dependency("jettywrapper", ">=1.0.0")
36
+ s.add_development_dependency("jettywrapper", ">=1.0.1")
37
37
  s.add_development_dependency("rspec", "<2.0.0")
38
38
  s.add_development_dependency("mocha", ">= 0.9.8")
39
39
  s.add_development_dependency("ruby-debug")
@@ -7,11 +7,14 @@ module ActiveFedora
7
7
  # as member of the base object. Pass the target datastream via the
8
8
  # <tt>:to</tt> argument. If you want to return a unique result, (e.g. string
9
9
  # instead of an array) set the <tt>:unique</tt> argument to true.
10
+ #
11
+ # The optional <tt>:at</tt> argument provides a terminology that the delegate will point to.
10
12
  #
11
13
  # class Foo < ActiveFedora::Base
12
14
  # has_metadata :name => "descMetadata", :type => MyDatastream
13
15
  #
14
16
  # delegate :field1, :to=>"descMetadata", :unique=>true
17
+ # delegate :field2, :to=>"descMetadata", :at=>[:term1, :term2]
15
18
  # end
16
19
  #
17
20
  # foo = Foo.new
@@ -29,7 +32,8 @@ module ActiveFedora
29
32
  define_method field do
30
33
  ds = self.send(args[:to])
31
34
  val = if ds.kind_of? ActiveFedora::NokogiriDatastream
32
- ds.send(:term_values, field)
35
+ terminology = args[:at] || [field]
36
+ ds.send(:term_values, *terminology)
33
37
  else
34
38
  ds.send(:get_values, field)
35
39
  end
@@ -42,7 +46,8 @@ module ActiveFedora
42
46
  define_method "#{field}=".to_sym do |v|
43
47
  ds = self.send(args[:to])
44
48
  if ds.kind_of? ActiveFedora::NokogiriDatastream
45
- ds.send(:update_indexed_attributes, {[field] => v})
49
+ terminology = args[:at] || [field]
50
+ ds.send(:update_indexed_attributes, {terminology => v})
46
51
  else
47
52
  ds.send(:set_value, field, v)
48
53
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "3.1.0.pre1"
2
+ VERSION = "3.1.0.pre2"
3
3
  end
@@ -1,4 +1,3 @@
1
- # require File.expand_path(File.dirname(__FILE__) + '/hydra_jetty.rb')
2
1
  require "active-fedora"
3
2
  require "solrizer-fedora"
4
3
  require "active_support" # This is just to load ActiveSupport::CoreExtensions::String::Inflections
@@ -42,8 +42,9 @@ task :hudson do
42
42
  Rake::Task["active_fedora:doc"].invoke
43
43
  Rake::Task["active_fedora:configure_jetty"].invoke
44
44
  jetty_params = Jettywrapper.load_config
45
+ jetty_params[:startup_wait]= 20
45
46
  error = Jettywrapper.wrap(jetty_params) do
46
- ENV["FEDORA_HOME"]=File.expand_path(File.join(File.dirname(__FILE__),'..','..','jetty','fedora','default'))
47
+ #ENV["FEDORA_HOME"]=File.expand_path(File.join(File.dirname(__FILE__),'..','..','jetty','fedora','default'))
47
48
  Rake::Task["active_fedora:load_fixtures"].invoke
48
49
  Rake::Task["active_fedora:rspec"].invoke
49
50
  end
@@ -65,7 +65,6 @@ describe ActiveFedora::Base do
65
65
  end
66
66
 
67
67
  it "should be able to delegate deeply into the terminology" do
68
- pending
69
68
  @n.duck=["Quack", "Peep"]
70
69
  @n.duck.should == ["Quack", "Peep"]
71
70
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1923832027
4
+ hash: 1923832029
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
9
  - 0
10
10
  - pre
11
- - 1
12
- version: 3.1.0.pre1
11
+ - 2
12
+ version: 3.1.0.pre2
13
13
  platform: ruby
14
14
  authors:
15
15
  - Matt Zumwalt
@@ -299,12 +299,12 @@ dependencies:
299
299
  requirements:
300
300
  - - ">="
301
301
  - !ruby/object:Gem::Version
302
- hash: 23
302
+ hash: 21
303
303
  segments:
304
304
  - 1
305
305
  - 0
306
- - 0
307
- version: 1.0.0
306
+ - 1
307
+ version: 1.0.1
308
308
  type: :development
309
309
  version_requirements: *id019
310
310
  - !ruby/object:Gem::Dependency