zeke-monkey_patches 0.1.12 → 0.1.15

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.
data/README.textile CHANGED
@@ -7,7 +7,7 @@ h1. Installation
7
7
  gem sources -a http://gems.github.com
8
8
  sudo gem install zeke-monkey_patches
9
9
 
10
- h2. String Methods
10
+ h2. String Methods
11
11
 
12
12
  See lib/monkey_patches.rb for information on all the methods.
13
13
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 1
3
- :patch: 12
3
+ :patch: 15
4
4
  :major: 0
@@ -103,7 +103,7 @@ class String
103
103
 
104
104
  def domain
105
105
  url = self.dup
106
- url=~(/^(?:\w+:\/\/)?([^\/?]+)(?:\/|\?|$)/) ? $1 : nil
106
+ url=~(/^(?:\w+:\/\/)?([^\/?]+)(?:\/|\?|$)/) ? $1 : url
107
107
  end
108
108
 
109
109
  def domain_without_www
@@ -74,6 +74,7 @@ describe "MonkeyPatches" do
74
74
  it "extracts domain from a string" do
75
75
  "http://www.google.com".domain.should == "www.google.com"
76
76
  "http://www.google.com".domain_without_www.should == "google.com"
77
+ "".domain_without_www.should == ""
77
78
  "not a url".domain.should == "not a url"
78
79
  end
79
80
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zeke-monkey_patches
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeke Sikelianos
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-06 00:00:00 -07:00
12
+ date: 2009-05-13 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15