ocman 1.0.0 → 1.1.0
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.
- checksums.yaml +4 -4
- data/lib/ocman/folder.rb +3 -3
- data/lib/ocman/item.rb +3 -3
- data/lib/ocman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abe7ee10e259fd8a41e538983473c3cd4d8a4b6d
|
4
|
+
data.tar.gz: d0d05374053fbf3a16ee1725abe0c849954b0c6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5fd9fa6ebbcfb5b10de80b93ebe203eae3264fd0757aa5bc795edc2eb05f56b6c30134a5cba91f035eeea92a7d0e52dbad2b55ce1f3c2b4198257a554e873d3
|
7
|
+
data.tar.gz: a38b2f320ef0c86ded95708d37fac7c925bfe08346bfb4990b7514edfc46d8adb6e63aa17550affe80cb0677dc233d9c7a01e1c6490ad72cf9df487b90bd4f39
|
data/lib/ocman/folder.rb
CHANGED
@@ -3,15 +3,15 @@ require 'hashie'
|
|
3
3
|
module Ocman
|
4
4
|
class Folder
|
5
5
|
def self.create(path)
|
6
|
-
Ocman::Dav.new.mkdir(path)
|
6
|
+
Ocman::Dav.new.mkdir(URI.encode(path))
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.list(path)
|
10
10
|
accu = []
|
11
11
|
|
12
|
-
Ocman::Dav.new.ls(path) do |item|
|
12
|
+
Ocman::Dav.new.ls(URI.encode(path)) do |item|
|
13
13
|
accu << Hashie::Mash.new({
|
14
|
-
path: item.uri.to_s.gsub(Ocman::Dav.url(path), '').gsub('/', ''),
|
14
|
+
path: URI.decode(item.uri.to_s.gsub(Ocman::Dav.url(path), '').gsub('/', '')),
|
15
15
|
type: item.type.to_s,
|
16
16
|
size: item.size
|
17
17
|
})
|
data/lib/ocman/item.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
module Ocman
|
2
2
|
class Item
|
3
3
|
def self.create(file, path, options={})
|
4
|
-
Ocman::Dav.new.put(file, path, options)
|
4
|
+
Ocman::Dav.new.put(file, URI.encode(path), options)
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.delete(path)
|
8
|
-
Ocman::Dav.new.delete(path)
|
8
|
+
Ocman::Dav.new.delete(URI.encode(path))
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.move(source_path, destination_path)
|
12
|
-
Ocman::Dav.new.move(source_path, destination_path)
|
12
|
+
Ocman::Dav.new.move(URI.encode(source_path), URI.encode(destination_path))
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
data/lib/ocman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Waldemar Gribele
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.5
|
103
|
+
rubygems_version: 2.4.5
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Ocman - Manages files and shares in owncloud
|