is-static-files 0.8.0 → 0.8.0.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +84 -1
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 529ecf4235cf3847754a421628cbce57bc456ce379735c28a8523fc41b0fba0d
4
- data.tar.gz: c5d31533d97b6b80c3a39197b6868ca4300476fddd21031ad5fc141378a46e3c
3
+ metadata.gz: 326bb085a76bc947287d3acab823bd3c377442c6366b92bb3a7bb4a634409b7d
4
+ data.tar.gz: 1d1b94ea788b5547c6f138ad44fd736968dc03982d4ede09a5e3793e4d333326
5
5
  SHA512:
6
- metadata.gz: d95f717243b6f6fbff0b1a987bf90b94425d1205316c2d3b0030f25ff7c39d13c0366a97a2e1aac22ced00002a3b4b5acaee6a74afa7c1368afecf474399a062
7
- data.tar.gz: 39e698e4436d162485dff7b39ec9c58b1fc3c606275444e943cf6ecb54fc1edc59f330fe3bb4afcd9a4404f98941bde211b87391073ee8edec025eea720c71f3
6
+ metadata.gz: e97b58266aa9bea8c426001cf073fb8296ca1a6d40397e1e2d8163405b58759e2e7fb51cff520c79289352368913e8b3784b2cb365e79ffd8effbf1fbf2d95c0
7
+ data.tar.gz: 7ea3d4cb71fcd3d40d9cecaf711fe4d51e948cc58934131b09f8f448d6556575da7cea2fb6fc74872a467f193e8894669c99b244acfe09fac9e0a2b1b9048824
data/README.md CHANGED
@@ -1,3 +1,86 @@
1
+ | **EN** | [ru](README-ru.md) |
2
+ |----------|----------|
3
+
1
4
  # is-static-files
2
5
 
3
- Custom StaticFile descendants for Jekyll
6
+ [![GitHub License](https://img.shields.io/github/license/jekyll-is/is-static-files)](LICENSE)
7
+ [![Gem Version](https://badge.fury.io/rb/is-static-files.svg?icon=si%3Arubygems)](https://badge.fury.io/rb/is-static-files)
8
+ [![Ruby](https://github.com/jekyll-is/is-static-files/actions/workflows/ruby.yml/badge.svg)](https://github.com/jekyll-is/is-static-files/actions/workflows/ruby.yml)
9
+ ![Coverage](coverage-badge.svg)
10
+
11
+ Custom `StaticFile` descendants for Jekyll.
12
+
13
+ ## Overview
14
+
15
+ `is-static-files` is a Ruby gem that extends Jekyll's static file handling capabilities by providing a custom `StaticFile` class. It allows you to manage static files that either come from a source file or from dynamic content held directly in memory. This flexibility enables programmatically generating or modifying static file content during the Jekyll build process.
16
+
17
+ ## Features
18
+
19
+ - Inherits from `Jekyll::StaticFile` to seamlessly integrate with Jekyll.
20
+ - Supports files backed by an existing source file on disk.
21
+ - Supports files created from raw content data without existing source files.
22
+ - Custom destination and relative path handling.
23
+ - Compatible with Jekyll >= 4.3 and Ruby ~> 3.4.
24
+ - Comes with RSpec tests and SimpleCov coverage for easy maintenance.
25
+
26
+ ## Installation
27
+
28
+ Add this line to your Jekyll site's `Gemfile`:
29
+
30
+ ```ruby
31
+ gem 'is-static-files', '~> 0.8.0'
32
+ ```
33
+
34
+ And then execute:
35
+
36
+ ```shell
37
+ bundle install
38
+ ```
39
+
40
+ Or install it yourself as:
41
+
42
+ ```shell
43
+ gem install is-static-files
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ Create instances of `IS::StaticFile` to represent static files that you want Jekyll to include in the site build.
49
+
50
+ ```ruby
51
+ # From existing source file
52
+ file = IS::StaticFile.new(site, '/target/path/', 'example.txt', source: '/full/path/to/src/example.txt')
53
+
54
+ # From in-memory content with no source file
55
+ file2 = IS::StaticFile.new(site, '/target/path/', 'generated.txt', content: 'This is dynamic content.')
56
+
57
+ # Add these files to the site static files during a generator hook
58
+ site.static_files << file
59
+ site.static_files << file2
60
+ ```
61
+
62
+ The `write` method ensures files are copied or written to the destination directory during site generation.
63
+
64
+ ## Development and Testing
65
+
66
+ Clone the repository and run:
67
+
68
+ ```shell
69
+ bundle install
70
+ rake spec
71
+ ```
72
+
73
+ This will run the RSpec test suite with coverage reporting.
74
+
75
+ ## License
76
+
77
+ This project is licensed under the GPL-3.0-or-later License.
78
+
79
+ ## Contributing
80
+
81
+ Bug reports and pull requests are welcome on GitHub at https://github.com/jekyll-is/is-static-files.
82
+
83
+ ---
84
+
85
+ Crafted for Jekyll users needing advanced static file handling with dynamic content generation.
86
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: is-static-files
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Shikhalev
@@ -57,14 +57,14 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 0.22.0
60
+ version: 1.0.3
61
61
  type: :development
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 0.22.0
67
+ version: 1.0.3
68
68
  description: Custom StaticFile descendants for Jekyll.
69
69
  email:
70
70
  - shikhalev@gmail.com