{"id":16370714,"url":"https://github.com/integralist/sinderella","last_synced_at":"2025-03-23T02:34:08.350Z","repository":{"id":14176194,"uuid":"16882347","full_name":"Integralist/Sinderella","owner":"Integralist","description":"Ruby gem which will allow authors to pass a code block to transform a data object for a specific period of time","archived":false,"fork":false,"pushed_at":"2015-04-04T09:15:57.000Z","size":285,"stargazers_count":21,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T17:04:00.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"joomla/Joomla-2.5-Hello-World-Component","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Integralist.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":"2014-02-16T10:03:41.000Z","updated_at":"2024-01-22T11:48:44.000Z","dependencies_parsed_at":"2022-07-10T00:16:32.837Z","dependency_job_id":null,"html_url":"https://github.com/Integralist/Sinderella","commit_stats":null,"previous_names":["integralist/cinderella"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integralist%2FSinderella","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integralist%2FSinderella/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integralist%2FSinderella/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integralist%2FSinderella/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Integralist","download_url":"https://codeload.github.com/Integralist/Sinderella/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245048012,"owners_count":20552431,"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":[],"created_at":"2024-10-11T03:05:47.311Z","updated_at":"2025-03-23T02:34:08.088Z","avatar_url":"https://github.com/Integralist.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sinderella\n\n[![Build Status](https://travis-ci.org/Integralist/Sinderella.png?branch=master)](https://travis-ci.org/Integralist/Sinderella) [![Gem Version](https://badge.fury.io/rb/sinderella.png)](http://badge.fury.io/rb/sinderella) [![Coverage Status](https://coveralls.io/repos/Integralist/Sinderella/badge.png)](https://coveralls.io/r/Integralist/Sinderella)\n\nRuby gem which will allow authors to pass a code block to transform a data object for a specific period of time.\n\nNote I created this repo and all the code under the name \"Cinderella\" but it later transpired that the name was already taken and although the project owner has officially abandoned it I'm not able to take over the gem name...\n\n\u003e nope, pick a new name. If anyone cares about it in 3 years I'll hand it over.\n\nSo I decided to rename the project and publish the gem under the title of Sinderella instead.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'sinderella'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sinderella\n\n## Usage\n\n```ruby\nrequire 'sinderella'\n\ndata = { :key =\u003e 'value' }\ntill_midnight = 60 # 1 minute\n\nid = Sinderella.transforms(data, till_midnight) do |data|\n  data.each do |key, value|\n    data.tap { |d| d[key].upcase! }\n  end\nend\n\nputs Sinderella.get(id) # =\u003e { :key =\u003e 'VALUE' }\n\n# we'll randomly reset the data before the time expires...\nif (rand() * 2).to_i == 1\n  puts \"Resetting data early\"\n  Sinderella.midnight(id)\nend\n\nsleep 10\n\n# if reset early     == { :key =\u003e 'value' }\n# if not reset early == { :key =\u003e 'VALUE' }\nputs Sinderella.get(id)\n\nsleep 60\n\n# time has expired by this point so == { :key =\u003e 'value' }\nputs Sinderella.get(id)\n```\n\n## Contributing\n\n1. Fork it ( http://github.com/Integralist/Sinderella/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegralist%2Fsinderella","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintegralist%2Fsinderella","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegralist%2Fsinderella/lists"}