Switching to RVM, View tweaks
This commit is contained in:
parent
211d79cbcd
commit
10a1e4eb84
35
.rvmrc
Normal file
35
.rvmrc
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# This is an RVM Project .rvmrc file, used to automatically load the ruby
|
||||
# development environment upon cd'ing into the directory
|
||||
|
||||
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
|
||||
# Only full ruby name is supported here, for short names use:
|
||||
# echo "rvm use 1.8.7" > .rvmrc
|
||||
environment_id="ruby-1.9.3-p385@members-hsl"
|
||||
|
||||
# Uncomment the following lines if you want to verify rvm version per project
|
||||
# rvmrc_rvm_version="1.18.8 (stable)" # 1.10.1 seams as a safe start
|
||||
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
|
||||
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
|
||||
# return 1
|
||||
# }
|
||||
|
||||
# First we attempt to load the desired environment directly from the environment
|
||||
# file. This is very fast and efficient compared to running through the entire
|
||||
# CLI and selector. If you want feedback on which environment was used then
|
||||
# insert the word 'use' after --create as this triggers verbose mode.
|
||||
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
|
||||
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
||||
then
|
||||
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
||||
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
|
||||
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
|
||||
else
|
||||
# If the environment file has not yet been created, use the RVM CLI to select.
|
||||
rvm --create "$environment_id" || {
|
||||
echo "Failed to create RVM environment '${environment_id}'."
|
||||
return 1
|
||||
}
|
||||
fi
|
||||
|
4
Gemfile
4
Gemfile
|
@ -1,6 +1,6 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
#ruby '1.9.3'
|
||||
ruby '1.9.3'
|
||||
|
||||
gem 'rails', '3.2.3'
|
||||
|
||||
|
@ -46,3 +46,5 @@ gem 'bcrypt-ruby', '~> 3.0.0'
|
|||
|
||||
#gem "paperclip", "~> 3.0"
|
||||
gem 'gravtastic'
|
||||
|
||||
gem 'passenger'
|
||||
|
|
|
@ -39,6 +39,7 @@ GEM
|
|||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.3.3)
|
||||
daemon_controller (1.1.5)
|
||||
devise (2.1.1)
|
||||
bcrypt-ruby (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
|
@ -63,6 +64,10 @@ GEM
|
|||
mime-types (1.19)
|
||||
multi_json (1.3.6)
|
||||
orm_adapter (0.1.0)
|
||||
passenger (4.0.14)
|
||||
daemon_controller (>= 1.1.0)
|
||||
rack
|
||||
rake (>= 0.8.1)
|
||||
polyglot (0.3.3)
|
||||
rack (1.4.1)
|
||||
rack-cache (1.2)
|
||||
|
@ -124,6 +129,7 @@ DEPENDENCIES
|
|||
gravtastic
|
||||
jquery-rails
|
||||
json
|
||||
passenger
|
||||
rails (= 3.2.3)
|
||||
sass-rails (~> 3.2.3)
|
||||
sqlite3
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
class Payment < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
has_one :ipn
|
||||
has_one :paypal_csv
|
||||
attr_accessible :date, :user_id, :created_by, :amount
|
||||
|
||||
validates_presence_of :user_id, :date, :amount # not created_by
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
<html><body>
|
||||
<h2>PayPal IPN Records</h2>
|
||||
<p>
|
||||
<em>Automatically loaded from PayPal's servers</em>
|
||||
</p>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
|
@ -30,4 +33,3 @@
|
|||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</body></html>
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<h1>Listing payments</h1>
|
||||
|
||||
<%= link_to 'New Payment', new_payment_path %>
|
||||
<br />
|
||||
<p>
|
||||
<b>Create Payments:</b>
|
||||
<%= link_to 'Manually', new_payment_path %> |
|
||||
<%= link_to 'Batched CSV', paypal_csvs_path %> |
|
||||
<%= link_to 'IPN', ipns_path %>
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>User</th>
|
||||
|
|
|
@ -35,7 +35,12 @@
|
|||
|
||||
<% if @payment.ipn.present? %>
|
||||
<p>
|
||||
<%= link_to "Paid via PayPal", @payment.ipn %>
|
||||
<%= link_to "Paid via PayPal (IPN)", @payment.ipn %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% if @payment.paypal_csv.present? %>
|
||||
<p>
|
||||
<%= link_to "Paid via PayPal (CSV)", @payment.paypal_csv %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
<%= link_to "Upload CSV", new_paypal_csv_path %>
|
||||
<h2>PayPal CSV Records</h2>
|
||||
<p>
|
||||
<%= link_to "Upload CSV", new_paypal_csv_path %>
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: UTF-8
|
||||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
|
|
Loading…
Reference in New Issue
Block a user