snapstats 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffc02865734c12cb306c2c32bd439cf17499179b
4
- data.tar.gz: 9e1e897b0beb60482dc1c500a6b58de565db0924
3
+ metadata.gz: e22016a3081f960d24b5916796005b24acf03a2b
4
+ data.tar.gz: 967a4973efb2a3f973c25547270aa637b5215f41
5
5
  SHA512:
6
- metadata.gz: 9d4c95a2511de658510462d811b1e389d61dd37376251442fd1a0c7b9fbc6edcbd937c1ed817199067c0b097088da21a29e556bc171287b7a6fd5040e208ebf6
7
- data.tar.gz: 400c8554843d3b8013fcbeb5322d8c4aeba51db652b741ac476da9dd03b399daf237c292848c30e94421ce0db6ba767b34fde64929213a0bf2e7b01b87cf282e
6
+ metadata.gz: c691180d31bca7e41d83939934926df55b33f4a4ad8f8113cf5eafe7b30a5d93cb59b43c6b2fc974761e1751589caa2336cf1d7d8c27124866d216e5e3cca543
7
+ data.tar.gz: beb7de92e772ca08e14fa9a3a4430b638071d1fbbd9073e7e12d2801ed8317b3b7044f28670a7cd58e73263f3f57970ae805dd085f021b10510e0fa6b77f695c
@@ -1,5 +1,9 @@
1
1
  module Snapstats
2
2
  class ApplicationController < ActionController::Base
3
-
3
+
4
+ before_action except: [:unavailable] do |controller|
5
+ redirect_to unavailable_main_path unless Snapstats.redis.present?
6
+ end
7
+
4
8
  end
5
9
  end
@@ -13,6 +13,10 @@ module Snapstats
13
13
  render json: data
14
14
  end
15
15
 
16
+ def unavailable
17
+
18
+ end
19
+
16
20
  end
17
21
  end
18
22
 
@@ -1,6 +1,6 @@
1
1
  module Snapstats
2
2
  class UsersController < ApplicationController
3
-
3
+
4
4
  def index
5
5
 
6
6
  end
@@ -0,0 +1,9 @@
1
+ <div class="container animated fadeIn">
2
+
3
+ <div class="page-header">
4
+ <h1>Error</h1>
5
+ </div>
6
+
7
+ Can't connect to redis
8
+
9
+ </div>
data/config/routes.rb CHANGED
@@ -5,6 +5,7 @@ Snapstats::Engine.routes.draw do
5
5
  resource :main do
6
6
  collection do
7
7
  get :chart
8
+ get :unavailable
8
9
  end
9
10
  end
10
11
 
@@ -1,3 +1,3 @@
1
1
  module Snapstats
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapstats
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
  - s3k
@@ -98,6 +98,7 @@ files:
98
98
  - app/views/layouts/snapstats/application.html.erb
99
99
  - app/views/snapstats/application/_main_menu.html.erb
100
100
  - app/views/snapstats/mains/show.html.erb
101
+ - app/views/snapstats/mains/unavailable.html.erb
101
102
  - app/views/snapstats/performances/show.html.erb
102
103
  - app/views/snapstats/users/activity.html.erb
103
104
  - app/views/snapstats/users/show.html.erb