Commit aa0516ab
Changed files (10)
app
assets
views
layouts
spec
javascripts
vendor
assets
stylesheets
app/assets/images/rails.png
Binary file
app/assets/javascripts/Player.js
@@ -1,22 +0,0 @@
-function Player() {
-}
-Player.prototype.play = function(song) {
- this.currentlyPlayingSong = song;
- this.isPlaying = true;
-};
-
-Player.prototype.pause = function() {
- this.isPlaying = false;
-};
-
-Player.prototype.resume = function() {
- if (this.isPlaying) {
- throw new Error("song is already playing");
- }
-
- this.isPlaying = true;
-};
-
-Player.prototype.makeFavorite = function() {
- this.currentlyPlayingSong.persistFavoriteStatus(true);
-};
app/assets/javascripts/Song.js
@@ -1,7 +0,0 @@
-function Song() {
-}
-
-Song.prototype.persistFavoriteStatus = function(value) {
- // something complicated
- throw new Error("not yet implemented");
-};
\ No newline at end of file
app/assets/stylesheets/application.css
@@ -2,6 +2,9 @@
* This is a manifest file that'll automatically include all the stylesheets available in this directory
* and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
* the top of the compiled file, but it's generally better to create a new file per style scope.
+ *= require bootstrap
+ *= require bootstrap-responsive
+ *= require jquery.Jcrop
*= require_self
*= require_tree .
*/
app/views/layouts/application.html.erb
@@ -5,12 +5,6 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title><%= full_title(yield(:title)) %></title>
<%= stylesheet_link_tag :application %>
- <style type="text/css">
- body {
- padding-top: 60px;
- padding-bottom: 40px;
- }
- </style>
<link rel="shortcut icon" href="/assets/favicon.ico">
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/apple-touch-icon-72x72.png">
@@ -25,7 +19,8 @@
<body>
<%= render "shared/header" %>
<div class="container">
- <div class="content">
+ <div class="row">
+ <div class="span12">
<% if notice %>
<div class="alert alert-success">
<a class="close">×</a>
@@ -40,8 +35,9 @@
<%= alert %>
</div>
<% end %>
- <%= yield %>
+ </div>
</div>
+ <%= yield %>
</div> <!-- /container -->
<%= render "shared/footer" %>
<%= render "shared/uservoice_feedback"%>
spec/javascripts/PlayerSpec.js
@@ -1,58 +0,0 @@
-describe("Player", function() {
- var player;
- var song;
-
- beforeEach(function() {
- player = new Player();
- song = new Song();
- });
-
- it("should be able to play a Song", function() {
- player.play(song);
- expect(player.currentlyPlayingSong).toEqual(song);
-
- //demonstrates use of custom matcher
- expect(player).toBePlaying(song);
- });
-
- describe("when song has been paused", function() {
- beforeEach(function() {
- player.play(song);
- player.pause();
- });
-
- it("should indicate that the song is currently paused", function() {
- expect(player.isPlaying).toBeFalsy();
-
- // demonstrates use of 'not' with a custom matcher
- expect(player).not.toBePlaying(song);
- });
-
- it("should be possible to resume", function() {
- player.resume();
- expect(player.isPlaying).toBeTruthy();
- expect(player.currentlyPlayingSong).toEqual(song);
- });
- });
-
- // demonstrates use of spies to intercept and test method calls
- it("tells the current song if the user has made it a favorite", function() {
- spyOn(song, 'persistFavoriteStatus');
-
- player.play(song);
- player.makeFavorite();
-
- expect(song.persistFavoriteStatus).toHaveBeenCalledWith(true);
- });
-
- //demonstrates use of expected exceptions
- describe("#resume", function() {
- it("should throw an exception if song is already playing", function() {
- player.play(song);
-
- expect(function() {
- player.resume();
- }).toThrow("song is already playing");
- });
- });
-});
\ No newline at end of file
app/assets/stylesheets/bootstrap-responsive.css → vendor/assets/stylesheets/bootstrap-responsive.css
File renamed without changes
app/assets/stylesheets/bootstrap.css → vendor/assets/stylesheets/bootstrap.css
File renamed without changes
app/assets/stylesheets/jquery.Jcrop.css → vendor/assets/stylesheets/jquery.Jcrop.css
File renamed without changes