mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
commit
b959e33b4b
9 changed files with 31 additions and 2287 deletions
|
@ -1 +1 @@
|
||||||
0.10.22
|
6.11.2
|
||||||
|
|
2258
services/track-changes/npm-shrinkwrap.json
generated
2258
services/track-changes/npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load diff
|
@ -7,30 +7,31 @@
|
||||||
"url": "https://github.com/sharelatex/track-changes-sharelatex.git"
|
"url": "https://github.com/sharelatex/track-changes-sharelatex.git"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"JSONStream": "^1.0.4",
|
||||||
"async": "~0.2.10",
|
"async": "~0.2.10",
|
||||||
|
"aws-sdk": "^2.102.0",
|
||||||
"bson": "^0.4.20",
|
"bson": "^0.4.20",
|
||||||
"byline": "^4.2.1",
|
"byline": "^4.2.1",
|
||||||
"cli": "^0.6.6",
|
"cli": "^0.6.6",
|
||||||
"express": "3.3.5",
|
"express": "3.3.5",
|
||||||
|
"heap": "^0.2.6",
|
||||||
"line-reader": "^0.2.4",
|
"line-reader": "^0.2.4",
|
||||||
"mongojs": "^1.4.1",
|
|
||||||
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
|
|
||||||
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.5.6",
|
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.5.6",
|
||||||
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.7.1",
|
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.7.1",
|
||||||
|
"mongo-uri": "^0.1.2",
|
||||||
|
"mongojs": "2.4.0",
|
||||||
|
"redis": "~0.10.1",
|
||||||
|
"redis-sharelatex": "git+https://github.com/sharelatex/redis-sharelatex.git#v1.0.2",
|
||||||
"request": "~2.33.0",
|
"request": "~2.33.0",
|
||||||
"requestretry": "^1.12.0",
|
"requestretry": "^1.12.0",
|
||||||
"redis-sharelatex": "git+https://github.com/sharelatex/redis-sharelatex.git#v1.0.2",
|
|
||||||
"redis": "~0.10.1",
|
|
||||||
"underscore": "~1.7.0",
|
|
||||||
"mongo-uri": "^0.1.2",
|
|
||||||
"s3-streams": "^0.3.0",
|
"s3-streams": "^0.3.0",
|
||||||
"JSONStream": "^1.0.4",
|
"settings-sharelatex": "git+https://github.com/sharelatex/settings-sharelatex.git#v1.0.0",
|
||||||
"heap": "^0.2.6",
|
"underscore": "~1.7.0",
|
||||||
"v8-profiler": "^5.6.5"
|
"v8-profiler": "^5.6.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "~1.9.0",
|
"chai": "~4.1.1",
|
||||||
"sinon": "~1.8.2",
|
"sinon": "~3.2.1",
|
||||||
"sandboxed-module": "~0.3.0",
|
"sandboxed-module": "~0.3.0",
|
||||||
"grunt-execute": "~0.1.5",
|
"grunt-execute": "~0.1.5",
|
||||||
"grunt-contrib-clean": "~0.5.0",
|
"grunt-contrib-clean": "~0.5.0",
|
||||||
|
@ -38,7 +39,7 @@
|
||||||
"grunt": "~0.4.2",
|
"grunt": "~0.4.2",
|
||||||
"grunt-available-tasks": "~0.4.2",
|
"grunt-available-tasks": "~0.4.2",
|
||||||
"grunt-contrib-coffee": "~0.10.1",
|
"grunt-contrib-coffee": "~0.10.1",
|
||||||
"bunyan": "~0.22.1",
|
"bunyan": "~2.0.2",
|
||||||
"grunt-bunyan": "~0.5.0",
|
"grunt-bunyan": "~0.5.0",
|
||||||
"grunt-forever": "~0.4.2",
|
"grunt-forever": "~0.4.2",
|
||||||
"timekeeper": "0.0.4",
|
"timekeeper": "0.0.4",
|
||||||
|
|
|
@ -39,7 +39,8 @@ describe "MongoAWS", ->
|
||||||
beforeEach (done) ->
|
beforeEach (done) ->
|
||||||
@awssdk.config = { update: sinon.stub() }
|
@awssdk.config = { update: sinon.stub() }
|
||||||
@awssdk.S3 = sinon.stub()
|
@awssdk.S3 = sinon.stub()
|
||||||
@S3S.WriteStream = MemoryStream.createWriteStream
|
@S3S.WriteStream = () ->
|
||||||
|
MemoryStream.createWriteStream()
|
||||||
@db.docHistory = {}
|
@db.docHistory = {}
|
||||||
@db.docHistory.findOne = sinon.stub().callsArgWith(1, null, {"pack":"hello"})
|
@db.docHistory.findOne = sinon.stub().callsArgWith(1, null, {"pack":"hello"})
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ describe "DocumentUpdaterManager", ->
|
||||||
@request.get.calledWith(url).should.equal true
|
@request.get.calledWith(url).should.equal true
|
||||||
|
|
||||||
it "should call the callback with the content and version", ->
|
it "should call the callback with the content and version", ->
|
||||||
@callback.calledWith(null, @lines.join("\n"), @version, @ops).should.equal true
|
@callback.calledWith(null, @lines.join("\n"), @version).should.equal true
|
||||||
|
|
||||||
describe "when the document updater API returns an error", ->
|
describe "when the document updater API returns an error", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
|
@ -48,7 +48,7 @@ describe "DocumentUpdaterManager", ->
|
||||||
|
|
||||||
it "should return the callback with an error", ->
|
it "should return the callback with an error", ->
|
||||||
@callback
|
@callback
|
||||||
.calledWith(new Error("doc updater returned failure status code: 500"))
|
.calledWith(sinon.match.has('message', "doc updater returned a non-success status code: 500"))
|
||||||
.should.equal true
|
.should.equal true
|
||||||
|
|
||||||
describe "setDocument", ->
|
describe "setDocument", ->
|
||||||
|
@ -91,5 +91,5 @@ describe "DocumentUpdaterManager", ->
|
||||||
|
|
||||||
it "should return the callback with an error", ->
|
it "should return the callback with an error", ->
|
||||||
@callback
|
@callback
|
||||||
.calledWith(new Error("doc updater returned failure status code: 500"))
|
.calledWith(sinon.match.has('message', "doc updater returned a non-success status code: 500"))
|
||||||
.should.equal true
|
.should.equal true
|
|
@ -194,5 +194,5 @@ describe "LockManager", ->
|
||||||
@LockManager.releaseLock @key, @lockValue, @callback
|
@LockManager.releaseLock @key, @lockValue, @callback
|
||||||
|
|
||||||
it 'should return an error if the lock has expired', ->
|
it 'should return an error if the lock has expired', ->
|
||||||
@callback.calledWith(new Error("tried to release timed out lock")).should.equal true
|
@callback.calledWith(sinon.match.has('message', "tried to release timed out lock")).should.equal true
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,7 @@ describe "PackManager", ->
|
||||||
it "should call the callback", ->
|
it "should call the callback", ->
|
||||||
@callback.called.should.equal true
|
@callback.called.should.equal true
|
||||||
it "should return an error", ->
|
it "should return an error", ->
|
||||||
@callback.calledWith(new Error()).should.equal true
|
@callback.calledWith(sinon.match.has('message')).should.equal true
|
||||||
|
|
||||||
describe "when an archive is completed", ->
|
describe "when an archive is completed", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
|
@ -326,17 +326,17 @@ describe "PackManager", ->
|
||||||
it "should call the callback", ->
|
it "should call the callback", ->
|
||||||
@callback.called.should.equal true
|
@callback.called.should.equal true
|
||||||
it "should return an error", ->
|
it "should return an error", ->
|
||||||
@callback.calledWith(new Error()).should.equal true
|
@callback.calledWith(sinon.match.has('message')).should.equal true
|
||||||
|
|
||||||
describe "when the archive has not started or completed", ->
|
describe "when the archive has not started or completed", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@db.docHistoryIndex =
|
@db.docHistoryIndex =
|
||||||
findOne: sinon.stub().callsArgWith(2, null, {})
|
findOne: sinon.stub().callsArgWith(2, null, {})
|
||||||
@PackManager.checkArchiveNotInProgress @project_id, @doc_id, @pack_id, @callback
|
@PackManager.checkArchiveNotInProgress @project_id, @doc_id, @pack_id, @callback
|
||||||
it "should call the callback", ->
|
it "should call the callback with no error", ->
|
||||||
@callback.called.should.equal true
|
@callback.called.should.equal true
|
||||||
it "should return with no error", ->
|
it "should return with no error", ->
|
||||||
@callback.calledWith(undefined).should.equal true
|
(typeof @callback.lastCall.args[0]).should.equal 'undefined'
|
||||||
|
|
||||||
# describe "setTTLOnArchivedPack", ->
|
# describe "setTTLOnArchivedPack", ->
|
||||||
# beforeEach ->
|
# beforeEach ->
|
||||||
|
|
|
@ -135,7 +135,7 @@ describe "UpdatesManager", ->
|
||||||
|
|
||||||
it "should call the callback with an error", ->
|
it "should call the callback with an error", ->
|
||||||
@callback
|
@callback
|
||||||
.calledWith(new Error("Tried to apply raw op at version 13 to last compressed update with version 11"))
|
.calledWith(sinon.match.has('message', "Tried to apply raw op at version 13 to last compressed update with version 11 from unknown time"))
|
||||||
.should.equal true
|
.should.equal true
|
||||||
|
|
||||||
it "should not insert any update into mongo", ->
|
it "should not insert any update into mongo", ->
|
||||||
|
@ -148,7 +148,7 @@ describe "UpdatesManager", ->
|
||||||
|
|
||||||
it "should call the callback with an error", ->
|
it "should call the callback with an error", ->
|
||||||
@callback
|
@callback
|
||||||
.calledWith(new Error)
|
.calledWith(sinon.match.has('message'))
|
||||||
.should.equal true
|
.should.equal true
|
||||||
|
|
||||||
it "should not insert any update into mongo", ->
|
it "should not insert any update into mongo", ->
|
||||||
|
|
|
@ -64,12 +64,12 @@ describe "WebApiManager", ->
|
||||||
|
|
||||||
describe "when the web returns a failure error code", ->
|
describe "when the web returns a failure error code", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@request.get = sinon.stub().callsArgWith(1, null, { statusCode: 500 }, "")
|
@request.get = sinon.stub().callsArgWith(1, null, { statusCode: 500, attempts: 42}, "")
|
||||||
@WebApiManager.getUserInfo @user_id, @callback
|
@WebApiManager.getUserInfo @user_id, @callback
|
||||||
|
|
||||||
it "should return the callback with an error", ->
|
it "should return the callback with an error", ->
|
||||||
@callback
|
@callback
|
||||||
.calledWith(new Error("web returned failure status code: 500"))
|
.calledWith(sinon.match.has('message', "web returned a non-success status code: 500 (attempts: 42)"))
|
||||||
.should.equal true
|
.should.equal true
|
||||||
|
|
||||||
describe "when the user cannot be found", ->
|
describe "when the user cannot be found", ->
|
||||||
|
@ -114,10 +114,10 @@ describe "WebApiManager", ->
|
||||||
|
|
||||||
describe "when the web returns a failure error code", ->
|
describe "when the web returns a failure error code", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@request.get = sinon.stub().callsArgWith(1, null, { statusCode: 500 }, "")
|
@request.get = sinon.stub().callsArgWith(1, null, { statusCode: 500, attempts: 42 }, "")
|
||||||
@WebApiManager.getProjectDetails @project_id, @callback
|
@WebApiManager.getProjectDetails @project_id, @callback
|
||||||
|
|
||||||
it "should return the callback with an error", ->
|
it "should return the callback with an error", ->
|
||||||
@callback
|
@callback
|
||||||
.calledWith(new Error("web returned failure status code: 500"))
|
.calledWith(sinon.match.has('message', "web returned a non-success status code: 500 (attempts: 42)"))
|
||||||
.should.equal true
|
.should.equal true
|
||||||
|
|
Loading…
Reference in a new issue