This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in the model: | |
puts "-------------------------------------------------------------------------------" | |
puts "we have #{Place.published.tagged.count} tagged published places" | |
result: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe 'copyDoc' | |
before_each | |
doc = {"Name" : "Sharon Agathon", "Callsign" : "Athena", "_id" : "123"}; | |
db.saveDoc(doc); | |
end | |
it 'should result in another document with same data and new id' | |
db.copyDoc({_id: "123"}, { | |
success: function(resp){ | |
console.log(resp, 'resp copyDoc') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// before: | |
function ajax(obj, options, errorMessage, ajaxOptions) { | |
options = $.extend({successStatus: 200}, options); | |
errorMessage = errorMessage || "Unknown error"; | |
$.ajax($.extend($.extend({ | |
type: "GET", dataType: "json", | |
complete: function(req) { | |
var resp = $.httpData(req, "json"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db = $.couch.db("spec_db"); | |
db.create(); | |
db.saveDoc({'type':'battlestar', 'name':'galactica'}); | |
db2 = $.couch.db("spec_db_2"); | |
host = window.location.protocol + "//" + window.location.host; | |
$.couch.replicate(host + db.uri, host + db2.uri, { | |
body : {"create_target":true}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
********************************************************************** | |
Done. The new package has been installed and saved to | |
/couchdb/json-c_0.7-1_i386.deb | |
You can remove it from your system anytime using: | |
dpkg -r json-c |
NewerOlder