xcop 0.5.6 → 0.5.7

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: 01042721d40f4868f1355ca93371d489f1b464c7
4
- data.tar.gz: 6503c87b8e09558e0ca2b4431feee7aca28242d1
3
+ metadata.gz: c34a8bbd7b22ae3433ed8533d3b67a319343d65e
4
+ data.tar.gz: 3fa076b3d636126741220ef84441633d353fafd4
5
5
  SHA512:
6
- metadata.gz: ce82cc3f7318a3a0fc66f33159eec3f62432cda9280df83473ff8f32abbe22936fd5806138dd580f5ca24a5009386bbada55ffc47ed99e0097eb6a570f200581
7
- data.tar.gz: eb150e198aa055abbf30b4510be56c0533750c5d8a02bb941b66f63dce59f39b6eb4b0c5c13e48737dbb07a8b6422984275879077612445e271e22ed0ec66d73
6
+ metadata.gz: e807e0225a109d0c2880ca434328d71a9f0f05e0026115934043d647fc570d2c7160d6fa96b9e711115e731084feeb784b606a521cad351c68e32068b540c294
7
+ data.tar.gz: 033d61c7be6cc7bc3935ddf213757f4cbc1fc49e4fa72d318ccf59d7c57c7840046af69ec8658bfd8f413ba5b31eb07e4b32b1bd32984642f8ba62c28d89ad5e
data/bin/xcop CHANGED
@@ -28,6 +28,10 @@ require 'nokogiri'
28
28
  require_relative '../lib/xcop'
29
29
  require_relative '../lib/xcop/version'
30
30
 
31
+ if Gem::Version.new(Nokogiri::VERSION) < Gem::Version.new('1.8')
32
+ puts "Nokogiri version #{Nokogiri::VERSION} is too old, 1.8+ is required"
33
+ end
34
+
31
35
  opts = Slop.parse(ARGV, strict: true, help: true) do |o|
32
36
  o.banner = "Usage (#{Xcop::VERSION}): xcop [options] [files...]"
33
37
  o.bool '-h', '--help', 'Show these instructions'
@@ -25,5 +25,5 @@
25
25
  # Copyright:: Copyright (c) 2017 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module Xcop
28
- VERSION = '0.5.6'.freeze
28
+ VERSION = '0.5.7'.freeze
29
29
  end
@@ -50,14 +50,14 @@ class TestXcop < Minitest::Test
50
50
  def test_license_presence
51
51
  Dir.mktmpdir 'test2' do |dir|
52
52
  f = File.join(dir, 'a.xml')
53
- license = "Copyright (c) All Good People\nDon't touch it!\n\n"
53
+ license = " Copyright (c) All Good People\n Don't touch it!\n\n"
54
54
  File.write(
55
55
  f,
56
56
  [
57
57
  '<?xml version="1.0"?>',
58
58
  '<!--',
59
- 'Copyright (c) All Good People',
60
- 'Don\'t touch it!',
59
+ ' Copyright (c) All Good People',
60
+ ' Don\'t touch it!',
61
61
  '-->',
62
62
  '<hello>Dude!</hello>',
63
63
  ''
@@ -86,7 +86,7 @@ class TestXcop < Minitest::Test
86
86
  def test_fixes_document
87
87
  Dir.mktmpdir 'test3' do |dir|
88
88
  f = File.join(dir, 'bad.xml')
89
- license = "Copyright (c) Me, Myself, and I\nLike it?\n\n"
89
+ license = " Copyright (c) Me, Myself, and I\n Like it?\n\n"
90
90
  File.write(f, '<hello>My friend!</hello>')
91
91
  Xcop::Document.new(f).fix(license)
92
92
  assert_equal(Xcop::Document.new(f).diff, '')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-27 00:00:00.000000000 Z
11
+ date: 2017-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri