cdn77 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9fb1d4de693d00f01e9e4e9bd6518a3865e96713
4
- data.tar.gz: 3f28f5950f9050e7f46018c7eaadbef47cde752f
3
+ metadata.gz: 3eef367ac01fbc606eeb5244f6ef603543168b8b
4
+ data.tar.gz: 16b14c0f6e30a6dec6a65e16220ca4fe89c09e06
5
5
  SHA512:
6
- metadata.gz: 8ac14290bfaff3a0b740fc9767b1fa4da6d956f998b649f802d27189f487ea224b9003a6dbb0036646997fd95a39b46e33ec8b9cd5e76f5e98581df0cf58f135
7
- data.tar.gz: f1a6b8a680c3926c076aea738f818be2026415be0d9aa3758effd8fdfac10bbe345704f4d51734efa9ea5dea5754ed8a580870ede4019008d1a2cfc4a6328140
6
+ metadata.gz: 4ca7a2bbf71b6c98b7716e49900fe6700117126860f76a3884fb1b2e747e878f3c84c329e435c6c78ad2e85ff85cbce8e1471523bb51e7049172551aa44a0a8d
7
+ data.tar.gz: eacda5f2875c57f152917ebc00771c57f2f16cc6ce6aa64044ec8167d0450039f603c72fa61eab9fea361bd13bca62523ec8872db9960318a95331953c8d6d71
@@ -1,5 +1,6 @@
1
1
  ## v0.0.2
2
2
 
3
3
  * API of CDN77 expect that arrays will be encoding using "x[]=1&x[]=2" notation. So, it's implemented now.
4
+ * Used new endpoint (https://api.cdn77.com/v2.0) for API
4
5
 
5
6
  Please check [v0.0.1](https://github.com/ToMesto/cdn77/tree/v1.0.0) for previous changes.
@@ -1,6 +1,6 @@
1
1
  module Cdn77
2
2
  class Configuration
3
- DEFAULT_ENDPOINT = "https://client.cdn77.com/api/v2.0"
3
+ DEFAULT_ENDPOINT = "https://api.cdn77.com/v2.0"
4
4
 
5
5
  attr_accessor :login
6
6
  attr_accessor :password
@@ -1,3 +1,3 @@
1
1
  module Cdn77
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -112,11 +112,11 @@ describe Cdn77::CDN do
112
112
  it_behaves_like "an url builder", :url
113
113
 
114
114
  it "should return correct url with scope and method" do
115
- expect(cdn.url("account", "details")).to eq("https://client.cdn77.com/api/v2.0/account/details")
115
+ expect(cdn.url("account", "details")).to eq("https://api.cdn77.com/v2.0/account/details")
116
116
  end
117
117
 
118
118
  it "should add given params to url" do
119
- expect(cdn.url("account", "details", :test => "test")).to eq("https://client.cdn77.com/api/v2.0/account/details?test=test")
119
+ expect(cdn.url("account", "details", :test => "test")).to eq("https://api.cdn77.com/v2.0/account/details?test=test")
120
120
  end
121
121
  end
122
122
 
@@ -124,10 +124,10 @@ describe Cdn77::CDN do
124
124
  it { is_expected.to respond_to(:post) }
125
125
 
126
126
  it_behaves_like "an url builder", :post
127
- it_behaves_like "a request sender", :post, "https://client.cdn77.com/api/v2.0/account/details"
127
+ it_behaves_like "a request sender", :post, "https://api.cdn77.com/v2.0/account/details"
128
128
 
129
129
  it "should encode array parameters correctly" do
130
- stub_request(:post, "https://client.cdn77.com/api/v2.0/data/purge").
130
+ stub_request(:post, "https://api.cdn77.com/v2.0/data/purge").
131
131
  with(:body => "cdn_id=12345&url%5B%5D=public%2Fimages%2F1.png&url%5B%5D=public%2Fimages%2F2.png&login=ivan%40examle.com&passwd=secret").
132
132
  to_return(:status => 200, :body => successful_response_body.to_json)
133
133
 
@@ -139,6 +139,6 @@ describe Cdn77::CDN do
139
139
  it { is_expected.to respond_to(:get) }
140
140
 
141
141
  it_behaves_like "an url builder", :get
142
- it_behaves_like "a request sender", :get, "https://client.cdn77.com/api/v2.0/account/details?login=ivan@examle.com&passwd=secret"
142
+ it_behaves_like "a request sender", :get, "https://api.cdn77.com/v2.0/account/details?login=ivan@examle.com&passwd=secret"
143
143
  end
144
144
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cdn77
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Tsvetkov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-04 00:00:00.000000000 Z
11
+ date: 2015-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler