Update dependencies

This commit is contained in:
Sami Samhuri 2024-09-02 13:25:20 -07:00
parent 7371beb78e
commit 382764bb44
No known key found for this signature in database
6 changed files with 23 additions and 20 deletions

View file

@ -1,9 +1,9 @@
AllCops: AllCops:
Include: Include:
- './Rakefile' - "./Rakefile"
- 'instapaper.gemspec' - "instapaper.gemspec"
- 'lib/**/*.rb' - "lib/**/*.rb"
- 'spec/**/*.rb' - "spec/**/*.rb"
DisplayCopNames: true DisplayCopNames: true
NewCops: enable NewCops: enable
@ -15,7 +15,7 @@ Metrics/BlockLength:
Metrics/BlockNesting: Metrics/BlockNesting:
Max: 2 Max: 2
Metrics/LineLength: Layout/LineLength:
AllowURI: true AllowURI: true
Enabled: false Enabled: false
@ -29,10 +29,10 @@ Metrics/ParameterLists:
Style/CollectionMethods: Style/CollectionMethods:
PreferredMethods: PreferredMethods:
map: 'collect' map: "collect"
reduce: 'inject' reduce: "inject"
find: 'detect' find: "detect"
find_all: 'select' find_all: "select"
Style/Documentation: Style/Documentation:
Enabled: false Enabled: false
@ -53,15 +53,15 @@ Layout/SpaceInsideHashLiteralBraces:
EnforcedStyle: no_space EnforcedStyle: no_space
Style/TrailingCommaInArguments: Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: 'comma' EnforcedStyleForMultiline: "comma"
Style/TrailingCommaInArrayLiteral: Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: 'comma' EnforcedStyleForMultiline: "comma"
Style/TrailingCommaInHashLiteral: Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: 'comma' EnforcedStyleForMultiline: "comma"
Style/FileName: Naming/FileName:
Exclude: Exclude:
- Rakefile - Rakefile
- Gemfile - Gemfile

View file

@ -7,8 +7,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'http', '>= 2', '< 6' spec.add_dependency 'http', '>= 2', '< 6'
spec.add_dependency 'multi_json', '~> 1' spec.add_dependency 'multi_json', '~> 1'
spec.add_dependency 'simple_oauth', '~> 0.3' spec.add_dependency 'simple_oauth', '~> 0.3'
spec.add_dependency 'virtus', '~> 1' spec.add_dependency 'virtus', '~> 2'
spec.add_development_dependency 'bundler'
spec.author = 'Steve Agalloco' spec.author = 'Steve Agalloco'
spec.description = "Ruby Client for Instapaper's Full API" spec.description = "Ruby Client for Instapaper's Full API"
spec.email = 'steve.agalloco@gmail.com' spec.email = 'steve.agalloco@gmail.com'
@ -20,4 +19,5 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = '>= 2.0.0' spec.required_ruby_version = '>= 2.0.0'
spec.summary = 'Ruby Instapaper Client' spec.summary = 'Ruby Instapaper Client'
spec.version = Instapaper::VERSION spec.version = Instapaper::VERSION
spec.metadata['rubygems_mfa_required'] = 'true'
end end

View file

@ -27,7 +27,7 @@ module Instapaper
# @param order [Array] An array of folder_id:position pairs joined by commas. # @param order [Array] An array of folder_id:position pairs joined by commas.
# @example Ordering folder_ids 100, 200, and 300 # @example Ordering folder_ids 100, 200, and 300
# Instapaper.set_order(['100:1','200:2','300:3']) # Instapaper.set_order(['100:1','200:2','300:3'])
def set_order(order = []) # rubocop:disable Naming/AccessorMethodName def set_order(order = [])
perform_post_with_objects('/api/1.1/folders/set_order', {order: order.join(',')}, Instapaper::Folder) perform_post_with_objects('/api/1.1/folders/set_order', {order: order.join(',')}, Instapaper::Folder)
end end
end end

View file

@ -8,9 +8,9 @@ module Instapaper
values do values do
attribute :user, Instapaper::User attribute :user, Instapaper::User
attribute :bookmarks, Array[Instapaper::Bookmark] attribute :bookmarks, [Instapaper::Bookmark]
attribute :highlights, Array[Instapaper::Highlight] attribute :highlights, [Instapaper::Highlight]
attribute :delete_ids, Array[Integer] attribute :delete_ids, [Integer]
end end
def each(&block) def each(&block)

View file

@ -42,7 +42,7 @@ module Instapaper
# @param klass [Class] # @param klass [Class]
def perform_request_with_object(request_method, path, options, klass) def perform_request_with_object(request_method, path, options, klass)
response = perform_request(request_method, path, options) response = perform_request(request_method, path, options)
response = response.is_a?(Array) ? response.first : response response = response.first if response.is_a?(Array)
klass.new(coerce_hash(response)) klass.new(coerce_hash(response))
end end

View file

@ -30,12 +30,15 @@ describe Instapaper::HTTP::Response do
describe '#valid?' do describe '#valid?' do
context 'when http error' do context 'when http error' do
it 'should be invalid'
end end
context 'when body unparseable' do context 'when body unparseable' do
it 'should be invalid'
end end
context 'when error in body' do context 'when error in body' do
it 'should be invalid'
end end
end end
end end