rails_best_practices 1.13.3 → 1.13.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -21,7 +21,7 @@ following template engines:
21
21
  * slim
22
22
  * rabl
23
23
 
24
- rails_best_practices works well only in ruby 1.9.2 and ruby 1.9.3 so far.
24
+ rails_best_practices works well only in ruby 1.9.2 and ruby 1.9.3 so far. It is incompatible with ruby 1.8.
25
25
 
26
26
  ## External Introduction
27
27
 
@@ -46,7 +46,9 @@ By default rails_best_practices will do parse codes in vendor, spec, test and fe
46
46
  -f, --format FORMAT output format
47
47
  --without-color only output plain text without color
48
48
  --with-textmate open file by textmate in html format
49
+ --with-sublime open file by sublime in html format (requires https://github.com/asuth/subl-handler)
49
50
  --with-mvim open file by mvim in html format
51
+ --with-github GITHUB_NAME open file on github in html format. GITHUB_NAME is like railsbp/rails-bestpractices
50
52
  --with-hg display hg commit and username, only support html format
51
53
  --with-git display git commit and username, only support html format
52
54
  --template TEMPLATE customize erb template
@@ -91,6 +93,10 @@ rails_best_practices gem is rewritten based on ripper instead of ruby_parser to
91
93
  or add in Gemfile
92
94
 
93
95
  gem "rails_best_practices"
96
+
97
+ #### --with-sublime
98
+
99
+ Install <https://github.com/asuth/subl-handler>
94
100
 
95
101
  ## Issue
96
102
 
@@ -114,6 +114,8 @@
114
114
  <a href='https://github.com/<%= @github_name %>/blob/<%= @last_commit_id %>/<%= error.short_filename %>#L<%= error.first_line_number %>' target='_blank'><%= error.short_filename %></a>
115
115
  <% elsif @textmate %>
116
116
  <a href='txmt://open/?url=file://<%= File.expand_path(error.filename) %>&amp;line=<%= error.line_number %>'><%= error.short_filename %></a>
117
+ <% elsif @sublime %>
118
+ <a href='"subl://open?url=file://"<%= File.expand_path(error.filename) %>&amp;line=<%= error.line_number %>'><%= error.short_filename %></a>
117
119
  <% elsif @mvim %>
118
120
  <a href='mvim://open/?url=file://<%= File.expand_path(error.filename) %>&amp;line=<%= error.line_number %>'><%= error.short_filename %></a>
119
121
  <% else %>
@@ -226,6 +226,7 @@ module RailsBestPractices
226
226
  errors: errors,
227
227
  error_types: error_types,
228
228
  textmate: @options["with-textmate"],
229
+ sublime: @options["with-sublime"],
229
230
  mvim: @options["with-mvim"],
230
231
  github: @options["with-github"],
231
232
  github_name: @options["github-name"],
@@ -8,6 +8,7 @@ require 'optparse'
8
8
  # --output-file FILE output html file for the analyzing result
9
9
  # --without-color only output plain text without color
10
10
  # --with-textmate open file by textmate in html format
11
+ # --with-sublime open file by sublime in html format (requires subl-handler)
11
12
  # --with-mvim open file by mvim in html format
12
13
  # --with-github GITHUB_NAME open file on github in html format, GITHUB_NAME is like railsbp/rails-bestpractices.com
13
14
  # --with-git display git commit and username, only support html format
@@ -43,6 +44,10 @@ OptionParser.new do |opts|
43
44
  opts.on("--with-textmate", "open file by textmate in html format") do
44
45
  options["with-textmate"] = true
45
46
  end
47
+
48
+ opts.on("--with-sublime", "open file by sublime in html format") do
49
+ options["with-sublime"] = true
50
+ end
46
51
 
47
52
  opts.on("--with-mvim", "open file by mvim in html format") do
48
53
  options["with-mvim"] = true
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module RailsBestPractices
3
- VERSION = "1.13.3"
3
+ VERSION = "1.13.4"
4
4
  end
@@ -11,6 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.summary = "a code metric tool for rails codes."
12
12
  s.description = "a code metric tool for rails codes, written in Ruby."
13
13
 
14
+ s.required_ruby_version = ">= 1.9.0"
14
15
  s.required_rubygems_version = ">= 1.3.6"
15
16
 
16
17
  s.add_dependency("code_analyzer")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_best_practices
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.3
4
+ version: 1.13.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-01-24 00:00:00.000000000 Z
12
+ date: 2013-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: code_analyzer
@@ -383,10 +383,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
383
383
  requirements:
384
384
  - - ! '>='
385
385
  - !ruby/object:Gem::Version
386
- version: '0'
387
- segments:
388
- - 0
389
- hash: -3719283038052699502
386
+ version: 1.9.0
390
387
  required_rubygems_version: !ruby/object:Gem::Requirement
391
388
  none: false
392
389
  requirements: