hoc 0.7.1 → 0.7.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d63fdd98e0cfd8dd19c7613c87db3d3f7195ee2e
4
- data.tar.gz: ac77e76f3b0ea558c0367aa4b77397390fcb5ae5
3
+ metadata.gz: 91552c539bda6026cb4b4d07a625730ff6c95d6a
4
+ data.tar.gz: f98220d1298b938cd96a4c8af33846375cf97a47
5
5
  SHA512:
6
- metadata.gz: 17976a64377f361b3019d348943b51e14ee134c0a57b2299337f57f4b2aeff9be8330c01012386b9ffca28643e95d69d45faa924c92ebff6353e3073cf191af7
7
- data.tar.gz: 78893f795b06537a1495265d6856c2f6c1b87ff2886cf61e9cd9bc4e3cf50577bacc8cd267a5be11bbab886284b9efd647d49fa15f90c640025772705bbbacc7
6
+ metadata.gz: d4bf9db824c0c8bb1f73b83c67587e09bb1dba5dc4a8ccdcf70062eea937089b100f375b0a2f244d53e9b292c3529b6ac36d3184ac6279f43e66d0e41cb70f6a
7
+ data.tar.gz: d12c915fe8f2cd2e744651ce891343f2be3e84eacd9afe5c8c6056153945e94abdb6bf6b880d0c074e1f7a1d2cbb7aca4fba896ce2c27645f5e9256f6fa85f5d
@@ -0,0 +1,5 @@
1
+ errors:
2
+ - yegor256@gmail.com
3
+ # alerts:
4
+ # github:
5
+ # - yegor256
data/.pdd ADDED
@@ -0,0 +1,7 @@
1
+ --source=.
2
+ --verbose
3
+ --exclude target/**/*
4
+ --exclude src/main/resources/images/**/*
5
+ --rule min-words:20
6
+ --rule min-estimate:15
7
+ --rule max-estimate:90
@@ -1,2 +1,7 @@
1
- MethodLength:
1
+ AllCops:
2
+ DisplayCopNames: true
3
+
4
+ Metrics/MethodLength:
5
+ Max: 30
6
+ Metrics/AbcSize:
2
7
  Max: 30
@@ -1,7 +1,6 @@
1
1
  assets:
2
- rubygems.yml: "yegor256/home#assets/rubygems.yml"
3
- s3cfg: "yegor256/home#assets/s3cfg"
4
-
2
+ rubygems.yml: zerocracy/home#assets/rubygems.yml
3
+ s3cfg: zerocracy/home#assets/s3cfg
5
4
  install: |
6
5
  sudo gem install --no-ri --no-rdoc pdd
7
6
  sudo apt-get install -y subversion diffstat
@@ -10,9 +9,13 @@ install: |
10
9
  sudo apt-get update
11
10
  sudo apt-get remove -y git
12
11
  sudo apt-get install -y git
13
-
12
+ deploy:
13
+ script: |
14
+ sudo bundle install
15
+ rake
14
16
  release:
15
17
  script: |
18
+ pdd --verbose --file=/dev/null
16
19
  sudo bundle install
17
20
  rake
18
21
  rm -rf *.gem
@@ -21,5 +24,3 @@ release:
21
24
  gem build hoc.gemspec
22
25
  chmod 0600 ../rubygems.yml
23
26
  gem push *.gem --config-file ../rubygems.yml
24
- pdd --source=$(pwd) --verbose --file=hoc.xml
25
- s3cmd --no-progress put hoc.xml --config=../s3cfg s3://pdd.teamed.io/hoc.xml
data/.simplecov CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0
3
+ - 2.3.3
4
4
  cache: bundler
5
5
  branches:
