wolfram-alpha 0.3 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00652f21bcb2490794e8336b9358369c1229251d
4
- data.tar.gz: fe54230b01c9511646c62a9daea873de63d13dde
3
+ metadata.gz: 732e884a18bb02dbaa63aa7ae191ba0b30bd0570
4
+ data.tar.gz: 7754338dc2de2bb6926ddcce23cad1627135fe36
5
5
  SHA512:
6
- metadata.gz: 3fdf8b6086f5ed6b3057425aaa6bc94ac9b0edc13fd21a31c75b55df983db14299b605763d1aac331481c15d7e059013f002bab290b1a3be137d5b5afed21371
7
- data.tar.gz: ea2c7ec6cc2de5926d27d97863fb37aa29660bbbca258d33391f96e4a8fa7e5f7f37890f057ffc28a501a360528c020bf5713fc992829203cf97f07d9664d7af
6
+ metadata.gz: 12ce3f67cd49125919bab8590f732b8b4675f0a7b3fb05ab1f504c8764d339183d681b05ab75c2a88e37a56e342eeedf7bd3ec3513e9d219c1d39e93fca3769f
7
+ data.tar.gz: 8622004c7b61e771fce3d26d59ef2701c3a5eb45d531dca5c4b14844aba614cdd52f7120f4fc1a839a9cb2055d10d77674babbedd3d7c40621715279567a3ea5
@@ -16,7 +16,7 @@ require 'wolfram-alpha/response'
16
16
  # @author Mikkel Kroman
17
17
  module WolframAlpha
18
18
  # The current version of the WolframAlpha library.
19
- Version = "0.3"
19
+ Version = "0.3.1"
20
20
 
21
21
  # The API request-uri.
22
22
  RequestURI = URI "http://api.wolframalpha.com/v2/query"
@@ -7,8 +7,8 @@ module WolframAlpha
7
7
 
8
8
  # The default options for a new client, it is merged with the options
9
9
  # set upon initialization.
10
- DefaultOptions = {
11
- timeout: 1
10
+ Options = {
11
+ timeout: 15
12
12
  }
13
13
 
14
14
  # Initialize a new client to communicate with the Wolfram|Alpha API.
@@ -21,7 +21,7 @@ module WolframAlpha
21
21
  def initialize token, options = {}
22
22
  @http = Net::HTTP.new RequestURI.host, RequestURI.port
23
23
  @token = token or raise "Invalid token"
24
- @options = DefaultOptions.merge options
24
+ @options = Options.merge options
25
25
  end
26
26
 
27
27
  # Compute the result of +input+, and return a new response.
@@ -30,7 +30,7 @@ module WolframAlpha
30
30
  #
31
31
  # @return [Response] The parsed response object.
32
32
  def query input
33
- response = @http.get request_url(input)
33
+ response = @http.get request_url(input).request_uri
34
34
  document = Nokogiri::XML response.body
35
35
 
36
36
  if document.root.name == "queryresult"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolfram-alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Kroman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-02 00:00:00.000000000 Z
11
+ date: 2013-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -24,20 +24,34 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description:
28
42
  email: mk@uplink.io
29
43
  executables: []
30
44
  extensions: []
31
45
  extra_rdoc_files: []
32
46
  files:
33
- - library/wolfram-alpha/client.rb
47
+ - library/wolfram-alpha.rb
48
+ - library/wolfram-alpha/subpod.rb
34
49
  - library/wolfram-alpha/pod.rb
50
+ - library/wolfram-alpha/client.rb
35
51
  - library/wolfram-alpha/response.rb
36
- - library/wolfram-alpha/subpod.rb
37
- - library/wolfram-alpha.rb
38
52
  homepage: https://github.com/mkroman/wolfram-alpha
39
53
  licenses:
40
- - Internet Systems Consortium (ISC)
54
+ - MIT
41
55
  metadata: {}
42
56
  post_install_message:
43
57
  rdoc_options: []
@@ -55,11 +69,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
69
  version: '0'
56
70
  requirements: []
57
71
  rubyforge_project:
58
- rubygems_version: 2.0.0
72
+ rubygems_version: 2.1.3
59
73
  signing_key:
60
74
  specification_version: 4
61
75
  summary: Wolfram|Alpha introduces a fundamentally new way to get knowledge and answers
62
76
  — not by searching the web, but by doing dynamic computations based on a vast collection
63
77
  of built-in data, algorithms, and methods.
64
78
  test_files: []
65
- has_rdoc: