runeledge 0.0.1

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: 39db9c950fd85840a07634582e5668dd71825d4dab25a40ecc2f8d54efa59a53
4
+ data.tar.gz: e8e8c29e8d905c0a5016086daac606e3cb83bfdd7339a4fbf848cb9615c9d1d2
5
+ SHA512:
6
+ metadata.gz: 0ac12c77f82f0821c8ca0e8d3378e796eaec6a33eb432959d7a69984c47daff88eb0a52d83d200845a513f0b304fb40babcdeb55296c2d9b4e6c8d3855ffdfb6
7
+ data.tar.gz: 662ee7941ef53cbf001cb2d537adbe88408020158cc27985cb9a4c4f421298befbecb47258a82653cb728d56f626376c8bc7fde4f40c29646a7e2bad5b3d6545
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2025 Marco Roth
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,70 @@
1
+ <div align="center">
2
+ <img alt="Runeledge" height="256px" src="assets/logo.png">
3
+ </div>
4
+
5
+ <h2 align="center">Runeledge</h2>
6
+
7
+ <h4 align="center">A file-backed Active Record adapter for permanent content archives.</h4>
8
+
9
+ <div align="center">Git-friendly data persistence with the power of Active Record.</div>
10
+
11
+
12
+ ## About
13
+
14
+ Runeledge lets your Rails models persist to structured files instead of a traditional database, while keeping the full power of Active Record. It's designed for **content archives** like [RubyEvents.org](https://rubyevents.org), where data lives in a version-controlled repository, segmented into human-editable files.
15
+
16
+ If you only need read access to static files, consider [FrozenRecord](https://github.com/byroot/frozen_record). Runeledge builds on that idea by adding **full CRUD**, transactions, and optional segmentation so you can shard a single model’s records across multiple files (e.g., one `videos.yml` per event).
17
+
18
+
19
+ ## Features
20
+
21
+ - **File-backed storage** for Active Record models
22
+ - **Multiple formats**: YAML (default), JSON, TOML (pluggable backends)
23
+ - **Segmentation**: shard a model into multiple files by a key or custom resolver
24
+ - **Git-friendly**: stable key ordering, atomic writes, minimal diffs
25
+ - **Transactions**: changes are staged and flushed on commit
26
+ - **Human-editable**: store data alongside code for easier review and collaboration
27
+
28
+ ## Installation
29
+
30
+ Add Runeledge to your `Gemfile`:
31
+
32
+ ```bash
33
+ bundle add runeledge
34
+ ````
35
+
36
+ ## Configuration
37
+
38
+ In `config/database.yml`:
39
+
40
+ ```yml
41
+ default: &default
42
+ adapter: runeledge
43
+ root: <%= Rails.root.join("data") %>
44
+ backend: yaml # yaml | json | toml
45
+ segmentation:
46
+ videos:
47
+ key: :event_slug
48
+ path: ":organization_slug/:event_slug/videos.%{ext}"
49
+
50
+ development:
51
+ <<: *default
52
+
53
+ test:
54
+ <<: *default
55
+
56
+ production:
57
+ <<: *default
58
+ ```
59
+
60
+ * **root** — base directory for storing model files
61
+ * **backend** — serialization format (`yaml`, `json`, `toml`, or a custom backend)
62
+ * **segmentation** — optional per-model rules for sharding data into multiple files
63
+
64
+ ## Contributing
65
+
66
+ Bug reports and pull requests are welcome on GitHub at https://github.com/marcoroth/runeledge. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/marcoroth/runeledge/blob/main/CODE_OF_CONDUCT.md).
67
+
68
+ ## License
69
+
70
+ This project is licensed under the [MIT License](LICENSE.txt).
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rake/testtask"
5
+ require "rubocop/rake_task"
6
+
7
+ RuboCop::RakeTask.new
8
+
9
+ Rake::TestTask.new(:test) do |t|
10
+ t.libs << "test"
11
+ t.libs << "lib"
12
+ t.test_files = FileList["test/**/*_test.rb"]
13
+ end
14
+
15
+ task default: %i[test rubocop]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Runeledge
4
+ VERSION = "0.0.1"
5
+ end
data/lib/runeledge.rb ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "runeledge/version"
4
+
5
+ module Runeledge
6
+ end
data/runeledge.gemspec ADDED
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/runeledge/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "runeledge"
7
+ spec.version = Runeledge::VERSION
8
+ spec.authors = ["Marco Roth"]
9
+ spec.email = ["marco.roth@intergga.ch"]
10
+
11
+ spec.summary = "A file-backed Active Record adapter for permanent content archives."
12
+ spec.description = spec.summary
13
+ spec.homepage = "https://github.com/marcoroth/runeledge"
14
+ spec.required_ruby_version = ">= 3.1.0"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = spec.homepage
18
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/releases"
19
+ spec.metadata["rubygems_mfa_required"] = "true"
20
+
21
+ spec.files = Dir[
22
+ "runeledge.gemspec",
23
+ "LICENSE.txt",
24
+ "Rakefile",
25
+ "README.md",
26
+ "lib/**/*.rb",
27
+ "sig/**/*.rbs",
28
+ "exe/*"
29
+ ]
30
+
31
+ spec.bindir = "exe"
32
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
33
+ spec.require_paths = ["lib"]
34
+ end
data/sig/runeledge.rbs ADDED
@@ -0,0 +1,3 @@
1
+ module Runeledge
2
+ VERSION: String
3
+ end
metadata ADDED
@@ -0,0 +1,50 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: runeledge
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Marco Roth
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: A file-backed Active Record adapter for permanent content archives.
13
+ email:
14
+ - marco.roth@intergga.ch
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - LICENSE.txt
20
+ - README.md
21
+ - Rakefile
22
+ - lib/runeledge.rb
23
+ - lib/runeledge/version.rb
24
+ - runeledge.gemspec
25
+ - sig/runeledge.rbs
26
+ homepage: https://github.com/marcoroth/runeledge
27
+ licenses: []
28
+ metadata:
29
+ homepage_uri: https://github.com/marcoroth/runeledge
30
+ source_code_uri: https://github.com/marcoroth/runeledge
31
+ changelog_uri: https://github.com/marcoroth/runeledge/releases
32
+ rubygems_mfa_required: 'true'
33
+ rdoc_options: []
34
+ require_paths:
35
+ - lib
36
+ required_ruby_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 3.1.0
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ requirements: []
47
+ rubygems_version: 3.6.7
48
+ specification_version: 4
49
+ summary: A file-backed Active Record adapter for permanent content archives.
50
+ test_files: []