Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all V1 functionality #24

Merged
merged 5 commits into from
Jun 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions lib/oxford_dictionary/api_objects/entry.rb

This file was deleted.

12 changes: 0 additions & 12 deletions lib/oxford_dictionary/api_objects/entry_response.rb

This file was deleted.

16 changes: 0 additions & 16 deletions lib/oxford_dictionary/api_objects/lexical_entry.rb

This file was deleted.

7 changes: 0 additions & 7 deletions lib/oxford_dictionary/api_objects/list_response.rb

This file was deleted.

10 changes: 0 additions & 10 deletions lib/oxford_dictionary/api_objects/pronunciation.rb

This file was deleted.

19 changes: 0 additions & 19 deletions lib/oxford_dictionary/api_objects/sense.rb

This file was deleted.

127 changes: 0 additions & 127 deletions lib/oxford_dictionary/deprecated_request.rb

This file was deleted.

23 changes: 0 additions & 23 deletions lib/oxford_dictionary/endpoints/inflection_endpoint.rb

This file was deleted.

10 changes: 0 additions & 10 deletions lib/oxford_dictionary/error.rb

This file was deleted.

32 changes: 0 additions & 32 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,6 @@
config.filter_sensitive_data('APP_KEY') { |request| ENV['APP_KEY'] }
end

TEST_API_ID = 'ID'.freeze
TEST_API_KEY = 'SECRET'.freeze
ACCEPT = 'application/json'.freeze
HEADERS = { 'Accept' => ACCEPT, 'App-Id' => 'ID', 'App-Key' => 'SECRET' }.freeze

def stub_get(path, fixture_name)
headers = HEADERS
stub_request(:get, api_url(path))
.with(headers: headers)
.to_return(status: 200, body: fixture(fixture_name))
end

def stub_error(path, fixture_name)
headers = HEADERS
stub_request(:get, api_url(path))
.with(headers: headers)
.to_return(status: 404, body: fixture(fixture_name))
end

def fixture_path(file = nil)
path = File.expand_path('../fixtures', __FILE__)
file.nil? ? path : File.join(path, file)
end

def fixture(file)
File.read(fixture_path(file))
end

def api_url(path)
"#{OxfordDictionary::DeprecatedRequest::BASE}/#{path}"
end

RSpec.configure do |config|
config.expect_with :rspec do |c|
c.syntax = :expect
Expand Down