latest_stock_price 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +1 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -0
- data/README.md +23 -0
- data/latest_stock_price.gemspec +36 -0
- data/lib/latest_stock_price/http_client.rb +38 -0
- data/lib/latest_stock_price/latest_stock_price.rb +7 -0
- data/lib/latest_stock_price/price.rb +13 -0
- data/lib/latest_stock_price/price_all.rb +10 -0
- data/lib/latest_stock_price/prices.rb +13 -0
- data/lib/latest_stock_price/version.rb +3 -0
- data/sample.env +3 -0
- data/spec/http_client_spec.rb +64 -0
- data/spec/price_all_spec.rb +44 -0
- data/spec/price_spec.rb +42 -0
- data/spec/prices_spec.rb +42 -0
- data/spec/spec_helper.rb +98 -0
- metadata +143 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 11ef6cb80025100502c4e7cf4468d2abeb1f02b316379c3cfab301081d9e2827
|
4
|
+
data.tar.gz: 880467c51f47fe8c3e7513b9cb2fc176cf6b970098d97f430f78ffafd8a28ae5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0ddd2e01ca5bc5cf271128cf9e0f205a4a3d263a229b5e5d82c6e977055dae96c2f189fcd4c7d83314f590843dab0a07976cf7e148f6677a6f5da15a401a28ef
|
7
|
+
data.tar.gz: 216e1866cd66a4706f3b0bdb58a0294852cba085d404df91ab41e07ea943c2fb2e25ad37ffe55bde52b92e2882c2b7728d141665e7e38aaa707cd3a74c12bc54
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
## Read Me
|
2
|
+
|
3
|
+
|
4
|
+
## Setup
|
5
|
+
|
6
|
+
```
|
7
|
+
bundle install
|
8
|
+
```
|
9
|
+
|
10
|
+
#### Create Your Environment Variables File
|
11
|
+
Copy the sample.env file to create your local .env file:
|
12
|
+
|
13
|
+
```
|
14
|
+
cp sample.env .env
|
15
|
+
```
|
16
|
+
|
17
|
+
#### Set Your API Keys
|
18
|
+
Open the .env file in your preferred text editor and add your API keys:
|
19
|
+
# .env
|
20
|
+
RAPIDAPI_KEY='your_actual_api_key'
|
21
|
+
RAPIDAPI_HOST='latest-stock-price.p.rapidapi.com'
|
22
|
+
|
23
|
+
**Note:** To obtain a Rapid APi key, login to your Rapid Api account and find it in the account settings.
|
@@ -0,0 +1,36 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "latest_stock_price"
|
3
|
+
s.version = "1.0.0"
|
4
|
+
s.summary = "Latest stock price"
|
5
|
+
s.description = "A simple hello world gem"
|
6
|
+
s.authors = ["Ciever Hassan"]
|
7
|
+
s.email = "ciever.a.h@hotmail.com"
|
8
|
+
s.homepage = "https://github.com/ciever/latest_stock_price"
|
9
|
+
s.license = "MIT"
|
10
|
+
|
11
|
+
s.files = ["lib/latest_stock_price/http_client.rb",
|
12
|
+
"lib/latest_stock_price/latest_stock_price.rb",
|
13
|
+
"lib/latest_stock_price/price_all.rb",
|
14
|
+
"lib/latest_stock_price/price.rb",
|
15
|
+
"lib/latest_stock_price/prices.rb",
|
16
|
+
"lib/latest_stock_price/version.rb",
|
17
|
+
"spec/http_client_spec.rb",
|
18
|
+
"spec/price_all_spec.rb",
|
19
|
+
"spec/price_spec.rb",
|
20
|
+
"spec/prices_spec.rb",
|
21
|
+
"spec/spec_helper.rb",
|
22
|
+
"sample.env",
|
23
|
+
"README.md",
|
24
|
+
"CHANGELOG.md",
|
25
|
+
"Gemfile",
|
26
|
+
".rspec",
|
27
|
+
"latest_stock_price.gemspec"]
|
28
|
+
|
29
|
+
s.add_development_dependency 'dotenv', '~> 3.0.0'
|
30
|
+
s.add_development_dependency 'rspec', '~> 3.4.0'
|
31
|
+
s.add_development_dependency 'webmock', '~> 3.19.1'
|
32
|
+
|
33
|
+
s.add_dependency 'net-http', '~> 0.4.1'
|
34
|
+
s.add_dependency 'uri', '~> 0.10.0'
|
35
|
+
s.add_dependency 'debug', '~> 1.8'
|
36
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'uri'
|
2
|
+
require 'net/http'
|
3
|
+
require 'json'
|
4
|
+
|
5
|
+
module LatestStockPrice
|
6
|
+
class HttpClient
|
7
|
+
def self.make_request(uri)
|
8
|
+
response = perform_request(uri)
|
9
|
+
parse_response(response.body)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def self.perform_request(uri)
|
15
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
16
|
+
http.use_ssl = true
|
17
|
+
|
18
|
+
request = Net::HTTP::Get.new(uri)
|
19
|
+
request["x-rapidapi-key"] = ENV['X_RAPIDAPI_KEY']
|
20
|
+
request["x-rapidapi-host"] = ENV['X_RAPIDAPI_HOST']
|
21
|
+
response = http.request(request)
|
22
|
+
|
23
|
+
unless response.is_a?(Net::HTTPSuccess)
|
24
|
+
raise "Error fetching data: #{response.code} #{response.message}"
|
25
|
+
end
|
26
|
+
|
27
|
+
response
|
28
|
+
rescue SocketError, Errno::ECONNREFUSED => e
|
29
|
+
raise "Network error: #{e.message}"
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.parse_response(response_body)
|
33
|
+
JSON.parse(response_body)
|
34
|
+
rescue JSON::ParserError => e
|
35
|
+
raise "Error parsing response: #{e.message}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module LatestStockPrice
|
2
|
+
class Price
|
3
|
+
API_BASE_URL = "https://latest-stock-price.p.rapidapi.com/equities-search"
|
4
|
+
|
5
|
+
def self.fetch(search_term) # Param example - "AAATECH.NS"
|
6
|
+
raise ArgumentError, "Search term cannot be nil or empty" if search_term.nil? || search_term.strip.empty?
|
7
|
+
|
8
|
+
encoded_term = URI.encode_www_form_component(search_term)
|
9
|
+
uri = URI("#{API_BASE_URL}?Search=#{encoded_term}")
|
10
|
+
LatestStockPrice::HttpClient.make_request(uri)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module LatestStockPrice
|
2
|
+
class Prices
|
3
|
+
API_BASE_URL = "https://latest-stock-price.p.rapidapi.com/equities-enhanced"
|
4
|
+
|
5
|
+
def self.fetch(symbols) # Param example - ['AAATECH.NS', 'AADHHOUS.NS']
|
6
|
+
raise ArgumentError, "Search term cannot be nil or empty" if symbols.nil? || symbols.empty? # could improve by checking each array item
|
7
|
+
|
8
|
+
symbols_param = URI.encode_www_form_component(symbols.join(','))
|
9
|
+
uri = URI("#{API_BASE_URL}?Symbols=#{symbols_param}")
|
10
|
+
LatestStockPrice::HttpClient.make_request(uri)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/sample.env
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
require 'debug'
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'webmock/rspec'
|
4
|
+
require './lib/latest_stock_price/http_client'
|
5
|
+
|
6
|
+
RSpec.describe LatestStockPrice::HttpClient do
|
7
|
+
let(:uri) { URI('https://latest-stock-price.p.rapidapi.com/test') }
|
8
|
+
let(:valid_response) { { "key" => "value" }.to_json }
|
9
|
+
|
10
|
+
before do
|
11
|
+
ENV['X_RAPIDAPI_KEY'] = 'dummy_key'
|
12
|
+
ENV['X_RAPIDAPI_HOST'] = 'dummy_host'
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '.make_request' do
|
16
|
+
context 'when the request is successful' do
|
17
|
+
before do
|
18
|
+
stub_request(:get, uri)
|
19
|
+
.with(
|
20
|
+
headers: {
|
21
|
+
'x-rapidapi-key' => ENV['X_RAPIDAPI_KEY'],
|
22
|
+
'x-rapidapi-host' => ENV['X_RAPIDAPI_HOST']
|
23
|
+
}
|
24
|
+
)
|
25
|
+
.to_return(status: 200, body: valid_response)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'returns parsed JSON response' do
|
29
|
+
response = described_class.make_request(uri)
|
30
|
+
expect(response).to eq({"key" => "value"})
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'when the request fails' do
|
35
|
+
before do
|
36
|
+
stub_request(:get, uri).to_return(status: 404, body: "")
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'raises an error' do
|
40
|
+
expect { described_class.make_request(uri) }.to raise_error(RuntimeError, /Error fetching data: 404/)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context 'when there is a network error' do
|
45
|
+
before do
|
46
|
+
allow(Net::HTTP).to receive(:new).and_raise(SocketError.new('Network issue'))
|
47
|
+
end
|
48
|
+
|
49
|
+
it 'raises a network error' do
|
50
|
+
expect { described_class.make_request(uri) }.to raise_error(RuntimeError, /Network error: Network issue/)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
context 'when the response cannot be parsed' do
|
55
|
+
before do
|
56
|
+
stub_request(:get, uri).to_return(status: 200, body: 'invalid json')
|
57
|
+
end
|
58
|
+
|
59
|
+
it 'raises a parsing error' do
|
60
|
+
expect { described_class.make_request(uri) }.to raise_error(RuntimeError, /Error parsing response: .*/)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'debug'
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'webmock/rspec'
|
4
|
+
require './lib/latest_stock_price/price_all'
|
5
|
+
|
6
|
+
RSpec.describe LatestStockPrice::PriceAll do
|
7
|
+
let(:uri) { URI("https://latest-stock-price.p.rapidapi.com/any") }
|
8
|
+
let(:valid_response) { { "key" => "value" }.to_json }
|
9
|
+
|
10
|
+
before do
|
11
|
+
ENV['X_RAPIDAPI_KEY'] = 'dummy_key'
|
12
|
+
ENV['X_RAPIDAPI_HOST'] = 'dummy_host'
|
13
|
+
end
|
14
|
+
|
15
|
+
describe '.fetch' do
|
16
|
+
context 'when the request is successful' do
|
17
|
+
before do
|
18
|
+
stub_request(:get, uri)
|
19
|
+
.with(
|
20
|
+
headers: {
|
21
|
+
'x-rapidapi-key' => ENV['X_RAPIDAPI_KEY'],
|
22
|
+
'x-rapidapi-host' => ENV['X_RAPIDAPI_HOST']
|
23
|
+
}
|
24
|
+
)
|
25
|
+
.to_return(status: 200, body: valid_response)
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'returns parsed JSON response' do
|
29
|
+
response = described_class.fetch
|
30
|
+
expect(response).to eq({"key" => "value"})
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
context 'when the request fails' do
|
35
|
+
before do
|
36
|
+
stub_request(:get, uri).to_return(status: 404, body: "")
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'raises an error' do
|
40
|
+
expect { described_class.fetch }.to raise_error(RuntimeError, /Error fetching data: 404/)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
data/spec/price_spec.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'debug'
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'webmock/rspec'
|
4
|
+
require './lib/latest_stock_price/price'
|
5
|
+
|
6
|
+
RSpec.describe LatestStockPrice::Price do
|
7
|
+
let(:search_term) { "AAATECH.NS" }
|
8
|
+
let(:uri) { URI("https://latest-stock-price.p.rapidapi.com/equities-search?Search=#{URI.encode_www_form_component(search_term)}") }
|
9
|
+
let(:valid_response) { { "key" => "value" }.to_json }
|
10
|
+
|
11
|
+
before do
|
12
|
+
ENV['X_RAPIDAPI_KEY'] = 'dummy_key'
|
13
|
+
ENV['X_RAPIDAPI_HOST'] = 'dummy_host'
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '.fetch' do
|
17
|
+
context 'when search term is valid' do
|
18
|
+
before do
|
19
|
+
stub_request(:get, uri)
|
20
|
+
.with(
|
21
|
+
headers: {
|
22
|
+
'x-rapidapi-key' => ENV['X_RAPIDAPI_KEY'],
|
23
|
+
'x-rapidapi-host' => ENV['X_RAPIDAPI_HOST']
|
24
|
+
}
|
25
|
+
)
|
26
|
+
.to_return(status: 200, body: valid_response)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'returns parsed JSON response' do
|
30
|
+
response = described_class.fetch(search_term)
|
31
|
+
expect(response).to eq({"key" => "value"})
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'when search term is nil or empty' do
|
36
|
+
it 'raises an ArgumentError' do
|
37
|
+
expect { described_class.fetch(nil) }.to raise_error(ArgumentError, /Search term cannot be nil or empty/)
|
38
|
+
expect { described_class.fetch('') }.to raise_error(ArgumentError, /Search term cannot be nil or empty/)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/spec/prices_spec.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'debug'
|
2
|
+
require 'spec_helper'
|
3
|
+
require 'webmock/rspec'
|
4
|
+
require './lib/latest_stock_price/prices'
|
5
|
+
|
6
|
+
RSpec.describe LatestStockPrice::Prices do
|
7
|
+
let(:symbols) { ['AAATECH.NS', 'AADHHOUS.NS'] }
|
8
|
+
let(:uri) { URI("https://latest-stock-price.p.rapidapi.com/equities-enhanced?Symbols=#{URI.encode_www_form_component(symbols.join(','))}") }
|
9
|
+
let(:valid_response) { { "key" => "value" }.to_json }
|
10
|
+
|
11
|
+
before do
|
12
|
+
ENV['X_RAPIDAPI_KEY'] = 'dummy_key'
|
13
|
+
ENV['X_RAPIDAPI_HOST'] = 'dummy_host'
|
14
|
+
end
|
15
|
+
|
16
|
+
describe '.fetch' do
|
17
|
+
context 'when symbols are valid' do
|
18
|
+
before do
|
19
|
+
stub_request(:get, uri)
|
20
|
+
.with(
|
21
|
+
headers: {
|
22
|
+
'x-rapidapi-key' => ENV['X_RAPIDAPI_KEY'],
|
23
|
+
'x-rapidapi-host' => ENV['X_RAPIDAPI_HOST']
|
24
|
+
}
|
25
|
+
)
|
26
|
+
.to_return(status: 200, body: valid_response)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'returns parsed JSON response' do
|
30
|
+
response = described_class.fetch(symbols)
|
31
|
+
expect(response).to eq({"key" => "value"})
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'when symbols are nil or empty' do
|
36
|
+
it 'raises an ArgumentError' do
|
37
|
+
expect { described_class.fetch(nil) }.to raise_error(ArgumentError, /Search term cannot be nil or empty/)
|
38
|
+
expect { described_class.fetch([]) }.to raise_error(ArgumentError, /Search term cannot be nil or empty/)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# See https://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
16
|
+
RSpec.configure do |config|
|
17
|
+
# rspec-expectations config goes here. You can use an alternate
|
18
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
19
|
+
# assertions if you prefer.
|
20
|
+
config.expect_with :rspec do |expectations|
|
21
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
22
|
+
# and `failure_message` of custom matchers include text for helper methods
|
23
|
+
# defined using `chain`, e.g.:
|
24
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
25
|
+
# # => "be bigger than 2 and smaller than 4"
|
26
|
+
# ...rather than:
|
27
|
+
# # => "be bigger than 2"
|
28
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
29
|
+
end
|
30
|
+
|
31
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
32
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
33
|
+
config.mock_with :rspec do |mocks|
|
34
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
35
|
+
# a real object. This is generally recommended, and will default to
|
36
|
+
# `true` in RSpec 4.
|
37
|
+
mocks.verify_partial_doubles = true
|
38
|
+
end
|
39
|
+
|
40
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
41
|
+
# have no way to turn it off -- the option exists only for backwards
|
42
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
43
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
44
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
45
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
46
|
+
|
47
|
+
# The settings below are suggested to provide a good initial experience
|
48
|
+
# with RSpec, but feel free to customize to your heart's content.
|
49
|
+
=begin
|
50
|
+
# This allows you to limit a spec run to individual examples or groups
|
51
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
52
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
53
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
54
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
55
|
+
config.filter_run_when_matching :focus
|
56
|
+
|
57
|
+
# Allows RSpec to persist some state between runs in order to support
|
58
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
59
|
+
# you configure your source control system to ignore this file.
|
60
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
61
|
+
|
62
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
63
|
+
# recommended. For more details, see:
|
64
|
+
# https://rspec.info/features/3-12/rspec-core/configuration/zero-monkey-patching-mode/
|
65
|
+
config.disable_monkey_patching!
|
66
|
+
|
67
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
68
|
+
# be too noisy due to issues in dependencies.
|
69
|
+
config.warnings = true
|
70
|
+
|
71
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
72
|
+
# file, and it's useful to allow more verbose output when running an
|
73
|
+
# individual spec file.
|
74
|
+
if config.files_to_run.one?
|
75
|
+
# Use the documentation formatter for detailed output,
|
76
|
+
# unless a formatter has already been configured
|
77
|
+
# (e.g. via a command-line flag).
|
78
|
+
config.default_formatter = "doc"
|
79
|
+
end
|
80
|
+
|
81
|
+
# Print the 10 slowest examples and example groups at the
|
82
|
+
# end of the spec run, to help surface which specs are running
|
83
|
+
# particularly slow.
|
84
|
+
config.profile_examples = 10
|
85
|
+
|
86
|
+
# Run specs in random order to surface order dependencies. If you find an
|
87
|
+
# order dependency and want to debug it, you can fix the order by providing
|
88
|
+
# the seed, which is printed after each run.
|
89
|
+
# --seed 1234
|
90
|
+
config.order = :random
|
91
|
+
|
92
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
93
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
94
|
+
# test failures related to randomization by passing the same `--seed` value
|
95
|
+
# as the one that triggered the failure.
|
96
|
+
Kernel.srand config.seed
|
97
|
+
=end
|
98
|
+
end
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: latest_stock_price
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ciever Hassan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dotenv
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.4.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.4.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: webmock
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.19.1
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.19.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: net-http
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.4.1
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.4.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: uri
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.10.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.10.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: debug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.8'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.8'
|
97
|
+
description: A simple hello world gem
|
98
|
+
email: ciever.a.h@hotmail.com
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- ".rspec"
|
104
|
+
- CHANGELOG.md
|
105
|
+
- Gemfile
|
106
|
+
- README.md
|
107
|
+
- latest_stock_price.gemspec
|
108
|
+
- lib/latest_stock_price/http_client.rb
|
109
|
+
- lib/latest_stock_price/latest_stock_price.rb
|
110
|
+
- lib/latest_stock_price/price.rb
|
111
|
+
- lib/latest_stock_price/price_all.rb
|
112
|
+
- lib/latest_stock_price/prices.rb
|
113
|
+
- lib/latest_stock_price/version.rb
|
114
|
+
- sample.env
|
115
|
+
- spec/http_client_spec.rb
|
116
|
+
- spec/price_all_spec.rb
|
117
|
+
- spec/price_spec.rb
|
118
|
+
- spec/prices_spec.rb
|
119
|
+
- spec/spec_helper.rb
|
120
|
+
homepage: https://github.com/ciever/latest_stock_price
|
121
|
+
licenses:
|
122
|
+
- MIT
|
123
|
+
metadata: {}
|
124
|
+
post_install_message:
|
125
|
+
rdoc_options: []
|
126
|
+
require_paths:
|
127
|
+
- lib
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
requirements: []
|
139
|
+
rubygems_version: 3.5.16
|
140
|
+
signing_key:
|
141
|
+
specification_version: 4
|
142
|
+
summary: Latest stock price
|
143
|
+
test_files: []
|