xray-rails 0.1.21 → 0.1.22

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: f149a5a9fc13928e5000548a04914d62a4b65401
4
- data.tar.gz: 63a8b1b1d992cd31a6edb95ee31e831bb59bd4c8
3
+ metadata.gz: 18c5fa59ce41be36f53c5d082228f00a377c4642
4
+ data.tar.gz: fa6fba704a0c95f40ad7e963fd6d2e4470aec89f
5
5
  SHA512:
6
- metadata.gz: f4f872523204ac2e0ca6f950ceffe4cb364d7b17c5f354acee4492857b553466472eacab058a56d45befb849b42138071eb631bb24a1c6515bf47257672407b4
7
- data.tar.gz: 4ed3f238f0bab14a3ec9b22075ee0594cc2f985e55713489110689d56db4a7c86c523657a01f52d41d4871354ed3e9ed33fae96e95807da4ae983ed477dfe804
6
+ metadata.gz: 269992ed3527fd075ddece83a5273c15e63d7ca0be2c5e274192151ee7da24b8409fa43645b76400ff300bde3fbeaced56e68628523ca644fd26d1a4f065af6b
7
+ data.tar.gz: 4547ec1abc60f7095e13c4dcfecd557080819376d56361937fe1406f14c7ef56d92596a44b3db2a0b5db944e3d186af454c26d2458b300c9ae7efd28a7be0b59
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  Xray-rails
2
2
  ==========
3
3
 
4
+ [![Gem Version](https://badge.fury.io/rb/xray-rails.svg)](https://rubygems.org/gems/xray-rails)
5
+ [![Build Status](https://travis-ci.org/brentd/xray-rails.svg?branch=master)](https://travis-ci.org/brentd/xray-rails)
6
+
4
7
  ### Reveal your UI's bones
5
8
 
6
9
  The dev tools available to web developers in modern browsers are great. Many of us can't remember what life was like before "Inspect Element". But what we see in the compiled output sent to our browser is often the wrong level of detail - what about visualizing the higher level components of your UI? Controllers, templates, partials, Backbone views, etc.
@@ -57,17 +60,18 @@ Backbone support via `xray-backbone` is optional.
57
60
 
58
61
  ## Configuration
59
62
 
60
- By default, Xray will open files with Sublime Text, looking for `/usr/local/bin/subl`.
61
-
62
- You can configure this to be your editor of choice in Xray's UI, or create `~/.xrayconfig`, a YAML file.
63
+ By default, Xray will check a few environment variables to determine
64
+ which editor to open files in: `$GEM_EDITOR`, `$VISUAL`, then
65
+ `$EDITOR` before falling back to `/usr/local/bin/subl`.
63
66
 
64
- Example `.xrayconfig`:
67
+ You can configure your editor of choice either by setting one of these
68
+ variables, or in Xray's UI, or in an `~/.xrayconfig` YAML file:
65
69
 
66
70
  ```yaml
67
71
  :editor: '/usr/local/bin/mate'
68
72
  ```
69
73
 
70
- Or for something more complex, use the `$file` placeholder.
74
+ For something more complex, use the `$file` placeholder.
71
75
 
72
76
  ```yaml
73
77
  :editor: "/usr/local/bin/tmux new-window 'vim $file'"
@@ -8,7 +8,13 @@ module Xray
8
8
  attr_accessor :editor
9
9
 
10
10
  CONFIG_FILE = ".xrayconfig"
11
- DEFAULT_EDITOR = '/usr/local/bin/subl'
11
+
12
+ def default_editor
13
+ ENV['GEM_EDITOR'] ||
14
+ ENV['VISUAL'] ||
15
+ ENV['EDITOR'] ||
16
+ '/usr/local/bin/subl'
17
+ end
12
18
 
13
19
  def editor
14
20
  load_config[:editor]
@@ -53,8 +59,7 @@ module Xray
53
59
  end
54
60
 
55
61
  def default_config
56
- { editor: DEFAULT_EDITOR }
62
+ { editor: default_editor }
57
63
  end
58
-
59
64
  end
60
65
  end
@@ -1,3 +1,3 @@
1
1
  module Xray
2
- VERSION = "0.1.21".freeze
2
+ VERSION = "0.1.22".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xray-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brent Dillingham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-21 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.6.4
192
+ rubygems_version: 2.6.6
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Reveal the structure of your UI