bel_parser 1.0.0.alpha.55-java → 1.0.0.alpha.56-java

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
  SHA1:
3
- metadata.gz: 90614dd2dc0ce9fbb17e01e51ec3bb203b064c26
4
- data.tar.gz: 8452877cf9fb328feed6d6f91b032f0286f3757b
3
+ metadata.gz: 31b7d1faf3439b77b301a8465b6a6302892ca256
4
+ data.tar.gz: e25ccf32c170db8fa016617ae6b8294a8bae07cc
5
5
  SHA512:
6
- metadata.gz: d5dcc028b6ad8df12788b3f2522235f0e4e948661b6de15e254a30af492f2fc4603d3f31affae8bb6cf40ddc9def28c2a337b332d71f03fa1a0fd8632f86ee6f
7
- data.tar.gz: bd19840310b1034352a9b6590a41af52ba0779073f6d9e202f1519e6fdabdf4295be87e50f62d6cca3a4f6ab24f2be3e1ca0046865ad0ec90901c017041e86da
6
+ metadata.gz: 735a3f898e103914def1b14114627329eefe30f6823747142037bc0060de61022cbcdcaae962a18b0bf744c73266b9412dd467f6946a94d83b902a6f473454d2
7
+ data.tar.gz: ef2463dd17b179952d8a259c2d80f3063cb5a4ba29da9985848e34e9d7217b0177c96f6f3980fc02af5f5cc718c2e5cae03580a1d14d548f3d7c3ddafd53d75f
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.alpha.55
1
+ 1.0.0.alpha.56
@@ -45,6 +45,28 @@ module BELParser
45
45
  !@url.nil?
46
46
  end
47
47
 
48
+ def type
49
+ case
50
+ when uri?
51
+ :uri
52
+ when url?
53
+ :url
54
+ else
55
+ nil
56
+ end
57
+ end
58
+
59
+ def domain
60
+ case
61
+ when uri?
62
+ @uri
63
+ when url?
64
+ @url
65
+ else
66
+ nil
67
+ end
68
+ end
69
+
48
70
  def include?(value)
49
71
  resolved_value =
50
72
  if uri? && @uri_reader
@@ -145,11 +145,19 @@ module BELParser
145
145
  end
146
146
 
147
147
  def self.open_datasets_file
148
- @dataset_file ||= ::DBM.open(_temporary_datasets_file)
148
+ if RUBY_ENGINE =~ /^jruby/i
149
+ @dataset_file ||= ::DBM.new
150
+ else
151
+ @dataset_file ||= ::DBM.open(_temporary_datasets_file)
152
+ end
149
153
  end
150
154
 
151
155
  def self.open_resource_file(url)
152
- @resource_files[url] ||= ::DBM.open(_temporary_resource_file(url))
156
+ if RUBY_ENGINE =~ /^jruby/i
157
+ @resource_files[url] ||= ::DBM.new
158
+ else
159
+ @resource_files[url] ||= ::DBM.open(_temporary_resource_file(url))
160
+ end
153
161
  end
154
162
 
155
163
  def self._temporary_datasets_file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bel_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.alpha.55
4
+ version: 1.0.0.alpha.56
5
5
  platform: java
6
6
  authors:
7
7
  - Anthony Bargnesi