<commit_before># Ringcaptcha API

Set up your Ringcaptcha keys (eg in config/initializers/ringcaptcha.rb): 

    Ringcaptcha.app_key = '...'
    Ringcaptcha.api_key = '...'
    Ringcaptcha.secret_key = '...'

## Installation

Add this line to your application's Gemfile:

    gem 'ringcaptcha', :git => 'https://github.com/paolodona/ringcaptcha.git'

And then execute:

    $ bundle

## Usage: Normalize Numbers:

    response = Ringcaptcha.normalize('353 083 148 0349')

    response #=> <Ringcaptcha::Response status="SUCCESS", phone="+353831480348", country="IE", area=nil, block=nil, subscriber=nil, type="MOBILE", carrier="Vodafone">
    response.success?   #=> true
    response.error?     #=> false
    response.status     #=> "SUCCESS"
    response.phone      #=> "+353831480349"
    response.country    #=> "IE"
    response.area       #=> nil
    response.block      #=> nil
    response.subscriber #=> nil
    response.type       #=> "MOBILE"
    response.carrier    #=> "Vodafone"

## Contributing

1. Fork it
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 new Pull Request<commit_msg>Documentation for .captcha, .code and .verify<commit_after># Ringcaptcha API

Set up your Ringcaptcha keys (eg in config/initializers/ringcaptcha.rb): 

    Ringcaptcha.app_key = '...'
    Ringcaptcha.api_key = '...'
    Ringcaptcha.secret_key = '...'

## Installation

Add this line to your application's Gemfile:

    gem 'ringcaptcha', :git => 'https://github.com/paolodona/ringcaptcha.git'

And then execute:

    $ bundle

## Usage: Normalize Numbers:

    response = Ringcaptcha.normalize('353 083 148 0349')

    response #=> <Ringcaptcha::Response status="SUCCESS", phone="+353831480348", country="IE", area=nil, block=nil, subscriber=nil, type="MOBILE", carrier="Vodafone">
    response.success?   #=> true
    response.error?     #=> false
    response.status     #=> "SUCCESS"
    response.phone      #=> "+353831480349"
    response.country    #=> "IE"
    response.area       #=> nil
    response.block      #=> nil
    response.subscriber #=> nil
    response.type       #=> "MOBILE"
    response.carrier    #=> "Vodafone"

## Usage: Verifying Phone Numbers:

    # Step 1 - Get a captcha token

    locale = "de"
    response = Ringcaptcha.captcha(locale)
  
    response.token # => "<KEY>"

    # Step 2 - Send the PIN code
 
    token = response.token
    phone = "+353831480349"
    service = "sms"
    Ringcaptcha.code(token, phone, service)

    # Step 3 - Verify the PIN code

    code = "1234"
    response = Ringcaptcha.verify(token, code)

    response #=> #<Ringcaptcha::Response status="SUCCESS",id="2381555c031619e61b3f81af30445b27a87ae97a", phone="+353831480349", geolocation=1, phone_type="MOBILE", carrier="Vodafone", threat_level="LOW">

## Contributing

1. Fork it
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 new Pull Request
{'fraction_non_alphanumeric': 0.13813909177516673, 'fraction_numerical': 0.046046363925055574, 'mean_word_length': 3.3388429752066116, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 33, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6085788', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1006, 'n_words': 264}