wolfram_databin 0.1.1 → 0.1.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -2
- data/lib/wolfram_databin/base.rb +9 -0
- data/test/coverage/index.html +1 -1
- data/test/test_wolfram.rb +10 -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: 4e733cc3c55e931304a1933fb5e1367924dcb037
|
4
|
+
data.tar.gz: f7ac9124f8c675a612b873765e1960f2ce5bf6be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94e42934a7daf6e05df5c9d1e44e91e9f4eb3dd4c1905f4932da12f7e71d55c98adc1ee71e731baf76d589f4ba57eb92b78fc327f86706d598c0cfd01ed2c31a
|
7
|
+
data.tar.gz: e60257184000f2d006c56dd554278508689884b4f9e90896ae652ea6324dc3662737eb9615481d698f0869d4bdcd2223b08a3b0820b8846e36d076416477c58d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
Wolfram Databin
|
5
5
|
============
|
6
6
|
|
7
|
-
|
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.
|
8
8
|
|
9
9
|
Test URL
|
10
10
|
=======
|
@@ -15,6 +15,9 @@ Usage
|
|
15
15
|
|
16
16
|
@dbin=WolframDatabin::Base.new
|
17
17
|
@dbin.set_shortid("4PZWVcDT")
|
18
|
-
query= {time:
|
18
|
+
query= {time: Time.now}
|
19
19
|
res=@dbin.post_data(query)
|
20
20
|
|
21
|
+
One shot usage
|
22
|
+
==============
|
23
|
+
WolframDatbin::Base.submit_data("4PZWVcDT",{time: Time.now})
|
data/lib/wolfram_databin/base.rb
CHANGED
@@ -20,6 +20,15 @@ module WolframDatabin
|
|
20
20
|
url="https://datadrop.wolframcloud.com/api/v1.0/Add?"
|
21
21
|
url
|
22
22
|
end
|
23
|
+
def self.submit_data(tshortid,aquery)
|
24
|
+
dbin=WolframDatabin::Base.new
|
25
|
+
dbin.submit_data(tshortid,aquery)
|
26
|
+
end
|
27
|
+
def submit_data(tshortid,aquery)
|
28
|
+
self.set_shortid(tshortid)
|
29
|
+
res=self.post_data(aquery)
|
30
|
+
res
|
31
|
+
end
|
23
32
|
def post_data(query)
|
24
33
|
raise "short id not set" if self.shortid==nil
|
25
34
|
res=''
|
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-05-
|
17
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2015-05-16T12:04:41+08:00">2015-05-16T12:04:41+08:00</abbr></div>
|
18
18
|
<ul class="group_tabs"></ul>
|
19
19
|
|
20
20
|
<div id="content">
|
data/test/test_wolfram.rb
CHANGED
@@ -30,6 +30,16 @@ class WolframDatabinTest < Minitest::Test
|
|
30
30
|
puts "result is #{res}"
|
31
31
|
assert res[:success], "response should be success #{res}"
|
32
32
|
end
|
33
|
+
def test_submit
|
34
|
+
res=@dbin.submit_data("4PZWVcDT",{submit_time: Time.now})
|
35
|
+
assert res[:success], "response should be success #{res} #{@dbin.datadrop_url}"
|
36
|
+
|
37
|
+
end
|
38
|
+
def test_submit_class
|
39
|
+
res = WolframDatabin::Base.submit_data("4PZWVcDT",{clas_submit_time: Time.now})
|
40
|
+
assert res[:success], "response should be success #{res} "
|
41
|
+
|
42
|
+
end
|
33
43
|
|
34
44
|
|
35
45
|
end
|
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.2
|
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-05-
|
11
|
+
date: 2015-05-16 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
|