murlsh 1.9.1 → 1.9.2

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/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ 1.9.2
2
+ 2001-10-02
3
+
4
+ Update for Heroku Cedar stack. User DATABASE_URL environment variable.
5
+
1
6
  1.9.1
2
7
  2011-10-02
3
8
 
data/README.textile CHANGED
@@ -51,7 +51,7 @@ mkdir murlsh_deploy <or any other name>
51
51
  cd murlsh_deploy
52
52
  murlsh .
53
53
  git init
54
- heroku create <choose a name>
54
+ heroku create --stack cedar <choose a name>
55
55
 
56
56
  rake app:gemfile
57
57
  bundle install
@@ -68,7 +68,8 @@ git add .
68
68
  git commit
69
69
  git push heroku master
70
70
 
71
- heroku rake db:migrate
71
+ heroku addons:add shared-database
72
+ heroku run rake db:migrate
72
73
  </code>
73
74
  </pre>
74
75
 
data/Rakefile CHANGED
@@ -22,9 +22,17 @@ end
22
22
  config = YAML.load_file('config.yaml')
23
23
 
24
24
  # for Heroku
25
- db_config_file = File.join(File.dirname(__FILE__), 'config', 'database.yml')
26
- if File.exist?(db_config_file)
27
- config['db'] = YAML.load_file(db_config_file)['production']
25
+ if ENV['DATABASE_URL']
26
+ db_parsed = URI(ENV['DATABASE_URL'])
27
+
28
+ config['db'] = {
29
+ :adapter =>
30
+ db_parsed.scheme == 'postgres' ? 'postgresql' : db_parsed.scheme,
31
+ :host => db_parsed.host,
32
+ :username => db_parsed.user,
33
+ :password => db_parsed.password,
34
+ :database => db_parsed.path[1..-1],
35
+ )
28
36
  end
29
37
 
30
38
  heroku_info = {}
data/config.ru CHANGED
@@ -14,9 +14,17 @@ require 'murlsh'
14
14
  config = YAML.load_file('config.yaml')
15
15
 
16
16
  # for Heroku
17
- db_config_file = File.join(File.dirname(__FILE__), 'config', 'database.yml')
18
- if File.exist?(db_config_file)
19
- config['db'] = YAML.load_file(db_config_file)['production']
17
+ if ENV['DATABASE_URL']
18
+ db_parsed = URI(ENV['DATABASE_URL'])
19
+
20
+ config['db'] = {
21
+ :adapter =>
22
+ db_parsed.scheme == 'postgres' ? 'postgresql' : db_parsed.scheme,
23
+ :host => db_parsed.host,
24
+ :username => db_parsed.user,
25
+ :password => db_parsed.password,
26
+ :database => db_parsed.path[1..-1],
27
+ }
20
28
  end
21
29
 
22
30
  # use Rack::ShowExceptions
@@ -1,3 +1,3 @@
1
1
  module Murlsh
2
- VERSION = '1.9.1'
2
+ VERSION = '1.9.2'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: murlsh
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 9
9
- - 1
10
- version: 1.9.1
9
+ - 2
10
+ version: 1.9.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matthew M. Boedicker