serpscan-dashboard 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35f572598520085d548695106ab4cb7c8395a3b6
4
- data.tar.gz: ac701311a98658d084d42095d597a26621b5b0c0
3
+ metadata.gz: 89f0e7ed51256dafad60849cbb3eb5956d4e4547
4
+ data.tar.gz: cba7157e7d9304d88e5c82504541192c0c55f943
5
5
  SHA512:
6
- metadata.gz: 1e4438cab0f4732280c30caa59c681984758d015722e18738d7518bf8dcecb060a8b90130b668217f6e49f13c77d7dd4170a77a46dcc28ee3f8a734be78091e9
7
- data.tar.gz: c35147a0e2c31dc239c1fdc686e3258a05e08eb056024cca3764b195fb9eabe9dab5b11558e3f6035eb387be90edf27fde1092ff33c4a158af3c6fcfdcd01f88
6
+ metadata.gz: 7fa8d8d2287ac7a78246d10f042a621c974392c57618ccf9d37040b69daf5e233aba7201882773d0b2f82cfcd14c6cbd4aa1b9d633968912506c044ee6c5d540
7
+ data.tar.gz: 0237241881c861c81e51daf91e6825c0eb9b83efacf1a8f561e95c06c0a0f7a29bb002e88cb76829dd82be7d599623300a10ed4e11f9908865b5b7003fb7cd13
@@ -0,0 +1,14 @@
1
+ module Serpscan
2
+ module Dashboard
3
+ class DashboardController < ActionController::Base
4
+
5
+ def error
6
+ end
7
+
8
+ rescue_from RestClient::Unauthorized do |e|
9
+ flash[:alert] = "Your API Key is invalid."
10
+ redirect_to error_path
11
+ end
12
+ end
13
+ end
14
+ end
@@ -1,6 +1,6 @@
1
1
  module Serpscan
2
2
  module Dashboard
3
- class KeywordsController < ActionController::Base
3
+ class KeywordsController < DashboardController
4
4
 
5
5
  def create
6
6
  @website = Serpscan::Website.find(params[:id])
@@ -1,6 +1,6 @@
1
1
  module Serpscan
2
2
  module Dashboard
3
- class WebsitesController < ActionController::Base
3
+ class WebsitesController < DashboardController
4
4
  layout 'serpscan/dashboard'
5
5
 
6
6
  def index
@@ -0,0 +1 @@
1
+ <h2><%= flash[:alert] %></h2>
data/config/routes.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  Serpscan::Dashboard::Engine.routes.draw do
2
2
  get '/' => 'websites#index', as: :websites
3
+ get '/error' => 'dashboard#error', as: :error
3
4
  get '/:id' => 'websites#show', as: :website
4
5
  post '/:id/keyword' => 'keywords#create'
5
6
  get '/keywords/delete' => 'keywords#delete'
@@ -1,5 +1,5 @@
1
1
  module Serpscan
2
2
  module Dashboard
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serpscan-dashboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Montgomery
@@ -76,9 +76,11 @@ extra_rdoc_files: []
76
76
  files:
77
77
  - MIT-LICENSE
78
78
  - Rakefile
79
+ - app/controllers/serpscan/dashboard/dashboard_controller.rb
79
80
  - app/controllers/serpscan/dashboard/keywords_controller.rb
80
81
  - app/controllers/serpscan/dashboard/websites_controller.rb
81
82
  - app/views/layouts/serpscan/dashboard.html.erb
83
+ - app/views/serpscan/dashboard/dashboard/error.html.erb
82
84
  - app/views/serpscan/dashboard/websites/index.html.erb
83
85
  - app/views/serpscan/dashboard/websites/show.html.erb
84
86
  - config/routes.rb