Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
/spec/reports/
/tmp/

brval-*.gem
brval2-*.gem
.idea/
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem 'httparty', '~> 0.21.0'

gemspec
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
brval (0.9.7)
httparty (~> 0.16.3)
brval2 (0.9.7)
httparty (~> 0.21.0)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -33,7 +33,7 @@ GEM
path_expander (~> 1.0)
ruby_parser (~> 3.1, > 3.1.0)
sexp_processor (~> 4.8)
httparty (0.16.3)
httparty (0.21.0)
mime-types (~> 3.0)
multi_xml (>= 0.5.2)
ice_nine (0.11.2)
Expand Down Expand Up @@ -110,7 +110,7 @@ PLATFORMS
ruby

DEPENDENCIES
brval!
brval2!
bundler (~> 1.17, >= 1.17.3)
json (~> 2.1)
rake (~> 10.0)
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ This is a gem to validate many Brazilian codes. Because it's common to use many

So the idea of Brval gem is: reunite all those validations methods in one single gem, making our lives even "easier" to develop Ruby apps.

[Link para ler as instruções em português](https://github.com/LucasAndrad/brval/wiki/Instru%C3%A7%C3%B5es-em-portugu%C3%AAs) (link to read the instructions in portuguese)

NPM package for JS projects coming soon!

## Installation

Add this line to your Gemfile

```ruby
gem 'brval'
gem 'brval2'
```

Or run it direct on terminal:

$ gem install brval
$ gem install brval2

## Usage

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ require "bundler/gem_tasks"
task :default => :spec

task :console do
exec "irb -r brval -I ./lib"
exec "irb -r brval2 -I ./lib"
end
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "brval"
require "brval2"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Expand Down
12 changes: 6 additions & 6 deletions brval.gemspec → brval2.gemspec
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'brval/version'
require 'brval2/version'

Gem::Specification.new do |spec|
spec.name = 'brval'
spec.name = 'brval2'
spec.version = Brval::VERSION
spec.authors = ['Lucas Andrade']
spec.email = ['lucasandrad@yandex.com']
spec.authors = ['Wagner Rigoli da Rosa']
spec.email = ['wagnerr2@gmail.com']

spec.summary = 'Gem to validates many Brazilian codes'
spec.description = 'Gem to validates Brazilian codes, like CPF, CNPJ, CNH, PIS ...'
spec.homepage = 'https://github.com/LucasAndrad/brval'
spec.homepage = 'https://github.com/wr2net/brval'
spec.license = 'MIT'

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
Expand Down Expand Up @@ -41,6 +41,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rubycritic', '~> 3.5'
spec.add_development_dependency 'rubocop', '~> 0.62.0'
spec.add_development_dependency 'json', '~> 2.1'
spec.add_dependency 'httparty', '~> 0.16.3'
spec.add_dependency 'httparty', '~> 0.21.0'

end
8 changes: 4 additions & 4 deletions build.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Script to build gem

rm brval-*.gem
gem build brval.gemspec
gem install ./brval-*.gem
irb -r 'brval'
rm brval2-*.gem
gem build brval2.gemspec
gem install ./brval2-*.gem
irb -r 'brval2'
2 changes: 1 addition & 1 deletion lib/brval/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Brval
VERSION = "0.9.72"
VERSION = "0.9.75"
end