Giter Site home page Giter Site logo

postmile's People

Contributors

dalmaer avatar fernandoacorreia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postmile's Issues

Integration testing

I'm interested in integration testing and I'd like to write a small suite as a proposal. This suite would run against an API server with a live (test) database, i.e., no mocking, and would issue requests to APIs and verify the results.

A major stumbling point for me is how this suite (which is a non-interactive client) could authenticate as a test user. Currently Postmile only alows users to authenticate using Yahoo!, Facebook and Twitter and these require a browser and user interaction, if I'm not mistaken.

Would it be appropriate to introduce a new system of authentication, for test only? Or maybe there is some shortcut for authentication that I'm not seeing at this moment.

Updating to newer hapi/node

This project is often mentioned as the [canonical hapi example project](http://hapijs.com/resources#Projects built with hapi.js). It's been super helpful to me in the past figuring stuff out but it's very out of date now in terms of hapi version.

What are your thoughts on updating to newer version of hapi and node? Do you think it's worth doing at all? Would you be open to PRs?

Missing postmile-web centos

Hello,

I just submitted postmile-web failing to install on mac (per #53.) I am also trying on centos:

uname -a = Linux ip-10-176-99-95 3.4.73-64.112.amzn1.x86_64 #1 SMP Tue Dec 10 01:50:05 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
node -v = v0.10.26
npm -v = 1.3.6

I could be incorrect but I would have expected postmile-web to be installed into node_modules after doing npm update, however this is what I see:

ls node_modules/
async cryptiles hapi hoek mongodb postmile-api

There is no error file, but this is what I see at the end of npm update:

...
npm http 200 https://registry.npmjs.org/options/-/options-0.0.5.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/nan/-/nan-0.3.2.tgz

[email protected] install /tmp/postmile/node_modules/postmile-api/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)

npm http 200 https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
make: Entering directory /tmp/postmile/node_modules/postmile-api/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o SOLINK_MODULE(target) Release/obj.target/bufferutil.node SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished COPY Release/bufferutil.node CXX(target) Release/obj.target/validation/src/validation.o SOLINK_MODULE(target) Release/obj.target/validation.node SOLINK_MODULE(target) Release/obj.target/validation.node: Finished COPY Release/validation.node make: Leaving directory/tmp/postmile/node_modules/postmile-api/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build'
[email protected] node_modules/postmile-api
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
[ec2-user@ip-10-176-99-95 postmile]$

(Email) error on application startup

After starting via $ node postmile, this error is thrown up:

20522/132419.200, err, Email error: {"code":5,"message":"connection encountered an error","error {"code":"ECONNREFUSED","errno":"ECONNREFUSED","syscall":"connect"}}

Commit a2928231173265eebed1 broke the website for me

An installation that was working up to commit 0525e31 doesn't work anymore with the more recent commits.

$ git checkout 0525e31
$ node postmile.js
Result: all working

$ git checkout a292823
$ node postmile.js
Result:

110902/224016.605, err, Uncaught exception: Error: EADDRNOTAVAIL, Cannot assign requested address
at HTTPServer._doListen (net.js:1106:5)
at net.js:1077:14
at dns.js:192:30
at IOWatcher.callback (dns.js:74:15)
110902/224016.608, err, Uncaught exception: Error: EADDRNOTAVAIL, Cannot assign requested address
at HTTPServer._doListen (net.js:1106:5)
at net.js:1077:14
at dns.js:192:30
at IOWatcher.callback (dns.js:74:15)
110902/224016.609, err, Uncaught exception: Error: EADDRNOTAVAIL, Cannot assign requested address
at HTTPServer._doListen (net.js:1106:5)
at net.js:1077:14
at dns.js:192:30
at IOWatcher.callback (dns.js:74:15)
110902/224016.609, err, Uncaught exception: Error: EADDRNOTAVAIL, Cannot assign requested address
at HTTPServer._doListen (net.js:1106:5)
at net.js:1077:14
at dns.js:192:30
at IOWatcher.callback (dns.js:74:15)

$ git checkout bb8a379
$ node postmile.js
Result: home page (logged off) renders without CSS -- see http://i.imgur.com/nuIAD.png

$ git checkout e679867
$ node postmile.js
Result: same behavior

Probably something that went bad with the newline conversion and/or symlink fix

Match new account email to existing PIDs

If a new account has a verified email address matching existing project PIDs (participant id for dummy or invited user), replace those with the user id of the new account automatically.

Third-party authentication not working on localhost

facebook and twitter authentication is not working on localhost, even after trying a multitude of app settings (app domain and site url in facebook developer zone).

Last note before app crashing:
120520/163128.250, info, Received, GET, /auth/facebook?state=abc&code=xyz

Any hints on setting up facebook for postmile running on a local machine?

Automate installation

Replace example copying with automatic code generation using the install.js script.

Add project limits

Limit the number of projects per user, items per project, and participants per project.

Run behind the firewall?

Hey, it looks like I need to have my server visible from Twitter/Facebook/Y!. Is this right or am I missing something?
Also, you should provide a quick help on how to get the auth tokens from either of these platforms.

No web/install.js

The documentation alludes to a web/install.js file used to install node.js dependencies, but it doesn't appear to be checked in.

Error "missing plugin"

Hi,

I am trying to install the example but at the end of the installation process, there comes:

$ node .

/Users/pmu/projects/node/postmile/node_modules/hapi/node_modules/hoek/lib/index.js:421
    throw new Error(msgs.join(' ') || 'Unknown error');
          ^
Error: Missing plugin name
    at Object.exports.assert (/Users/pmu/projects/node/postmile/node_modules/hapi/node_modules/hoek/lib/index.js:421:11)
    at internals.Pack._register (/Users/pmu/projects/node/postmile/node_modules/hapi/lib/pack.js:237:14)
    at internals.Pack.register (/Users/pmu/projects/node/postmile/node_modules/hapi/lib/pack.js:179:17)
    at /Users/pmu/projects/node/postmile/node_modules/hapi/lib/pack.js:807:18
    at iterate (/Users/pmu/projects/node/postmile/node_modules/hapi/node_modules/async/lib/async.js:149:13)
    at Object.async.eachSeries (/Users/pmu/projects/node/postmile/node_modules/hapi/node_modules/async/lib/async.js:165:9)
    at /Users/pmu/projects/node/postmile/node_modules/hapi/lib/pack.js:804:15
    at iterate (/Users/pmu/projects/node/postmile/node_modules/hapi/node_modules/async/lib/async.js:149:13)
    at Object.async.eachSeries (/Users/pmu/projects/node/postmile/node_modules/hapi/node_modules/async/lib/async.js:165:9)
    at Function.internals.Pack.compose (/Users/pmu/projects/node/postmile/node_modules/hapi/lib/pack.js:754:11)

Makefile points to mocha, but mocha is not a dev dep.

Same with Vault but 'm guessing this is a global dep?

https://github.com/hueniverse/postmile/blob/master/Makefile#L1-L12

REPORTER = dot

test:
@NODE_ENV=test ./node_modules/.bin/mocha --recursive --reporter $(REPORTER) --ignore-leaks --timeout 3000

test-cov:
@NODE_ENV=test ./node_modules/.bin/mocha --require blanket --recursive --ignore-leaks --timeout 3000 -R travis-cov

test-cov-html:
@NODE_ENV=test ./node_modules/.bin/mocha --require blanket --recursive --ignore-leaks --timeout 3000 -R html-cov > coverage.html

.PHONY: test test-cov test-cov-html

Add geo support

Add location as item details, show items based on location.

shasum check failed

Hello,

I am unable to install postmile-web on mac.

mac = 10.9.2
npm -v = 1.4.3
node -v = v0.10.26
md5 /var/folders/_z/w1hrwtm56hn4m3sfztz_2msw0000gn/T/npm-79637--b0H6MAO/1397404987271-0.8455003392882645/tmp.tgz =
MD5 (/var/folders/_z/w1hrwtm56hn4m3sfztz_2msw0000gn/T/npm-79637--b0H6MAO/1397404987271-0.8455003392882645/tmp.tgz) = 10b90f1ca330a7ef7cda512bb8af396d

npm install postmile-web
npm http GET https://registry.npmjs.org/postmile-web/1.0.1
npm http 304 https://registry.npmjs.org/postmile-web/1.0.1
npm http GET https://registry.npmjs.org/postmile-web/-/postmile-web-1.0.1.tgz
npm http 200 https://registry.npmjs.org/postmile-web/-/postmile-web-1.0.1.tgz

npm ERR! Error: shasum check failed for /var/folders/_z/w1hrwtm56hn4m3sfztz_2msw0000gn/T/npm-79637--b0H6MAO/1397404987271-0.8455003392882645/tmp.tgz
npm ERR! Expected: 1ed37d9256785300f133707d2ad644c3a432df1f
npm ERR! Actual: 0bce44c540b2af1003b781fd4b13e678fdbcf4a1
npm ERR! From: https://registry.npmjs.org/postmile-web/-/postmile-web-1.0.1.tgz
npm ERR! at /usr/local/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR! at ReadStream. (/usr/local/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR! at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR! at _stream_readable.js:920:16
npm ERR! at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/npm/npm/issues

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "postmile-web"
npm ERR! cwd /Users/rpetty/temp/postmile
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/rpetty/temp/postmile/npm-debug.log
npm ERR! not ok code 0

unable to authenticate - twitter

after the update to hapi 0.1.0 i can't authenticate with twitter:

120213/094624.735, info, Received, GET, /auth/twitter?oauth_token=TOKEN&oauth_verifier=VERIFIER
120213/094626.137, info, Received, POST, /oauth/token
120213/094626.139, info, HTTP: 404 No such path or method, POST, /oauth/token
120213/094626.159, err, HTTP: 500 Unexpected API response, safari 5.1.3, GET, /auth/twitter?oauth_token=TOKEN&oauth_verifier=VERIFIER
120213/094626.159, err, Log: {"error":"Not Found","message":"No such path or method","code":404}, safari 5.1.3, GET, /auth/twitter?oauth_token=TOKEN&oauth_verifier=VERIFIER

note : substituted the token and verifier for more readability

Adopt UNIX newline convention

The codebase is mixing WINDOWS and UNIX newline conventions. Some files are using CR+LF and others just LF.

For consistency, all files should be converted to UNIX newlines. On Windows, MSysGit seamlessly converts to and from native newlines.

PUT verb being used in a non-idempotent way

As stated in the HTTP 1.1 specification:

"Methods can also have the property of "idempotence" in that (aside from error or expiration issues) the side-effects of N > 0 identical requests is the same as for a single request. The methods GET, HEAD, PUT and DELETE share this property. "

(http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)

As implemented, repeated PUT request to e.g. "/project/{projectId}/task" will not be idempotent; each request to the same URL will create a new task.

That would be the semantics expected of POST, not of PUT. In short, PUT replaces the content of a URL, POST adds content subordinate to a URL.

"The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI. If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate successful completion of the request."

and

"The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line."

This semantic inconsistency would be more obvious if the URL emphasized that the resources are COLLECTIONS, not individual objects. For instance:

""/projects/{projectId}/tasks"

is a list of tasks, not a single task, and "/projects" is a list of projects, not a single project.

The suggested resolution is to replace PUT with POST when the expected action is to create a new resource subordinate to a URL and, optionally, pluralize the resource names to make that clearer.

See also:

http://stackoverflow.com/questions/630453/put-vs-post-in-rest

http://jcalcote.wordpress.com/2008/10/16/put-or-post-the-rest-of-the-story/

http://vincenthomedev.wordpress.com/2008/12/18/put-vs-post-in-restful-web-service/

http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Idempotent_methods_and_web_applications

Username race condition

Checking for an existing username and adding new user is not atomic. Need to add database rule to prevent duplication.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.