haveapi 0.19.2 → 0.20.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: c133d2a9145525028f07217eeb26edc2662223d205db29d36e87d37f16b7ee1d
4
- data.tar.gz: 6eec9a590cf1bc7534ce22c36384979f0c5779d06ef74c9bfcb272fb6f4e2885
3
+ metadata.gz: c0c14a9402fd2fd7ffef72fc2598c58b8682721c6166dd61acce339de6333e99
4
+ data.tar.gz: 96b21deb3be038337ae86baa6a02a4ff3d5c61c04c8e5836f2bc86fbc0295d58
5
5
  SHA512:
6
- metadata.gz: 50030f4ea50e770c1d1af8398f0e114242d60c8aef54f28f67a702d932d57917f416d097b92acbc51a3a1f81fc5b6742a432f45852ada5c91f675c5d46e5fda0
7
- data.tar.gz: a9dee23e6bfe83c7b926b9beec22591739b83d0a410ccc38a89035cb4f8450c237bb470bd0aa113c9cff9d377093d54b1d4b42f90ba4b94601979011509ffe17
6
+ metadata.gz: 7ead70adaf53318e32eb048d8d4643e31b2c3e5bc6c4bd9b3cddf0e7449cefb4b1ff16c47d6eb97e88763ea0a9c0843c1f74b56304584799d6ef0c2b27b0cca3
7
+ data.tar.gz: 1f8fd35c19dab55113f1702eacb323b5c86943c425279da4fa21f1de303164f7bd34bc9de134198458874ac09556e98de14de90f4d8f6d3b81b2b64785b001ea
data/haveapi.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.add_runtime_dependency 'require_all', '~> 2.0.0'
18
18
  s.add_runtime_dependency 'json'
19
- s.add_runtime_dependency 'activesupport', '>= 7.0'
19
+ s.add_runtime_dependency 'activesupport', '>= 7.1'
20
20
  s.add_runtime_dependency 'sinatra', '~> 3.1.0'
21
21
  s.add_runtime_dependency 'sinatra-contrib', '~> 3.1.0'
22
22
  s.add_runtime_dependency 'tilt', '~> 2.3.0'
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
24
24
  s.add_runtime_dependency 'rake'
25
25
  s.add_runtime_dependency 'github-markdown'
26
26
  s.add_runtime_dependency 'nesty', '~> 1.0'
27
- s.add_runtime_dependency 'haveapi-client', '~> 0.19.2'
27
+ s.add_runtime_dependency 'haveapi-client', '~> 0.20.0'
28
28
  s.add_runtime_dependency 'mail'
29
29
  s.add_runtime_dependency 'rack-oauth2', '~> 2.2.0'
30
30
  end
@@ -230,7 +230,9 @@ module HaveAPI
230
230
  end
231
231
 
232
232
  after do
233
- ActiveRecord::Base.clear_active_connections! if Object.const_defined?(:ActiveRecord)
233
+ if Object.const_defined?(:ActiveRecord)
234
+ ActiveRecord::Base.connection_handler.clear_active_connections!
235
+ end
234
236
  end
235
237
  end
236
238
 
data/lib/haveapi/types.rb CHANGED
@@ -2,10 +2,12 @@
2
2
  module Boolean
3
3
  def self.to_b(str)
4
4
  return true if str === true
5
- return true if str =~ /^(true|t|yes|y|1)$/i
6
-
7
5
  return false if str === false
8
- return false if str =~ /^(false|f|no|n|0)$/i
6
+
7
+ if str.respond_to?(:=~)
8
+ return true if str =~ /^(true|t|yes|y|1)$/i
9
+ return false if str =~ /^(false|f|no|n|0)$/i
10
+ end
9
11
 
10
12
  false
11
13
  end
@@ -16,7 +18,7 @@ module Datetime
16
18
  end
17
19
 
18
20
  module Custom
19
-
21
+
20
22
  end
21
23
 
22
24
  class Text < String
@@ -1,4 +1,4 @@
1
1
  module HaveAPI
2
2
  PROTOCOL_VERSION = '2.0'
3
- VERSION = '0.19.2'
3
+ VERSION = '0.20.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haveapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.2
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Skokan
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '7.0'
47
+ version: '7.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '7.0'
54
+ version: '7.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sinatra
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.19.2
159
+ version: 0.20.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.19.2
166
+ version: 0.20.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: mail
169
169
  requirement: !ruby/object:Gem::Requirement