groove 0.0.4 → 0.0.5

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.md CHANGED
@@ -9,6 +9,11 @@ Usage
9
9
  vim config.ru
10
10
 
11
11
  require 'groove'
12
+ Groove.config = { :db => ENV['DATABASE'] || 'weekapaug',
13
+ :db_url => ENV['DATABASE_URL'] || 'localhost',
14
+ :db_user => ENV['DATABASE_USER'],
15
+ :db_password => ENV['DATABASE_PASSWORD'],
16
+ :hoptoad => ENV['HOPTOAD'] }
12
17
  require 'app'
13
18
  run Sinatra::Application
14
19
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
data/groove.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{groove}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Croak"]
@@ -1,3 +1,3 @@
1
1
  require 'rack_hoptoad'
2
2
 
3
- use Rack::HoptoadNotifier, ENV['HOPTOAD'] || "1234"
3
+ use Rack::HoptoadNotifier, Groove.config[:hoptoad]
data/lib/groove/mongo.rb CHANGED
@@ -2,7 +2,7 @@ require 'mongo'
2
2
 
3
3
  include Mongo
4
4
 
5
- DB = Connection.new(ENV['DATABASE_URL'] || 'localhost').db(ENV['DATABASE'] || 'app')
6
- if ENV['DATABASE_USER'] && ENV['DATABASE_PASSWORD']
7
- DB.authenticate(ENV['DATABASE_USER'], ENV['DATABASE_PASSWORD'])
5
+ DB = Connection.new(Groove.config[:db_url]).db(Groove.config[:db])
6
+ if Groove.config[:db_user] && Groove.config[:db_password]
7
+ DB.authenticate(Groove.config[:db_user], Groove.config[:db_password])
8
8
  end
data/lib/groove.rb CHANGED
@@ -1,3 +1,13 @@
1
+ class Groove
2
+ class << self
3
+ attr_accessor :config
4
+ end
5
+
6
+ def initialize
7
+ @@config = { :db => 'app', :db_url => 'localhost', :hoptoad => '1234' }
8
+ end
9
+ end
10
+
1
11
  require 'rubygems'
2
12
  require 'x'
3
13
  require 'groove/sinatra'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groove
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Croak