wrike3 0.2.1 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wrike3/common.rb +10 -0
- data/lib/wrike3/folder.rb +11 -7
- data/lib/wrike3/version.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d7e84172998b74ac2cce6fb4fa87f0200de1f6a
|
4
|
+
data.tar.gz: 0cb6b2379ab099e26a1e53a1d7d60dc92561f414
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b011b66f19404620f9be9ec30da226e422f53cb48b99700a67001ae46a0064bbe71cdcf3dbfc0e5883633c2cd85a377b7577dd170fbab8906538918cfdefa41
|
7
|
+
data.tar.gz: 75ca30cfbf73e0bfbb77ddc44c3810e5d2815cf81a6753b33eccd1824a20fb3514b1a61dc2f51f86fc0c1e5e3080dbd41d0e6fba382df037b84ca38aefff3f04
|
data/lib/wrike3/common.rb
CHANGED
@@ -12,5 +12,15 @@ module Wrike3
|
|
12
12
|
path = "#{type}/#{id}/#{path}" if type.present? && id.present?
|
13
13
|
path
|
14
14
|
end
|
15
|
+
|
16
|
+
def to_j(parameters = {})
|
17
|
+
parameters.each do |item|
|
18
|
+
if item.last.is_a?(Hash) || item.last.is_a?(Array)
|
19
|
+
parameters[item.first.to_s] = item.last.to_json
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
parameters
|
24
|
+
end
|
15
25
|
end
|
16
26
|
end
|
data/lib/wrike3/folder.rb
CHANGED
@@ -11,19 +11,23 @@ module Wrike3
|
|
11
11
|
end
|
12
12
|
|
13
13
|
# Get folder data
|
14
|
-
def details(ids,
|
15
|
-
wrike.execute(:get, api_url("folders/#{ids}"),
|
14
|
+
def details(ids, params={})
|
15
|
+
wrike.execute(:get, api_url("folders/#{ids}"), to_j(params))
|
16
|
+
end
|
17
|
+
|
18
|
+
# create a folder
|
19
|
+
def create(id, params = {})
|
20
|
+
wrike.execute(:post, api_url("/folders/#{id}/folders"), to_j(params))
|
16
21
|
end
|
17
22
|
|
18
23
|
# Update a folder
|
19
|
-
def update(id,
|
20
|
-
wrike.execute(:put, api_url("folders/#{id}"),
|
24
|
+
def update(id, params = {})
|
25
|
+
wrike.execute(:put, api_url("folders/#{id}"), to_j(params))
|
21
26
|
end
|
22
27
|
|
23
28
|
# Delete folders and all descendants
|
24
|
-
def delete(id,
|
25
|
-
wrike.execute(:delete, api_url("folders/#{id}"),
|
29
|
+
def delete(id, params={})
|
30
|
+
wrike.execute(:delete, api_url("folders/#{id}"), to_j(params))
|
26
31
|
end
|
27
|
-
|
28
32
|
end
|
29
33
|
end
|
data/lib/wrike3/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrike3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morshed Alam
|
@@ -14,62 +14,62 @@ dependencies:
|
|
14
14
|
name: httparty
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.13.7
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.13.7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mime-types
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.99'
|
34
|
-
- -
|
34
|
+
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 2.99.1
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - ~>
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '2.99'
|
44
|
-
- -
|
44
|
+
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.99.1
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: shoulda
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - ~>
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '3.5'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - ~>
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '3.5'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: mocha
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - ~>
|
65
|
+
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '1.1'
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - ~>
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '1.1'
|
75
75
|
description: Ruby client to access Wrike API V3.
|
@@ -80,7 +80,7 @@ extra_rdoc_files:
|
|
80
80
|
- README.md
|
81
81
|
- LICENSE
|
82
82
|
files:
|
83
|
-
- .gitignore
|
83
|
+
- ".gitignore"
|
84
84
|
- Gemfile
|
85
85
|
- LICENSE
|
86
86
|
- README.md
|
@@ -110,23 +110,23 @@ licenses:
|
|
110
110
|
metadata: {}
|
111
111
|
post_install_message:
|
112
112
|
rdoc_options:
|
113
|
-
- --inline-source
|
114
|
-
- --charset=UTF-8
|
113
|
+
- "--inline-source"
|
114
|
+
- "--charset=UTF-8"
|
115
115
|
require_paths:
|
116
116
|
- lib
|
117
117
|
required_ruby_version: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
|
-
- -
|
119
|
+
- - ">="
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
|
-
- -
|
124
|
+
- - ">="
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project: wrike3
|
129
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.5.1
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: Wrike API extension
|