url_tokenizer 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/url_tokenizer/wowza.rb +6 -3
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 387acfac7178d45f41b053b81a9b866d62e49ca1
4
- data.tar.gz: 3df2078eb6f0039e11319e7a63d1923bea94ab33
3
+ metadata.gz: c9a438bd0d7b7cfa2d7fbfc6d366cdaf3f0d487c
4
+ data.tar.gz: 58c59197687088a2392fe93a76ecd8efbd77d700
5
5
  SHA512:
6
- metadata.gz: 707c34f2baf45c69f30fa7662f172f7ad3fcfdd9c3f7e12ceb904ff1463e6f30d3ef47f8e7276bd6ccca91219f3fdf1feecad97e85d4792630ca7f96510d82ff
7
- data.tar.gz: fcd4d1b956159ce3d9958ddfc9b6635eb11e65d0897dff95c263183e8ab72f45317a2db1ec7fc0f29a3ec0b48e7eaed43950de562794ab76708e93001b3c5e98
6
+ metadata.gz: ba59924cc949f8f24fb61471f41246ee268e321bff6a87394634955f7424524d96b6fd568d9e77aa6d6ecbed7e573bbc6cd0234246fb3bc0096cdf8fa8810878
7
+ data.tar.gz: db0a7ec9e789a35c36b7346f47e7e7fb6872fe9395d5545463fed173bf4c84b9de26bd7c6ba85cce82bd45560587f91890c2af2ba0548c9efe69827a5d1c8186
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.5
1
+ 1.1.6
@@ -7,9 +7,10 @@ module UrlTokenizer
7
7
  class Wowza < Provider
8
8
  def call(input_url, **options)
9
9
  options = global_options.merge options
10
+ ignore_in_path = options.delete :ignore_in_path
10
11
  uri = URI.parse input_url
11
12
 
12
- folder_path = get_path uri
13
+ folder_path = get_path uri, ignore_in_path
13
14
  return if folder_path.empty? || folder_path == '/'
14
15
 
15
16
  uri.query = encode_query folder_path, build_options(options)
@@ -17,8 +18,10 @@ module UrlTokenizer
17
18
  end
18
19
 
19
20
  private
20
- def get_path(uri)
21
- File.dirname(uri.path)[1..-1] # remove leading / or .
21
+ def get_path(uri, ignore_in_path)
22
+ File.dirname(uri.path)[1..-1].tap do |path|
23
+ path.gsub!(ignore_in_path, '') if ignore_in_path
24
+ end
22
25
  end
23
26
 
24
27
  def digest(url)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_tokenizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Paramonov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-13 00:00:00.000000000 Z
11
+ date: 2016-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facets
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubyforge_project:
141
- rubygems_version: 2.4.6
141
+ rubygems_version: 2.4.5.1
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: Tokenize url by variety of providers.