asimov-jq-module 0.1.3

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: 95842276f4e24328bee9fc70ec3dd93035662f520b51b1e464f53e4d24947d4b
4
+ data.tar.gz: 52d57f4110be8398779dc2afacf4a709f5c4a707e745cdaab7e443df7d55fc22
5
+ SHA512:
6
+ metadata.gz: 9561f2439501b516544d0ecdd948a84e87fea1451b1aa00efba5462565f9769fceeec29d86b3c5cfe7bdee22ea5cb9f85df66d3faf6d76db535692370f323f3c
7
+ data.tar.gz: 9e57ac8a1aefd97ac715bda9d5a4a349a436c980f5a636022f2cd91435e6189525b7fd2abaab6dbd36f8a657b4cdc4ba0e71ec2b2b3070c9c3b5376a69736939
data/AUTHORS ADDED
@@ -0,0 +1 @@
1
+ * Arto Bendiken <arto@asimov.so>
data/CHANGES.md ADDED
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## 0.1.3 - 2025-06-07
9
+ ### Changed
10
+ - Package also for distribution via PyPI
11
+
12
+ ## 0.1.2 - 2025-05-31
13
+ ### Changed
14
+ - [CD] Tweet new releases automatically
15
+
16
+ ## 0.1.1 - 2025-05-30
17
+ ### Changed
18
+ - Update the project template
19
+
20
+ ## 0.1.0 - 2025-05-29
21
+ ### Added
22
+ - Transforms JSON inputs using the [jq] programming language
23
+ - Supports values from environment variables using the `env.USER` syntax
24
+ - Loads environment variables from `.env` (aka dotenv) files
25
+
26
+ ## 0.0.1 - 2025-05-29
data/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # ASIMOV JQ Module
2
+
3
+ [![License](https://img.shields.io/badge/license-Public%20Domain-blue.svg)](https://unlicense.org)
4
+ [![Package on Crates.io](https://img.shields.io/crates/v/asimov-jq-module.svg)](https://crates.io/crates/asimov-jq-module)
5
+ [![Package on PyPI](https://img.shields.io/pypi/v/asimov-jq-module.svg)](https://pypi.org/project/asimov-jq-module)
6
+ [![Package on RubyGems](https://img.shields.io/gem/v/asimov-jq-module.svg)](https://rubygems.org/gems/asimov-jq-module)
7
+
8
+ [ASIMOV] module for JSON transformation using the [jq] filter language.
9
+
10
+ ## ✨ Features
11
+
12
+ - Transforms JSON inputs using the [jq] programming language.
13
+ - Supports values from environment variables using the `env.USER` syntax.
14
+ - Loads environment variables from `.env` (aka dotenv) files.
15
+ - Distributed as a standalone static binary with zero runtime dependencies.
16
+
17
+ ## 🛠️ Prerequisites
18
+
19
+ - [Rust] 1.85+ (2024 edition) if building from source code
20
+
21
+ ## ⬇️ Installation
22
+
23
+ ### Installation from PyPI
24
+
25
+ ```bash
26
+ pip install -U asimov-jq-module
27
+ ```
28
+
29
+ ### Installation from RubyGems
30
+
31
+ ```bash
32
+ gem install asimov-jq-module
33
+ ```
34
+
35
+ ### Installation from Source Code
36
+
37
+ ```bash
38
+ cargo install asimov-jq-module
39
+ ```
40
+
41
+ ## 👉 Examples
42
+
43
+ ### Transforming JSON Input
44
+
45
+ ```bash
46
+ asimov-jq-runner filter.jq < input.json > output.json
47
+ ```
48
+
49
+ ## 📚 Reference
50
+
51
+ ### Installed Binaries
52
+
53
+ - `asimov-jq-runner`: filters JSON from standard input to standard output
54
+
55
+ ## 👨‍💻 Development
56
+
57
+ ```bash
58
+ git clone https://github.com/asimov-modules/asimov-jq-module.git
59
+ ```
60
+
61
+ ---
62
+
63
+ [![Share on X](https://img.shields.io/badge/share%20on-x-03A9F4?logo=x)](https://x.com/intent/post?url=https://github.com/asimov-modules/asimov-jq-module&text=asimov-jq-module)
64
+ [![Share on Reddit](https://img.shields.io/badge/share%20on-reddit-red?logo=reddit)](https://reddit.com/submit?url=https://github.com/asimov-modules/asimov-jq-module&title=asimov-jq-module)
65
+ [![Share on Hacker News](https://img.shields.io/badge/share%20on-hn-orange?logo=ycombinator)](https://news.ycombinator.com/submitlink?u=https://github.com/asimov-modules/asimov-jq-module&t=asimov-jq-module)
66
+ [![Share on Facebook](https://img.shields.io/badge/share%20on-fb-1976D2?logo=facebook)](https://www.facebook.com/sharer/sharer.php?u=https://github.com/asimov-modules/asimov-jq-module)
67
+ [![Share on LinkedIn](https://img.shields.io/badge/share%20on-linkedin-3949AB?logo=linkedin)](https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/asimov-modules/asimov-jq-module)
68
+
69
+ [ASIMOV]: https://github.com/asimov-platform
70
+ [Python]: https://python.org
71
+ [Ruby]: https://ruby-lang.org
72
+ [Rust]: https://rust-lang.org
73
+ [jq]: https://en.wikipedia.org/wiki/Jq_(programming_language)
data/UNLICENSE ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org/>
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.3
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative "../lib/asimov-jq-module"
3
+ argv0 = ::ASIMOV_JQ_Module::Runner.path or abort("asimov-jq-runner not found")
4
+ if ::Gem.win_platform?
5
+ ::Kernel.exit(::Kernel.system(argv0, *ARGV) ? 0 : $?.exitstatus)
6
+ else
7
+ ::Kernel.exec(argv0, *ARGV)
8
+ end
@@ -0,0 +1,38 @@
1
+ # This is free and unencumbered software released into the public domain.
2
+
3
+ module ASIMOV_JQ_Module; end
4
+
5
+ class ASIMOV_JQ_Module::Runner
6
+ def self.path
7
+ self.which("asimov-jq-runner")
8
+ end
9
+
10
+ def self.execute(...)
11
+ self.new(...).execute
12
+ end
13
+
14
+ def initialize(*args, env: {})
15
+ @argv0 = self.class.path.freeze
16
+ @args = args.map(&:to_s).freeze
17
+ @env = env.to_h.freeze
18
+ end
19
+
20
+ def execute(*args)
21
+ ::Kernel.system(@env, @argv0, *(@args + args.map(&:to_s))) ? 0 : $?.exitstatus
22
+ end
23
+
24
+ protected
25
+
26
+ def self.which(command)
27
+ gem_bindir = ::Gem.bindir
28
+ exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
29
+ ENV['PATH'].split(::File::PATH_SEPARATOR).each do |dir|
30
+ next if dir == gem_bindir # avoid infinite recursion
31
+ exts.each do |ext|
32
+ exe = ::File.join(dir, "#{command}#{ext}")
33
+ return exe if ::File.executable?(exe) && !::File.directory?(exe)
34
+ end
35
+ end
36
+ nil # not found
37
+ end
38
+ end
@@ -0,0 +1,7 @@
1
+ # This is free and unencumbered software released into the public domain.
2
+
3
+ module ASIMOV_JQ_Module
4
+ VERSION = "0.1.3".freeze
5
+ end
6
+
7
+ require_relative 'asimov-jq-module/runner'
metadata ADDED
@@ -0,0 +1,53 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: asimov-jq-module
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - ASIMOV Protocol
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 2025-06-07 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: ASIMOV module for JSON transformation using the jq filter language.
13
+ email: support@asimov.so
14
+ executables:
15
+ - asimov-jq-runner
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - AUTHORS
20
+ - CHANGES.md
21
+ - README.md
22
+ - UNLICENSE
23
+ - VERSION
24
+ - bin/asimov-jq-runner
25
+ - lib/asimov-jq-module.rb
26
+ - lib/asimov-jq-module/runner.rb
27
+ homepage: https://github.com/asimov-modules
28
+ licenses:
29
+ - Unlicense
30
+ metadata:
31
+ homepage_uri: https://github.com/asimov-modules
32
+ source_code_uri: https://github.com/asimov-modules/asimov-jq-module
33
+ changelog_uri: https://github.com/asimov-modules/asimov-jq-module/blob/master/CHANGES.md
34
+ bug_tracker_uri: https://github.com/asimov-modules/asimov-jq-module/issues
35
+ documentation_uri: https://github.com/asimov-modules/asimov-jq-module/blob/master/README.md
36
+ rdoc_options: []
37
+ require_paths:
38
+ - lib
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '3.0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ requirements: []
50
+ rubygems_version: 3.6.9
51
+ specification_version: 4
52
+ summary: ASIMOV module for JSON transformation using the jq filter language.
53
+ test_files: []