panda 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.8
1
+ 0.4.9
@@ -41,7 +41,7 @@ class Panda
41
41
 
42
42
  def initialize(auth_params)
43
43
  @api_version = 2
44
-
44
+
45
45
  if auth_params.class == String
46
46
  init_from_url(auth_params)
47
47
  else
@@ -118,8 +118,7 @@ class Panda
118
118
 
119
119
 
120
120
  def init_from_url(url)
121
- params = url.scan(/^([^:@]+):([^:@]+)@([^:@]+)(:[\d]+)?\/([^:@]+)$/).flatten
122
-
121
+ params = url.scan(/http:\/\/([^:@]+):([^:@]+)@([^:@]+)(:[\d]+)?\/([^:@]+)$/).flatten
123
122
  @access_key = params[0]
124
123
  @secret_key = params[1]
125
124
  @cloud_id = params[4]
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{panda}
8
- s.version = "0.4.8"
8
+ s.version = "0.4.9"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["New Bamboo"]
12
- s.date = %q{2010-03-19}
12
+ s.date = %q{2010-03-30}
13
13
  s.description = %q{Panda Client}
14
14
  s.email = %q{info@pandastream.com}
15
15
  s.extra_rdoc_files = [
@@ -77,7 +77,7 @@ describe Panda do
77
77
 
78
78
  describe "Connected with a string url" do
79
79
  before(:each) do
80
- @panda = Panda::Connection.new("my_access_key:my_secret_key@myapihost:85/my_cloud_id")
80
+ @panda = Panda::Connection.new('http://my_access_key:my_secret_key@myapihost:85/my_cloud_id')
81
81
  end
82
82
 
83
83
  it_should_behave_like "Connected"
@@ -90,6 +90,14 @@ describe Panda do
90
90
  end
91
91
  it_should_behave_like "Connected"
92
92
  end
93
+
94
+ describe "Panda.connect with PANDASTREAM_URL" do
95
+ before(:each) do
96
+ Panda.connect!('http://my_access_key:my_secret_key@myapihost:85/my_cloud_id')
97
+ @panda = Panda
98
+ end
99
+ it_should_behave_like "Connected"
100
+ end
93
101
  describe "Panda::Connection.new" do
94
102
  before(:each) do
95
103
  @panda = Panda::Connection.new({"access_key" => "my_access_key", "secret_key" => "my_secret_key", "api_host" => "myapihost", "api_port" => 85, "cloud_id" => 'my_cloud_id' })
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 8
9
- version: 0.4.8
8
+ - 9
9
+ version: 0.4.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - New Bamboo
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-19 00:00:00 +00:00
17
+ date: 2010-03-30 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency