oexrwrapper 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 642ff556943c7cbcf1a36dad9f1059009b73973934ac4f1aa7feedd3020b0a32
4
- data.tar.gz: f976859603a88303c31cd0d7ba88ba468cfb9787b64aeecd82be1621fabae76f
3
+ metadata.gz: 8ec77047eb93bf59231cc3902f544a67da3d232ef2aaf5e190a230112091ea04
4
+ data.tar.gz: b42584b458a8a55fb3e4c68c39ae18fb2ddc786b95ab71f733371fd2281705d8
5
5
  SHA512:
6
- metadata.gz: bc671989bfbd958736b1282344c7e3e59394a89e04b69de5d2815c47bf5de74e7b7b6d5468b79bc448ed4a6d40f862babcb6a31ca2b93bb0359bb039b9e58b05
7
- data.tar.gz: fb4f319603d9941ab0ec8d0b4e40fde01e22dd8f813f4ff06b5ac07d41e385f52e6caeb32a1a163aaf5795d6d8f8cea5eeefb95adce4dbc2af3a14500cc333b3
6
+ metadata.gz: 63346ab370c482faafbfd5f7e07c3a67dd6832e0f8e1fcc4c87a5340658b4d72b4482b0b3dae0dc1612ab778f3139f17fddd4821a1374ef925f3ac8d67695287
7
+ data.tar.gz: f5aa0b5b820a867d105226973fa11172b36913f525ab90b40e8ba8e0290238a8ea2b9e1caa79ad77453a928caaadeb7a7aaf7e8f7ea618503f51488c2309d25b
data/CHANGELOG.md CHANGED
@@ -1,4 +1,5 @@
1
- ## [Unreleased]
1
+ ## [0.1.1] - 2022-03-25
2
+ - Add currencies list
2
3
 
3
4
  ## [0.1.0] - 2022-03-21
4
5
 
data/Gemfile CHANGED
@@ -10,3 +10,5 @@ gem "rake", "~> 13.0"
10
10
  gem "rspec", "~> 3.0"
11
11
 
12
12
  gem "rubocop", "~> 1.21"
13
+
14
+ gem 'webmock'
data/Gemfile.lock CHANGED
@@ -1,21 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oexrwrapper (0.1.1)
4
+ oexrwrapper (0.1.2)
5
5
  faraday (~> 2.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
+ addressable (2.8.0)
11
+ public_suffix (>= 2.0.2, < 5.0)
10
12
  ast (2.4.2)
13
+ crack (0.4.5)
14
+ rexml
11
15
  diff-lcs (1.5.0)
12
16
  faraday (2.2.0)
13
17
  faraday-net_http (~> 2.0)
14
18
  ruby2_keywords (>= 0.0.4)
15
19
  faraday-net_http (2.0.1)
20
+ hashdiff (1.0.1)
16
21
  parallel (1.21.0)
17
22
  parser (3.1.1.0)
18
23
  ast (~> 2.4.1)
24
+ public_suffix (4.0.6)
19
25
  rainbow (3.1.1)
20
26
  rake (13.0.6)
21
27
  regexp_parser (2.2.1)
@@ -47,15 +53,21 @@ GEM
47
53
  ruby-progressbar (1.11.0)
48
54
  ruby2_keywords (0.0.5)
49
55
  unicode-display_width (2.1.0)
56
+ webmock (3.14.0)
57
+ addressable (>= 2.8.0)
58
+ crack (>= 0.3.2)
59
+ hashdiff (>= 0.4.0, < 2.0.0)
50
60
 
51
61
  PLATFORMS
52
62
  arm64-darwin-21
63
+ x86_64-linux
53
64
 
54
65
  DEPENDENCIES
55
66
  oexrwrapper!
56
67
  rake (~> 13.0)
57
68
  rspec (~> 3.0)
58
69
  rubocop (~> 1.21)
70
+ webmock
59
71
 
60
72
  BUNDLED WITH
61
73
  2.3.6
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # OEXRWrapper
2
-
2
+ [![Maintainability](https://api.codeclimate.com/v1/badges/a71a2a3a3e3ce266b7c0/maintainability)](https://codeclimate.com/github/sdglhm/OEXRWrapper/maintainability)
3
+ ![example workflow](https://github.com/sdglhm/OEXRWrapper/actions/workflows/build.yml/badge.svg)
3
4
  Simple gem written for learning purposes. Fetches latest exchange rate from OpenExchangeRates.org and returns value.
4
5
 
5
6
  ## ToDo
@@ -13,7 +13,7 @@ module OEXRWrapper
13
13
  private
14
14
 
15
15
  def raise_response(response)
16
- case response
16
+ case response.status
17
17
  when 404
18
18
  raise Error, "Not found error."
19
19
  when 401
@@ -1,14 +1,14 @@
1
1
  module OEXRWrapper
2
2
  class LatestResource < Resource
3
3
  def retrieve
4
- Latest.new get_request('latest').body.dig('rates')
4
+ Latest.new get_request('latest').body['rates']
5
5
  end
6
6
 
7
7
  def method_missing(symbol, *args)
8
8
  if symbol !~ /^[a-zA-Z]{3}$/
9
9
  super
10
10
  else
11
- get_request('latest').body.dig('rates')[symbol.to_s.upcase]
11
+ get_request('latest').body['rates'][symbol.to_s.upcase]
12
12
  end
13
13
  end
14
14
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OEXRWrapper
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oexrwrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lahiru Himesh Madusanka