shortly 0.2.1 → 0.2.2
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/spec/shortly_spec.rb +8 -2
- metadata +4 -4
data/spec/shortly_spec.rb
CHANGED
@@ -45,10 +45,10 @@ describe "Shortly" do
|
|
45
45
|
@invalid_url = "bagwanpankaj.com"
|
46
46
|
end
|
47
47
|
|
48
|
-
it "should get a short url from
|
48
|
+
it "should get a short url from Is.gd(provided valid url)" do
|
49
49
|
res = Shortly::Clients::Isgd.shorten(@long_url)
|
50
50
|
res.shorturl.should_not be_empty
|
51
|
-
res.shorturl.should == "http://is.gd/
|
51
|
+
res.shorturl.should == "http://is.gd/KasWXL"
|
52
52
|
end
|
53
53
|
|
54
54
|
it "result should be an instance of OpenStruct" do
|
@@ -71,6 +71,7 @@ describe "Shortly" do
|
|
71
71
|
|
72
72
|
#tests for client bitly
|
73
73
|
describe "Bitly" do
|
74
|
+
|
74
75
|
before(:all) do
|
75
76
|
Shortly::Clients::Bitly.login = "modulo9"
|
76
77
|
Shortly::Clients::Bitly.apiKey = "R_0f17f32f11de7e3e953de49c6f255104"
|
@@ -95,6 +96,11 @@ describe "Shortly" do
|
|
95
96
|
end.should raise_error(Shortly::Errors::InvalidURIError)
|
96
97
|
end
|
97
98
|
|
99
|
+
it "should expand a given short url" do
|
100
|
+
res = Shortly::Clients::Bitly.expand("http://bit.ly/dUdiIJ")
|
101
|
+
res.long_url.should == @long_url
|
102
|
+
end
|
103
|
+
|
98
104
|
end
|
99
105
|
|
100
106
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shortly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 2
|
10
|
+
version: 0.2.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Bagwan Pankaj
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-16 00:00:00 +05:30
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|