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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15bebf58e21513e4d156ac2cf371be83a716751e
4
- data.tar.gz: 2318772a07f846302e7552081d8cd410e1c298c6
3
+ metadata.gz: 51997d6c4b76d0f2060359cf4dc5a71cb3e28ec2
4
+ data.tar.gz: 21d9a1ec1575084d58727fde7d164d33766d418b
5
5
  SHA512:
6
- metadata.gz: 46a702c1c1c063e808978b7746f033ce6de312fa3af45bd27b86a2cabf4cfbf73555e724110fe2939d29b6a57a8a7a2a437bb9bc3b470793418a581917b34810
7
- data.tar.gz: 324a9e6ae7c64e6ac749d28e7958903448ce885f6920d054a6970fa44640eb122cbf3d8ff532c1cb58b3143fa6fc21f57377d4d97e644b2fe07c8fea0fd6f26a
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
@@ -24,7 +24,7 @@ module Algorithmia
24
24
  Algorithmia::UnauthenticatedClient.new.dir(data_uri)
25
25
  end
26
26
 
27
- def client(api_key)
27
+ def client(api_key=nil)
28
28
  Algorithmia::Client.new(api_key)
29
29
  end
30
30
  end
@@ -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 || '',
@@ -1,3 +1,3 @@
1
1
  module Algorithmia
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  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.9.0
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-13 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler