Skip to content

Commit

Permalink
Merge 63d2aef into 85da52d
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Nov 24, 2018
2 parents 85da52d + 63d2aef commit cb548a7
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Expand Up @@ -9,10 +9,11 @@ gem "oga"
gem "parallel"
gem "public_suffix"
gem "puma"
gem "redis"
gem "rollbar"
gem "simpleidn"
gem "sinatra-contrib"
gem "sinatra"
gem "redis"

group :test, :development do
gem 'coveralls', require: false
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Expand Up @@ -59,6 +59,8 @@ GEM
rack (>= 1.0, < 3)
rake (12.3.1)
redis (4.0.3)
rollbar (2.18.0)
multi_json
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
Expand Down Expand Up @@ -129,6 +131,7 @@ DEPENDENCIES
rack-test
rake
redis
rollbar
rspec
simpleidn
sinatra
Expand Down
8 changes: 6 additions & 2 deletions bin/cron_job.rb
Expand Up @@ -2,5 +2,9 @@

require "ayashige"

job = Ayashige::Jobs::CronJob.new
job.perform
begin
job = Ayashige::Jobs::CronJob.new
job.perform
rescue StandardError => e
Rollbar.error e
end
8 changes: 8 additions & 0 deletions lib/ayashige.rb
Expand Up @@ -15,6 +15,14 @@

require "ayashige/jobs/cron_job"

require "rollbar"
require "dotenv/load"

Rollbar.configure do |config|
config.access_token = ENV["ROLLBAR_ACCESS_TOKEN"]
end


module Ayashige
class Error < StandardError; end
end
4 changes: 4 additions & 0 deletions lib/ayashige/application.rb
@@ -1,9 +1,13 @@
# frozen_string_literal: true

require "sinatra/base"
require "rollbar/middleware/sinatra"

module Ayashige
class Application < Sinatra::Base

use Rollbar::Middleware::Sinatra

configure do
set :root, File.dirname(__FILE__) + '/../..'
end
Expand Down
1 change: 0 additions & 1 deletion lib/ayashige/redis.rb
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require "redis"
require "dotenv/load"

module Ayashige
module Redis
Expand Down

0 comments on commit cb548a7

Please sign in to comment.