Modernizin 🎉
This commit is contained in:
parent
3a56880720
commit
cef59ad534
@ -1,6 +1,6 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2016-08-30 11:24:51 -0400 using RuboCop version 0.42.0.
|
||||
# on 2017-05-14 12:32:49 -0400 using RuboCop version 0.48.1.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
|
@ -1,4 +1,4 @@
|
||||
language: ruby
|
||||
rvm: 2.3.1
|
||||
dist: trusty
|
||||
rvm: 2.4.1
|
||||
cache: bundler
|
||||
script: bundle exec rubocop
|
||||
|
7
Gemfile
7
Gemfile
@ -1,8 +1,9 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
ruby '2.3.1' if ENV.key?('DYNO')
|
||||
ruby '2.4.1' if ENV.key?('DYNO')
|
||||
|
||||
gem 'aws-sdk', '~> 2'
|
||||
gem 'pry', group: %i(development test)
|
||||
gem 'pry', group: %i[development test]
|
||||
gem 'rack'
|
||||
gem 'rubocop', group: %i(development test)
|
||||
gem 'rake'
|
||||
gem 'rubocop', group: %i[development test]
|
||||
|
29
Gemfile.lock
29
Gemfile.lock
@ -2,33 +2,37 @@ GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
ast (2.3.0)
|
||||
aws-sdk (2.5.6)
|
||||
aws-sdk-resources (= 2.5.6)
|
||||
aws-sdk-core (2.5.6)
|
||||
aws-sdk (2.9.17)
|
||||
aws-sdk-resources (= 2.9.17)
|
||||
aws-sdk-core (2.9.17)
|
||||
aws-sigv4 (~> 1.0)
|
||||
jmespath (~> 1.0)
|
||||
aws-sdk-resources (2.5.6)
|
||||
aws-sdk-core (= 2.5.6)
|
||||
aws-sdk-resources (2.9.17)
|
||||
aws-sdk-core (= 2.9.17)
|
||||
aws-sigv4 (1.0.0)
|
||||
coderay (1.1.1)
|
||||
jmespath (1.3.1)
|
||||
method_source (0.8.2)
|
||||
parser (2.3.1.2)
|
||||
parser (2.4.0.0)
|
||||
ast (~> 2.2)
|
||||
powerpack (0.1.1)
|
||||
pry (0.10.4)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
rack (2.0.1)
|
||||
rainbow (2.1.0)
|
||||
rubocop (0.42.0)
|
||||
parser (>= 2.3.1.1, < 3.0)
|
||||
rack (2.0.2)
|
||||
rainbow (2.2.2)
|
||||
rake
|
||||
rake (12.0.0)
|
||||
rubocop (0.48.1)
|
||||
parser (>= 2.3.3.1, < 3.0)
|
||||
powerpack (~> 0.1)
|
||||
rainbow (>= 1.99.1, < 3.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (~> 1.0, >= 1.0.1)
|
||||
ruby-progressbar (1.8.1)
|
||||
slop (3.6.0)
|
||||
unicode-display_width (1.1.0)
|
||||
unicode-display_width (1.2.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@ -37,7 +41,8 @@ DEPENDENCIES
|
||||
aws-sdk (~> 2)
|
||||
pry
|
||||
rack
|
||||
rake
|
||||
rubocop
|
||||
|
||||
BUNDLED WITH
|
||||
1.12.5
|
||||
1.14.6
|
||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright © 2016 Dan Buch
|
||||
Copyright © 2017 Dan Buch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
9
Rakefile
Normal file
9
Rakefile
Normal file
@ -0,0 +1,9 @@
|
||||
begin
|
||||
require 'rubocop/rake_task'
|
||||
rescue LoadError => e
|
||||
warn e
|
||||
end
|
||||
|
||||
RuboCop::RakeTask.new if defined?(RuboCop)
|
||||
|
||||
task default: %i[rubocop]
|
@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'json'
|
||||
require 'net/http'
|
||||
@ -6,7 +7,11 @@ require 'net/https'
|
||||
require 'uri'
|
||||
|
||||
class CPIFetcher
|
||||
DEFAULT_CPI_SERIES_URL = 'https://api.bls.gov/publicAPI/v2/timeseries/data/CUUSA210SA0'.freeze
|
||||
DEFAULT_CPI_SERIES_URL = File.join(
|
||||
'https://api.bls.gov',
|
||||
'publicAPI/v2/timeseries/data/CUUSA210SA0'
|
||||
)
|
||||
private_constant :DEFAULT_CPI_SERIES_URL
|
||||
attr_reader :url, :bls_token
|
||||
|
||||
def initialize
|
||||
|
Loading…
Reference in New Issue
Block a user