punchcard 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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', ">= 0.1.3", :path => '../github/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, then do the
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 -am "Initial 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.0
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
- ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'] || {:adapter => 'sqlite3', :database => "punchcard_#{ENV['RACK_ENV'] || 'development'}.sqlite3"})
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{punchcard}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christoph Olszowka"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Christoph Olszowka