pmd_translate_checkstyle_format 0.2.2 → 0.3.0

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: 2c452fb41b1b5eb2acfa2ddc07fcc7d60858caad
4
- data.tar.gz: 0afcca99eb58d76ce117ad1904e69d3707408773
3
+ metadata.gz: 4628fb2e92c1e0a1ce5f516586c74150f54a89a3
4
+ data.tar.gz: 4934263e092e88f496055b3dc95228a0511eca29
5
5
  SHA512:
6
- metadata.gz: 0e18102b1f0e23c1bebd80fdecd69baefcc7e70c4b83f021500521666ea3324802ccf26853b5776e8659c07877bd9dd5555b31e2c7dd3a57d4ba308842ad711a
7
- data.tar.gz: 3c5a278b6c155c6df1f0b01731de711d30818249043bd9e64c7a1c8e30cd34c29a007aa7953c3dc7c41e5d135aa9195d22cd85242307491a873e0d7814272166
6
+ metadata.gz: f1dba286cb27efcf76d71ef4bbbcb73168f269728f204b6f79a1d91563cd2693b747700ba41cd099cb25ff4fad7b0594c53296d401c320ba5852bd6aa4b35c5d
7
+ data.tar.gz: ea1a4c92e506adbec3ab74ac9b66865c817216fd9a9f2079958fdc880bf10e470c68b945544670d5ccab695f9b73c9f34cd74a4753b3dff683fe7c4c58ed8019
data/.gitignore CHANGED
@@ -7,3 +7,5 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+
11
+ /vendor/
data/README.md CHANGED
@@ -39,6 +39,15 @@ pmd_translate_checkstyle_format translate --file="pmd.xml"
39
39
  pmd_translate_checkstyle_format translate --file="cpd.xml" --cpd-translate # cpd translate
40
40
  ```
41
41
 
42
+ ### Use from ruby script
43
+
44
+ ```ruby
45
+ require 'pmd_translate_checkstyle_format'
46
+ pmd_xml = ::PmdTranslateCheckstyleFormat::Script.translate('<?xml ...')
47
+ # or
48
+ pmd_cpd_xml = ::PmdTranslateCheckstyleFormat::Script.translate_cpd('<?xml ...')
49
+ ```
50
+
42
51
  ## Development
43
52
 
44
53
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -53,4 +62,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
53
62
  ## License
54
63
 
55
64
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
56
-
@@ -1,5 +1,6 @@
1
1
  require "pmd_translate_checkstyle_format/version"
2
2
  require "pmd_translate_checkstyle_format/translate"
3
+ require "pmd_translate_checkstyle_format/script"
3
4
 
4
5
  module PmdTranslateCheckstyleFormat
5
6
  end
@@ -0,0 +1,12 @@
1
+ module PmdTranslateCheckstyleFormat
2
+ class Script
3
+ extend ::PmdTranslateCheckstyleFormat::Translate
4
+ def self.translate(xml_text)
5
+ trans(parse(xml_text)).to_s
6
+ end
7
+
8
+ def self.translate_cpd(xml_text)
9
+ trans_cpd(parse(xml_text)).to_s
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module PmdTranslateCheckstyleFormat
2
- VERSION = "0.2.2"
2
+ VERSION = '0.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pmd_translate_checkstyle_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - noboru-i
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-03 00:00:00.000000000 Z
11
+ date: 2017-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -116,6 +116,7 @@ files:
116
116
  - exe/pmd_translate_checkstyle_format
117
117
  - lib/pmd_translate_checkstyle_format.rb
118
118
  - lib/pmd_translate_checkstyle_format/cli.rb
119
+ - lib/pmd_translate_checkstyle_format/script.rb
119
120
  - lib/pmd_translate_checkstyle_format/translate.rb
120
121
  - lib/pmd_translate_checkstyle_format/version.rb
121
122
  - pmd_translate_checkstyle_format.gemspec
@@ -139,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
140
  version: '0'
140
141
  requirements: []
141
142
  rubyforge_project:
142
- rubygems_version: 2.4.5
143
+ rubygems_version: 2.6.11
143
144
  signing_key:
144
145
  specification_version: 4
145
146
  summary: Translate pmd format into checkstyle format.