emp_json 1.2.1.pre.g7126641c2 → 1.3.0.pre.g0625fa6de

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: be2d689af57e828d02b12d7926f046e3e16cc710f5943f97fd7d8912604f2daa
4
- data.tar.gz: 6567675816c370264323610c46024eb4c1915d05d78a05c92ef23ab43aa8c919
3
+ metadata.gz: 9612a5c8e0b716176a85c878f90d0bc81fcf9356e18c393ee0c15311e955d688
4
+ data.tar.gz: e510d8c6a838de964217deb2d59f2dafbf2ca5f52d30b26499b3be160f1065cc
5
5
  SHA512:
6
- metadata.gz: 2bbc9e8faacfc512ea65058bcd37c1572a2a1fb8526e8c7bbee560aab37c34b7088456f0f202bb53224722392ace0d1c0fac9dc4ff96cc007f34014741fa8567
7
- data.tar.gz: fd3994099ab325ad30b3906db67ef1ffb4ab45e3891f34f0d11bc64272d2e7faa5fb9fca23a096b59d6d919da87120c66b729f7b155ee67f6349b6d865df60d6
6
+ metadata.gz: 1689dde51a6dd8413688616352278c134de24aa92704223d86ffdd22538cf9d84ff6a690d7a822e997fc1447abb073aa60e625886b735cf8c5a516cc8abcb204
7
+ data.tar.gz: d3d6782b0a717f1464b537e9704767f6318ad6ff1a9ed6425e68cf4cdcba2afd554f7f86a6ef82656291dd324b7abb3a84958c68df09c23c5af8d811190b7b88
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- emp_json (1.2.1.pre.g7126641c2)
4
+ emp_json (1.3.0.pre.g0625fa6de)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Empathy
4
4
  module EmpJson
5
- VERSION = "1.2.1"
5
+ VERSION = "1.3.0"
6
6
  end
7
7
  end
@@ -10,9 +10,21 @@ require "empathy/emp_json/serializer"
10
10
 
11
11
  module Empathy
12
12
  module EmpJson
13
- SUPPORTS_RDF_RB = Object.const_defined?("RDF")
14
- SUPPORTS_SEQUENCE = Object.const_defined?("LinkedRails")
15
- SUPPORTS_AR = Object.const_defined?("ActiveRecord")
13
+ # Class for checking if certain gems are present
14
+ class SupportChecker
15
+ class << self
16
+ def check(gem)
17
+ require gem
18
+ true
19
+ rescue LoadError
20
+ false
21
+ end
22
+ end
23
+ end
24
+
25
+ SUPPORTS_RDF_RB = SupportChecker.check("rdf")
26
+ SUPPORTS_SEQUENCE = SupportChecker.check("linked_rails")
27
+ SUPPORTS_AR = SupportChecker.check("active_record")
16
28
 
17
29
  class Error < StandardError; end
18
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emp_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1.pre.g7126641c2
4
+ version: 1.3.0.pre.g0625fa6de
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thom van Kalkeren
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-01 00:00:00.000000000 Z
11
+ date: 2022-08-15 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Serializer for the EmpJson specification.
14
14
  email: