paperclip-fedora 0.2.3 → 0.2.4

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/README.md CHANGED
@@ -19,7 +19,9 @@ For server connection options, you should have a file titled paperclip-fedora.ym
19
19
 
20
20
  `rake paperclip:fedora:setup`
21
21
 
22
- After that, go edit the yaml file with your server settings per rails environment (They default to a server on the localhost).
22
+ After that, go edit the yaml file with your server settings per rails environment (They default to a Fedora Commons server on the localhost).
23
+ The settings will reflect the default Fedora Commons settings: host (in form localhost or example.com), port, and context (Fedora Commons context,
24
+ based on your Fedora Commons setup).
23
25
 
24
26
  ## Overview
25
27
 
@@ -1,14 +1,20 @@
1
1
  test:
2
2
  user: 'fedoraAdmin'
3
3
  password: 'fedoraAdmin'
4
- host: 'http://localhost:8983/fedora'
4
+ host: 'localhost'
5
+ port: 8983
6
+ context: 'fedora'
5
7
 
6
8
  development:
7
9
  user: 'fedoraAdmin'
8
10
  password: 'fedoraAdmin'
9
- host: 'http://localhost:8983/fedora'
11
+ host: 'localhost'
12
+ port: 8983
13
+ context: 'fedora'
10
14
 
11
15
  production:
12
16
  user: 'fedoraAdmin'
13
17
  password: 'fedoraAdmin'
14
- host: 'http://localhost:8983/fedora'
18
+ host: 'localhost'
19
+ port: 8983
20
+ context: 'fedora'
@@ -14,8 +14,14 @@ module Paperclip
14
14
  end
15
15
 
16
16
  @fedora_config = parse_config(@options[:fedora_config])
17
+ @host = @fedora_config[:host]
18
+ @port = @fedora_config[:port]
19
+ @context = @fedora_config[:context]
20
+
21
+ @server_url = "http\://#{@host}\:#{@port}/#{@context}"
22
+
17
23
  @path = ":basename_clean\::id"
18
- @url = @fedora_config[:host] + "/objects/#{@path}/datastreams/:style/content"
24
+ @url = "#{@server_url}/objects/#{@path}/datastreams/:style/content"
19
25
 
20
26
  Paperclip.interpolates(:basename_clean) do |attachment, style|
21
27
  s = File.basename(attachment.original_filename, File.extname(attachment.original_filename))
@@ -67,7 +73,7 @@ module Paperclip
67
73
  end
68
74
 
69
75
  def fedora
70
- @@repo ||= Rubydora.connect url: @fedora_config[:host], user: @fedora_config[:user], password: @fedora_config[:password]
76
+ @@repo ||= Rubydora.connect url: @server_url, user: @fedora_config[:user], password: @fedora_config[:password]
71
77
  @@repo
72
78
  end
73
79
 
@@ -1,5 +1,5 @@
1
1
  module Paperclip
2
2
  module Fedora
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paperclip-fedora
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-16 00:00:00.000000000Z
12
+ date: 2011-09-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: paperclip
16
- requirement: &2160437080 !ruby/object:Gem::Requirement
16
+ requirement: &2156500140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2160437080
24
+ version_requirements: *2156500140
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rubydora
27
- requirement: &2160436540 !ruby/object:Gem::Requirement
27
+ requirement: &2156499720 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2160436540
35
+ version_requirements: *2156499720
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &2160436000 !ruby/object:Gem::Requirement
38
+ requirement: &2156499260 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2160436000
46
+ version_requirements: *2156499260
47
47
  description: Adds Fedora Commons storage support for the Paperclip gem.
48
48
  email:
49
49
  - jaredsartin@gmail.com