pathutil 0.14.0 → 0.16.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: 573e188028984fdf69f8a48f1c0fe41f1ad67218
4
- data.tar.gz: 01348ec6e176f2dd1430b36466cb6963a9dfbf6e
3
+ metadata.gz: fd8beba3fabb9c3e1f81687b11107f5ec543f77a
4
+ data.tar.gz: 84471a1e564e6c63b4309207aaa6719327734841
5
5
  SHA512:
6
- metadata.gz: 674cb5b94b039bb4eea67fad59db1899578520a36621dd207c62b8eaacf45b9a2c974dbb2c72e057626860f291a4befcdc2b1a2c855a36dcd4fba1644250180a
7
- data.tar.gz: bb564499ec17e0f89f54015b8075f934bd0a70e8b5a6b86d5cc91cfbc4cc7fecd036995474279eab1c54ed1b898650599867a76ec8f0ed4e3b9348716f0f088f
6
+ metadata.gz: f631dbebf863001a75773caa5ce70ae4bcfd67bd0e763e31e3cc3018e1021c02854f2dd273d79b6923dabc68021787ef1c6b9f593c9ceb8f663a4a1fd1622901
7
+ data.tar.gz: 2b6280c69b3e9a397b6ff839dec71ef6b7a3da68a07f5c4ad831dc87cd5b85b6fc477626f7fd99be26ff53c3930029e69c9dac9a1f9ae6a5fc549c5628863f7e
data/Gemfile CHANGED
@@ -1,23 +1,20 @@
1
- # ----------------------------------------------------------------------------
2
1
  # Frozen-string-literal: true
3
- # Copyright: 2015-2016 Jordon Bedwell - MIT License
2
+ # Copyright: 2015 - 2017 Jordon Bedwell - MIT License
4
3
  # Encoding: utf-8
5
- # ----------------------------------------------------------------------------
6
4
 
7
5
  source "https://rubygems.org"
8
6
  gem "rake", :require => false
9
7
  gemspec
10
8
 
11
9
  group :test do
12
- gem "luna-rspec-formatters", :require => false
13
- gem "codeclimate-test-reporter", :require => false
14
10
  gem "safe_yaml", :require => false
11
+ gem "luna-rspec-formatters", :require => false
12
+ gem "simplecov", :require => false
15
13
  end
16
14
 
17
15
  group :development do
18
16
  gem "rspec", :require => false
19
17
  gem "rspec-helpers", :require => false
20
- gem "luna-rubocop-formatters", :require => false
21
18
  gem "rubocop", :github => "bbatsov/rubocop", :require => false
22
19
  gem "benchmark-ips", :require => false
23
20
  gem "simple-ansi", :require => false
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2016 Jordon Bedwell
1
+ Copyright (c) 2015 - 2017 Jordon Bedwell
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the "Software"),
data/Rakefile CHANGED
@@ -1,30 +1,28 @@
1
- # ----------------------------------------------------------------------------
2
1
  # Frozen-string-literal: true
3
- # Copyright: 2015-2016 Jordon Bedwell - MIT License
2
+ # Copyright: 2015 - 2017 Jordon Bedwell - MIT License
4
3
  # Encoding: utf-8
5
- # ----------------------------------------------------------------------------
6
4
 
7
5
  require "open3"
8
6
  require "rspec/core/rake_task"
9
7
  require_relative "benchmark/support/task"
10
- require "luna/rubocop/rake/task"
8
+ require "rubocop/rake_task"
11
9
  require "simple/ansi"
12
10
  require "pathutil"
13
11
  require "json"
14
12
 
15
- # ----------------------------------------------------------------------------
13
+ # --
16
14
 
17
15
  task :default => [
18
16
  ENV["BENCHMARK"] ? :benchmark : :spec
19
17
  ]
20
18
 
21
- # ----------------------------------------------------------------------------
19
+ # --
22
20
 
23
21
  BenchmarkTask.new :benchmark
24
22
  RSpec::Core::RakeTask.new :spec
25
23
  task :test => :spec
26
24
 
27
- # ----------------------------------------------------------------------------
25
+ # --
28
26
 
29
27
  namespace :diff do
30
28
  desc "List methods we have that Pathname doesn't."
@@ -36,7 +34,7 @@ namespace :diff do
36
34
  end
37
35
  end
38
36
 
39
- # ----------------------------------------------------------------------------
37
+ # --
40
38
 
41
39
  namespace :missing do
42
40
  desc "List methods we are missing."
@@ -52,7 +50,7 @@ namespace :missing do
52
50
  end
53
51
  end
54
52
 
