geo_monitor 0.3.1 → 0.6.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
- SHA1:
3
- metadata.gz: d212884e1dffc19ff2a79c1a1370dcc6e7370fab
4
- data.tar.gz: 2bf333c6fbcfdbf56a42fb0a3f93d6ec7787f82a
2
+ SHA256:
3
+ metadata.gz: 438e826f4d7ed4a0f2b481251269d80cdb162dca7513a707ef2d22a77bf1e431
4
+ data.tar.gz: 2767f0827c3f7e6b4afdcd215f48f68ebaf3dcbf349621fa4af387784eb861e1
5
5
  SHA512:
6
- metadata.gz: d4c0a78f06e1344f97f923904d1a4adda96f998108b08fe2e7fe51f3eac4d15c3773eb2bdeb58b82b0b6a7df8f359d413b960084c17298b19de6ad4f91e489bb
7
- data.tar.gz: 6d1bf9b04eaf4f1c196a509515be4d2099773af1c758659561249cc727f135baee6f525fe145d689575959cd0bda48f86913ef2bc04f26c1dc121627de81623c
6
+ metadata.gz: 2a69a07ec6dfdc5af0e1527fdbdd8d576c71b6cd0edb0b64f29a3479d39cd96d2412844e3a8415243a2f78eb9f51e406ca7976ccad07ca663c023c827c1cab6d
7
+ data.tar.gz: 026ef1633a3055156b2e7ba91e88865748d79012b8a841100b307d99b21ed7f435b2fe09dbdcb0f7004a2ccffbe44c6bc088f1d51d625c885d25ae4a9c38dc64
data/Rakefile CHANGED
@@ -7,8 +7,6 @@ end
7
7
  require 'bundler/gem_tasks'
8
8
  require 'engine_cart/rake_task'
9
9
 
10
- EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc
11
-
12
10
  namespace :geomonitor do
13
11
  desc 'Create the test rails app'
14
12
  task generate: ['engine_cart:generate'] do
@@ -7,8 +7,8 @@ module GeoMonitor
7
7
  def self.from_geoblacklight(schema_json)
8
8
  schema = JSON.parse(schema_json)
9
9
  references = JSON.parse(schema['dct_references_s'] || '{}')
10
- find_or_create_by(slug: schema['layer_slug_s']) do |layer|
11
- layer.checktype =
10
+ find_or_create_by(slug: schema['layer_slug_s']).tap do |layer|
11
+ layer.checktype =
12
12
  if references['http://www.opengis.net/def/serviceType/ogc/wms']
13
13
  'WMS'
14
14
  elsif references['http://iiif.io/api/image']
@@ -10,7 +10,7 @@ module GeoMonitor
10
10
  max = ::GeoMonitor::Engine.config.max_status_per_layer
11
11
  self.class
12
12
  .where(layer: layer)
13
- .last(statuses_by_layer - max + 1)
13
+ .first(statuses_by_layer - max + 1)
14
14
  .map(&:destroy) if statuses_by_layer >= max
15
15
  end
16
16
 
@@ -12,10 +12,10 @@ module GeoMonitor
12
12
  def to_3857
13
13
  d = Math::PI / 180
14
14
  max = 1 - 1E-15
15
- sin = [[Math.sin(lng * d), max].min, -max].max
15
+ sin = [[Math.sin(lat * d), max].min, -max].max
16
16
  self.class.new(
17
- lat: ::GeoMonitor::Constants::R * lat * d,
18
- lng: ::GeoMonitor::Constants::R * Math.log((1 + sin) / (1 - sin)) / 2
17
+ lng: ::GeoMonitor::Constants::R * lng * d,
18
+ lat: ::GeoMonitor::Constants::R * Math.log((1 + sin) / (1 - sin)) / 2
19
19
  )
20
20
  end
21
21
 
@@ -45,7 +45,7 @@ module GeoMonitor
45
45
  request.options.timeout = 10
46
46
  request.options.open_timeout = 10
47
47
  end
48
- rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
48
+ rescue Faraday::ConnectionFailed, Faraday::TimeoutError, Faraday::SSLError => e
49
49
  ::GeoMonitor::FailedResponse.new(
50
50
  { url: conn.url_prefix.to_s },
51
51
  e.class,
@@ -1,3 +1,3 @@
1
1
  module GeoMonitor
2
- VERSION = '0.3.1'
2
+ VERSION = '0.6.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geo_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Reed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-16 00:00:00.000000000 Z
11
+ date: 2020-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 5.1.4
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 5.1.4
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: faraday
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +48,16 @@ dependencies:
42
48
  name: engine_cart
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - ">="
51
+ - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :runtime
53
+ version: '2.0'
54
+ type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - ">="
58
+ - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '0'
60
+ version: '2.0'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: sqlite3
57
63
  requirement: !ruby/object:Gem::Requirement
@@ -149,8 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
155
  - !ruby/object:Gem::Version
150
156
  version: '0'
151
157
  requirements: []
152
- rubyforge_project:
153
- rubygems_version: 2.6.11
158
+ rubygems_version: 3.1.2
154
159
  signing_key:
155
160
  specification_version: 4
156
161
  summary: A Rails engine for monitoring geo webservices