From 594d37bb40f3e3e0f15553383cf2a305d4d6742e Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 9 Feb 2015 19:43:03 -0700 Subject: extract api. --- config/routes.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index ae0a4cb..9092e9b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,6 +4,13 @@ Rails.application.routes.draw do resources :files, only: [:index, :show], controller: 'agents/files' end + namespace :api do + resources :agents, only: [:create] do + resources :events, only: [:create], controller: 'agents/events' + resources :files, only: [:show], controller: 'agents/files' + end + end + resources :dispositions root 'agents#index' end -- cgit v1.2.3 From 9061437f38cd7d4775fc4599e8c557fda9ed4743 Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 9 Feb 2015 19:56:17 -0700 Subject: add lograge. --- Gemfile | 1 + Gemfile.lock | 5 +++++ config/application.rb | 1 + 3 files changed, 7 insertions(+) (limited to 'config') diff --git a/Gemfile b/Gemfile index 812b7f0..f45e50c 100644 --- a/Gemfile +++ b/Gemfile @@ -24,6 +24,7 @@ gem 'jbuilder', '~> 2.0' gem 'sdoc', '~> 0.4.0', group: :doc gem 'typhoeus' gem 'listen' +gem 'lograge' # Use ActiveModel has_secure_password # gem 'bcrypt', '~> 3.1.7' diff --git a/Gemfile.lock b/Gemfile.lock index 709cd85..cc375da 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -94,6 +94,10 @@ GEM celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) + lograge (0.3.1) + actionpack (>= 3) + activesupport (>= 3) + railties (>= 3) loofah (2.0.1) nokogiri (>= 1.5.9) mail (2.6.3) @@ -213,6 +217,7 @@ DEPENDENCIES jbuilder (~> 2.0) jquery-rails listen + lograge packetfu pcaprub pg diff --git a/config/application.rb b/config/application.rb index a4c3856..8ffec33 100644 --- a/config/application.rb +++ b/config/application.rb @@ -30,5 +30,6 @@ module Malwer # Do not swallow errors in after_commit/after_rollback callbacks. config.active_record.raise_in_transactional_callbacks = true + config.lograge.enabled = true end end -- cgit v1.2.3