Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
bundle update all of our gems; fixes for major updates in rufus-sched…
Browse files Browse the repository at this point in the history
…uler and sequel
  • Loading branch information
obfuscurity committed Jan 20, 2014
1 parent ab0d54d commit 6117f53
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 59 deletions.
111 changes: 57 additions & 54 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,98 +1,101 @@
GEM
remote: http://rubygems.org/
specs:
addressable (2.3.2)
coderay (1.0.8)
addressable (2.3.5)
atomic (1.1.14)
coderay (1.1.0)
daemons (1.1.9)
diff-lcs (1.1.3)
diff-lcs (1.2.5)
dotenv (0.9.0)
eventmachine (1.0.3)
faraday (0.8.6)
multipart-post (~> 1.1)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
foreman (0.60.2)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
foreman (0.63.0)
dotenv (>= 0.7)
thor (>= 0.13.6)
haml (3.1.7)
hashie (1.2.0)
json (1.7.5)
method_source (0.8.1)
mime-types (1.19)
multi_json (1.6.1)
multipart-post (1.2.0)
netrc (0.7.7)
nokogiri (1.5.5)
octokit (1.23.0)
addressable (~> 2.2)
faraday (~> 0.8)
faraday_middleware (~> 0.9)
hashie (~> 1.2)
multi_json (~> 1.3)
netrc (~> 0.7.7)
omniauth (1.1.1)
hashie (~> 1.2)
rack
omniauth-google-apps (0.0.2)
haml (4.0.5)
tilt
hashie (2.0.5)
json (1.8.1)
method_source (0.8.2)
mime-types (2.0)
mini_portile (0.5.2)
multipart-post (2.0.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
octokit (2.7.0)
sawyer (~> 0.5.2)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
rack (~> 1.0)
omniauth-google-apps (0.1.0)
omniauth (~> 1.0)
omniauth-openid (~> 1.0)
ruby-openid (~> 2.3.0)
ruby-openid-apps-discovery (~> 1.2.0)
omniauth-openid (1.0.1)
omniauth (~> 1.0)
rack-openid (~> 1.3.1)
openid-redis-store (0.0.2)
redis
ruby-openid
pg (0.14.1)
pry (0.9.10)
coderay (~> 1.0.5)
pg (0.17.1)
pry (0.9.12.4)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.3.1)
rack (1.4.1)
slop (~> 3.4)
rack (1.5.2)
rack-canonical-host (0.0.8)
addressable
rack (~> 1.0)
rack-openid (1.3.1)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-protection (1.2.0)
rack-protection (1.5.2)
rack
rack-ssl-enforcer (0.2.4)
rack-ssl-enforcer (0.2.6)
rack-test (0.6.2)
rack (>= 1.0)
rake (0.9.2.2)
redis (3.0.2)
rake (10.1.1)
redis (3.0.6)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.11.0)
rspec-core (~> 2.11.0)
rspec-expectations (~> 2.11.0)
rspec-mocks (~> 2.11.0)
rspec-core (2.11.1)
rspec-expectations (2.11.3)
diff-lcs (~> 1.1.3)
rspec-mocks (2.11.3)
ruby-openid (2.2.2)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
ruby-openid (2.3.0)
ruby-openid-apps-discovery (1.2.0)
ruby-openid (>= 2.1.7)
rufus-scheduler (2.0.17)
tzinfo (>= 0.3.23)
sequel (3.41.0)
rufus-scheduler (3.0.4)
tzinfo
sawyer (0.5.2)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
sequel (4.6.0)
sinatra (1.3.1)
rack (~> 1.3, >= 1.3.4)
rack-protection (~> 1.1, >= 1.1.2)
tilt (~> 1.3, >= 1.3.3)
sinatra_auth_github (0.13.3)
sinatra (~> 1.0)
warden-github (~> 0.13.1)
slop (3.3.3)
slop (3.4.7)
thin (1.5.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.16.0)
tilt (1.3.3)
tzinfo (0.3.35)
warden (1.2.1)
thor (0.18.1)
thread_safe (0.1.3)
atomic
tilt (1.4.1)
tzinfo (1.1.0)
thread_safe (~> 0.1)
warden (1.2.3)
rack (>= 1.0)
warden-github (0.13.2)
octokit (>= 1.22.0)
Expand Down
2 changes: 1 addition & 1 deletion config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Metric.load unless ENV['METRICS_UPDATE_ON_BOOT'] == 'false'

# update our Metrics list at regular intervals
require 'rufus/scheduler'
scheduler = Rufus::Scheduler.start_new
scheduler = Rufus::Scheduler.new
# kick off update after we start so as not to hit Heroku's web startup timeout
scheduler.in '1m' do
Metric.update
Expand Down
9 changes: 6 additions & 3 deletions lib/descartes/models/init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
require 'securerandom'
require 'json'

db = ENV['DATABASE_URL'] || 'postgres://localhost/descartes'
Sequel.connect(db)
dsn = ENV['DATABASE_URL'] || 'postgres://localhost/descartes'

DB = Sequel.connect(dsn)
DB.extension :pagination

$LOAD_PATH.unshift File.dirname(__FILE__)
require 'graphs'
Expand All @@ -15,7 +17,8 @@
require 'metrics'
require 'users'

Sequel.extension :pagination
Sequel.extension :core_extensions

Sequel::Model.plugin :json_serializer
Graph.plugin :json_serializer
Dashboard.plugin :json_serializer
Expand Down
3 changes: 2 additions & 1 deletion lib/descartes/models/metrics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def self.update
request = RestClient::Resource.new("#{u.to_s}/metrics/index.json", :timeout => -1)
response = request.get
@@paths = JSON.parse(response)
MetricCacheStatus.update(:updated_at => Sequel.function(:NOW))

MetricCacheStatus.dataset.update(:updated_at => Sequel.function(:NOW))
end
end

Expand Down

1 comment on commit 6117f53

@obfuscurity
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should mention that much of this was reported by @aphyr in #155.

Please sign in to comment.