mida 0.3.6 → 0.3.7

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: 6d01fe436dfe46a4496213212df9720593e13754
4
- data.tar.gz: 5320742776ee4fb1ca0a171b76ccd72471681c54
3
+ metadata.gz: cde0c31ecf86cd045ae29de07cd82b579ee941a9
4
+ data.tar.gz: 2823a83ecb98f15bd20c429515985f293d512915
5
5
  SHA512:
6
- metadata.gz: 4637578b6ff945acf8adc05a8d464502664870b422f13a2d7fc87c120471df8d46b7bf7232362aced30133db5bccc0162ea2ec0da9708896e99e6c46cc5d49cd
7
- data.tar.gz: e2b442573d64d3d601c536d4b18bd9638247022b4962947c5bca8328f91c6266af409d77b8e0be0667f4c8e5ded59ba2830ad23a1c190a073d7d98cb6464fc38
6
+ metadata.gz: 33555423be24c0b7520449187cca5a1a52f7404cc20e7660b3c04c1be1c85136bda187e57a5cfaee36dea02aabb753ff21bcd3e86259b1cbab29888a07a15742
7
+ data.tar.gz: b9b04ca377acba4c9e7e5067c5b9db97bdba04eac474dac3f5a504dd158835a26aac7fd414c8d89305ba45f76558263b936fdefcd0f050d30d2cff31b87c5e20
@@ -1,3 +1,6 @@
1
+ == 0.3.7 (3rd June 2014)
2
+ * Ensures that domains with non 7-bit ASCII characters such as those with umlauts are handled properly.
3
+
1
4
  == 0.3.6 (22nd September 2013)
2
5
  * Corrects Gemfile.lock to work properly with bundler
3
6
 
@@ -2,16 +2,18 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  mida (0.3.6)
5
+ addressable (~> 2.3.6)
5
6
  blankslate (= 2.1.2.4)
6
7
  nokogiri (>= 1.5)
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
12
+ addressable (2.3.6)
11
13
  blankslate (2.1.2.4)
12
14
  diff-lcs (1.1.3)
13
- mini_portile (0.5.1)
14
- nokogiri (1.6.0)
15
+ mini_portile (0.5.3)
16
+ nokogiri (1.6.1)
15
17
  mini_portile (~> 0.5.0)
16
18
  rake (10.1.0)
17
19
  rspec (2.10.0)
@@ -1,5 +1,7 @@
1
+ #encoding: utf-8
1
2
  require 'mida/datatype/generic'
2
3
  require 'uri'
4
+ require 'addressable/uri'
3
5
 
4
6
  module Mida
5
7
  module DataType
@@ -10,6 +12,7 @@ module Mida
10
12
 
11
13
  # Raises +ArgumentError+ if value not valid url
12
14
  def initialize(value)
15
+ value = ::Addressable::URI.encode(value)
13
16
  raise ::ArgumentError unless value =~ ::URI::DEFAULT_PARSER.regexp[:ABS_URI]
14
17
  @parsedValue = ::URI.parse(value)
15
18
  end
@@ -1,6 +1,7 @@
1
1
  require 'nokogiri'
2
2
  require 'uri'
3
3
  require 'mida/itemscope'
4
+ require 'addressable/uri'
4
5
 
5
6
  module Mida
6
7
 
@@ -52,6 +53,7 @@ module Mida
52
53
  # This returns an empty string if can't form a valid
53
54
  # absolute url as per the Microdata spec.
54
55
  def make_absolute_url(url)
56
+ url = ::Addressable::URI.encode(url)
55
57
  return url unless URI.parse(url).relative?
56
58
  begin
57
59
  URI.parse(@page_url).merge(url).to_s
@@ -1,3 +1,3 @@
1
1
  module Mida
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.rdoc_options << '--main' << 'README.rdoc'
21
21
  spec.add_dependency('blankslate', '2.1.2.4')
22
22
  spec.add_dependency('nokogiri', '>= 1.5')
23
+ spec.add_dependency('addressable', '~> 2.3.6')
23
24
  spec.add_development_dependency "bundler", "~> 1.3"
24
25
  spec.add_development_dependency "rake"
25
26
  spec.add_development_dependency "rspec", "~> 2.10.0"
@@ -1,3 +1,5 @@
1
+ #encoding: utf-8
2
+ #
1
3
  require 'mida/datatype'
2
4
  require 'yaml'
3
5
 
@@ -20,8 +22,9 @@ describe Mida::DataType::URL do
20
22
  end
21
23
 
22
24
 
23
- it '#parse should accept a valid url' do
24
- url_text = 'http://example.com/test/'
25
+ it '#parse should accept a valid url with special characters' do
26
+ url_text = 'http://example.com/übergangslösung'
25
27
  url = Mida::DataType::URL.parse(url_text)
28
+ url.to_s.should == ::Addressable::URI.encode(url_text)
26
29
  end
27
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mida
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lawrence Woodman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-22 00:00:00.000000000 Z
11
+ date: 2014-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blankslate
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: addressable
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 2.3.6
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 2.3.6
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -451,7 +465,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
451
465
  version: '0'
452
466
  requirements: []
453
467
  rubyforge_project:
454
- rubygems_version: 2.0.7
468
+ rubygems_version: 2.2.2
455
469
  signing_key:
456
470
  specification_version: 4
457
471
  summary: A Microdata parser/extractor library