vortex_utils 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/vortex_utils.rb +15 -1
  3. metadata +8 -8
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.0.1
data/lib/vortex_utils.rb CHANGED
@@ -1,4 +1,4 @@
1
- require_relative 'vortex_utils/string_extensions'
1
+ require 'vortex_utils/string_extensions'
2
2
 
3
3
  # Utilites used to access the Vortex CMS from the WebDAV protocol and do common tasks
4
4
 
@@ -131,6 +131,20 @@ module Net
131
131
  proppatch(uri, '<hidden xmlns="http://www.uio.no/navigation">true</hidden>')
132
132
  end
133
133
 
134
+ def get_vortex_collection_title(url)
135
+ title = nil
136
+ path = url
137
+ path = path.sub(/[^\/]*$/,'')
138
+ begin
139
+ doc = propfind( path )
140
+ title = doc.xpath('//v:collectionTitle', "v" => "vrtx").last.children.first.inner_text
141
+ rescue
142
+ puts "Warning: Unable to read folder title: " + path
143
+ title = ""
144
+ end
145
+ return title
146
+ end
147
+
134
148
  end
135
149
 
136
150
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vortex_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
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: 2012-01-01 00:00:00.000000000Z
12
+ date: 2012-01-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: net_dav
16
- requirement: &2156218200 !ruby/object:Gem::Requirement
16
+ requirement: &2152618180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.5.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2156218200
24
+ version_requirements: *2152618180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: highline
27
- requirement: &2156217040 !ruby/object:Gem::Requirement
27
+ requirement: &2152616240 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.6.9
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2156217040
35
+ version_requirements: *2152616240
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: thoughtbot-shoulda
38
- requirement: &2156215100 !ruby/object:Gem::Requirement
38
+ requirement: &2152614500 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 2.11.1
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2156215100
46
+ version_requirements: *2152614500
47
47
  description: Utilities for managing content on Vortex web content management system
48
48
  through webdav
49
49
  email: thomas.flemming@usit.uio.no