peek 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/app/controllers/peek/results_controller.rb +8 -5
- data/lib/peek.rb +3 -1
- data/lib/peek/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bd3fd3acc9362105584e5faaeef0fc839cef3d5
|
4
|
+
data.tar.gz: d3f007fe21318d5b9f56b113a73d8f11a8f05a2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 647adb6b09ef5b112df5a3d9153244a320e4f21ee82f13217179523f5baec3747d760ce3f8a880b96d88f5cab14aac13eaf31e95e3a1427fc9fdb496df8dfee4
|
7
|
+
data.tar.gz: 0e376d75d3e9c14391a4a5aa68c1d8ff26b2bb420a96065e65c4ab2635a970d2d927799261e9cabcbf7da791c28ad80c11246d23160b846bef35380422a05d11
|
data/README.md
CHANGED
@@ -90,7 +90,7 @@ In `app/assets/javascripts/application.coffee`:
|
|
90
90
|
#= require peek
|
91
91
|
```
|
92
92
|
|
93
|
-
Note: Each additional view
|
93
|
+
Note: Each additional view may have their own CSS and JS that you may need to require
|
94
94
|
which should be stated in their usage documentation.
|
95
95
|
|
96
96
|
### Configuring the default adapter
|
@@ -199,6 +199,7 @@ end
|
|
199
199
|
- [peek-dalli](https://github.com/peek/peek-dalli)
|
200
200
|
- [peek-gc](https://github.com/peek/peek-gc)
|
201
201
|
- [peek-git](https://github.com/peek/peek-git)
|
202
|
+
- [peek-host](https://github.com/jacobbednarz/peek-host)
|
202
203
|
- [peek-mongo](https://github.com/peek/peek-mongo)
|
203
204
|
- [peek-moped](https://github.com/nodkz/peek-moped)
|
204
205
|
- [peek-mysql2](https://github.com/peek/peek-mysql2)
|
@@ -1,13 +1,16 @@
|
|
1
1
|
module Peek
|
2
2
|
class ResultsController < ApplicationController
|
3
3
|
before_filter :restrict_non_access
|
4
|
-
respond_to :json
|
5
4
|
|
6
5
|
def show
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
respond_to do |format|
|
7
|
+
format.json do
|
8
|
+
if request.xhr?
|
9
|
+
render :json => Peek.adapter.get(params[:request_id])
|
10
|
+
else
|
11
|
+
render :nothing => true, :status => :not_found
|
12
|
+
end
|
13
|
+
end
|
11
14
|
end
|
12
15
|
end
|
13
16
|
|
data/lib/peek.rb
CHANGED
@@ -6,6 +6,8 @@ require 'peek/adapters/memory'
|
|
6
6
|
require 'peek/views/view'
|
7
7
|
|
8
8
|
module Peek
|
9
|
+
ALLOWED_ENVS = ['development', 'staging'].freeze
|
10
|
+
|
9
11
|
def self._request_id
|
10
12
|
@_request_id ||= Atomic.new
|
11
13
|
end
|
@@ -47,7 +49,7 @@ module Peek
|
|
47
49
|
end
|
48
50
|
|
49
51
|
def self.enabled?
|
50
|
-
|
52
|
+
ALLOWED_ENVS.include?(env)
|
51
53
|
end
|
52
54
|
|
53
55
|
def self.env
|
data/lib/peek/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peek
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garrett Bjerkhoel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.2.
|
131
|
+
rubygems_version: 2.2.3
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Take a peek into your Rails application.
|