sds-rest 0.1.5 → 0.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.
- data/README.txt +7 -13
- data/lib/sds-rest.rb +10 -11
- data/lib/sds-rest/version.rb +1 -1
- data/spec/authority_spec.rb +1 -1
- data/spec/sdsactiveresource_spec.rb +2 -1
- data/spec/sdsconnection_spec.rb +4 -1
- data/spec/spec_helper.rb +2 -2
- data/website/index.html +1 -1
- metadata +1 -1
data/README.txt
CHANGED
@@ -1,9 +1,6 @@
|
|
1
|
-
= sds-rest
|
2
|
-
|
3
|
-
|
4
1
|
== DESCRIPTION:
|
5
2
|
|
6
|
-
A ruby library for accessing the
|
3
|
+
A ruby library for accessing the Microsoft SQL Data Services REST interface. Microsoft SQL Data Services (SDS), formerly known as SQL Server Data Services (SSDS), are highly scalable, on-demand data storage and query processing utility services. Built on robust SQL Server technologies and Windows Server, SDS provides highly available, secure, standards based web services that are easy to program and provision.
|
7
4
|
|
8
5
|
== FEATURES/PROBLEMS:
|
9
6
|
|
@@ -12,20 +9,17 @@ Active Resource Adapter
|
|
12
9
|
|
13
10
|
== SYNOPSIS:
|
14
11
|
|
15
|
-
|
16
|
-
|
17
12
|
== REQUIREMENTS:
|
18
13
|
|
19
|
-
|
14
|
+
Signup for a SDS account at http://www.microsoft.com/azure/default.mspx and then enter your credentials in spec_helper.rb to run the tests or on the ssds.yml file of your solution.
|
20
15
|
|
21
16
|
== INSTALL:
|
22
17
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
4) Install UUIDTools - cmd line => gem install uuidtools
|
18
|
+
Install Ruby with the One-Click Installer - http://rubyforge.org/frs/download.php/29263/ruby186-26.exe
|
19
|
+
Install Ruby Gems - http://rubyforge.org/frs/download.php/38647/rubygems-1.2.0.zip
|
20
|
+
Install UUIDTools - cmd line => gem install uuidtools
|
21
|
+
Install Hoe - cmd line => gem install hoe
|
22
|
+
Install sds-rest - cmd line => gem install sds-rest
|
29
23
|
|
30
24
|
== LICENSE:
|
31
25
|
|
data/lib/sds-rest.rb
CHANGED
@@ -169,19 +169,18 @@ module SDSRest
|
|
169
169
|
private
|
170
170
|
#execute a request
|
171
171
|
def execute_request(req)
|
172
|
-
|
173
|
-
|
174
|
-
# http.start {|http|
|
175
|
-
# response = http.request(req)
|
176
|
-
# puts response
|
177
|
-
# response
|
178
|
-
# }
|
179
|
-
#
|
172
|
+
http = Net::HTTP.new(get_url, 443)
|
173
|
+
#http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
180
174
|
|
181
|
-
|
182
|
-
|
175
|
+
http.use_ssl = true
|
176
|
+
http.start {|http|
|
183
177
|
response = http.request(req)
|
184
|
-
|
178
|
+
response
|
179
|
+
}
|
180
|
+
|
181
|
+
#Net::HTTP.new(get_url).start {|http|
|
182
|
+
# response = http.request(req)
|
183
|
+
#}
|
185
184
|
end
|
186
185
|
|
187
186
|
#gets the base url to send the request to
|
data/lib/sds-rest/version.rb
CHANGED
data/spec/authority_spec.rb
CHANGED
@@ -12,7 +12,7 @@ class SDSSpec < Test::Unit::TestCase
|
|
12
12
|
assert_respond_to @service, :create_authority
|
13
13
|
end
|
14
14
|
|
15
|
-
should "be able to create an authority" do
|
15
|
+
should "be able to create an authority" do
|
16
16
|
results = @service.create_authority random
|
17
17
|
assert_instance_of Net::HTTPCreated, results
|
18
18
|
end
|
@@ -15,7 +15,8 @@ class SDSSpec < Test::Unit::TestCase
|
|
15
15
|
@service = SDSRest::Service.new
|
16
16
|
@container = random
|
17
17
|
@service.create_container @container
|
18
|
-
|
18
|
+
# enter your authority here
|
19
|
+
Car.site = 'http://zrzjhb.data.beta.mssds.com/' + @container + "/"
|
19
20
|
Car.user = ENV['username']
|
20
21
|
Car.password = ENV['password']
|
21
22
|
end
|
data/spec/sdsconnection_spec.rb
CHANGED
@@ -5,7 +5,10 @@ require File.dirname(__FILE__) + '/spec_helper'
|
|
5
5
|
class SDSSpec < Test::Unit::TestCase
|
6
6
|
context "An SDSActiveResource class" do
|
7
7
|
setup do
|
8
|
-
@
|
8
|
+
@service = SDSRest::Service.new
|
9
|
+
@container = random
|
10
|
+
@service.create_container @container
|
11
|
+
@connection = SDSActiveResource::SDSConnection.new('http://zrzjhb.data.beta.mssds.com/' + @container)
|
9
12
|
end
|
10
13
|
|
11
14
|
should "respond to get_container" do
|
data/spec/spec_helper.rb
CHANGED
@@ -14,8 +14,8 @@ require 'shoulda'
|
|
14
14
|
# if you have not created an authority you can use the SSDS object to do so
|
15
15
|
ENV['username'] = 'username'
|
16
16
|
ENV['password'] = "password"
|
17
|
-
ENV['url'] = "data.
|
18
|
-
ENV['authority'] = '
|
17
|
+
ENV['url'] = "data.database.windows.net"
|
18
|
+
ENV['authority'] = 'zrzjhb'
|
19
19
|
|
20
20
|
def random(length=6)
|
21
21
|
chars = 'abcdefghjkmnpqrstuvwxyz'
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>sds rest</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/sds-rest"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/sds-rest" class="numbers">0.1.
|
36
|
+
<a href="http://rubyforge.org/projects/sds-rest" class="numbers">0.1.6</a>
|
37
37
|
</div>
|
38
38
|
<h1>&#x2192; ‘sds-rest’</h1>
|
39
39
|
<h2>What</h2>
|