sequencescape-client-api 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 780556e1d4fea4c8137bc1e023f146f88aff680b5049d2b8a8fdf69adabeca22
4
- data.tar.gz: c5cbbc90e3fabd2ffe2e8ba52d6d3936663605fa891157187b7b33129783a88e
3
+ metadata.gz: 0ecebf6c962ae60d3a187a5f16ac2f4812994c99238d72d06b1d7db5ec35d602
4
+ data.tar.gz: 9bfa9f43fe9da3c5df5dfd6184e24253812f5c615a591306d2c011b48b80a474
5
5
  SHA512:
6
- metadata.gz: 10594eddd32c881066aaefb260d55f5a839f6d547112a3af5ddfd7b8a9da8d7f7942cb4944423a1868ebdacf198f8900b7502c425893f1b8a02b4d3ea9f84bd1
7
- data.tar.gz: 88fe205eae3cc2eab0e0115c355140c483ee39afa50051b48238985dde739c2193a578e1b95f7c8fde2e202c137d20e337fe806081c767e1fb913bead1aee200
6
+ metadata.gz: b2a94ea0dd5f5d4a2fa319c614f6ef7ec659033ac156d06074f33a35a65dba3bf3bdec089328a81dea647ec168c4e26968bfb8f559e165a9294f87d2bdd3378d
7
+ data.tar.gz: 5dbea569370cf968fdc3caf93bcd68d4b380ccedaef927013ef74a67b6abea835aab4b65a4f9a3280b85790ddb33f9440182c20603e86d50c4d91c565847f4f7
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- ruby: ["2.5", "2.6", "2.7", "3.0"]
12
+ ruby: ["2.7", "3.0", "3.1"]
13
13
  name: Ruby Test ${{ matrix.ruby }}
14
14
 
15
15
  steps:
@@ -31,7 +31,7 @@ jobs:
31
31
  - name: Set up Ruby
32
32
  uses: ruby/setup-ruby@v1
33
33
  with:
34
- ruby-version: 3.0
34
+ ruby-version: "3.0"
35
35
  bundler-cache:
36
36
  true # Runs bundle install and caches gems. See the ruby_test.yml
37
37
  # example if you need more control over bundler.
data/.rubocop.yml CHANGED
@@ -11,7 +11,7 @@ inherit_from: .rubocop_todo.yml
11
11
  #
12
12
  # See https://github.com/rubocop-hq/rubocop/blob/master/manual/configuration.md
13
13
  AllCops:
14
- TargetRubyVersion: 2.4
14
+ TargetRubyVersion: "2.7"
15
15
  Style/ClassAndModuleChildren:
16
16
  Enabled: false
17
17
  Layout/LineLength:
@@ -19,7 +19,7 @@ Layout/LineLength:
19
19
  AutoCorrect: true
20
20
  Naming/FileName:
21
21
  Exclude:
22
- - 'lib/sequencescape-api.rb'
22
+ - "lib/sequencescape-api.rb"
23
23
 
24
24
  # Pending Cops
