{"id":15801690,"url":"https://github.com/jnv/table_syntax","last_synced_at":"2025-04-21T07:33:04.608Z","repository":{"id":34586758,"uuid":"38533816","full_name":"jnv/table_syntax","owner":"jnv","description":"Create tables comfortably in plain Ruby","archived":false,"fork":false,"pushed_at":"2016-12-26T01:19:54.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-17T00:19:21.366Z","etag":null,"topics":["ruby","table"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/table_syntax","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/jnv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-04T12:53:53.000Z","updated_at":"2020-04-27T22:47:46.000Z","dependencies_parsed_at":"2022-08-28T10:51:36.667Z","dependency_job_id":null,"html_url":"https://github.com/jnv/table_syntax","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnv%2Ftable_syntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnv%2Ftable_syntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnv%2Ftable_syntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnv%2Ftable_syntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnv","download_url":"https://codeload.github.com/jnv/table_syntax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250014809,"owners_count":21361017,"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":["ruby","table"],"created_at":"2024-10-05T01:40:26.122Z","updated_at":"2025-04-21T07:33:04.382Z","avatar_url":"https://github.com/jnv.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TableSyntax\n\n[![Rubygems.org](https://img.shields.io/gem/v/table_syntax.svg?style=flat-square)](https://rubygems.org/gems/table_syntax)\n[![Build Status](https://img.shields.io/travis/jnv/table_syntax.svg?style=flat-square)](https://travis-ci.org/jnv/table_syntax)\n[![Code Climate](https://img.shields.io/codeclimate/github/jnv/table_syntax.svg?style=flat-square)](https://codeclimate.com/github/jnv/table_syntax)\n\nTableSyntax was extracted from [RSpec::Parameterized](https://github.com/tomykaira/rspec-parameterized) by [@tomykaira](https://github.com/tomykaira).\n\nIt lets you build tables in plain Ruby with simple syntax, like:\n\n```ruby\n'value1' | 123     | 'lorem'\n'value2' | 456     | 'ipsum'\n:another | 'value' | [:dolor]\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'table_syntax'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install table_syntax\n\n## Usage\n\n`TableSyntax` exposes method `.build`, which accepts column headers as arguments and block for table:\n\n```ruby\nrequire 'table_syntax'\n\ntable = TableSyntax.build(:col1, :col2) do\n  'value1' | 'value2'\n  :val3    | :val4\nend\n```\n\nThe resulting table can be iterated, where each row is available in a Struct:\n\n```ruby\ntable.each do |row|\n  row.col1 # =\u003e 'value1'; :val3\n  row.col2 # =\u003e 'value2'; :val4\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` 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 push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [jnv/table_syntax](https://github.com/jnv/table_syntax). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnv%2Ftable_syntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnv%2Ftable_syntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnv%2Ftable_syntax/lists"}