inat-get 0.9.0.16 → 0.9.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2015547fb2fd46a5f9666fca61bd6a2dc6c2a753bfc2f868558bf8b30914c5c6
4
- data.tar.gz: 6019977a72b24cef5f6c90f1396a02463f1b6ec3788aa6bbd72ea164b3b565c2
3
+ metadata.gz: 4755573543862b68a12f01b319807ec43826ec16fa4ce875d7b241b4b9d19a50
4
+ data.tar.gz: aae527530c9c0a04017254eb86fb591dc43a53cfac2f3b17809e351fd0cdedd5
5
5
  SHA512:
6
- metadata.gz: 5e41b660557b64a68084e4dccea9a0420fd814dab4147620958bd6bb95310f3f602ebbac4820ecfa8af8cfab6f2e9a7a7adc9a4578637774368a1eac0597ed5a
7
- data.tar.gz: 99b79c7972ed57bb68ba11ef352507199852cf9c0a1e21a3d60e9a14b59ab4e12eb2ccbc51f9944a811a66b5be205e05921176ac5af41c2203447ec295fb323d
6
+ metadata.gz: fc75d5593af48b7f1518577afb26ecf4dbc6dc3e2ccea894aa3acee2394b9a5246fe6726f5a4217c10688ac0789485c670a6d5604e913570e3316d316edc2b3b
7
+ data.tar.gz: 86ba6085e4964c0d8e57e96c2b1ae6117d616f69b95a56b7fd144549ce991311980745142a6219d9a45b776e1429980bfe97f5362eb8f71a8a92617f3fb16b0e
@@ -51,12 +51,11 @@ class INatGet::App::Server::API < INatGet::App::Server
51
51
  @logger.error "Error in response: #{response.status}"
52
52
  return { status: :error, error: response.status }.freeze
53
53
  end
54
- # rescue => e
55
- # return { status: :error, error: e.message }.freeze
54
+ rescue => e
55
+ return { status: :error, error: e.message }.freeze
56
56
  end
57
57
 
58
58
  def faraday
59
- # tmp_logger = ::Logger::new 'common.log', level: :info
60
59
  @faraday ||= Faraday::new do |f|
61
60
  f.request :retry,
62
61
  max: @config.dig(:api, :retry, :max),
@@ -66,15 +65,14 @@ class INatGet::App::Server::API < INatGet::App::Server
66
65
  retry_block: lambda { |env:, options:, retry_count:, exception:, will_retry_in:| @logger.warn "retry... : #{ retry_count } : #{ exception.class }" },
67
66
  exceptions: [Faraday::TimeoutError, Faraday::ConnectionFailed, Faraday::SSLError, Faraday::ClientError]
68
67
  f.request :url_encoded
69
- # f.response :logger, tmp_logger, { headers: true, bodies: false }
70
68
 
71
- # f.use :http_cache, store: INatGet::App::Server::API::Cache::new(@config.dig(:caching, :api) || 100)
69
+ f.response :raise_error
72
70
 
73
71
  f.adapter :typhoeus do |typhoeus|
74
- typhoeus.options[:connecttimeout] = 10
75
- typhoeus.options[:timeout] = 20
76
- typhoeus.options[:low_speed_limit] = 10
77
- typhoeus.options[:low_speed_time] = 10
72
+ typhoeus.options[:connecttimeout] = 5
73
+ typhoeus.options[:timeout] = 10
74
+ typhoeus.options[:nosignal] = 1
75
+ typhoeus.options[:dns_cache_timeout] = 0
78
76
  end
79
77
  end
80
78
  end
@@ -66,7 +66,7 @@ module INatGet::App::Setup
66
66
  max: 25,
67
67
  interval: '1s',
68
68
  randomness: 0.5,
69
- backoff: 2
69
+ backoff: 1
70
70
  },
71
71
  delay: '1s',
72
72
  pager: 200
data/lib/inat-get/info.rb CHANGED
@@ -5,7 +5,7 @@ module INatGet; end
5
5
  module INatGet::Info
6
6
 
7
7
  NAME = 'inat-get'
8
- VERSION = '0.9.0.16'
8
+ VERSION = '0.9.0.18'
9
9
  VERSION_ALIAS = 'Carduelis carduelis'
10
10
 
11
11
  AUTHOR = 'Ivan Shikhalev'
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ Sequel.migration do
4
+
5
+ change do
6
+
7
+ alter_table :taxa_ancestors do
8
+ add_index [ :taxon_id ], name: 'ix_taxa_ancestors_taxon_id'
9
+ add_index [ :ancestor_id ], name: 'ix_taxa_ancestors_ancestor_id'
10
+ end
11
+
12
+ end
13
+
14
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inat-get
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0.16
4
+ version: 0.9.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Shikhalev
@@ -71,14 +71,14 @@ dependencies:
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '1.1'
74
+ version: '2.0'
75
75
  type: :runtime
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '1.1'
81
+ version: '2.0'
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: is-dsl
84
84
  requirement: !ruby/object:Gem::Requirement
@@ -406,6 +406,7 @@ files:
406
406
  - lib/inat-get/utils/simple_singular.rb
407
407
  - share/inat-get/db/migrations/001_start_database.rb
408
408
  - share/inat-get/db/migrations/002_nullable_slug.rb
409
+ - share/inat-get/db/migrations/003_ancestry_indices.rb
409
410
  - share/inat-get/demo/01_user_stat.rb
410
411
  - share/inat-get/demo/02_underfound.rb
411
412
  - share/inat-get/demo/03_newcomers.rb