treasuryio 0.0.1
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.
- checksums.yaml +7 -0
- data/lib/treasuryio.rb +11 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: a53244b4e3a81661a7d938170b2cd17de4290e68
|
|
4
|
+
data.tar.gz: 5eb9727ef7b9b2f1c13298e726ae53bccbc8257b
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: e5562117e32a16f5af50ce06ab0eb4e69e6150905638abaa634cd223ae4094f8273bb5d9e485d950aadc25893a68ba60394cb8780c9b7642e13d6c29b5f78649
|
|
7
|
+
data.tar.gz: 487bd7000bf7fd7e0fade53891eb40102c71e653f743c8d16b54a1a206eee5539b15bd2fba27dc8157bf9793dc769e49fce789985d79058914b9687fc898c8ea
|
data/lib/treasuryio.rb
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
require 'open-uri'
|
|
3
|
+
require 'cgi'
|
|
4
|
+
|
|
5
|
+
def treasuryio(sql)
|
|
6
|
+
# Use like this:
|
|
7
|
+
# treasuryio('SELECT * FROM t1 limit 3')
|
|
8
|
+
endpoint = 'https://premium.scraperwiki.com/cc7znvq/47d80ae900e04f2/sql/?q='
|
|
9
|
+
body = open(endpoint + (CGI.escape sql)).read
|
|
10
|
+
JSON.parse body
|
|
11
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: treasuryio
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Thomas Levine
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2013-07-10 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: Run queries on US treasury transaction data
|
|
14
|
+
email: csv@treasury.io
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- lib/treasuryio.rb
|
|
20
|
+
homepage: http://treasury.io
|
|
21
|
+
licenses:
|
|
22
|
+
- MIT
|
|
23
|
+
metadata: {}
|
|
24
|
+
post_install_message:
|
|
25
|
+
rdoc_options: []
|
|
26
|
+
require_paths:
|
|
27
|
+
- lib
|
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - '>='
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
34
|
+
requirements:
|
|
35
|
+
- - '>='
|
|
36
|
+
- !ruby/object:Gem::Version
|
|
37
|
+
version: '0'
|
|
38
|
+
requirements: []
|
|
39
|
+
rubyforge_project:
|
|
40
|
+
rubygems_version: 2.0.0
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: treasury.io client
|
|
44
|
+
test_files: []
|