{"id":21878263,"url":"https://github.com/pepabo/siteguard_lite-custom_signature","last_synced_at":"2025-04-15T03:03:59.465Z","repository":{"id":32769644,"uuid":"142096666","full_name":"pepabo/siteguard_lite-custom_signature","owner":"pepabo","description":"This library load and dump SiteGuard Lite custom signature file","archived":false,"fork":false,"pushed_at":"2021-12-08T01:30:37.000Z","size":30,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":92,"default_branch":"master","last_synced_at":"2024-11-18T02:41:16.025Z","etag":null,"topics":["gem","rubygem","siteguard","siteguard-lite"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pepabo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-24T02:58:37.000Z","updated_at":"2021-12-07T00:45:04.000Z","dependencies_parsed_at":"2022-08-07T18:01:26.644Z","dependency_job_id":null,"html_url":"https://github.com/pepabo/siteguard_lite-custom_signature","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fsiteguard_lite-custom_signature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fsiteguard_lite-custom_signature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fsiteguard_lite-custom_signature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepabo%2Fsiteguard_lite-custom_signature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepabo","download_url":"https://codeload.github.com/pepabo/siteguard_lite-custom_signature/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226881093,"owners_count":17696894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","rubygem","siteguard","siteguard-lite"],"created_at":"2024-11-28T08:12:07.098Z","updated_at":"2024-11-28T08:12:07.786Z","avatar_url":"https://github.com/pepabo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SiteguardLite::CustomSignature\n\nこのライブラリはSiteGuard Liteのカスタム・シグネチャファイル(`sig_custom.txt`)を扱うためのライブラリです。\n\nこのファイルはタブ区切りフォーマットですが、このライブラリではYAMLフォーマットで扱えるようにします。\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'siteguard_lite-custom_signature'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install siteguard_lite-custom_signature\n\n## Usage\n\n```ruby\nrequire 'siteguard_lite/custom_signature'\n\n# Load yaml format (This gem's format)\nrules = SiteguardLite::CustomSignature.load_yaml(File.read('sig_custom.yml'))\n\n# Generate text format (SiteGuard Lite format)\nSiteguardLite::CustomSignature.dump_text(rules)\n\n# Load text format\nrules = SiteguardLite::CustomSignature.load_text(File.read('sig_custom.txt'))\n\n# Generate yaml format\nSiteguardLite::CustomSignature.dump_yaml(rules)\n```\n\n## バリデーション\n\nカスタム・シグネチャファイルには文字数やバイト数の制限を持つ項目があります。`dump_text()`メソッドではこの制限をチェックして違反している場合は例外を投げます。\n\n## 注意\n\n`dump_yaml()`メソッドで生成されるYAMLにはフォーマット上の制限があります。\n\n### 配列のインデント\n\nこのgemでは以下のようなYAMLが生成されます。\n\n```yaml\nrules:\n- name: exclude-foo\n  comment: fooを除外する\n```\n\n以下のようにインデントされません。\n\n```yaml\nrules:\n  - name: exclude-foo\n    comment: fooを除外する\n```\n\n### アンカーとエイリアス\n\nYAMLでは`\u0026`と`*`を使ったアンカーとエイリアスを使うと重複した記述を避けることができて便利ですが、生成されるYAMLはそのようになりません。\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo 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 tags and no pushing the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/pepabo/siteguard_lite-custom_signature.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Fsiteguard_lite-custom_signature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepabo%2Fsiteguard_lite-custom_signature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepabo%2Fsiteguard_lite-custom_signature/lists"}