fundsrb 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04af70672cdb9570cd59c852275e62752989a011494e5fcee2ab1725f348579e
4
- data.tar.gz: 50349fad47eb2f4773607698964fc2da1379c1e4f595cbc6f94978ecc9a0ba2f
3
+ metadata.gz: 79972667b304357b54c17eb93f58c4ec50f9e36964ff5b59bc78545735337d71
4
+ data.tar.gz: 144c47bee8d5f063a70969d9b5c6e95a1e21620ab7f73ad921c0b598cedea32d
5
5
  SHA512:
6
- metadata.gz: 15cfc135997d0bb82eb2619acb64759ab79c15ba25558175a56467c4c3ace7530980415ff30d0332a21c34799951101ef33b857815883a2ef0bb9f797bcc6eba
7
- data.tar.gz: 6752844099b51b22795167b4069aa406108654408ed4e7dfc7b702930557337a470c9deff806529efc36aa712774c34bb03e0b559fb9ce1dd660b55bc4e75ffb
6
+ metadata.gz: 6c37e87c098ffadd83a733dc6f22196a61ed10f0173c27827df700ed6aa98f0ae265ead66d1e88d6942354a8f0ccad0a76f632f7447c66181519e1075fc923eb
7
+ data.tar.gz: 4da28c41404b7fb2a06e13b141aeebd6081a5335387ac7b00c33d3e8bcad2b44fbfca7c39b1e7ec4d4108a5d08a1d5933e94cb6050b671f8f818d92cdcc1f2bf
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Fundsrb
1
+ # Fundsrb [![Gem Version](https://badge.fury.io/rb/fundsrb.svg)](https://badge.fury.io/rb/fundsrb)
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fundsrb`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ A Ruby library to query the fundsexplorer.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,17 +20,30 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
26
-
27
- ## Development
28
-
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
23
+ ```ruby
24
+ require 'fundsrb'
25
+
26
+ client = Fundsrb::Client.new
27
+ client.quotes('BIDI4')
28
+
29
+ {
30
+ :liquidity=>"7.828",
31
+ :dividend=>"R$ 0,59",
32
+ :yield=>"0,53%",
33
+ :patrimony=>"R$ 94,66",
34
+ :pvp=>"1,17",
35
+ :name=>"ALIANZA TRUST RENDA IMOBILIARIA FDO INV IMOB",
36
+ :cnpj=>"28.737.771/0001-85",
37
+ :segment=>"Logistica"
38
+ }
39
+ ```
40
+ ## Thanks
30
41
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
42
+ Thanks to the [fundsexplorer](https://www.fundsexplorer.com.br) team for build this awesome app.
32
43
 
33
44
  ## Contributing
34
45
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fundsrb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/fundsrb/blob/master/CODE_OF_CONDUCT.md).
46
+ Bug reports and pull requests are welcome on GitHub at https://github.com/hamorim/fundsrb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/hamorim/fundsrb/blob/master/CODE_OF_CONDUCT.md).
36
47
 
37
48
 
38
49
  ## License
@@ -41,4 +52,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
41
52
 
42
53
  ## Code of Conduct
43
54
 
44
- Everyone interacting in the Fundsrb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/fundsrb/blob/master/CODE_OF_CONDUCT.md).
55
+ Everyone interacting in the Fundsrb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/hamorim/fundsrb/blob/master/CODE_OF_CONDUCT.md).
@@ -3,7 +3,7 @@ module Fundsrb
3
3
  API_ENDPOINT = "https://www.fundsexplorer.com.br/funds".freeze
4
4
 
5
5
  def query(ticket)
6
- parser(Nokogiri::HTML(open("#{API_ENDPOINT}/#{ticket}")))
6
+ parser(Nokogiri::HTML(open("#{API_ENDPOINT}/#{ticket}"), nil, Encoding::UTF_8.to_s))
7
7
  end
8
8
 
9
9
  private
@@ -1,3 +1,3 @@
1
1
  module Fundsrb
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fundsrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Lyra