Project

helpy

0.0
No commit activity in last 3 years
No release in over 3 years
Check out the readme!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6.2
~> 1.8.4
~> 3.12
>= 0
 Project Readme

helpy¶ ↑

Helpy, well, helps you. It extends several of ruby’s classes to add some functionality.

1) You can call .monetize on a string or number, and it returns a formatted string that looks like, well, a dollar value. Default format is U.S. formatting, but you can pass a hash of options in to change the format. The defaults look like this: {:currency_symbol => “$”, :delimiter => “,”, :decimal => “.”, :currency_before => true, :no_decimal => false}. You only need to supply the values you are changing.

2) Call .phone on any number or string. The number or string must contain exactly 7 or 10 digits (strings can contain any number of other characters, they get stripped out). Again, you can change the formatting. Here are the defaults: {:area_sep => ‘-’, :num_sep => ‘-’, :exceptions => true}. If you pass a ‘(’ as the area separator, helpy will wrap the area in open-and-closing parens.

3) True and false testing! This is great for data returned from html forms, legacy systems, or anything that has an unknown or variable ‘true/false’ format. Call .truey? on any Boolean, FixNum, Float, Bignum or String. If the value is a true, 1, or is a string consisting of only ‘true’, ‘yes’, ‘t’, ‘y’, or ‘1’ (case-insensitive), helpy returns true. Call .falsy? to return whether it looks false. falsy? also returns false for empty strings.

Contributing to helpy¶ ↑

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2015 Brad Corson. See LICENSE.txt for further details.

Deploying Changes¶ ↑

  • Commit and push changes

  • Bump the version:

    rake version:write MAJOR=0 MINOR=3 PATCH=0
    OR
    rake version:bump:<major||minor||patch>
  • Push changes again

  • ‘rake release’

  • delete gem from Gemfile.lock in projects you wish to update

  • in the projects you wish to update to new gem, ‘bundle update –source gem-name’