lexurl 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +4 -12
- data/.gitignore +0 -14
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/README.md +0 -31
- data/Rakefile +0 -2
- data/lexurl.gemspec +0 -23
- data/lib/lexurl/version.rb +0 -3
- data/lib/lexurl.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fca21f079b45b459811690cf9f394c537b6cd6b
|
4
|
+
data.tar.gz: ad5c38624dd06067bd835201481f173a1204f86b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abfe1944e26a4fe0c991e7c9362e3837e56308a4cb7767f5ef955fba4d9bfe8c1b291f71fdef52be35a3584ecd8a4913998b6f34be13fdb378775b190848aee0
|
7
|
+
data.tar.gz: a55b01e64faae4cd405c72cf2066560411069ba00a26041c9c9a53bc817f1b640b7be31ac29db6e2d4c7c75d16664a38bb53abed1fadcd103190c03406b78286
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lexurl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- astorre
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,15 +44,7 @@ email:
|
|
44
44
|
executables: []
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
|
-
files:
|
48
|
-
- ".gitignore"
|
49
|
-
- Gemfile
|
50
|
-
- LICENSE.txt
|
51
|
-
- README.md
|
52
|
-
- Rakefile
|
53
|
-
- lexurl.gemspec
|
54
|
-
- lib/lexurl.rb
|
55
|
-
- lib/lexurl/version.rb
|
47
|
+
files: []
|
56
48
|
homepage: ''
|
57
49
|
licenses:
|
58
50
|
- MIT
|
@@ -73,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
65
|
version: '0'
|
74
66
|
requirements: []
|
75
67
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.4.
|
68
|
+
rubygems_version: 2.4.7
|
77
69
|
signing_key:
|
78
70
|
specification_version: 4
|
79
71
|
summary: URL-handler.
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2015 astorre
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# Lexurl
|
2
|
-
|
3
|
-
TODO: Write a gem description
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
gem 'lexurl'
|
11
|
-
```
|
12
|
-
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
$ bundle
|
16
|
-
|
17
|
-
Or install it yourself as:
|
18
|
-
|
19
|
-
$ gem install lexurl
|
20
|
-
|
21
|
-
## Usage
|
22
|
-
|
23
|
-
TODO: Write usage instructions here
|
24
|
-
|
25
|
-
## Contributing
|
26
|
-
|
27
|
-
1. Fork it ( https://github.com/[my-github-username]/lexurl/fork )
|
28
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
-
5. Create a new Pull Request
|
data/Rakefile
DELETED
data/lexurl.gemspec
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'lexurl/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "lexurl"
|
8
|
-
spec.version = Lexurl::VERSION
|
9
|
-
spec.authors = ["astorre"]
|
10
|
-
spec.email = ["bigbenperl@gmail.com"]
|
11
|
-
spec.summary = %q{URL-handler.}
|
12
|
-
spec.description = %q{Tools for URL-string parsing.}
|
13
|
-
spec.homepage = ""
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
end
|
data/lib/lexurl/version.rb
DELETED
data/lib/lexurl.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require "lexurl/version"
|
2
|
-
require "uri"
|
3
|
-
|
4
|
-
module Lexurl
|
5
|
-
class LURL
|
6
|
-
|
7
|
-
def initialize(url)
|
8
|
-
@url = url
|
9
|
-
end
|
10
|
-
|
11
|
-
def get_domain
|
12
|
-
clean = @url.gsub(/^(http:\/\/|\/+)/, "")
|
13
|
-
url_h = 'http://' + clean unless clean.match(/^http:\/\//)
|
14
|
-
host = URI.parse(url_h).host
|
15
|
-
host.gsub(/\Awww\./, "")
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
19
|
-
end
|