cloudxls 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/cloudxls.gemspec +3 -3
- data/lib/cloudxls/version.rb +1 -1
- data/lib/cloudxls.rb +8 -8
- metadata +5 -5
data/cloudxls.gemspec
CHANGED
@@ -5,9 +5,9 @@ require "cloudxls/version"
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "cloudxls"
|
7
7
|
gem.authors = ["Sebastian Burkhard"]
|
8
|
-
gem.email = ["
|
9
|
-
gem.description = %q{
|
10
|
-
gem.summary = %q{
|
8
|
+
gem.email = ["seb@cloudxls.com"]
|
9
|
+
gem.description = %q{Ruby wrapper for the CloudXLS xpipe API}
|
10
|
+
gem.summary = %q{Ruby wrapper for the CloudXLS xpipe API}
|
11
11
|
gem.homepage = "https://cloudxls.com"
|
12
12
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
13
13
|
gem.files = `git ls-files`.split("\n")
|
data/lib/cloudxls/version.rb
CHANGED
data/lib/cloudxls.rb
CHANGED
@@ -23,7 +23,7 @@ module CloudXLS
|
|
23
23
|
"http#{@https ? 's' : ''}://#{@api_key}:@#{@api_base}/api/v1/#{path}"
|
24
24
|
end
|
25
25
|
|
26
|
-
class
|
26
|
+
class XpipeResponse
|
27
27
|
attr_reader :url, :uuid, :response
|
28
28
|
|
29
29
|
def initialize(response)
|
@@ -34,24 +34,24 @@ module CloudXLS
|
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
# CloudXLS.
|
38
|
-
# CloudXLS.
|
39
|
-
# CloudXLS.
|
40
|
-
# CloudXLS.
|
37
|
+
# CloudXLS.xpipe :data => File.new('/path/to/data.csv', 'r')
|
38
|
+
# CloudXLS.xpipe :data => File.new("foo,bar\nlorem,ipsum")
|
39
|
+
# CloudXLS.xpipe :data_url => "https://example.com/data.csv"
|
40
|
+
# CloudXLS.xpipe :data_url => "https://username:password@example.com/data.csv"
|
41
41
|
#
|
42
|
-
def self.
|
42
|
+
def self.xpipe(params = {})
|
43
43
|
check_api_key!
|
44
44
|
|
45
45
|
headers = {}
|
46
46
|
|
47
47
|
response = execute_request do
|
48
|
-
RestClient.post(api_url("
|
48
|
+
RestClient.post(api_url("xpipe"), params, headers)
|
49
49
|
end
|
50
50
|
|
51
51
|
if params[:mode].to_s == 'inline'
|
52
52
|
response
|
53
53
|
else
|
54
|
-
|
54
|
+
XpipeResponse.new(response)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudxls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-11-
|
12
|
+
date: 2013-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -97,9 +97,9 @@ dependencies:
|
|
97
97
|
- - ! '>='
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
|
-
description:
|
100
|
+
description: Ruby wrapper for the CloudXLS xpipe API
|
101
101
|
email:
|
102
|
-
-
|
102
|
+
- seb@cloudxls.com
|
103
103
|
executables: []
|
104
104
|
extensions: []
|
105
105
|
extra_rdoc_files: []
|
@@ -135,5 +135,5 @@ rubyforge_project:
|
|
135
135
|
rubygems_version: 1.8.23
|
136
136
|
signing_key:
|
137
137
|
specification_version: 3
|
138
|
-
summary:
|
138
|
+
summary: Ruby wrapper for the CloudXLS xpipe API
|
139
139
|
test_files: []
|