redpen_ruby 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +10 -5
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/LICENSE.txt +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/bin/redpen +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/bin/redpen.bat +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/conf/redpen-conf-en.xml +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/conf/redpen-conf-ja.xml +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/asm-4.1.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/asm-analysis-4.1.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/asm-tree-4.1.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/asm-util-4.1.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/commons-cli-1.2.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/json-20080701.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/kuromoji-0.7.7.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/logback-classic-1.1.1.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/logback-core-1.1.1.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/parboiled-core-1.1.6.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/parboiled-java-1.1.6.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/pegdown-1.4.2.jar +0 -0
- data/lib/redpen-cli-1.1/lib/redpen-cli-1.1.jar +0 -0
- data/lib/{redpen-cli-1.0/lib/redpen-core-1.0.jar → redpen-cli-1.1/lib/redpen-core-1.1.jar} +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/lib/slf4j-api-1.7.6.jar +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/sample-doc/en/sampledoc-en.md +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/sample-doc/en/sampledoc-en.txt +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/sample-doc/ja/sampledoc-ja.md +0 -0
- data/lib/{redpen-cli-1.0 → redpen-cli-1.1}/sample-doc/ja/sampledoc-ja.txt +0 -0
- data/lib/redpen_ruby/process.rb +1 -1
- data/lib/redpen_ruby/version.rb +1 -1
- data/redpen_ruby.gemspec +1 -1
- data/spec/redpen_ruby/format_message_spec.rb +15 -1
- data/spec/spec_helper.rb +2 -0
- metadata +27 -27
- data/lib/redpen-cli-1.0/lib/redpen-cli-1.0.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cb988aab549371088978ac43ead5d4261b5b7f6
|
4
|
+
data.tar.gz: 1454ba23e8e7dd6661dee74b228a7febd829c39a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aedddf496d35eef029032ac7478b717069d7768e2ed24ab7f589ec294126ee1ad5f4085c189fc58d411ba97d829efb33c5c62f7015e2cc3e8ffc6f94e42c320
|
7
|
+
data.tar.gz: 928d93036a17fc057960756e7e7ae00f990d40777af537d793450527fa9a7f31a0875eef12213a75d2a91092a7b9b33bfcc1fcaeb2b08d611f43c946ce8a7068
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
#
|
1
|
+
# RedPenRuby
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/redpen_ruby.svg)](http://badge.fury.io/rb/redpen_ruby)
|
4
|
+
[![Build Status](https://travis-ci.org/akinomurasame/redpen_ruby.svg?branch=travis-ci)](https://travis-ci.org/akinomurasame/redpen_ruby)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/akinomurasame/redpen_ruby/badge.png?branch=coveralls)](https://coveralls.io/r/akinomurasame/redpen_ruby?branch=coveralls)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/akinomurasame/redpen_ruby/badges/gpa.svg)](https://codeclimate.com/github/akinomurasame/redpen_ruby)
|
7
|
+
|
8
|
+
RedPenRuby is a Ruby wrapper for [redpen: a text inspection tool](https://github.com/recruit-tech/redpen).
|
4
9
|
|
5
10
|
## Installation
|
6
11
|
|
@@ -29,10 +34,10 @@ Usage Ruby script:
|
|
29
34
|
```ruby
|
30
35
|
require 'redpen_ruby'
|
31
36
|
|
32
|
-
config_file = './lib/redpen-cli-1.
|
33
|
-
target_file = './lib/redpen-cli-1.
|
37
|
+
config_file = './lib/redpen-cli-1.1/conf/redpen-conf-en.xml'
|
38
|
+
target_file = './lib/redpen-cli-1.1/sample-doc/en/sampledoc-en.md'
|
34
39
|
|
35
|
-
redpen = RedpenRuby.check(
|
40
|
+
redpen = RedpenRuby.check(config_file, target_file)
|
36
41
|
|
37
42
|
if redpen.valid?
|
38
43
|
puts 'Ok, Valid!'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/redpen_ruby/process.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module RedpenRuby
|
2
2
|
class Process
|
3
3
|
def redpen_ruby(config, target)
|
4
|
-
redpen_bin = File.expand_path(File.dirname(__FILE__) + '/../redpen-cli-1.
|
4
|
+
redpen_bin = File.expand_path(File.dirname(__FILE__) + '/../redpen-cli-1.1/bin/redpen')
|
5
5
|
format_redpen_ruby_output(`#{redpen_bin} -c #{config} #{target} 2>&1`, `#{redpen_bin} -v`)
|
6
6
|
end
|
7
7
|
|
data/lib/redpen_ruby/version.rb
CHANGED
data/redpen_ruby.gemspec
CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Akino Murasame"]
|
10
10
|
spec.email = ["akino.murasame@gmail.com"]
|
11
11
|
spec.summary = %q{Ruby wrapper for redpen: a text inspection tool.}
|
12
|
-
spec.description = %q{
|
12
|
+
spec.description = %q{RedPenRuby is a Ruby wrapper for redpen: a text inspection tool.}
|
13
13
|
spec.homepage = "https://github.com/akinomurasame/redpen_ruby"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
@@ -7,7 +7,21 @@ module RedpenRuby
|
|
7
7
|
result = message.valid?
|
8
8
|
expect(result).to be false
|
9
9
|
end
|
10
|
-
it '
|
10
|
+
it 'does not include "ValidationError" should be true' do
|
11
|
+
message = FormatMessage.new("aaa", "1.0.1")
|
12
|
+
result = message.valid?
|
13
|
+
expect(result).to be true
|
14
|
+
end
|
15
|
+
it 'does not include "ValidationError" should be true' do
|
16
|
+
message = FormatMessage.new("aaa", "1.0.1")
|
17
|
+
result = message.valid?
|
18
|
+
expect(result).to be true
|
19
|
+
end
|
20
|
+
it 'message is correct' do
|
21
|
+
message = FormatMessage.new('aaa', '1.0.1')
|
22
|
+
expect(message.messages).to eq ['aaa']
|
23
|
+
end
|
24
|
+
it 'version is correct' do
|
11
25
|
message = FormatMessage.new('aaa', '1.0.1')
|
12
26
|
expect(message.version).to eq '1.0.1'
|
13
27
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: redpen_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Akino Murasame
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: '
|
55
|
+
description: 'RedPenRuby is a Ruby wrapper for redpen: a text inspection tool.'
|
56
56
|
email:
|
57
57
|
- akino.murasame@gmail.com
|
58
58
|
executables:
|
@@ -68,30 +68,30 @@ files:
|
|
68
68
|
- README.md
|
69
69
|
- Rakefile
|
70
70
|
- bin/redpen_ruby
|
71
|
-
- lib/redpen-cli-1.
|
72
|
-
- lib/redpen-cli-1.
|
73
|
-
- lib/redpen-cli-1.
|
74
|
-
- lib/redpen-cli-1.
|
75
|
-
- lib/redpen-cli-1.
|
76
|
-
- lib/redpen-cli-1.
|
77
|
-
- lib/redpen-cli-1.
|
78
|
-
- lib/redpen-cli-1.
|
79
|
-
- lib/redpen-cli-1.
|
80
|
-
- lib/redpen-cli-1.
|
81
|
-
- lib/redpen-cli-1.
|
82
|
-
- lib/redpen-cli-1.
|
83
|
-
- lib/redpen-cli-1.
|
84
|
-
- lib/redpen-cli-1.
|
85
|
-
- lib/redpen-cli-1.
|
86
|
-
- lib/redpen-cli-1.
|
87
|
-
- lib/redpen-cli-1.
|
88
|
-
- lib/redpen-cli-1.
|
89
|
-
- lib/redpen-cli-1.
|
90
|
-
- lib/redpen-cli-1.
|
91
|
-
- lib/redpen-cli-1.
|
92
|
-
- lib/redpen-cli-1.
|
93
|
-
- lib/redpen-cli-1.
|
94
|
-
- lib/redpen-cli-1.
|
71
|
+
- lib/redpen-cli-1.1/LICENSE.txt
|
72
|
+
- lib/redpen-cli-1.1/bin/redpen
|
73
|
+
- lib/redpen-cli-1.1/bin/redpen.bat
|
74
|
+
- lib/redpen-cli-1.1/conf/redpen-conf-en.xml
|
75
|
+
- lib/redpen-cli-1.1/conf/redpen-conf-ja.xml
|
76
|
+
- lib/redpen-cli-1.1/lib/asm-4.1.jar
|
77
|
+
- lib/redpen-cli-1.1/lib/asm-analysis-4.1.jar
|
78
|
+
- lib/redpen-cli-1.1/lib/asm-tree-4.1.jar
|
79
|
+
- lib/redpen-cli-1.1/lib/asm-util-4.1.jar
|
80
|
+
- lib/redpen-cli-1.1/lib/commons-cli-1.2.jar
|
81
|
+
- lib/redpen-cli-1.1/lib/json-20080701.jar
|
82
|
+
- lib/redpen-cli-1.1/lib/kuromoji-0.7.7.jar
|
83
|
+
- lib/redpen-cli-1.1/lib/logback-classic-1.1.1.jar
|
84
|
+
- lib/redpen-cli-1.1/lib/logback-core-1.1.1.jar
|
85
|
+
- lib/redpen-cli-1.1/lib/parboiled-core-1.1.6.jar
|
86
|
+
- lib/redpen-cli-1.1/lib/parboiled-java-1.1.6.jar
|
87
|
+
- lib/redpen-cli-1.1/lib/pegdown-1.4.2.jar
|
88
|
+
- lib/redpen-cli-1.1/lib/redpen-cli-1.1.jar
|
89
|
+
- lib/redpen-cli-1.1/lib/redpen-core-1.1.jar
|
90
|
+
- lib/redpen-cli-1.1/lib/slf4j-api-1.7.6.jar
|
91
|
+
- lib/redpen-cli-1.1/sample-doc/en/sampledoc-en.md
|
92
|
+
- lib/redpen-cli-1.1/sample-doc/en/sampledoc-en.txt
|
93
|
+
- lib/redpen-cli-1.1/sample-doc/ja/sampledoc-ja.md
|
94
|
+
- lib/redpen-cli-1.1/sample-doc/ja/sampledoc-ja.txt
|
95
95
|
- lib/redpen_ruby.rb
|
96
96
|
- lib/redpen_ruby/format_message.rb
|
97
97
|
- lib/redpen_ruby/process.rb
|
Binary file
|