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 +4 -4
- data/CHANGELOG.md +1 -0
- data/lib/cdn77/configuration.rb +1 -1
- data/lib/cdn77/version.rb +1 -1
- data/spec/cdn_spec.rb +5 -5
- 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: 3eef367ac01fbc606eeb5244f6ef603543168b8b
|
4
|
+
data.tar.gz: 16b14c0f6e30a6dec6a65e16220ca4fe89c09e06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ca7a2bbf71b6c98b7716e49900fe6700117126860f76a3884fb1b2e747e878f3c84c329e435c6c78ad2e85ff85cbce8e1471523bb51e7049172551aa44a0a8d
|
7
|
+
data.tar.gz: eacda5f2875c57f152917ebc00771c57f2f16cc6ce6aa64044ec8167d0450039f603c72fa61eab9fea361bd13bca62523ec8872db9960318a95331953c8d6d71
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
data/lib/cdn77/configuration.rb
CHANGED
data/lib/cdn77/version.rb
CHANGED
data/spec/cdn_spec.rb
CHANGED
@@ -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://
|
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://
|
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://
|
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://
|
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://
|
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.
|
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-
|
11
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|