phlexite-rss 0.1.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 13e070a5034523440e3a68c7eb142cc9bd50a188738051e6b4420ffa3ecbcc2b
4
+ data.tar.gz: 7d3f742d9651c319fa0b07151f9936305623a467c60d2d3d5fb4b6f6af8761dd
5
+ SHA512:
6
+ metadata.gz: 16e22ad9b26d2352b9a4e2c18a1812e825788632e6c52a30752a5ba46fb6c32c2f62c947d1acc8a30a85b7101918e9fe8be7f231f1967edbebf84edbe8ab1b58
7
+ data.tar.gz: c5c7af719499755bef06edf588617dc28a868d96a74c79a1505106fd296c31fab583984bea61f11c9d7484525baa4b5a776650559479f1f83c5172b186323c3f
data/.idea/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Ignored default folder with query files
7
+ /queries/
8
+ # Datasource local storage ignored files
9
+ /dataSources/
10
+ /dataSources.local.xml
data/.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/phlexite-rss.iml" filepath="$PROJECT_DIR$/.idea/phlexite-rss.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,44 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$">
8
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
+ </content>
12
+ <orderEntry type="jdk" jdkName="mise: 4.0.7" jdkType="RUBY_SDK" />
13
+ <orderEntry type="sourceFolder" forTests="false" />
14
+ <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.3, mise: 4.0.7) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v4.0.20, mise: 4.0.7) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="erb (v6.0.7, mise: 4.0.7) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="io-console (v0.9.4, mise: 4.0.7) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="irb (v1.18.0, mise: 4.0.7) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="json (v3.1.0, mise: 4.0.7) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="language_server-protocol (v3.17.0.6, mise: 4.0.7) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="lint_roller (v1.1.0, mise: 4.0.7) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="logger (v1.7.0, mise: 4.0.7) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="parallel (v2.3.0, mise: 4.0.7) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="parser (v3.3.12.0, mise: 4.0.7) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="pp (v0.6.4, mise: 4.0.7) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="prettyprint (v0.2.1, mise: 4.0.7) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="prism (v1.9.0, mise: 4.0.7) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="racc (v1.8.1, mise: 4.0.7) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, mise: 4.0.7) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="rake (v13.4.2, mise: 4.0.7) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="rbs (v4.2.0, mise: 4.0.7) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="rdoc (v8.1.0, mise: 4.0.7) [gem]" level="application" />
33
+ <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.13.1, mise: 4.0.7) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="reline (v0.7.0, mise: 4.0.7) [gem]" level="application" />
35
+ <orderEntry type="library" scope="PROVIDED" name="rexml (v3.4.4, mise: 4.0.7) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="rss (v0.3.2, mise: 4.0.7) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.92.0, mise: 4.0.7) [gem]" level="application" />
38
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.50.0, mise: 4.0.7) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.13.0, mise: 4.0.7) [gem]" level="application" />
40
+ <orderEntry type="library" scope="PROVIDED" name="tsort (v0.2.0, mise: 4.0.7) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v3.3.0, mise: 4.0.7) [gem]" level="application" />
42
+ <orderEntry type="library" scope="PROVIDED" name="unicode-emoji (v4.3.0, mise: 4.0.7) [gem]" level="application" />
43
+ </component>
44
+ </module>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Aleks Rutins
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Phlexite::Rss
2
+
3
+ TODO: Delete this and the text below, and describe your gem
4
+
5
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/phlexite/rss`. To experiment with that code, run `bin/console` for an interactive prompt.
6
+
7
+ ## Installation
8
+
9
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
+
11
+ Install the gem and add to the application's Gemfile by executing:
12
+
13
+ ```bash
14
+ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ ```
16
+
17
+ If bundler is not being used to manage dependencies, install the gem by executing:
18
+
19
+ ```bash
20
+ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/phlexite-rss.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rubocop/rake_task"
5
+
6
+ RuboCop::RakeTask.new
7
+
8
+ task default: :rubocop
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "rss"
4
+
5
+ module Phlexite
6
+ module Rss
7
+ ##
8
+ # A builder for an RSS feed.
9
+ class Feed
10
+ def initialize
11
+ @entries = []
12
+ end
13
+
14
+ def add_collection(collection, title_field: "title", updated_field: "updated")
15
+ collection.entries.each do |entry|
16
+ fm = entry.read.front_matter
17
+ @entries << {
18
+ link: entry.out_path,
19
+ title: fm[title_field],
20
+ updated: fm[updated_field]
21
+ }
22
+ end
23
+ end
24
+
25
+ def build(site)
26
+ site.page "rss.xml", proc {
27
+ ::RSS::Maker.make("atom") do |maker|
28
+ yield maker if block_given?
29
+
30
+ @entries.each do |entry|
31
+ next unless entry[:link] && entry[:title] && entry[:updated]
32
+
33
+ maker.items.new_item do |item|
34
+ item.link = entry[:link]
35
+ item.title = entry[:title]
36
+ item.updated = entry[:updated]
37
+ end
38
+ end
39
+ end
40
+ }
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Phlexite
4
+ module Rss
5
+ VERSION = "0.1.0"
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rss/version"
4
+ require_relative "rss/feed"
5
+
6
+ module Phlexite
7
+ module Rss
8
+ class Error < StandardError; end
9
+ # Your code goes here...
10
+ end
11
+ end
@@ -0,0 +1,6 @@
1
+ module Phlexite
2
+ module Rss
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,67 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: phlexite-rss
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Aleks Rutins
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rss
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: '0.3'
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - "~>"
24
+ - !ruby/object:Gem::Version
25
+ version: '0.3'
26
+ email:
27
+ - keeper@farthergate.com
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - ".idea/.gitignore"
33
+ - ".idea/modules.xml"
34
+ - ".idea/phlexite-rss.iml"
35
+ - ".idea/vcs.xml"
36
+ - LICENSE.txt
37
+ - README.md
38
+ - Rakefile
39
+ - lib/phlexite/rss.rb
40
+ - lib/phlexite/rss/feed.rb
41
+ - lib/phlexite/rss/version.rb
42
+ - sig/phlexite/rss.rbs
43
+ homepage: https://git.farthergate.com/phlexite-rss.git
44
+ licenses:
45
+ - MIT
46
+ metadata:
47
+ allowed_push_host: https://rubygems.org
48
+ homepage_uri: https://git.farthergate.com/phlexite-rss.git
49
+ source_code_uri: https://git.farthergate.com/phlexite-rss.git
50
+ rdoc_options: []
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: 3.2.0
58
+ required_rubygems_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ requirements: []
64
+ rubygems_version: 4.0.20
65
+ specification_version: 4
66
+ summary: Build RSS feeds for Phlexite sites.
67
+ test_files: []