url_scrubber 0.7.19 → 0.7.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 743040fbabe8b162af5d06665e9d8b076916097a
4
+ data.tar.gz: 3a620b4a6fff1a137093f2d1fb5be3c6b43ef84f
5
+ SHA512:
6
+ metadata.gz: 1641e258c6f4bccbe75de24bb7132697ed286b2f485cc1ef73ba0576307c15eda16b6e8be11e2cf91386b719c2f476ad04cb4e47a47b433df9e0355166fc5e3f
7
+ data.tar.gz: 6e290b6607c0363c73a25328f8b217a56789ae90793930a11ca78dbe51676a90e3871d17ef878dc1f936fdc8c5ba2bb28f2cf90749afe3ebf57e52f231e40926
@@ -1,3 +1,3 @@
1
1
  module UrlScrubber
2
- VERSION = "0.7.19"
2
+ VERSION = "0.7.20"
3
3
  end
data/lib/url_scrubber.rb CHANGED
@@ -8,11 +8,12 @@ module UrlScrubber
8
8
  def self.scrub(url)
9
9
  url = url.clone # don't modify the original argument
10
10
 
11
- m = url.match(/(https?:\/\/\S*)/i)
11
+ m = url.match(/(htt?ps?:\/\/\S*)/i)
12
12
  return nil unless m
13
13
 
14
14
  url = m[1]
15
15
  url.sub!(/^https/, 'http')
16
+ url.sub!(/^htp/, 'http')
16
17
  url.sub!(/\/+$/, '')
17
18
  url.sub!(/;+$/, '')
18
19
  url.sub!('#!/', '')
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: url_scrubber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.19
5
- prerelease:
4
+ version: 0.7.20
6
5
  platform: ruby
7
6
  authors:
8
7
  - Colin Langton
@@ -12,12 +11,11 @@ authors:
12
11
  autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2014-05-01 00:00:00.000000000 Z
14
+ date: 2014-06-12 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: rspec
19
18
  requirement: !ruby/object:Gem::Requirement
20
- none: false
21
19
  requirements:
22
20
  - - ~>
23
21
  - !ruby/object:Gem::Version
@@ -25,7 +23,6 @@ dependencies:
25
23
  type: :development
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
27
  - - ~>
31
28
  - !ruby/object:Gem::Version
@@ -33,7 +30,6 @@ dependencies:
33
30
  - !ruby/object:Gem::Dependency
34
31
  name: guard-bundler
35
32
  requirement: !ruby/object:Gem::Requirement
36
- none: false
37
33
  requirements:
38
34
  - - ~>
39
35
  - !ruby/object:Gem::Version
@@ -41,7 +37,6 @@ dependencies:
41
37
  type: :development
42
38
  prerelease: false
43
39
  version_requirements: !ruby/object:Gem::Requirement
44
- none: false
45
40
  requirements:
46
41
  - - ~>
47
42
  - !ruby/object:Gem::Version
@@ -49,7 +44,6 @@ dependencies:
49
44
  - !ruby/object:Gem::Dependency
50
45
  name: guard-rspec
51
46
  requirement: !ruby/object:Gem::Requirement
52
- none: false
53
47
  requirements:
54
48
  - - ~>
55
49
  - !ruby/object:Gem::Version
@@ -57,7 +51,6 @@ dependencies:
57
51
  type: :development
58
52
  prerelease: false
59
53
  version_requirements: !ruby/object:Gem::Requirement
60
- none: false
61
54
  requirements:
62
55
  - - ~>
63
56
  - !ruby/object:Gem::Version
@@ -65,7 +58,6 @@ dependencies:
65
58
  - !ruby/object:Gem::Dependency
66
59
  name: terminal-notifier-guard
67
60
  requirement: !ruby/object:Gem::Requirement
68
- none: false
69
61
  requirements:
70
62
  - - ! '>='
71
63
  - !ruby/object:Gem::Version
@@ -73,7 +65,6 @@ dependencies:
73
65
  type: :development
74
66
  prerelease: false
75
67
  version_requirements: !ruby/object:Gem::Requirement
76
- none: false
77
68
  requirements:
78
69
  - - ! '>='
79
70
  - !ruby/object:Gem::Version
@@ -81,7 +72,6 @@ dependencies:
81
72
  - !ruby/object:Gem::Dependency
82
73
  name: rb-fsevent
83
74
  requirement: !ruby/object:Gem::Requirement
84
- none: false
85
75
  requirements:
86
76
  - - ~>
87
77
  - !ruby/object:Gem::Version
@@ -89,7 +79,6 @@ dependencies:
89
79
  type: :development
90
80
  prerelease: false
91
81
  version_requirements: !ruby/object:Gem::Requirement
92
- none: false
93
82
  requirements:
94
83
  - - ~>
95
84
  - !ruby/object:Gem::Version
@@ -118,27 +107,26 @@ files:
118
107
  - url_scrubber.gemspec
119
108
  homepage: http://brandle.net
120
109
  licenses: []
110
+ metadata: {}
121
111
  post_install_message:
122
112
  rdoc_options: []
123
113
  require_paths:
124
114
  - lib
125
115
  required_ruby_version: !ruby/object:Gem::Requirement
126
- none: false
127
116
  requirements:
128
117
  - - ! '>='
129
118
  - !ruby/object:Gem::Version
130
119
  version: '0'
131
120
  required_rubygems_version: !ruby/object:Gem::Requirement
132
- none: false
133
121
  requirements:
134
122
  - - ! '>='
135
123
  - !ruby/object:Gem::Version
136
124
  version: '0'
137
125
  requirements: []
138
126
  rubyforge_project:
139
- rubygems_version: 1.8.21
127
+ rubygems_version: 2.1.10
140
128
  signing_key:
141
- specification_version: 3
129
+ specification_version: 4
142
130
  summary: Clean up URLs.
143
131
  test_files:
144
132
  - spec/spec_helper.rb