Merge pull request #1 from samsonjs/update-dependencies

Update dependencies
This commit is contained in:
Sami Samhuri 2025-06-08 10:39:21 -07:00 committed by GitHub
commit 679bfec8df
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 23 additions and 20 deletions

View file

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

View file

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

View file

@ -27,7 +27,7 @@ module Instapaper
# @param order [Array] An array of folder_id:position pairs joined by commas.
# @example Ordering folder_ids 100, 200, and 300
# 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)
end
end

View file

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

View file

@ -42,7 +42,7 @@ module Instapaper
# @param klass [Class]
def perform_request_with_object(request_method, path, options, klass)
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))
end

View file

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