{"id":15590752,"url":"https://github.com/timrogers/ncco-ruby","last_synced_at":"2026-06-30T17:32:27.371Z","repository":{"id":56885223,"uuid":"159051861","full_name":"timrogers/ncco-ruby","owner":"timrogers","description":"Validate Nexmo Call Control Objects (NCCOs) before you send them to Nexmo, allowing you to detect errors early so you can have more confidence in your voice applications 📞","archived":false,"fork":false,"pushed_at":"2023-07-20T06:21:24.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-06-19T19:06:51.595Z","etag":null,"topics":["nexmo","ruby"],"latest_commit_sha":null,"homepage":"","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/timrogers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-25T16:30:35.000Z","updated_at":"2018-11-26T11:30:22.000Z","dependencies_parsed_at":"2025-01-24T14:41:42.564Z","dependency_job_id":null,"html_url":"https://github.com/timrogers/ncco-ruby","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/timrogers/ncco-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timrogers%2Fncco-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timrogers%2Fncco-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timrogers%2Fncco-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timrogers%2Fncco-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timrogers","download_url":"https://codeload.github.com/timrogers/ncco-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timrogers%2Fncco-ruby/sbom","scorecard":{"id":886717,"data":{"date":"2025-08-11","repo":{"name":"github.com/timrogers/ncco-ruby","commit":"e953ab32329cee533203aed5a2ffd160903f5595"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-jppv-gw3r-w3q8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T10:17:20.302Z","repository_id":56885223,"created_at":"2025-08-24T10:17:20.302Z","updated_at":"2025-08-24T10:17:20.302Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34977668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-30T02:00:05.919Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["nexmo","ruby"],"created_at":"2024-10-02T23:28:33.614Z","updated_at":"2026-06-30T17:32:27.348Z","avatar_url":"https://github.com/timrogers.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NCCO\n\n[Nexmo Call Control Objects](https://developer.nexmo.com/voice/voice-api/ncco-reference) (NCCOs) allow you to decide with your code what happens in a phone call which you've placed or received using [Nexmo's Voice API](https://developer.nexmo.com/voice/voice-api/overview).\n\nIf you make a mistake in your NCCO (for example, you miss out a required parameter or misspell something), the call will fail.\n\nThis gem allows you to __validate__ your NCCOs before you send them to Nexmo, giving you a tighter feedback loop and helping you to catch errors earlier, before they hit production (for example when you run your tests).\n\n## Installation\n\nAdd this line to your application's `Gemfile`:\n\n```ruby\ngem \"ncco\", \"~\u003e 0.1.0\"\n```\n\nNext, install the gem by running:\n\n```bash\nbundle\n```\n\n## Usage\n\nNexmo Call Control Objects (NCCOs) are JSON arrays of objects. In Ruby, you'll build a Ruby array of hashes, where each hash represents an \"action\" in your call, and then you'll send it to Nexmo as JSON:\n\n```ruby\nsay_hello = {\n  action: \"talk\",\n  text: \"Hello there! You're through to Acme Widgets. Leave a message after the tone. Press star or hang up when you're done.\",\n}\n\nrecord_message = {\n  action: \"record\",\n  endOnKey: \"*\",\n  beepStart: true,\n  eventUrl: \"https://acmewidgets.com/nexmo/recordings\",\n  eventMethod: \"POST\",\n  format: \"mp4\"\n}\n\nncco = [say_hello, record_message]\nrender json: ncco\n```\n\nThe eagle-eyed among you will have noticed that there's a mistake in our example above: Nexmo doesn't support the `mp4` format for recordings! This would lead to an error, and a bad experience for our users 😭\n\nBut there's a better way:\n\n```ruby\nrequire \"ncco\"\n\nrender json: NCCO.build(ncco)\n```\n\nThis will still fail - our NCCO is invalid! - but our application will let us know ahead of time:\n\n```ruby\nNCCO.build(ncco)\n# NCCO::InvalidActionError (The 2nd action is invalid: format must be one of: mp3, wav,\n# ogg, eventUrl must be a valid HTTP or HTTPS URL)\n```\n\nThis allows you to catch errors earlier and easily handle them with your usual exception tracking tools (for example Sentry).\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies.\n\nThen, run `rake spec` to run the tests and `rake lint` to check the code style with Rubocop.\n\nYou can also run `bin/console` for an interactive prompt that will allow you to experiment with the gem.\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\nNCCO \"actions\" are defined using schemas in `lib/ncco/schemas`, implemented using [dry-validation](https://github.com/dry-rb/dry-validation).\n\nTo tweak how we validate an action (for example to add a new attribute or change how an existing one is validated), just update the action's corresponding schema. Testing is easy thanks to our `allow_value`, `require_attribute` and `allow_blank_values` matchers - see the existing tests for an example.\n\nIf you want to add support for a new action, you'll need to crerate a new schema in `lib/ncco/schemas`, require it and add it to `SCHEMAS_BY_TYPE` in `lib/ncco.rb` and write some tests.\n\nBug reports and pull requests are welcome on GitHub at https://github.com/timrogers/ncco. 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## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the Ncco project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/timrogers/ncco/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimrogers%2Fncco-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimrogers%2Fncco-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimrogers%2Fncco-ruby/lists"}