mdurl-rb 1.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +104 -0
- data/lib/mdurl-rb/decode.rb +145 -0
- data/lib/mdurl-rb/encode.rb +100 -0
- data/lib/mdurl-rb/format.rb +28 -0
- data/lib/mdurl-rb/parse.rb +304 -0
- data/lib/mdurl-rb/version.rb +5 -0
- data/lib/mdurl-rb.rb +18 -0
- data/spec/mdurl-rb/decode_spec.rb +112 -0
- data/spec/mdurl-rb/encode_spec.rb +74 -0
- data/spec/mdurl-rb/fixtures/url_spec.rb +704 -0
- data/spec/mdurl-rb/format_spec.rb +9 -0
- data/spec/mdurl-rb/parse_spec.rb +15 -0
- data/spec/spec_helper.rb +4 -0
- metadata +78 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
describe 'parse' do
|
2
|
+
|
3
|
+
URL_TEST_DATA.each_pair do |url, result|
|
4
|
+
|
5
|
+
it "#{url}" do
|
6
|
+
parsed = MDUrl::Url.urlParse(url)
|
7
|
+
|
8
|
+
(expect(parsed.protocol).to eq result['protocol']) if parsed.protocol
|
9
|
+
(expect(parsed.slashes).to eq result['slashes']) if parsed.slashes
|
10
|
+
(expect(parsed.hostname).to eq result['hostname']) if parsed.hostname
|
11
|
+
(expect(parsed.pathname).to eq result['pathname']) if parsed.pathname
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mdurl-rb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Brett Walker
|
8
|
+
- Vitaly Puzrin
|
9
|
+
- Alex Kocharin
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: motion-support
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - "~>"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.2.6
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - "~>"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: 0.2.6
|
29
|
+
description: Ruby version of MDUrl for motion-markdown-it for use with Ruby and RubyMotion
|
30
|
+
email: github@digitalmoksha.com
|
31
|
+
executables: []
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- README.md
|
36
|
+
- lib/mdurl-rb.rb
|
37
|
+
- lib/mdurl-rb/decode.rb
|
38
|
+
- lib/mdurl-rb/encode.rb
|
39
|
+
- lib/mdurl-rb/format.rb
|
40
|
+
- lib/mdurl-rb/parse.rb
|
41
|
+
- lib/mdurl-rb/version.rb
|
42
|
+
- spec/mdurl-rb/decode_spec.rb
|
43
|
+
- spec/mdurl-rb/encode_spec.rb
|
44
|
+
- spec/mdurl-rb/fixtures/url_spec.rb
|
45
|
+
- spec/mdurl-rb/format_spec.rb
|
46
|
+
- spec/mdurl-rb/parse_spec.rb
|
47
|
+
- spec/spec_helper.rb
|
48
|
+
homepage: https://github.com/digitalmoksha/mdurl-rb
|
49
|
+
licenses:
|
50
|
+
- MIT
|
51
|
+
metadata: {}
|
52
|
+
post_install_message:
|
53
|
+
rdoc_options: []
|
54
|
+
require_paths:
|
55
|
+
- lib
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
requirements: []
|
67
|
+
rubyforge_project:
|
68
|
+
rubygems_version: 2.4.5
|
69
|
+
signing_key:
|
70
|
+
specification_version: 4
|
71
|
+
summary: MDUrl for motion-markdown-it in Ruby
|
72
|
+
test_files:
|
73
|
+
- spec/mdurl-rb/decode_spec.rb
|
74
|
+
- spec/mdurl-rb/encode_spec.rb
|
75
|
+
- spec/mdurl-rb/fixtures/url_spec.rb
|
76
|
+
- spec/mdurl-rb/format_spec.rb
|
77
|
+
- spec/mdurl-rb/parse_spec.rb
|
78
|
+
- spec/spec_helper.rb
|