6
6
  only:
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -1,7 +1,7 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2014 Teamed.io
4
- Copyright (c) 2014 Yegor Bugayenko
3
+ Copyright (c) 2014-2017 Teamed.io
4
+ Copyright (c) 2014-2017 Yegor Bugayenko
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  of this software and associated documentation files (the 'Software'), to deal
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  [![Made By Teamed.io](http://img.teamed.io/btn.svg)](http://www.teamed.io)
2
2
  [![DevOps By Rultor.com](http://www.rultor.com/b/teamed/hoc)](http://www.rultor.com/p/teamed/hoc)
3
+ [![We recommend RubyMine](http://img.teamed.io/rubymine-recommend.svg)](https://www.jetbrains.com/ruby/)
3
4
 
4
5
  [![Build Status](https://travis-ci.org/teamed/hoc.svg)](https://travis-ci.org/teamed/hoc)
5
6
  [![Build status](https://ci.appveyor.com/api/projects/status/yww1brb4xy80jh11?svg=true)](https://ci.appveyor.com/project/yegor256/hoc)
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -33,7 +33,7 @@ def version
33
33
  Gem::Specification.load(Dir['*.gemspec'].first).version
34
34
  end
35
35
 
36
- task default: [:clean, :test, :features, :rubocop]
36
+ task default: [:clean, :test, :features, :rubocop, :copyright]
37
37
 
38
38
  task :clean do
39
39
  rm_rf 'coverage'
@@ -71,3 +71,11 @@ end
71
71
  Cucumber::Rake::Task.new(:'features:html') do |t|
72
72
  t.profile = 'html_report'
73
73
  end
74
+
75
+ task :copyright do
76
+ sh "grep -q -r '2014-#{Date.today.strftime('%Y')}' \
77
+ --include '*.rb' \
78
+ --include '*.txt' \
79
+ --include 'Rakefile' \
80
+ ."
81
+ end
data/bin/hoc CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
3
  #
4
- # Copyright (c) 2014 Teamed.io
5
- # Copyright (c) 2014 Yegor Bugayenko
4
+ # Copyright (c) 2014-2017 Teamed.io
5
+ # Copyright (c) 2014-2017 Yegor Bugayenko
6
6
  #
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
  # of this software and associated documentation files (the 'Software'), to deal
@@ -29,8 +29,8 @@ require 'slop'
29
29
  require 'hoc/version'
30
30
 
31
31
  args = []
32
- args.push(*File.read('.hoc').split(/\s+/).map(&:strip)) if File.exist?('.hoc')
33
- args.push(*ARGV)
32
+ args.concat(File.read('.hoc').split(/\s+/).map(&:strip)) if File.exist?('.hoc')
33
+ args.concat(ARGV)
34
34
 
35
35
  opts = Slop.parse(args, strict: true, help: true) do
36
36
  banner "Usage (#{HOC::VERSION}): hoc [options]"
@@ -9,7 +9,7 @@ Feature: Gem Package
9
9
  #!/usr/bin/env ruby
10
10
  require 'rubygems'
11
11
  spec = Gem::Specification::load('./spec.rb')
12
- fail 'no executables' if spec.executables.empty?
12
+ raise 'no executables' if spec.executables.empty?
13
13
  """
14
14
  When I run bash:
15
15
  """
@@ -6,12 +6,12 @@ Feature: Git repo processing
6
6
  Given It is Unix
7
7
  Given I run bash:
8
8
  """
9
- git init .
9
+ git init --quiet .
10
10
  git config user.email test@teamed.io
11
11
  git config user.name test
12
12
  echo 'hello, world!' > test.txt
13
13
  git add test.txt
14
- git commit -am test
14
+ git commit -qam test
15
15
  """
16
16
  When I run bin/hoc with "-f int"
17
17
  Then Exit code is zero
@@ -20,7 +20,7 @@ Feature: Git repo processing
20
20
  Scenario: Real git repo
21
21
  Given I run bash:
22
22
  """
23
- git clone https://github.com/teamed/hoc.git hoc-repo
23
+ git clone --quiet https://github.com/teamed/hoc.git hoc-repo
24
24
  """
25
25
  When I run bin/hoc with "-f int -d hoc-repo"
26
26
  Then Exit code is zero
@@ -6,14 +6,14 @@ Feature: Exclude dirs from Git counting
6
6
  Given It is Unix
7
7
  Given I run bash:
8
8
  """
9
- git init .
9
+ git init --quiet .
10
10
  git config user.email test@teamed.io
11
11
  git config user.name test
12
12
  mkdir x
13
13
  echo 'hello, world!' > x/invalid.txt
14
14
  echo 'hello, world!' > valid.txt
15
15
  git add .
16
- git commit -am test
16
+ git commit -qam test
17
17
  """
18
18
  When I run bin/hoc with "-e x/** -e a.txt"
19
19
  Then Exit code is zero
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -51,10 +51,10 @@ Given(/^I run bash:$/) do |script|
51
51
  cmd = script.split("\n").join(' && ')
52
52
  @stdout = `#{cmd}`
53
53
  @exitstatus = $CHILD_STATUS.exitstatus
54
- fail 'non-zero exit code' unless @exitstatus == 0
54
+ raise 'non-zero exit code' unless @exitstatus == 0
55
55
  end
56
56
 
57
- When(/^I run bin\/hoc with "([^"]*)"$/) do |arg|
57
+ When(%r{^I run bin/hoc with "([^"]*)"$}) do |arg|
58
58
  home = File.join(File.dirname(__FILE__), '../..')
59
59
  @stdout = `ruby -I#{home}/lib #{home}/bin/hoc #{arg}`
60
60
  @exitstatus = $CHILD_STATUS.exitstatus
@@ -62,12 +62,12 @@ end
62
62
 
63
63
  Then(/^Stdout contains "([^"]*)"$/) do |txt|
64
64
  unless @stdout.include?(txt)
65
- fail "STDOUT doesn't contain '#{txt}':\n\n--------\n#{@stdout}\n--------\n"
65
+ raise "STDOUT doesn't contain '#{txt}':\n\n--------\n#{@stdout}\n--------\n"
66
66
  end
67
67
  end
68
68
 
69
69
  Then(/^Exit code is zero$/) do
70
- fail "Non-zero exit code #{@exitstatus}" unless @exitstatus == 0
70
+ raise "Non-zero exit code #{@exitstatus}" unless @exitstatus == 0
71
71
  end
72
72
 
73
73
  Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -41,17 +41,17 @@ Gem::Specification.new do |s|
41
41
  s.email = 'yegor@teamed.io'
42
42
  s.homepage = 'http://github.com/teamed/hoc'
43
43
  s.files = `git ls-files`.split($RS)
44
- s.executables = s.files.grep(/^bin\//) { |f| File.basename(f) }
45
- s.test_files = s.files.grep(/^(test|spec|features)\//)
44
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
45
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
46
46
  s.rdoc_options = ['--charset=UTF-8']
47
47
  s.extra_rdoc_files = %w(README.md LICENSE.txt)
48
48
  s.add_runtime_dependency 'slop', '3.6.0'
49
- s.add_runtime_dependency 'rake', '10.4.2'
49
+ s.add_development_dependency 'rake', '12.0.0'
50
50
  s.add_development_dependency 'coveralls', '0.7'
51
51
  s.add_development_dependency 'rdoc', '3.11'
52
52
  s.add_development_dependency 'cucumber', '1.3.11'
53
53
  s.add_development_dependency 'minitest', '5.4'
54
- s.add_development_dependency 'rubocop', '0.24.1'
55
- s.add_development_dependency 'rubocop-rspec', '1.1'
54
+ s.add_development_dependency 'rubocop', '0.41.2'
55
+ s.add_development_dependency 'rubocop-rspec', '1.5.1'
56
56
  s.add_development_dependency 'rspec-rails', '2.13'
57
57
  end
data/lib/hoc.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -26,7 +26,7 @@ require 'hoc/svn'
26
26
 
27
27
  # HOC main module.
28
28
  # Author:: Yegor Bugayenko (yegor@teamed.io)
29
- # Copyright:: Copyright (c) 2014 Yegor Bugayenko
29
+ # Copyright:: Copyright (c) 2014-2017 Yegor Bugayenko
30
30
  # License:: MIT
31
31
  module HOC
32
32
  # Code base abstraction
@@ -35,7 +35,7 @@ module HOC
35
35
  # +opts+:: Options
36
36
  def initialize(opts)
37
37
  @dir = opts[:dir]
38
- fail "only \"int\" format is supported now" unless
38
+ raise 'only "int" format is supported now' unless
39
39
  opts[:format].nil? || opts[:format] == 'int'
40
40
  @exclude = opts[:exclude].nil? ? [] : opts[:exclude]
41
41
  end
@@ -48,9 +48,9 @@ module HOC
48
48
  elsif File.exist?(File.join(@dir, '.svn'))
49
49
  repo = Svn.new(@dir)
50
50
  else
51
- fail 'only Git repositories supported now'
51
+ raise 'only Git repositories supported now'
52
52
  end
53
- repo.hits.map { |h| h.total }.inject(:+)
53
+ repo.hits.map(&:total).inject(:+)
54
54
  end
55
55
  end
56
56
  end
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -34,7 +34,7 @@ module HOC
34
34
 
35
35
  def hits
36
36
  version = `git --version`.split(/ /)[2]
37
- fail "git version #{version} is too old, upgrade it to 2.0+" unless
37
+ raise "git version #{version} is too old, upgrade it to 2.0+" unless
38
38
  Gem::Version.new(version) >= Gem::Version.new('2.0')
39
39
  cmd = [
40
40
  "cd #{@dir} && git",
@@ -49,7 +49,7 @@ module HOC
49
49
  Hits.new(
50
50
  Time.now,
51
51
  `#{cmd}`.split(/\n/).delete_if(&:empty?).map do |t|
52
- t.split(/\t/).take(2).map { |s| s.to_i }.inject(:+)
52
+ t.split(/\t/).take(2).map(&:to_i).inject(:+)
53
53
  end.inject(:+) || 0
54
54
  )
55
55
  ]
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -33,16 +33,16 @@ module HOC
33
33
 
34
34
  def hits
35
35
  version = `svn --non-interactive --version --quiet`
36
- fail "svn version #{version} is too old, upgrade it to 1.7+" unless
36
+ raise "svn version #{version} is too old, upgrade it to 1.7+" unless
37
37
  Gem::Version.new(version) >= Gem::Version.new('1.7')
38
- fail 'diffstat is not installed' if
38
+ raise 'diffstat is not installed' if
39
39
  `diffstat -V`.index('version').nil?
40
40
  log = `cd #{@dir} && svn log --diff | diffstat`
41
41
  [
42
42
  Hits.new(
43
43
  Time.now,
44
44
  log.split(/\n/).last.split(/[^\d]/)
45
- .map { |s| s.to_i }.select { |x| x > 0 }
45
+ .map(&:to_i).select { |x| x > 0 }
46
46
  .drop(1).inject(:+)
47
47
  )
48
48
  ]
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -23,8 +23,8 @@
23
23
 
24
24
  # HOC main module.
25
25
  # Author:: Yegor Bugayenko (yegor@teamed.io)
26
- # Copyright:: Copyright (c) 2014 Yegor Bugayenko
26
+ # Copyright:: Copyright (c) 2014-2017 Yegor Bugayenko
27
27
  # License:: MIT
28
28
  module HOC
29
- VERSION = '0.7.1'
29
+ VERSION = '0.7.2'.freeze
30
30
  end
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -27,25 +27,25 @@ require 'tmpdir'
27
27
 
28
28
  # Git test.
29
29
  # Author:: Yegor Bugayenko (yegor@teamed.io)
30
- # Copyright:: Copyright (c) 2014 Yegor Bugayenko
30
+ # Copyright:: Copyright (c) 2014-2017 Yegor Bugayenko
31
31
  # License:: MIT
32
32
  class TestGit < Minitest::Test
33
33
  def test_parsing
34
34
  skip if Gem.win_platform?
35
35
  Dir.mktmpdir 'test' do |dir|
36
- fail unless system("
36
+ raise unless system("
37
37
  set -e
38
38
  cd '#{dir}'
39
- git init .
39
+ git init --quiet .
40
40
  git config user.email test@teamed.io
41
41
  git config user.name test
42
42
  echo 'hello, world!' > test.txt
43
43
  git add test.txt
44
- git commit -am 'add line'
44
+ git commit -qam 'add line'
45
45
  echo 'good bye, world!' > test.txt
46
- git commit -am 'modify line'
46
+ git commit -qam 'modify line'
47
47
  rm test.txt
48
- git commit -am 'delete line'
48
+ git commit -qam 'delete line'
49
49
  ")
50
50
  hits = HOC::Git.new(dir, []).hits
51
51
  assert_equal 1, hits.size
@@ -56,10 +56,10 @@ class TestGit < Minitest::Test
56
56
  def test_parsing_with_empty_git
57
57
  skip if Gem.win_platform?
58
58
  Dir.mktmpdir 'test' do |dir|
59
- fail unless system("
59
+ raise unless system("
60
60
  set -e
61
61
  cd '#{dir}'
62
- git init .
62
+ git init --quiet .
63
63
  ")
64
64
  hits = HOC::Git.new(dir, []).hits
65
65
  assert_equal 1, hits.size
@@ -70,18 +70,18 @@ class TestGit < Minitest::Test
70
70
  def test_ignores_binary_files
71
71
  skip if Gem.win_platform?
72
72
  Dir.mktmpdir 'test' do |dir|
73
- fail unless system("
73
+ raise unless system("
74
74
  set -e
75
75
  cd '#{dir}'
76
- git init .
76
+ git init --quiet .
77
77
  git config user.email test@teamed.io
78
78
  git config user.name test
79
79
  dd if=/dev/urandom of=test.dat bs=1 count=65536
80
80
  git add test.dat
81
- git commit -am 'binary file'
81
+ git commit -qam 'binary file'
82
82
  dd if=/dev/urandom of=test.dat bs=1 count=65536
83
83
  git add test.dat
84
- git commit -am 'binary file modified'
84
+ git commit -qam 'binary file modified'
85
85
  ")
86
86
  hits = HOC::Git.new(dir, []).hits
87
87
  assert_equal 1, hits.size
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -28,13 +28,13 @@ require 'slop'
28
28
 
29
29
  # HOC main module test.
30
30
  # Author:: Yegor Bugayenko (yegor@teamed.io)
31
- # Copyright:: Copyright (c) 2014 Yegor Bugayenko
31
+ # Copyright:: Copyright (c) 2014-2017 Yegor Bugayenko
32
32
  # License:: MIT
33
33
  class TestHOC < Minitest::Test
34
34
  def test_basic_git
35
35
  skip if Gem.win_platform?
36
36
  Dir.mktmpdir 'test' do |dir|
37
- fail unless system("
37
+ raise unless system("
38
38
  set -e
39
39
  cd '#{dir}'
40
40
  git init .
@@ -51,7 +51,7 @@ class TestHOC < Minitest::Test
51
51
  def test_basic_svn
52
52
  skip if Gem.win_platform?
53
53
  Dir.mktmpdir 'test' do |dir|
54
- fail unless system("
54
+ raise unless system("
55
55
  set -e
56
56
  cd '#{dir}'
57
57
  svnadmin create base
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  #
3
- # Copyright (c) 2014 Teamed.io
4
- # Copyright (c) 2014 Yegor Bugayenko
3
+ # Copyright (c) 2014-2017 Teamed.io
4
+ # Copyright (c) 2014-2017 Yegor Bugayenko
5
5
  #
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  # of this software and associated documentation files (the 'Software'), to deal
@@ -27,13 +27,13 @@ require 'tmpdir'
27
27
 
28
28
  # Svn test.
29
29
  # Author:: Yegor Bugayenko (yegor@teamed.io)
30
- # Copyright:: Copyright (c) 2014 Yegor Bugayenko
30
+ # Copyright:: Copyright (c) 2014-2017 Yegor Bugayenko
31
31
  # License:: MIT
32
32
  class TestSvn < Minitest::Test
33
33
  def test_parsing
34
34
  skip if Gem.win_platform?
35
35
  Dir.mktmpdir 'test' do |dir|
36
- fail unless system("
36
+ raise unless system("
37
37
  set -e
38
38
  cd '#{dir}'
39
39
  svnadmin create base
@@ -57,7 +57,7 @@ class TestSvn < Minitest::Test
57
57
  def test_parsing_empty_repo
58
58
  skip('fails now')
59
59
  Dir.mktmpdir 'test' do |dir|
60
- fail unless system("
60
+ raise unless system("
61
61
  set -e
62
62
  cd '#{dir}'
63
63
  svnadmin create base
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-25 00:00:00.000000000 Z
11
+ date: 2017-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slop
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 10.4.2
34
- type: :runtime
33
+ version: 12.0.0
34
+ type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 10.4.2
40
+ version: 12.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: coveralls
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: 0.24.1
103
+ version: 0.41.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: 0.24.1
110
+ version: 0.41.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop-rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: '1.1'
117
+ version: 1.5.1
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: '1.1'
124
+ version: 1.5.1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rspec-rails
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -145,8 +145,10 @@ extra_rdoc_files:
145
145
  - README.md
146
146
  - LICENSE.txt
147
147
  files:
148
+ - ".0pdd.yml"
148
149
  - ".gitattributes"
149
150
  - ".gitignore"
151
+ - ".pdd"
150
152
  - ".rubocop.yml"
151
153
  - ".rultor.yml"
152
154
  - ".simplecov"
@@ -197,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
199
  version: '0'
198
200
  requirements: []
199
201
  rubyforge_project:
200
- rubygems_version: 2.4.5.1
202
+ rubygems_version: 2.4.5.2
201
203
  signing_key:
202
204
  specification_version: 2
203
205
  summary: Hits Of Code