Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp

.DS_Store
*.DS_Store
*/.DS_Store
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.0-p0
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source 'https://rubygems.org'
ruby '2.0.0'

gem 'rails', '4.0.0'
gem 'pg'
Expand All @@ -10,6 +11,7 @@ gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'ember-rails'
gem 'ember-source'
gem 'qunit-rails'

group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ GEM
multi_json (1.7.9)
pg (0.16.0)
polyglot (0.3.3)
qunit-rails (0.0.3)
railties (>= 3.2.3)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
Expand Down Expand Up @@ -138,6 +140,7 @@ DEPENDENCIES
jbuilder (~> 1.2)
jquery-rails
pg
qunit-rails
rails (= 4.0.0)
sass-rails (~> 4.0.0)
sdoc
Expand Down
17 changes: 8 additions & 9 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
== README

This README would normally document whatever steps are necessary to get the
application up and running.
This is a workout app for competing with your friends on things like pushups, pullups, situps etc.

Things you may want to cover:

* Ruby version
* Server is Ruby version: 4.0

* Client is Ember.js

* System dependencies

* Configuration

* Database creation
rake db:create

* Database initialization
rake db:migrate

* How to run the test suite
RAILS_ENV=test rails server
Then go to localhost:3000/qunit

* Services (job queues, cache servers, search engines, etc.)

* Deployment instructions

* ...


Please feel free to use a different markup language if you do not plan to run
<tt>rake doc:app</tt>.
Binary file added app/assets/images/Pull-Ups-Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/Push-Ups-Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/Sit-Ups-Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/Squats-Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/balance-flex-icon-selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added app/assets/images/balance-flex-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/balance-flex-icon.xcf
Binary file not shown.
Binary file added app/assets/images/balance-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/darkdenim3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/endurance-icon-selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/endurance-icon-selected.xcf
Binary file not shown.
Binary file added app/assets/images/endurance-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/endurance-icon.xcf
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 120 additions & 0 deletions app/assets/images/flexibility-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/strength-icon-selected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/strength-icon-selected.xcf
Binary file not shown.
Binary file added app/assets/images/strength-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/strength-icon.xcf
Binary file not shown.
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
Praesto = Ember.Application.create();

//= require_tree .

19 changes: 19 additions & 0 deletions app/assets/javascripts/controllers/activities_controller.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Praesto.ActivitiesController = Ember.ArrayController.extend
resourceType: "activity"

addActivity: (activity) ->
name = @get('name')
activityType = @get('activityType')
sets = @get('sets')
reps = @get('reps')
duration = @get('duration')
distance = @get('distance')
activity = Praesto.Activity.createRecord(
name: name
activity_type: activityType
sets: sets
reps: reps
duration: duration
distance: distance
)
activity.save()
28 changes: 28 additions & 0 deletions app/assets/javascripts/controllers/workout_controller.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Praesto.WorkoutController = Ember.ObjectController.extend
isEditing: false
isStrength: true
isEndurance: false
isBalance: false

openEdit: ->
@set('isEditing', true)

closeEdit: ->
@set('isEditing', false)

updateWorkout: (workout) ->
@set('isEditing', false)
workout.save()

select: (activity) ->
@set('isStrength', false)
@set('isEndurance', false)
@set('isBalance', false)
switch activity
when "strength" then @set('isStrength', true)
when "endurance" then @set('isEndurance', true)
when "balance" then @set('isBalance', true)
debugger;

addActivity: ->

16 changes: 16 additions & 0 deletions app/assets/javascripts/controllers/workouts_controller.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Praesto.WorkoutsController = Ember.ArrayController.extend
sortProperties: ['date']
sortAscending: false

createWorkout: ->
location = @get('location')
date = @get('date')
workout = Praesto.Workout.createRecord(
location: location
date: date
)
workout.save()

deleteWorkout: (workout) ->
workout.deleteRecord()
workout.save()
Loading