jekyll-hardlinks 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll/static_file.rb +4 -4
  3. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01e0765ee7fd1bc6c93713ca5e9af4a37c1fd2729264407aa23c1bfacb73ad46
4
- data.tar.gz: 2448c5c778bcd8ba36217baeae48ef5133acea3772877487e9ea32eaeb46d99f
3
+ metadata.gz: '09f07cd36dff9fc8b00a61d3871bf748e67fbba2397d9719ef6884881ebd9b39'
4
+ data.tar.gz: 64f2a8022c1ae408d49aafb2b702b0c0dffe0505a10a5b270be069a7e4a08202
5
5
  SHA512:
6
- metadata.gz: dcd8b521bb79112e43c416c794a27a8b97f4c4b7c8248fe21332171229fae066d9b48c7ecbbbac94b35334c9312f2e2503d28e55c0a14112092066f1924a5462
7
- data.tar.gz: 56d5b178d51475ace8a780385bffb43825b2fec57837ddd7d66ca17b35e44b8e34315d0fb50924c46e7df1d3d59856f80763503ae76827abb828ec412d1e4a64
6
+ metadata.gz: 5fb45122553433a228bfa7ce2079df2f008a09701e730aa68b20389d26ca14fe31f73625552e0b9bd09f6247138e7924bb69452c39547ba65021464fa7325d83
7
+ data.tar.gz: 4c9806dc1b41f5e050b6936a4ab45955645ebfbe4a5ae32cdb7034bc59c7cd986501a2748d8a63f53e023bece881a7679fb19629e674e21bf210148e973f8d57
@@ -11,7 +11,7 @@ module Jekyll
11
11
  # replace it with one. This is useful when migrating from a site
12
12
  # already built without this plugin.
13
13
  if File.exist? dest_path
14
- return if hardlink? dest_path
14
+ return if hardlink? dest_path, path
15
15
  FileUtils.rm dest_path
16
16
  end
17
17
 
@@ -23,9 +23,9 @@ module Jekyll
23
23
 
24
24
  private
25
25
 
26
- # Verifies the path has hardlinks
27
- def hardlink?(path)
28
- File.stat(path).nlink > 1
26
+ # Verifies the files are the same by checking their inode
27
+ def hardlink?(dest_path, path)
28
+ File.stat(path).ino == File.stat(dest_path).ino
29
29
  end
30
30
  end
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-hardlinks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-02 00:00:00.000000000 Z
11
+ date: 2020-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -47,7 +47,7 @@ metadata:
47
47
  source_code_uri: https://0xacab.org/sutty/jekyll/jekyll-hardlinks
48
48
  changelog_uri: https://0xacab.org/sutty/jekyll/jekyll-hardlinks/-/blob/master/CHANGELOG.md
49
49
  documentation_uri: https://rubydoc.info/gems/jekyll-hardlinks
50
- post_install_message:
50
+ post_install_message:
51
51
  rdoc_options:
52
52
  - "--title"
53
53
  - jekyll-hardlinks - Saves space by using hard links for static files
@@ -60,17 +60,17 @@ require_paths:
60
60
  - lib
61
61
  required_ruby_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
- - - "~>"
63
+ - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: '2'
65
+ version: '2.6'
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.0.3
73
- signing_key:
72
+ rubygems_version: 3.1.2
73
+ signing_key:
74
74
  specification_version: 4
75
75
  summary: Saves space by using hard links for static files
76
76
  test_files: []