wolfram_databin 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d97c4291a955f1ef6d8f955edf26768c0293c86
4
- data.tar.gz: 2cbc4847dfb99f194e10538d8b91696231eedd08
3
+ metadata.gz: bf0667593a674d257fecf2a1a64506155168719a
4
+ data.tar.gz: 8a4d62636bf5f30b80624abc3c361d127418ef24
5
5
  SHA512:
6
- metadata.gz: 6cedc5cf163368926a735fa84b30964e09f2f5deb2c866de4d1b6bd9b6d7b01de5f958b888883c83cebe648e5ffcceb324a29848c5c0c4d94880dc5f02222e5b
7
- data.tar.gz: 54ff1829c98cfe28270d5d83d94cb59a32c786a352b19af51ec7194f42efe015d2a9e386a1ca4d1e0b64533188843a23f32f96936f297f1ee04cb12c7d7a941b
6
+ metadata.gz: b863805d1502fe26a9b82c6f3ca0e1376c1dda906d8e8afb6d6cab5a1017641c2b0d264b0638d8f98cf54bd4277b8711fe96405f5dea954c37628a878c2be591
7
+ data.tar.gz: 253179ac3eadcf8c466fe47f57cca296c334b0bba96aff1be67ced4736c569d587ef60221e9718585b7f616a8b02117b084f1c410872c35c8165af6c7393e616
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wolfram_databin (0.1.3)
4
+ wolfram_databin (0.1.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -6,6 +6,8 @@ Wolfram Databin
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
+ 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
+
9
11
  Test URL
10
12
  =======
11
13
  http://wolfr.am/4PZWVcDT
@@ -47,8 +47,7 @@ module WolframDatabin
47
47
  Timeout::timeout(40) do
48
48
  # @uri=URI.parse(self.get_url)
49
49
  q=self.get_url + Hurley::Query::Flat.new(qdata).to_s
50
- puts "url is #{q}"
51
- puts "uri #{@uri} query #{qdata}" if self.debug_flag
50
+ puts "url #{q} query #{qdata}" if self.debug_flag
52
51
  res=Hurley.get(q)
53
52
  end
54
53
  rescue Exception => e
@@ -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-18T10:20:36+08:00">2015-07-18T10:20:36+08:00</abbr></div>
17
+ <div class="timestamp">Generated <abbr class="timeago" title="2015-07-18T10:50:25+08:00">2015-07-18T10:50:25+08:00</abbr></div>
18
18
  <ul class="group_tabs"></ul>
19
19
 
20
20
  <div id="content">
@@ -22,6 +22,15 @@ class WolframDatabinTest < Minitest::Test
22
22
  def test_datadrop_url
23
23
  assert @dbin.datadrop_url=="http://wolfr.am/4PZWVcDT", "should have short id #{@dbin.datadrop_url}"
24
24
  end
25
+ def test_query_fixer
26
+ time=Time.now
27
+ query= {time: time, new_time: time }
28
+ res=@dbin.fix_query(query)
29
+ assert res[:time]==nil, "symbol to string unchanged"
30
+ assert res['time']==time, "time unchanged"
31
+ assert res[:new_time]==nil, "new time nil"
32
+ assert res['newUtime']==time, "new time has U rather than underscore"
33
+ end
25
34
 
26
35
  def test_postdatabin
27
36
  time=Time.now
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolfram_databin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Sproule