Skip to content

Commit

Permalink
upgrade ruby, rails, fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kellen Hart committed Jan 3, 2015
1 parent 5f6ca35 commit 3789672
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 117 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0-p353
2.1.5
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
source 'https://rubygems.org'
ruby "2.0.0"

gem 'rails', '4.0.2'
gem 'rails', '~> 4.0.2'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
Expand All @@ -17,7 +16,7 @@ group :test, :development do
gem 'rspec-rails'
gem 'pry-rails'
gem 'sqlite3'
gem 'pry-debugger'
# gem 'pry-debugger'
end

group :test do
Expand All @@ -42,7 +41,7 @@ gem 'zurb-foundation'
gem 'uglifier', '>= 1.3.0'


gem 'jquery-rails'
gem 'jquery-rails', '~> 3.0.0'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
Expand Down
175 changes: 86 additions & 89 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,56 +1,48 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.0.2)
actionpack (= 4.0.2)
mail (~> 2.5.4)
actionpack (4.0.2)
activesupport (= 4.0.2)
actionmailer (4.0.12)
actionpack (= 4.0.12)
mail (~> 2.5, >= 2.5.4)
actionpack (4.0.12)
activesupport (= 4.0.12)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
active_model_serializers (0.8.1)
activemodel (>= 3.0)
activemodel (4.0.2)
activesupport (= 4.0.2)
active_model_serializers (0.9.2)
activemodel (>= 3.2)
activemodel (4.0.12)
activesupport (= 4.0.12)
builder (~> 3.1.0)
activerecord (4.0.2)
activemodel (= 4.0.2)
activerecord (4.0.12)
activemodel (= 4.0.12)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.2)
activesupport (= 4.0.12)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.2)
i18n (~> 0.6, >= 0.6.4)
activesupport (4.0.12)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.1)
atomic (1.1.14)
barber (0.4.2)
arel (4.0.2)
barber (0.6.0)
ember-source
execjs
handlebars-source
handlebars-source (>= 1.0.0.rc.4)
builder (3.1.4)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
columnize (0.3.6)
debugger (1.6.5)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.1)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.1)
coffee-script-source (1.8.0)
diff-lcs (1.2.5)
ember-data-source (1.0.0.beta.4)
ember-data-source (1.0.0.beta.14)
ember-source
ember-rails (0.14.1)
active_model_serializers
Expand All @@ -64,108 +56,114 @@ GEM
ember-source (1.0.0)
handlebars-source (= 1.0.12)
erubis (2.7.0)
execjs (2.0.2)
faker (1.2.0)
execjs (2.2.2)
faker (1.4.3)
i18n (~> 0.5)
font-awesome-sass-rails (3.0.2.2)
railties (>= 3.1.1)
sass-rails (>= 3.1.1)
haml (4.0.4)
haml (4.1.0.beta.1)
tilt
haml-rails (0.5.3)
haml-rails (0.6.0)
actionpack (>= 4.0.1)
activesupport (>= 4.0.1)
haml (>= 3.1, < 5.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1)
handlebars-source (1.0.12)
hike (1.2.3)
i18n (0.6.9)
hpricot (0.8.6)
html2haml (1.0.1)
erubis (~> 2.7.0)
haml (>= 4.0.0.rc.1)
hpricot (~> 0.8.6)
ruby_parser (~> 3.1.1)
i18n (0.7.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mail (2.6.3)
mime-types (>= 1.16, < 3)
method_source (0.8.2)
mime-types (1.25.1)
mime-types (2.4.3)
minitest (4.7.5)
multi_json (1.8.2)
polyglot (0.3.3)
pry (0.9.12.4)
coderay (~> 1.0)
method_source (~> 0.8)
multi_json (1.10.1)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-debugger (0.2.2)
debugger (~> 1.3)
pry (~> 0.9.10)
pry-rails (0.3.2)
pry (>= 0.9.10)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.2)
actionmailer (= 4.0.2)
actionpack (= 4.0.2)
activerecord (= 4.0.2)
activesupport (= 4.0.2)
rails (4.0.12)
actionmailer (= 4.0.12)
actionpack (= 4.0.12)
activerecord (= 4.0.12)
activesupport (= 4.0.12)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.2)
sprockets-rails (~> 2.0.0)
rails_12factor (0.0.2)
railties (= 4.0.12)
sprockets-rails (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_serve_static_assets (0.0.3)
rails_stdout_logging (0.0.3)
railties (4.0.2)
actionpack (= 4.0.2)
activesupport (= 4.0.2)
railties (4.0.12)
actionpack (= 4.0.12)
activesupport (= 4.0.12)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.1.1)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
rspec-rails (2.14.1)
rake (10.4.2)
rspec-core (3.1.7)
rspec-support (~> 3.1.0)
rspec-expectations (3.1.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.1.0)
rspec-mocks (3.1.3)
rspec-support (~> 3.1.0)
rspec-rails (3.1.0)
actionpack (>= 3.0)
activemodel (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
sass (3.2.13)
sass-rails (4.0.1)
rspec-core (~> 3.1.0)
rspec-expectations (~> 3.1.0)
rspec-mocks (~> 3.1.0)
rspec-support (~> 3.1.0)
rspec-support (3.1.2)
ruby_parser (3.1.3)
sexp_processor (~> 4.1)
sass (3.2.19)
sass-rails (4.0.5)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 3.0)
sprockets-rails (~> 2.0)
sexp_processor (4.4.4)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.1.6)
shoulda-matchers (2.4.0)
shoulda-context (1.2.1)
shoulda-matchers (2.7.0)
activesupport (>= 3.0.0)
slop (3.4.7)
sprockets (2.10.1)
slop (3.6.0)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.1)
sprockets-rails (2.2.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.8)
thor (0.18.1)
thread_safe (0.1.3)
atomic
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.10)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.38)
uglifier (2.4.0)
tzinfo (0.3.42)
uglifier (2.6.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
zurb-foundation (4.3.2)
Expand All @@ -182,10 +180,9 @@ DEPENDENCIES
faker
font-awesome-sass-rails
haml-rails
jquery-rails
pry-debugger
jquery-rails (~> 3.0.0)
pry-rails
rails (= 4.0.2)
rails (~> 4.0.2)
rails_12factor
rspec-rails
sass-rails (~> 4.0.0)
Expand Down
4 changes: 1 addition & 3 deletions app/controllers/albums_controller.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
class AlbumsController < ApplicationController
respond_to :json

def index
@albums = Album.all

respond_with @albums
render json: @albums
end
end
4 changes: 1 addition & 3 deletions app/controllers/songs_controller.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
class SongsController < ApplicationController
respond_to :json

def index
@songs = Song.all

respond_with @songs
render json: @songs
end
end
6 changes: 3 additions & 3 deletions app/mailers/contact_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
class ContactMailer < ActionMailer::Base
class ContactMailer < ActionMailer::Base
def contact(params)
@note = params[:note]
@name = params[:name]
@contact_email = params[:email2]
@subject = params[:subject]
mail(to: "Phil <#{ENV['GMAIL_USERNAME']}>",
# from email gets changed to actual sending email by google
from: "via pahart.com <#{@contact_email}>",
from: "via pahart.com <#{@contact_email}>",
subject: "Pahart.com inquiry: #{params[:subject]}")
end

def contact_verification(params)
mail(to: "#{params[:name]} <#{params[:email2]}>",
mail(to: "#{params[:name]} <#{params[:email2]}>",
from: "Phil <#{ENV['GMAIL_USERNAME']}>",
subject: "Pahart.com inquiry sent")
end
Expand Down
6 changes: 3 additions & 3 deletions app/serializers/album_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class AlbumSerializer < ActiveModel::Serializer
attributes :id, :date_recorded, :description, :image_path, :title, :bandcamp_name,
attributes :id, :date_recorded, :description, :image_path, :title, :bandcamp_name,
:bandcamp_id

has_many :songs, key: :songs, embed: :ids, include: true
has_many :song_albums, key: :song_albums, embed: :ids, include: true
# has_many :songs, key: :songs, embed: :ids, include: true
# has_many :song_albums, key: :song_albums, embed: :ids, include: true
end
4 changes: 2 additions & 2 deletions app/serializers/song_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class SongSerializer < ActiveModel::Serializer
attributes :id, :name, :lyrics, :date_written

has_many :albums, key: :albums, embed: :ids
has_many :song_albums, key: :song_albums, embed: :ids
# has_many :albums, key: :albums, embed: :ids
# has_many :song_albums, key: :song_albums, embed: :ids
end
Loading

0 comments on commit 3789672

Please sign in to comment.