cotendo 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Readme.md +6 -2
- data/VERSION +1 -1
- data/cotendo.gemspec +1 -1
- data/lib/cotendo.rb +7 -7
- data/spec/config.example.yml +1 -1
- metadata +3 -3
data/Readme.md
CHANGED
@@ -9,8 +9,12 @@ Usage
|
|
9
9
|
client = Cotendo.new(:user => 'user', :password => 'password')
|
10
10
|
|
11
11
|
# flush
|
12
|
-
client.flush(
|
13
|
-
client.flush(
|
12
|
+
client.flush('orig-10001.MyCompany.cotcdn.net', "/images/*") # hard flush
|
13
|
+
client.flush('orig-10001.MyCompany.cotcdn.net', ["/images/*", "/*.jsp", "/*.txt"], :flush_type => 'soft')
|
14
|
+
|
15
|
+
TODO
|
16
|
+
====
|
17
|
+
- add whole [API](http://help.cotendo.net/display/Manual30/APIs)
|
14
18
|
|
15
19
|
Author
|
16
20
|
======
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/cotendo.gemspec
CHANGED
data/lib/cotendo.rb
CHANGED
@@ -13,9 +13,9 @@ class Cotendo
|
|
13
13
|
def flush(cname, expressions, options = {})
|
14
14
|
expressions = [*expressions]
|
15
15
|
request(:do_flush,
|
16
|
-
:cname => cname,
|
17
|
-
:
|
18
|
-
:
|
16
|
+
'api:cname' => cname,
|
17
|
+
'api:flushExpression' => expressions.join("\n"),
|
18
|
+
'api:flushType' => options[:flush_type] || 'hard'
|
19
19
|
)
|
20
20
|
end
|
21
21
|
|
@@ -23,6 +23,7 @@ class Cotendo
|
|
23
23
|
@client = begin
|
24
24
|
client = Savon::Client.new do
|
25
25
|
wsdl.document = WSDL
|
26
|
+
wsdl.endpoint = WSDL + '&ver=1.0'
|
26
27
|
end
|
27
28
|
client.wsdl.request.auth.basic @user, @password
|
28
29
|
client
|
@@ -30,10 +31,9 @@ class Cotendo
|
|
30
31
|
end
|
31
32
|
|
32
33
|
def request(method, options)
|
33
|
-
response = client.request(api_namespaced(method)) do |
|
34
|
-
|
35
|
-
|
36
|
-
r.body = options
|
34
|
+
response = client.request(api_namespaced(method)) do |soap|
|
35
|
+
soap.namespaces['xmlns:api'] = NAMESPACE
|
36
|
+
soap.body = options
|
37
37
|
end
|
38
38
|
response.to_hash
|
39
39
|
end
|
data/spec/config.example.yml
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cotendo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Grosser
|