railsbp_in_browser 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +8 -5
- data/images/railsbp_in_browser_examp.jpg +0 -0
- data/lib/railsbp_in_browser.rb +8 -0
- data/lib/railsbp_in_browser/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fcd05570d0f3749c50600dad95358bae2648af26d90ead8160ec02a38cced8e3
|
4
|
+
data.tar.gz: 257c5f30e287d88e36ef4230f81ed84a29e8e5fee707322b22959caa4ac4fc04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1608e159fa5110ccb80c1c50980e26cb30636e099e842e11191026b15689bb6764cb11d04118bfccd1fa8573c84e9df9029361dbcbb45cf2ae7f76b129a13032
|
7
|
+
data.tar.gz: 216da32b80c368603bef7baac50f48eac6129ff88ddfd55787e2a7d6b0226dacbf6299d4ec0741265600c4f0545dd73c65abf2ff3234060d9b8bc37dc21e3174
|
data/README.md
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
# RailsbpInBrowser
|
2
2
|
|
3
|
-
|
3
|
+
This gem based on 'rails_best_practices' which is used to analyze the code of Rails project. The output of 'rails_best_practices' is not very readable, which didn't
|
4
|
+
supply more details on which code has problem. In order to get the specific code detail and it's problems, I created this gem.
|
4
5
|
|
5
|
-
|
6
|
+
It will generate a more specific output in html format and open it in your default browser for you.
|
7
|
+
|
8
|
+

|
6
9
|
|
7
10
|
## Installation
|
8
11
|
|
9
|
-
|
12
|
+
You could add it to you Gemfile(development group)
|
10
13
|
|
11
14
|
```ruby
|
12
15
|
gem 'railsbp_in_browser'
|
@@ -16,13 +19,13 @@ And then execute:
|
|
16
19
|
|
17
20
|
$ bundle
|
18
21
|
|
19
|
-
Or install it yourself as:
|
22
|
+
Or install it yourself as(in the root directory of your Rails app):
|
20
23
|
|
21
24
|
$ gem install railsbp_in_browser
|
22
25
|
|
23
26
|
## Usage
|
24
27
|
|
25
|
-
|
28
|
+
run `$ railsbp_in_browser`
|
26
29
|
|
27
30
|
## Development
|
28
31
|
|
Binary file
|
data/lib/railsbp_in_browser.rb
CHANGED
@@ -14,11 +14,19 @@ module RailsbpInBrowser
|
|
14
14
|
OnlineDocs::DOC_MAPPINGS[key]
|
15
15
|
end
|
16
16
|
|
17
|
+
def check_and_create_dir dirname
|
18
|
+
unless File.directory?(dirname)
|
19
|
+
Dir.mkdir(dirname)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
17
23
|
def generate_html
|
18
24
|
puts "Generating the code climate ..."
|
19
25
|
`rails_best_practices . > rails_best_practices_output.html`
|
20
26
|
|
21
27
|
output_file_path = "#{ENV['HOME']}/tmp/code_climate.html"
|
28
|
+
dirname = File.dirname output_file_path
|
29
|
+
check_and_create_dir dirname
|
22
30
|
f = File.open("rails_best_practices_output.html")
|
23
31
|
of = File.open(output_file_path, 'w')
|
24
32
|
reg = /.*\[31m(.*):([0-9]+) - (.*)\e.*/
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railsbp_in_browser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiveer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,6 +102,7 @@ files:
|
|
102
102
|
- bin/console
|
103
103
|
- bin/railsbp_in_browser
|
104
104
|
- bin/setup
|
105
|
+
- images/railsbp_in_browser_examp.jpg
|
105
106
|
- lib/railsbp_in_browser.rb
|
106
107
|
- lib/railsbp_in_browser/online_docs.rb
|
107
108
|
- lib/railsbp_in_browser/version.rb
|
@@ -126,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
127
|
version: '0'
|
127
128
|
requirements: []
|
128
129
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.6
|
130
|
+
rubygems_version: 2.7.6
|
130
131
|
signing_key:
|
131
132
|
specification_version: 4
|
132
133
|
summary: Generate code climate page based on rails_best_practices
|