wolfram_databin 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -6
- data/lib/wolfram_databin.rb +5 -0
- data/test/coverage/index.html +1 -1
- data/test/test_wolfram.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3c591593d5542f99e0161f8fe29e69d61affc0d
|
4
|
+
data.tar.gz: 4ff955b436ac6d383d30da91ebd1b2e505992732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89b2327ab1313eabce769a7c84955217fedd7c5963fbe816ae6992c14cedf7258eea91fb9556036bfd8cefcc9c36723249fa3680296adbcc713e9b32c65182cd
|
7
|
+
data.tar.gz: 22d17c7ebf03c8ad2f8186d6bd2a257f9ae61422ea455b05200c42559d64daf122966f94a1676b3c1715a138956a206a7c68e5a0d17ec7fe9bc2f7fb1669188c
|
data/README.md
CHANGED
@@ -4,13 +4,11 @@
|
|
4
4
|
Wolfram Databin
|
5
5
|
============
|
6
6
|
|
7
|
-
Post data to a wolfram databin. You can post just about any kind of string data to the databin. Just add more stuff to the query hash and send it. The bin id is merged with the query hash so no need to add the bin id to the query.
|
7
|
+
Post data to a wolfram databin. You can post just about any kind of string data to the databin. Just add more stuff to the query hash and send it. The query hash contains all your data. The bin id is merged with the query hash so no need to add the bin id to the query.
|
8
8
|
|
9
9
|
Note that Mathematica does not like underscores so they are converted to U like mathematica does for Java. This means that your query contents are converted from symbols to string but this has not impact on the data except that the key with an underscore now has a U in it. (eg if you send weekly_revenue it looks like weeklyUrevenue in the datadrop)
|
10
10
|
|
11
|
-
|
12
|
-
=======
|
13
|
-
http://wolfr.am/4PZWVcDT
|
11
|
+
|
14
12
|
|
15
13
|
Usage
|
16
14
|
=======
|
@@ -20,6 +18,13 @@ Usage
|
|
20
18
|
query= {time: Time.now}
|
21
19
|
res=@dbin.post_data(query)
|
22
20
|
|
23
|
-
|
21
|
+
Class usage
|
24
22
|
==============
|
25
|
-
|
23
|
+
WolframDatbin::Base contains all the code but a simple one class submission is available at WolframDatabin.submit_data(shortid, hash of data)
|
24
|
+
|
25
|
+
WolframDatbin.submit_data("4PZWVcDT",{time: Time.now})
|
26
|
+
WolframDatbin::Base.submit_data("4PZWVcDT",{time: Time.now})
|
27
|
+
|
28
|
+
Test URL
|
29
|
+
=======
|
30
|
+
http://wolfr.am/4PZWVcDT
|
data/lib/wolfram_databin.rb
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__)) unless
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
3
|
Dir[File.join(File.dirname(__FILE__), 'wolfram_databin/**/*.rb')].sort.each { |lib| require lib }
|
4
|
+
|
4
5
|
|
5
6
|
module WolframDatabin
|
6
7
|
VERSION = '0.0.1'
|
8
|
+
def self.submit_data(tshortid,aquery)
|
9
|
+
dbin=WolframDatabin::Base.new
|
10
|
+
dbin.submit_data(tshortid,aquery)
|
11
|
+
end
|
7
12
|
end
|
data/test/coverage/index.html
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<img src="./assets/0.10.0/loading.gif" alt="loading"/>
|
15
15
|
</div>
|
16
16
|
<div id="wrapper" style="display:none;">
|
17
|
-
<div class="timestamp">Generated <abbr class="timeago" title="2015-07-
|
17
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2015-07-19T09:37:57+08:00">2015-07-19T09:37:57+08:00</abbr></div>
|
18
18
|
<ul class="group_tabs"></ul>
|
19
19
|
|
20
20
|
<div id="content">
|
data/test/test_wolfram.rb
CHANGED
@@ -43,6 +43,11 @@ class WolframDatabinTest < Minitest::Test
|
|
43
43
|
res=@dbin.submit_data("4PZWVcDT",{submit_time: Time.now})
|
44
44
|
assert res[:success], "response should be success #{res} #{@dbin.datadrop_url}"
|
45
45
|
|
46
|
+
end
|
47
|
+
def test_toplevel_submit_classs
|
48
|
+
res = WolframDatabin.submit_data("4PZWVcDT",{submit_class: Time.now})
|
49
|
+
assert res[:success], "response should be success #{res} "
|
50
|
+
|
46
51
|
end
|
47
52
|
def test_submit_class
|
48
53
|
res = WolframDatabin::Base.submit_data("4PZWVcDT",{classubmittime: Time.now})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wolfram_databin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Sproule
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Upload data to wolfram databin mathematica via ruby
|
14
14
|
email: scott.sproule@ficonab.com
|