55
- # ----------------------------------------------------------------------------
53
+ # --
56
54
 
57
55
  namespace :pathname do
58
56
  desc "List all of Pathnames methods."
@@ -69,7 +67,7 @@ namespace :pathname do
69
67
  end
70
68
  end
71
69
 
72
- # ----------------------------------------------------------------------------
70
+ # --
73
71
 
74
72
  desc "List all of Pathutils methods."
75
73
  task :methods do
@@ -1,5 +1,5 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2015-2016 Jordon Bedwell - MIT License
2
+ # Copyright: 2015 - 2017 Jordon Bedwell - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  require "pathutil/helpers"
@@ -25,7 +25,6 @@ class Pathutil
25
25
  # --
26
26
  # Make a path relative.
27
27
  # --
28
-
29
28
  def relative
30
29
  return self if relative?
31
30
  self.class.new(strip_windows_drive.gsub(
@@ -36,7 +35,6 @@ class Pathutil
36
35
  # --
37
36
  # Make a path absolute
38
37
  # --
39
-
40
38
  def absolute
41
39
  return self if absolute?
42
40
  self.class.new("/").join(
@@ -297,7 +295,6 @@ class Pathutil
297
295
  end
298
296
 
299
297
  # --
300
-
301
298
  def inspect
302
299
  "#<#{self.class}:#{@path}>"
303
300
  end
@@ -589,7 +586,6 @@ class Pathutil
589
586
  end
590
587
 
591
588
  # --
592
-
593
589
  def to_regexp(guard: true)
594
590
  Regexp.new((guard ? "\\A" : "") + Regexp.escape(
595
591
  self
@@ -599,7 +595,6 @@ class Pathutil
599
595
  # --
600
596
  # Strips the windows drive from the path.
601
597
  # --
602
-
603
598
  def strip_windows_drive(path = @path)
604
599
  self.class.new(path.gsub(
605
600
  %r!\A[A-Za-z]:(?:\\+|/+)!, ""
@@ -635,7 +630,6 @@ class Pathutil
635
630
  end
636
631
 
637
632
  # --
638
-
639
633
  def conservative_cleanpath
640
634
  _out = split_path.each_with_object([]) do |part, out|
641
635
  next if part == "." || (part == ".." && out.last == "")
@@ -823,6 +817,7 @@ class Pathutil
823
817
  rb_delegate :realpath, :to => :File, :args => :@path, :wrap => true
824
818
  rb_delegate :rename, :to => :File, :args => :@path, :wrap => true
825
819
  rb_delegate :join, :to => :File, :args => :@path, :wrap => true
820
+ rb_delegate :empty?, :to => :file, :args => :@path
826
821
  rb_delegate :size, :to => :File, :args => :@path
827
822
  rb_delegate :link, :to => :File, :args => :@path
828
823
  rb_delegate :atime, :to => :File, :args => :@path
@@ -1,3 +1,7 @@
1
+ # Frozen-string-literal: true
2
+ # Copyright: 2015 - 2017 Jordon Bedwell - MIT License
3
+ # Encoding: utf-8
4
+
1
5
  class Pathutil
2
6
  module Helpers
3
7
  extend self
@@ -61,7 +65,6 @@ class Pathutil
61
65
  end
62
66
 
63
67
  # --
64
-
65
68
  private
66
69
  def tmpname_suffix(suffix)
67
70
  suffix = suffix.join("-") if suffix.is_a?(Array)
@@ -1,7 +1,7 @@
1
1
  # Frozen-string-literal: true
2
- # Copyright: 2015-2016 Jordon Bedwell - MIT License
2
+ # Copyright: 2015 - 2017 Jordon Bedwell - MIT License
3
3
  # Encoding: utf-8
4
4
 
5
5
  class Pathutil
6
- VERSION = "0.14.0"
6
+ VERSION = "0.16.0"
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pathutil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordon Bedwell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2017-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: forwardable-extended
@@ -37,7 +37,7 @@ files:
37
37
  - lib/pathutil.rb
38
38
  - lib/pathutil/helpers.rb
39
39
  - lib/pathutil/version.rb
40
- homepage: http://github.com/envygeeks/pathutils
40
+ homepage: http://github.com/envygeeks/pathutil
41
41
  licenses:
42
42
  - MIT
43
43
  metadata: {}
@@ -57,7 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  requirements: []
59
59
  rubyforge_project:
60
- rubygems_version: 2.6.4
60
+ rubygems_version: 2.6.13
61
61
  signing_key:
62
62
  specification_version: 4
63
63
  summary: Almost like Pathname but just a little less insane.