truemail-rspec
gem helps you to create Truemail::Configuration
, Truemail::Auditor
and Truemail::Validator
instances for your RSpec environment.
Actual and maintainable documentation 📚 for developers is living here.
- Features
- Requirements
- Installation
- Usage
- Truemail family
- Contributing
- License
- Code of Conduct
- Credits
- Versioning
- Changelog
Ruby MRI 2.5.0+
- Ability to create
Truemail::Configuration
instance with random or with predefined params - Ability to create
Truemail::Auditor
instance with random or with predefined params - Ability to create
Truemail::Validator
instance with random or with predefined params
Add this line to your application's Gemfile
:
group :development, :test do
gem 'truemail-rspec', require: false
end
And add into your spec_helper.rb
or rails_helper.rb
:
require 'truemail/rspec'
RSpec.configure do |config|
config.include Truemail::RSpec
end
And then execute:
bundle
Or install it yourself as:
gem install truemail-rspec
Allows to create configuration instance with random or with predefined params.
create_configuration
# => returns Truemail::Configuration instance with
# random verifier_email and default Truemail::Configuration params
All Truemail::Configuration
available params
create_configuration(verifier_email: '[email protected]', verifier_domain: 'other-domain.com')
# => returns Truemail::Configuration instance with custom settings
Allows to create auditor instance with default random or with predefined params.
create_auditor(
success: true, # optional, type:Bool, by default true
current_host_ip: current_host_ip, # optional, type:String, by default random IPv4 address
warnings: warnings, # optional, type:Hash, by default creates auditor result warnings
configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
)
# => returns Truemail::Auditor instance follow passed params
Allows to create validator instance with default random or with predefined params.
create_servers_list # => returns array with random ip addresses
create_servers_list(42) # => returns array with 42 random ip addresses
create_validator(
validation_type, # optional, type:Symbol, can be :emails_list, :domains_list, :regex, :mx, :mx_blacklist or :smtp, by default creates :smtp validation
email, # optional, type:String, by default random email
mail_servers, # optional, type:Array(String), by default array with random ip addresses
success: true, # optional, type:Bool, by default true
rcptto_error: 'custom context of rcptto error' # optional, type:String, by default it's equal to 'user not found'
configuration: create_configuration # optional, type:Truemail::Configuration, by default creates random configuration
)
# => returns Truemail::Validator instance follow passed params
All Truemail solutions: https://truemail-rb.org
Name | Type | Description |
---|---|---|
truemail | ruby gem | Configurable framework agnostic plain Ruby email validator, main core |
truemail-go | go package | Configurable Golang email validator, main core |
truemail server | ruby app | Lightweight rack based web API wrapper for Truemail gem |
truemail-rack-docker | docker image | Lightweight rack based web API dockerized image 🐳 of Truemail server |
truemail-ruby-client | ruby gem | Web API Ruby client for Truemail Server |
truemail-crystal-client | crystal shard | Web API Crystal client for Truemail Server |
truemail-java-client | java lib | Web API Java client for Truemail Server |
Bug reports and pull requests are welcome on GitHub at https://github.com/truemail-rb/truemail-rspec. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. Please check the open tickets. Be sure to follow Contributor Code of Conduct below and our Contributing Guidelines.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the truemail-rspec
project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
- The Contributors for code and awesome suggestions
- The Stargazers for showing their support
truemail-rspec
uses Semantic Versioning 2.0.0