glimpse 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,3 +9,8 @@
9
9
  # 0.0.3
10
10
 
11
11
  - Change the scope of the .tipsy selector as it's inserted outside of the Glimpse div.
12
+
13
+ # 0.0.4
14
+
15
+ - Don't capture ` being pressed when in combination with `cmd`
16
+ - Support for [Turbolinks](https://github.com/rails/turbolinks)
data/README.md CHANGED
@@ -39,13 +39,13 @@ Feel free to pick and choose from the list or create your own. The order they
39
39
  are added to Glimpse, the order they will appear in your bar.
40
40
 
41
41
  Next, to render the Glimpse bar in your application just add the following snippet
42
- just before the opening `<body>` tag in your application layout.
42
+ just after the opening `<body>` tag in your application layout.
43
43
 
44
44
  ```erb
45
45
  <%= render 'glimpse/bar' %>
46
46
  ```
47
47
 
48
- It will look something like:
48
+ It will look like:
49
49
 
50
50
  ```erb
51
51
  <html>
@@ -63,10 +63,10 @@ Some Glimpse views require the view to render before data is collected and can
63
63
  be presented, ie: the number of MySQL queries ran on the page and how
64
64
  long it took.
65
65
 
66
- For this to work, you need to include the performance partial at the end of your
66
+ For this to work, you need to include the `glimpse/results` partial at the end of your
67
67
  application layout.
68
68
 
69
- It will look something like:
69
+ It will look like:
70
70
 
71
71
  ```erb
72
72
  <html>
@@ -82,7 +82,7 @@ It will look something like:
82
82
  ```
83
83
 
84
84
  Now that you have the partials in your application, you will need to include the
85
- CSS and JS that help make Glimpse work :sparkles:
85
+ CSS and JS that help make Glimpse :sparkles:
86
86
 
87
87
  In `app/assets/stylesheets/application.scss`:
88
88
 
@@ -98,11 +98,12 @@ In `app/assets/javascripts/application.coffee`:
98
98
  #= require glimpse
99
99
  ```
100
100
 
101
- Note: Each additional view my have their own CSS and JS you need to require.
101
+ Note: Each additional view my have their own CSS and JS you need to require
102
+ which should be stated in their usage documentation.
102
103
 
103
104
  ## Using Glimpse with PJAX
104
105
 
105
- When using PJAX in your application, by default requests won't render the
106
+ When using [PJAX](https://github.com/defunkt/jquery-pjax) in your application, by default requests won't render the
106
107
  application layout which ends up not including the required results partial.
107
108
  It's fairly simple to get this working with PJAX if you're using the
108
109
  [pjax_rails](https://github.com/rails/pjax_rails) gem.
@@ -151,9 +152,12 @@ end
151
152
  - [glimpse-pg](https://github.com/dewski/glimpse-pg)
152
153
  - [glimpse-redis](https://github.com/dewski/glimpse-redis)
153
154
  - [glimpse-resque](https://github.com/dewski/glimpse-resque)
155
+ - [glimpse-sidekiq](https://github.com/suranyami/glimpse-sidekiq)
154
156
  - Navigation Time :soon:
155
157
  - Unicorn :soon:
156
158
 
159
+ Feel free to submit a Pull Request adding your own Glimpse item to this list.
160
+
157
161
  ## Creating your own Glimpse item
158
162
 
159
163
  Each Glimpse item is a self contained Rails engine which gives you the power to
@@ -17,7 +17,7 @@ initializeTipsy = ->
17
17
  toggleBar = (event) ->
18
18
  return if $(event.target).is ':input'
19
19
 
20
- if event.keyCode == 96
20
+ if event.keyCode == 96 && !event.metaKey
21
21
  wrapper = $('#glimpse')
22
22
  if wrapper.hasClass 'disabled'
23
23
  wrapper.removeClass 'disabled'
@@ -35,5 +35,9 @@ $(document).on 'glimpse:update', initializeTipsy
35
35
  $(document).on 'pjax:end', ->
36
36
  $(this).trigger 'glimpse:update'
37
37
 
38
+ # Also listen to turbolinks page change event
39
+ $(document).on 'page:change', ->
40
+ $(this).trigger 'glimpse:update'
41
+
38
42
  $ ->
39
43
  $(this).trigger 'glimpse:update'
@@ -11,11 +11,12 @@ Gem::Specification.new do |gem|
11
11
  gem.description = %q{Provide a glimpse into your Rails application.}
12
12
  gem.summary = %q{Provide a glimpse into your Rails application.}
13
13
  gem.homepage = 'https://github.com/dewski/glimpse'
14
+ gem.license = 'MIT'
14
15
 
15
16
  gem.files = `git ls-files`.split($/)
16
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
19
  gem.require_paths = ['lib']
19
20
 
20
- gem.add_dependency 'rails'
21
+ gem.add_dependency 'rails', '>= 3'
21
22
  end
@@ -12,9 +12,9 @@ module Glimpse
12
12
  end
13
13
 
14
14
  def self.env
15
- ENV['RAILS_ENV'] || ENV['RACK_ENV']
15
+ Rails.env
16
16
  end
17
-
17
+
18
18
  def self.views
19
19
  @cached_views ||= if @views && @views.any?
20
20
  @views.collect { |klass, options| klass.new(options.dup) }.select(&:enabled?)
@@ -1,3 +1,3 @@
1
1
  module Glimpse
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
@@ -22,10 +22,6 @@ describe Glimpse do
22
22
  end
23
23
 
24
24
  describe "env" do
25
- before do
26
- ENV['RACK_ENV'] ||= 'test'
27
- end
28
-
29
25
  it "should return the current environment" do
30
26
  assert_equal 'test', Glimpse.env
31
27
  end
@@ -1,3 +1,5 @@
1
+ ENV['RAILS_ENV'] = "test"
2
+
1
3
  require 'glimpse'
2
4
 
3
5
  require 'minitest/autorun'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimpse
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-11 00:00:00.000000000 Z
12
+ date: 2013-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: '0'
21
+ version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: '0'
29
+ version: '3'
30
30
  description: Provide a glimpse into your Rails application.
31
31
  email:
32
32
  - me@garrettbjerkhoel.com
@@ -59,7 +59,8 @@ files:
59
59
  - test/glimpse_test.rb
60
60
  - test/test_helper.rb
61
61
  homepage: https://github.com/dewski/glimpse
62
- licenses: []
62
+ licenses:
63
+ - MIT
63
64
  post_install_message:
64
65
  rdoc_options: []
65
66
  require_paths: