54 Commits

Author SHA1 Message Date
Thibault Jouan
c0b2621b2f Implement ping/pong endpoint in API 2015-05-01 16:56:55 +00:00
Thibault Jouan
5e1757aff9 Improve tracks CRUD
* Add index, edit and update action;
* Add _form partial;
* Add link to tracks/index in nav;
* Refactor specs.
2015-05-01 12:09:29 +00:00
Thibault Jouan
b25fbaac5e Remove last playlists and tracks from home 2015-05-01 11:03:34 +00:00
Thibault Jouan
4b0f4d391f Implement user sign out (destroy current session) 2015-05-01 10:55:32 +00:00
Thibault Jouan
2f44a2265e Add navigation in layout header as a list 2015-04-30 13:54:02 +00:00
Thibault Jouan
4a015d461a Prevent exception when fetching current user 2015-04-30 13:36:48 +00:00
Thibault Jouan
3e5c29b635 Configure CSRF protection with exceptions
rails 4 introduced different strategies, but we never configured one
so it would default to a null session.
2015-04-30 11:43:22 +00:00
Thibault Jouan
b13efc5a4c Improve how ruby features are required
* Don't require bcrypt explicitly (done by bundler);
* Regroup require calls in application configuration.
2015-04-30 11:28:07 +00:00
Thibault Jouan
3b733c349e Fix coding standards in application files 2015-04-30 08:52:00 +00:00
Thibault Jouan
1efb3103d9 Remove respond_to usage in playlists controller
This feature was deprecated by rails.
2015-04-29 11:17:29 +00:00
Thibault Jouan
4c6adc6927 Use new "strong parameters" from rails4 2014-04-03 02:20:37 +00:00
Thibault Jouan
e6f6475705 Fix coding standards in application 2014-04-01 19:02:23 +00:00
Thibault Jouan
aca19eb51f Fix coding standards: bang operator 2014-04-01 18:55:46 +00:00
Thibault Jouan
da96c4814a Use ruby 2.x hash syntax 2014-04-01 10:48:18 +00:00
Thibault Jouan
bd39be32c5 Make Sound#file attr_accessible 2014-04-01 07:48:47 +00:00
Thibault Jouan
40f4ced3b8 Add inflection for API acronym 2013-06-30 21:37:30 +00:00
Thibault Jouan
9b9e17e591 Implement track/index action for API 2012-05-03 21:11:03 +00:00
Thibault Jouan
fc1ec120ae Add sound/show action (FIXME: need tests!) 2012-05-03 21:11:00 +00:00
Thibault Jouan
9ccd1e10be Allow Content-Length header to be received and sent in CORS requests 2012-05-03 21:03:11 +00:00
Thibault Jouan
b40b4d4df3 Fix use of nil in CORS filter when request doesn't have an Origin header 2012-05-03 21:03:11 +00:00
Thibault Jouan
df6d4991f8 Implement playlists/create action for API 2012-03-19 02:23:48 +00:00
Thibault Jouan
10a8e1f094 Remove v0 version namespacing for API 2012-03-18 23:16:43 +00:00
Thibault Jouan
5dfafdcc46 Implement sessions/create in JSON API 2012-03-18 17:30:36 +00:00
Thibault Jouan
499b06c9e5 Allow API consumer to send credentials on cross-origin requests 2012-03-13 21:12:24 +00:00
Thibault Jouan
196ea16a94 Use RABL to build JSON responses given by API 2012-03-11 23:31:01 +00:00
Thibault Jouan
6379da88e2 Implement Cross-Origin Resource Sharing:
* Add Api::ApplicationController
* Route OPTION requests (CORS preflight) to API application controller
* Filter all API requests through #cor_filter in API application
  controller
2012-03-11 22:19:42 +00:00
Thibault Jouan
88d3242843 Implements playlists/index action in JSON API 2012-02-26 11:33:43 +00:00
Thibault Jouan
5145717a3c Specify models attributes that must not be mass assignated 2012-01-07 18:26:38 +00:00
Thibault Jouan
0e3cf48d95 Use symbols instead of strings for Haml attributes keys in the layout 2011-12-30 10:42:47 +00:00
Thibault Jouan
c764265af2 Improve readability in some views by adding empty lines 2011-12-30 10:41:52 +00:00
Thibault Jouan
a8067404f4 Use rails configuration for sounds file path
* Add sounds_path initializer
2011-09-21 21:21:14 +00:00
Thibault Jouan
6af1540640 Bundle shoulda and use ActiveModel matchers in specs 2011-09-21 00:07:19 +00:00
Thibault Jouan
27550fd14e Save track files in new Sound model:
* Consolidate migrations
* Add Sound model. Each sound can belong to a track and contains
  informations about one sound file.
2011-09-20 17:43:20 +00:00
Thibault Jouan
f49a5a3f67 Update to rails 3.1.0
* Bump rails version to 3.1.0 in Gemfile
* Update config files
* Fix bcrypt monkey patch for specs
* Fix TracksController
* Replace track streaming with track download
* Remove assets from application layout
2011-09-15 16:10:21 +00:00
Thibault Jouan
638d379ec6 Add validation on User password presence 2011-09-13 20:10:38 +00:00
Thibault Jouan
688a178376 Validate uniqueness of user email address
* Make user.email attribute unique
* Render validations error messages in users/new view
2011-09-08 23:09:58 +00:00
Thibault Jouan
acaa9fc19a Use table for form fields in views 2011-09-07 21:13:20 +00:00
Thibault Jouan
1057cab009 Implement user registration feature
* Add users/new action and view
* Add users/create action
* Add link to sign up in sign in page
2011-09-07 18:36:06 +00:00
Thibault Jouan
7fad9e0402 Associate a user to his playlists 2011-08-30 16:53:47 +00:00
Thibault Jouan
4f66db2682 Refactor code related to authentication:
* User model
* SessionsController
2011-08-29 20:23:20 +00:00
Thibault Jouan
c023a071d0 Fix playlist/update action behaviour with invalid params 2011-08-24 20:27:30 +00:00
Thibault Jouan
6c6ed3b0b2 Refactor user model 2011-08-24 19:18:39 +00:00
Thibault Jouan
1fc3be42de Save user password as a bcrypt hash
* Replace password field by password_hash
* Add User#password attribute
* Implement password hashing and verification with BCrypt mixin
2011-08-09 17:04:47 +00:00
Thibault Jouan
7bf4d4c5f9 Add authentication and User model
* Add User model
* Add SessionsController
* Add password authentication on User
* Request authentication for all actions except sign in
* Add some helpers for ApplicationController
* Update features to work with mandatory authentication
2011-08-06 23:04:36 +00:00
Thibault Jouan
46abe07268 Add latest added tracks list on the home page 2011-07-27 22:10:22 +00:00
Thibault Jouan
b39bc2d6da Add home page with playlists list and link to add a track 2011-07-27 19:40:30 +00:00
Thibault Jouan
2f6a447416 Implement track/stream
* Add Streamer class
* Use FactoryGirl for factories
* Add sha256 field to tracks
* Add mime_type field to tracks
2011-07-26 16:59:47 +00:00
Thibault Jouan
47fa969617 Use factory_girl_rails for factories 2011-07-25 22:56:30 +00:00
Thibault Jouan
6af96b0f75 Add track/{new,create} with file upload for the track 2011-07-24 18:50:57 +00:00
Thibault Jouan
34b38b77cf Implement tracks/{show,listen} 2011-07-19 19:42:45 +00:00