0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Simple library to keep reserved words
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
~> 10.0
~> 3.2
~> 0.49.0

Runtime

 Project Readme

ReservedWords Build Status

Reserve words for your system

Installation

Add this line to your application's Gemfile:

gem 'reserved_words'

And then execute:

$ bundle

Or install it yourself as:

$ gem install reserved_words

Usage

List default words

[1] pry(main)> ReservedWords.list
=> ["admin", "api", "image", "rss", "www"]

Add your own word

[1] pry(main)> ReservedWords.add('blog')
=> ["admin", "api", "blog", "image", "rss", "www"]

[1] pry(main)> ReservedWords.add(['blog', 'public'])
=> ["admin", "api", "blog", "image", "public", "rss", "www"]

Remove word

[1] pry(main)> ReservedWords.remove('rss')
=> ["admin", "api", "image", "www"]

Restore default words

[1] pry(main)> ReservedWords.clear!
=> ["admin", "api", "image", "rss", "www"]

If you are using Rails, config/initializers/reserved_words.rb is a good place to create your own reserved words

Contributing

  1. Fork it ( https://github.com/bitjourney/reserved_words/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request