transparent_data-rb 0.1.2 → 0.1.3

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: fdb82eceff80959973b79ac2ac2eb2f70c3f304cc871eea6afec0ca68f052923
4
- data.tar.gz: 3bd9b51316d4793062bdb42a9aa21b00874d1fab976d45d1114b0687d66d88ec
3
+ metadata.gz: f258721c6c110c19f04edf8539c83c69848db272da6198e0c64938cb5d14caf5
4
+ data.tar.gz: 7b43d915c95b584c2d0e2b79956bf0f390dd509b800208a57f1c070ef4cd98aa
5
5
  SHA512:
6
- metadata.gz: eae69543829933e695001af6c663a8a6e6a6ebfacd770c145e2d1cad87ffb36b81cc4e07ad86aaa74bfc930e4cd00f1d39db646f64237cb704eb2720d0e41584
7
- data.tar.gz: 689417247a6e2d4cf130b713257b7672865a11334345c2b7c51e20acbd6f061253b5ed888164517a5ca156cf8c0e99e11ab4cca78aa0eb534046fad97b4eb3f6
6
+ metadata.gz: 5d3c2a4abfaceb3fad5f1f9430ecf3172459cab72fe7f5ff1711706a7d7f848341f9eebe133eb3033a92ca6361bc4205b2b5f8ac0649da2b49f9b5c04333a87f
7
+ data.tar.gz: 24fe0d76d0e496fba62722ac6ac65bb9f9898c047df4edb3143f0897ffe4740426ecb4c8c4f90f00d66b9e6d9833e1c46d2c080cf4b120d65282ddf1eaeb4d2b
data/README.md CHANGED
@@ -1,44 +1,58 @@
1
- # TransparentData
1
+ # PG Inheritance
2
+ [![Gem Version](https://badge.fury.io/rb/transparent_data-rb.svg)](https://badge.fury.io/rb/transparent_data-rb) [![Build Status](https://travis-ci.com/sigmen/transparent_data-rb.svg?branch=master)](https://travis-ci.com/sigmen/transparent_data-rb)
2
3
 
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/transparent_data`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+ # UNDER DEVELOPMENT
4
5
 
5
- TODO: Delete this and the text above, and describe your gem
6
+ ## Supports
7
+
8
+ Ruby `>= 2.4`.
6
9
 
7
10
  ## Installation
8
11
 
9
12
  Add this line to your application's Gemfile:
10
13
 
11
- ```ruby
12
- gem 'transparent_data-rb'
13
- ```
14
+ gem 'transparent_data-rb'
14
15
 
15
16
  And then execute:
16
17
 
17
18
  $ bundle install
18
19
 
19
- Or install it yourself as:
20
+ Or install with:
20
21
 
21
22
  $ gem install transparent_data-rb
22
23
 
23
- ## Usage
24
-
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.
24
+ ### Usage
30
25
 
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).
32
-
33
- ## Contributing
26
+ ```ruby
27
+ response = TransparentData.search(country_name, query)
34
28
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/transparent_data-rb. 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]/transparent_data-rb/blob/master/CODE_OF_CONDUCT.md).
29
+ response.body # => [{...}]
30
+ response.status # => 200
31
+ response.headers # => {...}
32
+ ```
36
33
 
34
+ #### Search options
35
+ * country_name - Any available country name (see Available countries)
36
+ * query - Search query
37
37
 
38
- ## License
38
+ #### Available countries
39
+ Gem supports all available Transparentdata.eu countries:
40
+ * finland
41
+ * uk
42
+ * denmark
43
+ * norway
44
+ * slovakia
45
+ * czech
39
46
 
40
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
47
+ #### Configuration
41
48
 
42
- ## Code of Conduct
49
+ Before using gem you need to configure some parameters:
43
50
 
44
- Everyone interacting in the TransparentData project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/transparent_data-rb/blob/master/CODE_OF_CONDUCT.md).
51
+ ```ruby
52
+ TransparentData.configure do |config|
53
+ config.url = 'https://transparentdata.eu/' # You can using any another url for test environment
54
+ config.user = 'user' # Username for HTTP Basic
55
+ config.password = 'password' # Password for HTTP Basic
56
+ config.key = 'key' # API Key
57
+ end
58
+ ```
@@ -26,7 +26,7 @@ module TransparentData
26
26
  end
27
27
 
28
28
  def fetch_country_id(country)
29
- COUNTRY_TO_KEY_MAP.fetch(country.to_sym) do
29
+ COUNTRY_TO_KEY_MAP.fetch(country.to_s.downcase.to_sym) do
30
30
  raise TransparentData::UnknownCountryError, "Unknown country: #{country.inspect}"
31
31
  end
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module TransparentData
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transparent_data-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kakorin