diva 0.3.1 → 0.3.2

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: bbd71e6eab2ac33b0889772975d9eca73bc410b4
4
- data.tar.gz: 9b22e2df9cef290b873554f511266cbd844cbebc
2
+ SHA256:
3
+ metadata.gz: 68d766412779aaedc71ea2ab874be3861238afff5b896d4d4bdab9e50e2c5103
4
+ data.tar.gz: 7ca9cc8bec5f1b284fe51b078501831572519263feab02619b641ee7498543bd
5
5
  SHA512:
6
- metadata.gz: 5f13d1159a00b3476b2ce4718a11d3dda0cd037210bab256d3d6b2e32aa0fcd71afc2b3366446b538ba867b0a907411f91f54f45a722cfe17f723a80fd0c1bd9
7
- data.tar.gz: 60a7677cbba7d4716b7246428c36b9b27e15ad9a4fc7299a7eb03de2594fcb8cb6f9f5945f40f7d4a4877121e005c4c3008608ab65307ff4d095fa0f16b7f7b6
6
+ metadata.gz: 77ca8065a2a25a922bebdf0fe297242363f17e4277f411f4f72ece8ed0b61e26893452c6683d7815a55c96e5944f58e86436d77d38952fc9bf30c97c24e2c815
7
+ data.tar.gz: 77627879b34087e1a4877125c54c489b0b799d768fee187bffff8f237e337cce67981ccae60eaa7481b964bbe841fd02bbed68740ab5f972f60c7aa7b7ac6517
data/lib/diva.rb CHANGED
@@ -12,5 +12,7 @@ require 'diva/version'
12
12
 
13
13
 
14
14
  module Diva
15
- # Your code goes here...
15
+ def self.URI(uri)
16
+ Diva::URI.new(uri)
17
+ end
16
18
  end
data/lib/diva/uri.rb CHANGED
@@ -44,8 +44,8 @@ class Diva::URI
44
44
 
45
45
  def ==(other)
46
46
  case other
47
- when URI, Addressable::URI
48
- other == to_uri
47
+ when URI, Addressable::URI, String
48
+ other.to_s == self.to_s
49
49
  when Diva::URI
50
50
  if has_string? or other.has_string?
51
51
  to_s == other.to_s
@@ -119,13 +119,13 @@ class Diva::URI
119
119
 
120
120
  def generate_uri_by_string
121
121
  URI.parse(@uri_string)
122
- rescue URI::InvalidComponentError
122
+ rescue URI::Error
123
123
  Addressable::URI.parse(@uri_string)
124
124
  end
125
125
 
126
126
  def generate_uri_by_hash
127
127
  URI::Generic.build(@uri_hash)
128
- rescue URI::InvalidComponentError
128
+ rescue URI::Error
129
129
  Addressable::URI.new(@uri_hash)
130
130
  end
131
131
  end
data/lib/diva/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Diva
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diva
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshiaki Asai
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-05 00:00:00.000000000 Z
11
+ date: 2018-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  version: '0'
149
149
  requirements: []
150
150
  rubyforge_project:
151
- rubygems_version: 2.6.14
151
+ rubygems_version: 2.7.6
152
152
  signing_key:
153
153
  specification_version: 4
154
154
  summary: Implementation of expression for handling things.