global_error_handler 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: 07f69e5667ebe1d85b0a8c19d1235a4e2f616376
4
- data.tar.gz: 6b567dc07286f74344be7f8095f5ff2143653428
3
+ metadata.gz: f3bfdcc640a0acecd16fb7622c821afa05ec299c
4
+ data.tar.gz: d54f255a35cdb52e49f2683f06ffcc5dd15e2a3d
5
5
  SHA512:
6
- metadata.gz: 0b6e21e73feb9f79d781bda7e1568f189d9e925e6b4e5add59358dc27f3dd756026b75c945b8daabe872a24756d28db307c67083f51be810077089c9c3d61a79
7
- data.tar.gz: ac37c37754e81d3619c43c3dc8b75be62a041597a81f157643559266a3f53a6506511e836f4d636cef9d06da9187609b9400393f01479f61580581ae8340328d
6
+ metadata.gz: 8891a983d533f742ea5edc686cbd294b874931ebc3f489b1452942071f4f84dc6d9aecbe3e5e5f6b8ba96b64c41bd192a3405872e7cde4a0160d8b4de3804267
7
+ data.tar.gz: 225113b3256269da00210c68d40e8854c5c3f108fd37e83cd705bfa240e740db6aec0d746c528a8d91e613bfe443a0820c25aa08d1af9c4e3c7e16c6f7abfa52
data/README.md CHANGED
@@ -34,7 +34,7 @@ GlobalErrorHandler::Handler.new(request.env, exception).process_exception!
34
34
 
35
35
  ## Contributing
36
36
 
37
- 1. Fork it ( https://github.com/[my-github-username]/global_error_handler/fork )
37
+ 1. Fork it ( https://github.com/kolobock/global_error_handler/fork )
38
38
  2. Create your feature branch (`git checkout -b my-new-feature`)
39
39
  3. Commit your changes (`git commit -am 'Add some feature'`)
40
40
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,5 +1,5 @@
1
- - filter_suffix = "filter by Error #{params[:filter_by].capitalize}: #{get_filter}" if params[:filter_by]
2
1
  %h1 App Exceptions
2
+ - filter_suffix = "filter by Error #{params[:filter_by].capitalize}: #{get_filter}" if params[:filter_by]
3
3
  %p.sub #{filter_suffix}
4
4
  #app_exceptions
5
5
  .commands
@@ -72,7 +72,7 @@ module GlobalErrorHandler
72
72
  def geh_public_view(filename, dir='')
73
73
  file = File.join(GEH_PUBLIC_PATH, dir, filename)
74
74
  begin
75
- cache_control :public, :max_age => 1800
75
+ cache_control :public, max_age: 1800
76
76
  send_file file
77
77
  rescue Errno::ENOENT
78
78
  404
@@ -131,39 +131,39 @@ module GlobalErrorHandler
131
131
 
132
132
  markup = ""
133
133
  if start - per_page >= 0
134
- markup << link_to(raw("&laquo; less"), exceptions_path(start - per_page), :class => 'btn less')
134
+ markup << link_to(raw("&laquo; less"), exceptions_path(start - per_page), class: 'btn less')
135
135
  elsif start > 0 && start < per_page
136
- markup << link_to(raw("&laquo; less"), exceptions_path(0), :class => 'btn less')
136
+ markup << link_to(raw("&laquo; less"), exceptions_path(0), class: 'btn less')
137
137
  end
138
138
 
139
139
  markup << pages_markup(start, per_page, total)
140
140
 
141
141
  if start + per_page < total
142
- markup << link_to(raw("more &raquo;"), exceptions_path(start + per_page), :class => 'btn more')
142
+ markup << link_to(raw("more &raquo;"), exceptions_path(start + per_page), class: 'btn more')
143
143
  end
144
144
  markup
145
145
  end
146
146
 
147
147
  def pages_markup(start, per_page, total)
148
- pages_count = ((total - 1)/ per_page).ceil
148
+ pages_count = ((total - 1) / per_page).ceil
149
149
  return '' if pages_count < 1
150
150
 
151
151
  left_ind = start / per_page
152
152
  markups = [left_ind.to_s]
153
153
  while (left_ind -= 1) >= 0 && (start/per_page - left_ind <= max_side_links || pages_count < max_links)
154
- markups.unshift link_to(left_ind, exceptions_path(left_ind * per_page, params[:filter_by], params[:filter]), :class => 'btn pages')
154
+ markups.unshift link_to(left_ind, exceptions_path(left_ind * per_page, params[:filter_by], params[:filter]), class: 'btn pages')
155
155
  end
156
156
  right_ind = start / per_page
157
157
  if right_ind > max_side_links && pages_count >= max_links
158
158
  markups.unshift '...' if right_ind - max_side_links > 1
159
- markups.unshift link_to(0, exceptions_path(0, params[:filter_by], params[:filter]), :class => 'btn pages')
159
+ markups.unshift link_to(0, exceptions_path(0, params[:filter_by], params[:filter]), class: 'btn pages')
160
160
  end
161
161
  while (right_ind +=1) * per_page < total && (right_ind - start / per_page <= max_side_links || pages_count < max_links)
162
- markups.push link_to(right_ind, exceptions_path(per_page * right_ind, params[:filter_by], params[:filter]), :class => 'btn pages')
162
+ markups.push link_to(right_ind, exceptions_path(per_page * right_ind, params[:filter_by], params[:filter]), class: 'btn pages')
163
163
  end
164
164
  if pages_count >= max_links && pages_count >= right_ind
165
165
  markups.push '...' if pages_count - right_ind >= 1
166
- markups.push link_to(pages_count, exceptions_path(pages_count * per_page, params[:filter_by], params[:filter]), :class => 'btn pages')
166
+ markups.push link_to(pages_count, exceptions_path(pages_count * per_page, params[:filter_by], params[:filter]), class: 'btn pages')
167
167
  end
168
168
  markups.join(' ')
169
169
  end
@@ -1,3 +1,3 @@
1
1
  module GlobalErrorHandler
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -12,7 +12,7 @@ require 'global_error_handler/redis'
12
12
  require 'global_error_handler/parser'
13
13
  require 'global_error_handler/handler'
14
14
  require 'global_error_handler/app_exception'
15
- require 'global_error_handler/global_error_handler'
15
+ require 'global_error_handler/server'
16
16
 
17
17
  require 'global_error_handler/middleware'
18
18
  require 'global_error_handler/rails' if defined? Rails::Railtie
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: global_error_handler
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
  - Andrii Rudenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-08 00:00:00.000000000 Z
11
+ date: 2014-11-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -101,12 +101,12 @@ files:
101
101
  - global_error_handler.gemspec
102
102
  - lib/global_error_handler.rb
103
103
  - lib/global_error_handler/app_exception.rb
104
- - lib/global_error_handler/global_error_handler.rb
105
104
  - lib/global_error_handler/handler.rb
106
105
  - lib/global_error_handler/middleware.rb
107
106
  - lib/global_error_handler/parser.rb
108
107
  - lib/global_error_handler/rails.rb
109
108
  - lib/global_error_handler/redis.rb
109
+ - lib/global_error_handler/server.rb
110
110
  - lib/global_error_handler/server/public/css/global_error_handler.css
111
111
  - lib/global_error_handler/server/public/js/global_error_handler.js
112
112
  - lib/global_error_handler/server/views/index.html.haml