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 CHANGED
@@ -9,8 +9,12 @@ Usage
9
9
  client = Cotendo.new(:user => 'user', :password => 'password')
10
10
 
11
11
  # flush
12
- client.flush(cname, "/images/*") # hard flush
13
- client.flush(cname, ["/images/*", "/*.jsp", "/*.txt"], :flush_type => 'soft')
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
1
+ 0.0.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cotendo}
8
- s.version = "0.0.1"
8
+ s.version = "0.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Michael Grosser"]
@@ -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
- :flush_expression => expressions.join("\n"),
18
- :flush_type => options[:flush_type] || 'hard'
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 |r|
34
- r.namespaces['xmlns:api'] = NAMESPACE
35
- r.namespaces['xmlns:wsdl'] = WSDL+'&ver=1.0'
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
@@ -1,3 +1,3 @@
1
1
  :user: email
2
2
  :password: pass
3
- :cname: foo.bar.com
3
+ :cname: orig-10001.Foooooooo.cotcdn.net
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: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser