--------------------------------------------------------------------------------
/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/assets/.DS_Store
--------------------------------------------------------------------------------
/assets/beermon.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/assets/beermon.psd
--------------------------------------------------------------------------------
/app/assets/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/.DS_Store
--------------------------------------------------------------------------------
/app/controllers/requests_controller.rb:
--------------------------------------------------------------------------------
1 | class RequestsController < ApplicationController
2 | end
3 |
--------------------------------------------------------------------------------
/app/models/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/models/.DS_Store
--------------------------------------------------------------------------------
/assets/beermon.aiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/assets/beermon.aiff
--------------------------------------------------------------------------------
/app/models/request.rb:
--------------------------------------------------------------------------------
1 | class Request < ActiveRecord::Base
2 | # attr_accessible :title, :body
3 | end
4 |
--------------------------------------------------------------------------------
/README.rdoc:
--------------------------------------------------------------------------------
1 | == Beermon
2 |
3 | Keg monitoring service and Suggestion collector for
4 | the Shopify Keggerator
--------------------------------------------------------------------------------
/app/assets/images/rails.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/rails.png
--------------------------------------------------------------------------------
/app/assets/images/beermon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/beermon.png
--------------------------------------------------------------------------------
/test/unit/helpers/keg_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class KegHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/app/assets/images/beer-gloss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/beer-gloss.png
--------------------------------------------------------------------------------
/app/assets/javascripts/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/javascripts/.DS_Store
--------------------------------------------------------------------------------
/test/unit/helpers/beers_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BeersHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/test/unit/helpers/kegs_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class KegsHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/test/unit/helpers/taps_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class TapsHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/test/unit/helpers/vote_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class VoteHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/app/assets/webfonts/2470E9_0_0.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/webfonts/2470E9_0_0.eot
--------------------------------------------------------------------------------
/app/assets/webfonts/2470E9_0_0.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/webfonts/2470E9_0_0.ttf
--------------------------------------------------------------------------------
/app/assets/webfonts/2470E9_0_0.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/webfonts/2470E9_0_0.woff
--------------------------------------------------------------------------------
/test/unit/helpers/callback_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class CallbackHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/test/unit/helpers/ratings_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class RatingsHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/test/unit/helpers/requests_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class RequestsHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/test/unit/helpers/sessions_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class SessionsHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/app/helpers/kegs_helper.rb:
--------------------------------------------------------------------------------
1 | module KegsHelper
2 | def add_draggable(keg)
3 | 'draggable' if keg.remaining > 1
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/app/models/vote.rb:
--------------------------------------------------------------------------------
1 | class Vote < ActiveRecord::Base
2 | belongs_to :beer
3 | belongs_to :user
4 | attr_accessible :value
5 | end
6 |
--------------------------------------------------------------------------------
/test/unit/helpers/breweries_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BreweriesHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/test/unit/helpers/dashboard_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class DashboardHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/test/unit/helpers/measurements_helper_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class MeasurementsHelperTest < ActionView::TestCase
4 | end
5 |
--------------------------------------------------------------------------------
/app/assets/images/ui-icons_2694e8_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-icons_2694e8_256x240.png
--------------------------------------------------------------------------------
/app/assets/images/ui-icons_2e83ff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-icons_2e83ff_256x240.png
--------------------------------------------------------------------------------
/app/assets/images/ui-icons_3d80b3_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-icons_3d80b3_256x240.png
--------------------------------------------------------------------------------
/app/assets/images/ui-icons_72a7cf_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-icons_72a7cf_256x240.png
--------------------------------------------------------------------------------
/app/assets/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/app/assets/javascripts/bootstrap.js.coffee:
--------------------------------------------------------------------------------
1 | jQuery ->
2 | $("a[rel=popover]").popover()
3 | $(".tooltip").tooltip()
4 | $("a[rel=tooltip]").tooltip()
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_flat_15_cd0a0a_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_flat_15_cd0a0a_40x100.png
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_glass_100_e4f1fb_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_glass_100_e4f1fb_1x400.png
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_glass_50_3baae3_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_glass_50_3baae3_1x400.png
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_glass_80_d7ebf9_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_glass_80_d7ebf9_1x400.png
--------------------------------------------------------------------------------
/config/initializers/twilio.rb:
--------------------------------------------------------------------------------
1 | $twilio_username = ENV['TWILIO_USERNAME']
2 | $twilio_password = ENV['TWILIO_PASSWORD']
3 | $twilio_sender = ENV['TWILIO_SENDER']
--------------------------------------------------------------------------------
/app/models/user.rb:
--------------------------------------------------------------------------------
1 | class User < ActiveRecord::Base
2 | attr_accessible :email, :phone_number, :send_sms, :send_email
3 | # attr_accessible :title, :body
4 | end
5 |
--------------------------------------------------------------------------------
/config/unicorn.rb:
--------------------------------------------------------------------------------
1 | port = ENV['PORT'].to_i
2 | port = 3000 if port <= 0
3 | worker_processes 1
4 | timeout 30
5 | preload_app true
6 | listen port, :tcp_nopush => false
--------------------------------------------------------------------------------
/test/unit/beer_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BeerTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/unit/user_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class UserTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/unit/vote_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class VoteTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/unit/rating_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class RatingTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_highlight-hard_70_000000_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_highlight-hard_70_000000_1x100.png
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_highlight-soft_25_ffef8f_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
--------------------------------------------------------------------------------
/app/models/rating.rb:
--------------------------------------------------------------------------------
1 | class Rating < ActiveRecord::Base
2 | belongs_to :beer
3 | validates_inclusion_of :value, :in => 1..5
4 | attr_accessible :value, :message
5 | end
6 |
--------------------------------------------------------------------------------
/test/unit/beer_tap_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BeerTapTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/unit/brewery_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BreweryTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/unit/request_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class RequestTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
--------------------------------------------------------------------------------
/app/assets/images/ui-bg_highlight-soft_100_deedf7_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/orenmazor/beermon-server/master/app/assets/images/ui-bg_highlight-soft_100_deedf7_1x100.png
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Beermon::Application
5 |
--------------------------------------------------------------------------------
/test/unit/measurement_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class MeasurementTest < ActiveSupport::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the rails application
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the rails application
5 | Beermon::Application.initialize!
6 |
--------------------------------------------------------------------------------
/test/functional/keg_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class KegControllerTest < ActionController::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/functional/vote_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class VoteControllerTest < ActionController::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/db/migrate/20121019020043_add_notified_for_keg.rb:
--------------------------------------------------------------------------------
1 | class AddNotifiedForKeg < ActiveRecord::Migration
2 | def change
3 | add_column :kegs, :notified, :boolean, :default => false
4 | end
5 | end
6 |
--------------------------------------------------------------------------------
/test/functional/breweries_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class BreweriesControllerTest < ActionController::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/functional/callback_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class CallbackControllerTest < ActionController::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/functional/dashboard_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class DashboardControllerTest < ActionController::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/functional/ratings_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class RatingsControllerTest < ActionController::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/functional/requests_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class RequestsControllerTest < ActionController::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/test/functional/sessions_controller_test.rb:
--------------------------------------------------------------------------------
1 | require 'test_helper'
2 |
3 | class SessionsControllerTest < ActionController::TestCase
4 | # test "the truth" do
5 | # assert true
6 | # end
7 | end
8 |
--------------------------------------------------------------------------------
/app/models/measurement.rb:
--------------------------------------------------------------------------------
1 | class Measurement < ActiveRecord::Base
2 | belongs_to :keg
3 | attr_accessible :volume, :temperature, :sampled_at
4 | validates_uniqueness_of :volume, :scope => :keg_id
5 | end
6 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/keg.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Keg controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/kegs.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Kegs controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/taps.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Taps controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/vote.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the vote controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/beers.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Beers controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/breweries.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the breweries controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/callback.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Callback controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/dashboard.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Dashboard controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/ratings.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Ratings controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/requests.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Requests controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/sessions.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Sessions controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | require 'rubygems'
2 |
3 | # Set up gems listed in the Gemfile.
4 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
5 |
6 | require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
7 |
--------------------------------------------------------------------------------
/doc/README_FOR_APP:
--------------------------------------------------------------------------------
1 | Use this README file to introduce your application and point to useful places in the API for learning more.
2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
3 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/measurements.css.scss:
--------------------------------------------------------------------------------
1 | // Place all the styles related to the Measurements controller here.
2 | // They will automatically be included in application.css.
3 | // You can use Sass (SCSS) here: http://sass-lang.com/
4 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-Agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/db/migrate/20121016233749_create_beer_taps.rb:
--------------------------------------------------------------------------------
1 | class CreateBeerTaps < ActiveRecord::Migration
2 | def change
3 | create_table :beer_taps do |t|
4 | t.string :name
5 |
6 | t.timestamps
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | def current_user
3 | @current_user || User.find(session[:user_id])
4 | end
5 |
6 | def navbar_admin
7 | 'navbar-admin' if current_user.admin?
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/db/migrate/20121019151218_rename_brewery_column.rb:
--------------------------------------------------------------------------------
1 | class RenameBreweryColumn < ActiveRecord::Migration
2 | def change
3 | rename_column :beers, :brewery_id, :manufacturer_id
4 | rename_table :breweries, :manufacturers
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 | # Mime::Type.register_alias "text/html", :iphone
6 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Sample localization file for English. Add more files in this directory for other locales.
2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3 |
4 | en:
5 | hello: "Hello world"
6 |
--------------------------------------------------------------------------------
/config/initializers/omniauth.rb:
--------------------------------------------------------------------------------
1 | require 'openid/store/filesystem'
2 | Rails.application.config.middleware.use OmniAuth::Builder do
3 | provider :google_apps, :store => OpenID::Store::Filesystem.new('./tmp'), :name => 'g', :domain => 'jadedpixel.com'
4 | end
5 |
--------------------------------------------------------------------------------
/db/migrate/20121019195635_change_timestamp_to_integer.rb:
--------------------------------------------------------------------------------
1 | class ChangeTimestampToInteger < ActiveRecord::Migration
2 | def change
3 | remove_column :measurements, :sampled_at
4 | add_column :measurements, :sampled_at, :integer, :limit => 8
5 | end
6 | end
7 |
--------------------------------------------------------------------------------
/app/assets/javascripts/keg.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/taps.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/vote.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/beers.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/breweries.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/callback.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/dashboard.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/ratings.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/requests.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/sessions.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/app/assets/javascripts/measurements.js.coffee:
--------------------------------------------------------------------------------
1 | # Place all the behaviors and hooks related to the matching controller here.
2 | # All this logic will automatically be available in application.js.
3 | # You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
4 |
--------------------------------------------------------------------------------
/db/migrate/20121016121546_create_measurements.rb:
--------------------------------------------------------------------------------
1 | class CreateMeasurements < ActiveRecord::Migration
2 | def change
3 | create_table :measurements do |t|
4 | t.integer :keg_id
5 | t.float :amount
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/app/models/beer_tap.rb:
--------------------------------------------------------------------------------
1 | class BeerTap < ActiveRecord::Base
2 | attr_accessible :name
3 | has_one :keg
4 |
5 | def detached?
6 | keg.blank?
7 | end
8 |
9 | def serializable_hash(options={})
10 | options[:include] ||= [:keg]
11 | super
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20121018144916_create_ratings.rb:
--------------------------------------------------------------------------------
1 | class CreateRatings < ActiveRecord::Migration
2 | def change
3 | create_table :ratings do |t|
4 | t.integer :beer_id
5 | t.integer :value
6 | t.string :message
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env rake
2 | # Add your own tasks in files placed in lib/tasks ending in .rake,
3 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4 |
5 | require File.expand_path('../config/application', __FILE__)
6 |
7 | Beermon::Application.load_tasks
8 |
--------------------------------------------------------------------------------
/db/migrate/20121016121501_create_requests.rb:
--------------------------------------------------------------------------------
1 | class CreateRequests < ActiveRecord::Migration
2 | def change
3 | create_table :requests do |t|
4 | t.string :brewery
5 | t.string :name
6 | t.string :requested_by
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/db/migrate/20121019014130_create_users.rb:
--------------------------------------------------------------------------------
1 | class CreateUsers < ActiveRecord::Migration
2 | def change
3 | create_table :users do |t|
4 | t.string :email
5 | t.string :phone_number
6 | t.boolean :send_sms
7 | t.boolean :send_email
8 |
9 | t.timestamps
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/script/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3 |
4 | APP_PATH = File.expand_path('../../config/application', __FILE__)
5 | require File.expand_path('../../config/boot', __FILE__)
6 | require 'rails/commands'
7 |
--------------------------------------------------------------------------------
/db/migrate/20121016224314_create_beers.rb:
--------------------------------------------------------------------------------
1 | class CreateBeers < ActiveRecord::Migration
2 | def change
3 | create_table :beers do |t|
4 | t.string :name
5 | t.string :brewery
6 | t.float :abv
7 | t.float :srm
8 | t.float :ibus
9 |
10 | t.timestamps
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/db/migrate/20121016121454_create_kegs.rb:
--------------------------------------------------------------------------------
1 | class CreateKegs < ActiveRecord::Migration
2 | def change
3 | create_table :kegs do |t|
4 | t.string :kind
5 | t.float :capacity
6 | t.string :brewery
7 | t.string :name
8 | t.float :ibu
9 | t.float :srm
10 |
11 | t.timestamps
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/db/migrate/20121019154140_create_votes.rb:
--------------------------------------------------------------------------------
1 | class CreateVotes < ActiveRecord::Migration
2 | def change
3 | create_table :votes do |t|
4 | t.integer :value
5 | t.integer :beer_id
6 | t.integer :user_id
7 | t.timestamps
8 | end
9 |
10 | add_index(:votes, :beer_id)
11 | add_index(:votes, :user_id)
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/app/views/kegs/_keg.html.erb:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/fixtures/users.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/votes.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/beer_taps.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | left:
8 | name: "Left Tap"
9 |
10 | right:
11 | name: "Right Tap"
12 |
--------------------------------------------------------------------------------
/test/fixtures/ratings.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/requests.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/test/fixtures/manufacturers.yml:
--------------------------------------------------------------------------------
1 | # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
2 |
3 | # This model initially had no columns defined. If you add columns to the
4 | # model remove the '{}' from the fixture names and add the columns immediately
5 | # below each fixture, per the syntax in the comments below
6 | #
7 | one: {}
8 | # column: value
9 | #
10 | two: {}
11 | # column: value
12 |
--------------------------------------------------------------------------------
/lib/templates/erb/scaffold/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%%= simple_form_for(@<%= singular_table_name %>) do |f| %>
2 | <%%= f.error_notification %>
3 |
4 |
17 |
--------------------------------------------------------------------------------
/config/locales/en.bootstrap.yml:
--------------------------------------------------------------------------------
1 | # Sample localization file for English. Add more files in this directory for other locales.
2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3 |
4 | en:
5 | helpers:
6 | actions: "Actions"
7 | links:
8 | back: "Back"
9 | cancel: "Cancel"
10 | confirm: "Are you sure?"
11 | destroy: "Delete"
12 | new: "New"
13 | titles:
14 | edit: "Edit"
15 | save: "Save"
16 | new: "New"
17 | delete: "Delete"
18 |
--------------------------------------------------------------------------------
/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 | # Make sure the secret is at least 30 characters and all random,
6 | # no regular words or you'll be exposed to dictionary attacks.
7 | Beermon::Application.config.secret_token = '4a85c4b823acde3e99c85988ebadaca761750d15b8d672e29c602a2bec5af8d7ef1e3409b3336a1c00f89e9d166783733e8fb3533607a3adf54442c1787803c4'
8 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # Disable root element in JSON by default.
12 | ActiveSupport.on_load(:active_record) do
13 | self.include_root_in_json = false
14 | end
15 |
--------------------------------------------------------------------------------
/app/views/dashboard/index.html.erb:
--------------------------------------------------------------------------------
1 |