algorithmia 0.1.0 → 0.2.0

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: e447a94758db3ef21b6c33d5bc51a91fd2ea8fa9
4
- data.tar.gz: bc2751c57b973ebe204b23581b9faebf370dd496
3
+ metadata.gz: 3e320f18a0a2c63b461e158fe6667eefb3cdb28d
4
+ data.tar.gz: 21b544a00dce997e0537d0a76b8fc77a4517699d
5
5
  SHA512:
6
- metadata.gz: fa48bb6e91d94bd0074385bf18ad1d40f90370232e8efc38f3f18bc0e3fbd11fdf8f411707ab95c8aaa0f1123f06d669d39c6f2c5a9630f56250a61b04648159
7
- data.tar.gz: aace9f5700afb51664469bd848ca1b03675eece28440b330d5a5b4dc0a0b49bfacc0ffaa84c2cd80753959f20944f107392f4fbb65d66011847bc1a4d6135ede
6
+ metadata.gz: 9405aabdc8d2ca3b7d26facb3aa792307790ec19dbf77123cdcc3d0fc3dce172f3ca033605e460d951d5d7efa4d514d7e544df25a27dfabea5bb66fd54fa62b5
7
+ data.tar.gz: 6ddbca4ad8bb320253afe4eaf0c367a9291871e130495d140ab76c137ecc5888cc80392f7be00827f0ef438dc599b4e4290dfee9aeccf2997d64b8e7b8662dd2
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.2.0
1
+ 2.2
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
- ruby "2.2.0"
2
1
  source "https://rubygems.org"
3
2
 
4
3
  gem "httparty", "~> 0.13.1"
data/algorithmia.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.authors = ["Bilawal Hameed"]
18
18
  spec.email = 'bilawal@studenthack.com'
19
19
  spec.homepage = 'http://github.com/bih/algorithmia'
20
-
20
+
21
21
  spec.files = `git ls-files`.split("\n").select{ |f| f[-4..-1] != ".gem" }
22
22
  spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
23
  spec.require_paths = ["lib"]
data/lib/algorithmia.rb CHANGED
@@ -13,6 +13,6 @@ require 'algorithmia/http'
13
13
 
14
14
  class Algorithmia
15
15
  def self.call(endpoint, input)
16
- post_http("/api/#{endpoint}", input)
16
+ post_http("/#{endpoint}", input.to_json)
17
17
  end
18
18
  end
@@ -9,6 +9,6 @@ class Algorithmia
9
9
  include Singleton
10
10
  include HTTParty
11
11
 
12
- base_uri "https://api.algorithmia.com"
12
+ base_uri "https://api.algorithmia.com/v1/algo"
13
13
  format :json
14
14
  end
@@ -7,12 +7,12 @@ class Algorithmia
7
7
 
8
8
  def self.post_http(endpoint, params = {})
9
9
  params = params.to_s unless params.is_a?(Hash)
10
- parse_output post(endpoint, body: params, headers: { "Authorization" => @api_key, "Accept" => "application/json" })
10
+ parse_output post(endpoint, body: params, headers: { "Authorization" => @api_key, "Content-Type" => "application/json" })
11
11
  end
12
12
 
13
13
  def self.get_http(endpoint, params = {})
14
14
  params = params.to_s unless params.is_a?(Hash)
15
- parse_output get(endpoint, query: params, headers: { "Authorization" => @api_key, "Accept" => "application/json" })
15
+ parse_output get(endpoint, query: params, headers: { "Authorization" => @api_key, "Content-Type" => "application/json" })
16
16
  end
17
17
 
18
18
  def self.parse_output(res)
@@ -3,5 +3,5 @@
3
3
  # http://github.com/bih/algorithmia
4
4
 
5
5
  class Algorithmia
6
- VERSION = "0.1.0"
6
+ VERSION = "0.2.0"
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algorithmia
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bilawal Hameed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-15 00:00:00.000000000 Z
11
+ date: 2015-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.4.5
112
+ rubygems_version: 2.4.6
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Ruby library for interacting with Algorithmia.com