algorithmia 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -10
- data/lib/algorithmia.rb +1 -1
- data/lib/algorithmia/client.rb +3 -1
- data/lib/algorithmia/requester.rb +1 -1
- data/lib/algorithmia/version.rb +1 -1
- 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: 51997d6c4b76d0f2060359cf4dc5a71cb3e28ec2
|
4
|
+
data.tar.gz: 21d9a1ec1575084d58727fde7d164d33766d418b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e65b7d66bdcfd8dd93cb60848e94ca42a848b9f95ba9e5e2e619ae71f130b71012e9be10ed634783fdc6b0de9cf2aff8fad01270e4523527e039d9bae3a54cce
|
7
|
+
data.tar.gz: a00e98ac2e55dabc88c1e2edd7ab853123c646fc18e37de428a4c6f07b19437470ef26612d5148df4f8e845d1aa4c45c85b29ebb9f676cd4b369e816862025dc
|
data/README.md
CHANGED
@@ -5,16 +5,6 @@ The Algorithmia Ruby client is a wrapper for making calls to the Algorithmia API
|
|
5
5
|
With Algorithmia, you can leverage algorithms written in any language by including them in your Ruby project with a simple API call! Browse the collection of algorithms available on [Algorithmia.com](http://algorithmia.com).
|
6
6
|
|
7
7
|
## Installation
|
8
|
-
|
9
|
-
#### Local Builds:
|
10
|
-
|
11
|
-
Because this gem is yet to be released on ruby gems, follow these instructions to build and use it locally:
|
12
|
-
|
13
|
-
```bash
|
14
|
-
gem build algorithmia.gemspec && gem install algorithmia-0.1.0.gem
|
15
|
-
```
|
16
|
-
|
17
|
-
#### Regular installation:
|
18
8
|
Add this line to your application's Gemfile:
|
19
9
|
|
20
10
|
```ruby
|
data/lib/algorithmia.rb
CHANGED
data/lib/algorithmia/client.rb
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
module Algorithmia
|
2
2
|
class Client
|
3
3
|
attr_reader :api_key
|
4
|
+
attr_reader :api_address
|
4
5
|
|
5
|
-
def initialize(api_key)
|
6
|
+
def initialize(api_key, api_address=nil)
|
6
7
|
@api_key = api_key
|
8
|
+
@api_address = api_address || ENV['ALGORITHMIA_API'] || "https://api.algorithmia.com"
|
7
9
|
end
|
8
10
|
|
9
11
|
def algo(endpoint)
|
@@ -3,9 +3,9 @@ require 'httparty'
|
|
3
3
|
module Algorithmia
|
4
4
|
class Requester
|
5
5
|
include HTTParty
|
6
|
-
base_uri "https://api.algorithmia.com"
|
7
6
|
|
8
7
|
def initialize(client)
|
8
|
+
self.class.base_uri client.api_address
|
9
9
|
@client = client
|
10
10
|
@default_headers = {
|
11
11
|
'Authorization' => @client.api_key || '',
|
data/lib/algorithmia/version.rb
CHANGED
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.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algorithmia
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|