From 2296faf224102f9eb4db3e2d980c5f5b8401a3a8 Mon Sep 17 00:00:00 2001 From: longbai Date: Thu, 24 Jul 2014 00:14:04 +0800 Subject: [PATCH 1/6] new useragent --- .travis.yml | 8 ++++---- gopher.png | Bin 0 -> 5588 bytes qiniu/conf.js | 10 +++++++++- qiniu/util.js | 3 +-- test/fop.test.js | 2 +- test/logo.png | Bin 14057 -> 18525 bytes test/rs.test.js | 15 +++------------ 7 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 gopher.png diff --git a/.travis.yml b/.travis.yml index a0331ae1..d004e927 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ node_js: - 0.8 - 0.6 before_script: - - export QINIU_ACCESS_KEY="nnwjTeUgpQdfZp9cb4-iHK0EUlebKCNk4kXwoStq" - - export QINIU_SECRET_KEY="Ia9pXC-XEcGF6hvu1V5fdRhwFLpeUkCbt0Gxk5NW" - - export QINIU_TEST_BUCKET="test741" - - export QINIU_TEST_DOMAIN="test741.qiniudn.com" + - export QINIU_ACCESS_KEY=QWYn5TFQsLLU1pL5MFEmX3s5DmHdUThav9WyOWOm + - export QINIU_SECRET_KEY=Bxckh6FA-Fbs9Yt3i3cbKVK22UPBmAOHJcL95pGz + - export QINIU_TEST_BUCKET="nodesdk" + - export QINIU_TEST_DOMAIN="nodesdk.qiniudn.com" diff --git a/gopher.png b/gopher.png new file mode 100644 index 0000000000000000000000000000000000000000..0d1abb7418cfcff2718c32f1226447f1d298f8e4 GIT binary patch literal 5588 zcmV;_6)WnAP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4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sAeMdNtMC1&9YY6s2ss)b+ zG$T`h;ZbKe!)+Z{^YU3J>633jYAZcs0r=|sXS0E9!kX9}ZJ3qkB|~aqm7o+^>JMiZ zs2MuZHk&21SrCzkAB_uiPQ9C&WAXDoLFh?cJ0rA8liiLo{>f zYmALh#uYwREf#%vFg*DHTlaWH6Ct7cjXNXrHYJ{ep2f0vk1ZzM_^8R`Z+tp3s7mL_ zYke(}l0t)~dI$yGbYSTC7L$ORn0#zNllpd*fZ3l>e5vy@Nv`I;MESsi(!AZ>^C4#Q zQMB##3DgSCfgIe*NR~|_!Oa_GUhi&~YL&M1#pW%Pv;zYI9MQqV;}Yu!3!0uVp}S@=sLvZ(6H-7AwbrhY}R60 z@3Ovbw<}DMz%Q1Dtw`=X>*8>$RsQ>^ff0nx@(pKQS!VMZ(=MR1B4W6D-Z9FQ#EN`X z%xd1>?lg?we6eV=mpRF5juNXgUNNI73-l<&BLJOeG5lgCgX7_Q&7A_$&2I4s$6oR1 z^?Q~qD<)twelnT<+LF62cpf+M;iTHCtH1veB%XJHY>`tGl_6!V#y5Z9l%Y%kN3~?8 z>RBJ8k-C*luk29=_cT;TGX_-xy}mov7=>S;!V^%%e{dV$F z6^pS9YT=&2DnFNFC~>-N9#XdJdt&yf)$4Gs*`HgM%&ILeLzKq#Y-tt50TB=os5DQ` zUBI|HOP{Tp3xv0-=k9Sq8*(~ToUJaF*!#qoFh{~t6soKbQ9EsGmE6aPdzf%#XwyM3 ze(R|whiuUn>D@MNaOg+v%7E4k8dtJTMYdWNCaIRP*0$C`Qj~r(-jQe)F#S_g+=xz# zwsK$aB%w`Zj*L>sYzo zQ&F1<*X>)zci~g*Z5L(t-$_-2FOS#h*yXj2K^sNSI5c# diff --git a/test/rs.test.js b/test/rs.test.js index 30bff5e3..0c3d69b8 100644 --- a/test/rs.test.js +++ b/test/rs.test.js @@ -88,7 +88,7 @@ describe('test start step2:', function() { describe('rs.Client#batchStat()', function() { it('get the stat of logo.png and logo2.png', function(done) { var entries = [ - new EntryPath(TEST_BUCKET, logo), + new EntryPath(TEST_BUCKET, logo), new EntryPath(TEST_BUCKET, logo2)]; client.batchStat(entries, function(err, ret) { @@ -105,7 +105,7 @@ describe('test start step2:', function() { it('should return code 298 when partial ok', function(done) { var entries = [ - new EntryPath(TEST_BUCKET, logo), + new EntryPath(TEST_BUCKET, logo), new EntryPath(TEST_BUCKET, 'not exist file')]; client.batchStat(entries, function(err, ret) { @@ -167,23 +167,14 @@ describe('test start step2:', function() { describe('rs.isQiniuCallBack', function() { it('test isQiniuCallback true', function(done) { -// @gist isQiniuCallback -// ------ auth应该是来自请求的header的'Authrization'字段,path是请求的路径,content是请求的内容 - var auth = 'QBox nnwjTeUgpQdfZp9cb4-iHK0EUlebKCNk4kXwoStq:kyFuG6yYh6FlX1fZO0alTgJK2Jw='; + var auth = 'QBox QWYn5TFQsLLU1pL5MFEmX3s5DmHdUThav9WyOWOm:4GcOC2_eiw97QBNsHiwLzSqxelI='; var path = '/callback'; var content = 'key=43850.6579994258936495&hash=FllOJrhvzorEKnyMwE-o7pfciiha'; -// ------ - var ok = qiniu.util.isQiniuCallback(path, content, auth); ok.should.be.ok; -// @endgist done(); }); - - }); - // rs.GetPolicy#makeRequest() - }); }); From 8d5b0ec2a8d0f9f8b62042c881951b942816eca9 Mon Sep 17 00:00:00 2001 From: longbai Date: Thu, 24 Jul 2014 00:19:10 +0800 Subject: [PATCH 2/6] update version --- CHANGELOG.md | 14 ++++++++++++++ package.json | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b4fa92f..873cb1d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ ## CHANGE LOG +### v6.1.5 + +2014-4-03 issue [#110](https://github.com/qiniu/nodejs-sdk/pull/102) + +- [#109] 统一user agent + + +### v6.1.4 + +2014-4-03 issue [#108](https://github.com/qiniu/nodejs-sdk/pull/108) + +- [#107] 调整上传host + + ### v6.1.3 2014-4-03 issue [#102](https://github.com/qiniu/nodejs-sdk/pull/102) diff --git a/package.json b/package.json index b3c2c4a1..fd5bdbf6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "qiniu", - "version": "6.1.3", + "version": "6.1.5", "description": "Node wrapper for Qiniu Resource (Cloud) Storage API", "main": "index.js", "directories": { From 691718e23922dc9b1c8894813b4fb162ec93aaa9 Mon Sep 17 00:00:00 2001 From: longbai Date: Thu, 24 Jul 2014 00:21:49 +0800 Subject: [PATCH 3/6] update change log [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 873cb1d3..0c7451f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,10 @@ ### v6.1.5 -2014-4-03 issue [#110](https://github.com/qiniu/nodejs-sdk/pull/102) +2014-4-03 issue [#111](https://github.com/qiniu/nodejs-sdk/pull/111) - [#109] 统一user agent - +- [#110] 更新put policy ### v6.1.4 From 95f0182bce210985d37ad8d55bbc50c9d485c782 Mon Sep 17 00:00:00 2001 From: longbai Date: Thu, 24 Jul 2014 00:37:33 +0800 Subject: [PATCH 4/6] update policy --- .travis.yml | 2 -- qiniu/rs.js | 21 +++++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index d004e927..dd50e672 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: node_js node_js: - 0.10 - - 0.8 - - 0.6 before_script: - export QINIU_ACCESS_KEY=QWYn5TFQsLLU1pL5MFEmX3s5DmHdUThav9WyOWOm - export QINIU_SECRET_KEY=Bxckh6FA-Fbs9Yt3i3cbKVK22UPBmAOHJcL95pGz diff --git a/qiniu/rs.js b/qiniu/rs.js index df8a59e9..8b3d347a 100644 --- a/qiniu/rs.js +++ b/qiniu/rs.js @@ -136,15 +136,16 @@ function getEncodedEntryUri(bucket, key) { // ----- token -------- // @gist PutPolicy function PutPolicy(scope, callbackUrl, callbackBody, returnUrl, returnBody, - asyncOps, endUser, expires) { + asyncOps, endUser, expires, persistentOps, persistentNotifyUrl) { this.scope = scope || null; this.callbackUrl = callbackUrl || null; this.callbackBody = callbackBody || null; this.returnUrl = returnUrl || null; this.returnBody = returnBody || null; - this.asyncOps = asyncOps || null; this.endUser = endUser || null; this.expires = expires || 3600; + this.persistentOps = persistentOps || null; + this.persistentNotifyUrl = persistentNotifyUrl || null; } // @endgist @@ -177,9 +178,6 @@ PutPolicy.prototype.getFlags = function(putPolicy) { if (this.returnBody != null) { flags['returnBody'] = this.returnBody; } - if (this.asyncOps != null) { - flags['asyncOps'] = this.asyncOps; - } if (this.endUser != null) { flags['endUser'] = this.endUser; } @@ -189,11 +187,22 @@ PutPolicy.prototype.getFlags = function(putPolicy) { if (this.persistentNotifyUrl != null) { flags['persistentNotifyUrl'] = this.persistentNotifyUrl; } + if (this.persistentPipeline != null) { + flags['persistentPipeline'] = this.persistentPipeline; + } + if (this.mimeLimit != null) { + flags['mimeLimit'] = this.mimeLimit; + } + if (this.insertOnly != null) { + flags['insertOnly'] = this.insertOnly; + } + if (this.detectMime != null) { + flags['detectMime'] = this.detectMime; + } flags['deadline'] = this.expires + Math.floor(Date.now() / 1000); return flags; } - function GetPolicy(expires) { this.expires = expires || 3600; } From d3e34842ecc7dea1b62a3d82b1027f6f863d5454 Mon Sep 17 00:00:00 2001 From: longbai Date: Thu, 24 Jul 2014 00:52:17 +0800 Subject: [PATCH 5/6] add save key --- qiniu/rs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qiniu/rs.js b/qiniu/rs.js index 8b3d347a..e83324be 100644 --- a/qiniu/rs.js +++ b/qiniu/rs.js @@ -199,6 +199,9 @@ PutPolicy.prototype.getFlags = function(putPolicy) { if (this.detectMime != null) { flags['detectMime'] = this.detectMime; } + if (this.saveKey != null) { + flags['saveKey'] = this.saveKey; + } flags['deadline'] = this.expires + Math.floor(Date.now() / 1000); return flags; } From d9d6f4920e3b71c040e0c5d4c3d0dddb6a05b319 Mon Sep 17 00:00:00 2001 From: Bai Long Date: Thu, 24 Jul 2014 01:14:11 +0800 Subject: [PATCH 6/6] update log [ci skip] --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c7451f6..c82f5537 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,14 @@ ### v6.1.5 -2014-4-03 issue [#111](https://github.com/qiniu/nodejs-sdk/pull/111) +2014-7-23 issue [#111](https://github.com/qiniu/nodejs-sdk/pull/111) - [#109] 统一user agent - [#110] 更新put policy ### v6.1.4 -2014-4-03 issue [#108](https://github.com/qiniu/nodejs-sdk/pull/108) +2014-7-10 issue [#108](https://github.com/qiniu/nodejs-sdk/pull/108) - [#107] 调整上传host