25
25
  Lint/DuplicateBranch: # (new in 1.3)
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.5.8
1
+ 2.7.4
data/README.markdown CHANGED
@@ -12,9 +12,10 @@ Documentation can be found [on the wiki](https://github.com/sanger/sequencescape
12
12
  - 0.6.x Removes usage of WTSISignOn cookie. Replaces with user specific api key,
13
13
  can be provided to Sequencescape::Api.new as user_api_key: or via
14
14
  `api_connection_options` in the controller.
15
- - 0.8.x Enables HTTPS
15
+ - 1.0.x Enables HTTPS
16
+ - 2.0.x Drops support for versions less than Ruby 2.7
16
17
 
17
- - master currently corresponds to 0.6.x
18
+ - master currently corresponds to 2.x
18
19
 
19
20
  Rails 6 appears to be supported judging by Specs, but haven't used it in anger
20
21
  yet.
@@ -8,8 +8,8 @@ BEGIN {
8
8
  Net::HTTP.module_eval do
9
9
  alias_method '__initialize__', 'initialize'
10
10
 
11
- def initialize(*args, &block)
12
- __initialize__(*args, &block)
11
+ def initialize(...)
12
+ __initialize__(...)
13
13
  ensure
14
14
  @debug_output = $stderr if ENV['HTTP_DEBUG']
15
15
  end
@@ -5,6 +5,7 @@ require 'active_model/translation'
5
5
  require 'active_model/errors'
6
6
 
7
7
  # Uh, ok, so why do I have to include these when I've kind of said I want everything!?!!
8
+ require 'active_support/core_ext/module/deprecation'
8
9
  require 'active_model/validator'
9
10
  require 'active_model/validations'
10
11
  require 'active_model/callbacks'
@@ -28,19 +28,17 @@ module Sequencescape::Api::Resource::Groups
28
28
  end
29
29
 
30
30
  module Json
31
- def as_json_for_update(options) # rubocop:todo Metrics/MethodLength
31
+ def as_json_for_update(options)
32
32
  super.tap do |json|
33
- begin
34
- if options[:root]
35
- json.fetch(json_root).merge!(attribute_group_json(options))
36
- else
37
- json.merge!(attribute_group_json(options))
38
- end
39
- rescue KeyError => e
40
- # If we get a key error, append the json to out exception to assist diagnosing issues
41
- e.message << " in #{json.to_json}"
42
- raise e
33
+ if options[:root]
34
+ json.fetch(json_root).merge!(attribute_group_json(options))
35
+ else
36
+ json.merge!(attribute_group_json(options))
43
37
  end
38
+ rescue KeyError => e
39
+ # If we get a key error, append the json to out exception to assist diagnosing issues
40
+ e.message << " in #{json.to_json}"
41
+ raise e
44
42
  end
45
43
  end
46
44
  private :as_json_for_update
@@ -1,5 +1,5 @@
1
1
  module Sequencescape
2
2
  class Api
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '2.0.0'.freeze
4
4
  end
5
5
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.homepage = ''
11
11
  s.summary = 'Gem for the client side of the Sequencescape API'
12
12
  s.description = 'Provides all of the necessary code for interacting with the Sequencescape API'
13
- s.required_ruby_version = '> 2.4'
13
+ s.required_ruby_version = '>= 2.7'
14
14
 
15
15
  s.rubyforge_project = 'sequencescape-client-api'
16
16
 
@@ -11,11 +11,9 @@ shared_examples_for 'errors on both client and server' do |action, request_contr
11
11
  end
12
12
 
13
13
  it 'includes the error on the field' do
14
- begin
15
- target.__send__(action, attribute_validated_at_client: 'please error')
16
- rescue Sequencescape::Api::ResourceInvalid => e
17
- e.resource.errors[:attribute_validated_at_client].should == ['cannot be set']
18
- end
14
+ target.__send__(action, attribute_validated_at_client: 'please error')
15
+ rescue Sequencescape::Api::ResourceInvalid => e
16
+ e.resource.errors[:attribute_validated_at_client].should == ['cannot be set']
19
17
  end
20
18
  end
21
19
 
@@ -29,11 +27,9 @@ shared_examples_for 'errors on both client and server' do |action, request_contr
29
27
  end
30
28
 
31
29
  it 'includes the error on the field' do
32
- begin
33
- target.__send__(action, attribute_validated_at_server: 'please error')
34
- rescue Sequencescape::Api::ResourceInvalid => e
35
- e.resource.errors[:attribute_validated_at_server].should == ['cannot be set']
36
- end
30
+ target.__send__(action, attribute_validated_at_server: 'please error')
31
+ rescue Sequencescape::Api::ResourceInvalid => e
32
+ e.resource.errors[:attribute_validated_at_server].should == ['cannot be set']
37
33
  end
38
34
  end
39
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequencescape-client-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Denner
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-01-20 00:00:00.000000000 Z
13
+ date: 2022-01-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -520,17 +520,16 @@ require_paths:
520
520
  - lib
521
521
  required_ruby_version: !ruby/object:Gem::Requirement
522
522
  requirements:
523
- - - ">"
523
+ - - ">="
524
524
  - !ruby/object:Gem::Version
525
- version: '2.4'
525
+ version: '2.7'
526
526
  required_rubygems_version: !ruby/object:Gem::Requirement
527
527
  requirements:
528
528
  - - ">="
529
529
  - !ruby/object:Gem::Version
530
530
  version: '0'
531
531
  requirements: []
532
- rubyforge_project: sequencescape-client-api
533
- rubygems_version: 2.7.6.2
532
+ rubygems_version: 3.1.6
534
533
  signing_key:
535
534
  specification_version: 4
536
535
  summary: Gem for the client side of the Sequencescape API