punchcard 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -5
- data/VERSION +1 -1
- data/lib/punchcard.rb +7 -1
- data/punchcard.gemspec +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -9,7 +9,7 @@ Create a directory to hold your app, then create a Gemfile:
|
|
9
9
|
source :rubygems
|
10
10
|
gem 'pg'
|
11
11
|
# gem 'sqlite3' # if you want to run using sqlite or test locally
|
12
|
-
gem 'punchcard'
|
12
|
+
gem 'punchcard'
|
13
13
|
|
14
14
|
Create a Rakefile:
|
15
15
|
|
@@ -43,13 +43,14 @@ Open http://localhost:9292
|
|
43
43
|
|
44
44
|
== Hosting on Heroku
|
45
45
|
|
46
|
-
Starting from the initial bootstrap above, make sure you have the pg gem in your bundle
|
47
|
-
following in the terminal:
|
46
|
+
Starting from the initial bootstrap above, make sure you have the pg gem in your bundle and did run
|
47
|
+
bundle install to create the Gemfile.lock, then do the following in the terminal:
|
48
48
|
|
49
|
-
$ git init
|
50
|
-
$ git commit -
|
49
|
+
$ git init && git add .
|
50
|
+
$ git commit -m "Initial commit"
|
51
51
|
$ heroku create [APPNAME] --stack bamboo-mri-1.9.2
|
52
52
|
$ git push heroku master
|
53
|
+
$ heroku rake db:migrate
|
53
54
|
|
54
55
|
Now head over to your app's url! You'll still need to add users, see below.
|
55
56
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/lib/punchcard.rb
CHANGED
@@ -9,7 +9,13 @@ require 'logger'
|
|
9
9
|
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
10
10
|
ActiveRecord::Base.logger.level = Logger::WARN
|
11
11
|
ActiveRecord::Migration.verbose = false
|
12
|
-
|
12
|
+
|
13
|
+
if ENV['DATABASE_URL']
|
14
|
+
dbconfig = YAML.load(File.read('config/database.yml'))
|
15
|
+
ActiveRecord::Base.establish_connection dbconfig[ENV['RACK_ENV']]
|
16
|
+
else
|
17
|
+
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => "punchcard_#{ENV['RACK_ENV'] || 'development'}.sqlite3")
|
18
|
+
end
|
13
19
|
|
14
20
|
require 'punchcard/person'
|
15
21
|
require 'punchcard/punch'
|
data/punchcard.gemspec
CHANGED