haveapi 0.19.3 → 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: 06b4c4191d96bd967530dd58f27e0e3d8f913addd893f137d78e93bab5143c11
4
- data.tar.gz: 3bbc4f4bfaace2cf2203e4c0ad33952a4c0b043d2453be2715e21404f38bf043
3
+ metadata.gz: c0c14a9402fd2fd7ffef72fc2598c58b8682721c6166dd61acce339de6333e99
4
+ data.tar.gz: 96b21deb3be038337ae86baa6a02a4ff3d5c61c04c8e5836f2bc86fbc0295d58
5
5
  SHA512:
6
- metadata.gz: 7055cb415c3c7e5e366c473e38067ae9766c545c189d34ac4977cbdc337f6a5450d354b306805fd6fe0467c78cc89d9369f6aa80c986e129e194c4a40574da0f
7
- data.tar.gz: 3b4ecc8547ea055000f4e5282dc5165f3bd6741fef2fedd60df7e9c17c67796574e288c8b7352143e8a25dc1d3b1c40e125a17db66dd9fdb12e1a906f3111148
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.3'
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.3'
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.3
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.3
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.3
166
+ version: 0.20.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: mail
169
169
  requirement: !ruby/object:Gem::Requirement