allegro_api_client 0.0.3 → 0.0.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: 989b91d20ef4dda4be2be9a22ec35ac4dfe4f34f
4
- data.tar.gz: 97093fe256eda37a41bebcdafa58e6697288eb26
3
+ metadata.gz: 1349c57a3383110ca70aef4fd493572959b63c3f
4
+ data.tar.gz: 7270a32663152a223310a1fed85c087bb5256e45
5
5
  SHA512:
6
- metadata.gz: 88c314cb44a0816bfa657dacfef56c65bcb5c62083f50e492159d7f4da0904a618e04f4e688a16053d0cff2f35870e2e13f279e2ae6931f2e2b889fcc57db0ab
7
- data.tar.gz: 596550bc515b7000281275acd3cd1b2fb9604dbf296da87dd092cfcbc31d2fcfa949ab645b1f60accbaff2fd84de73afff1ceb3c3e4c1ccd1bd8638063b3a928
6
+ metadata.gz: 65e502c1abe96656e30265671283503031bf985b9f48ef77196b25b673f5d5fdce47eede42f18bd0ffc953653dba8e6997a99d4e3a2d63df01be9bcb7c02820f
7
+ data.tar.gz: 458f95d6ecc915d5a0ebc67f25538969627ffff9925dee2fad172ebe8d3cc3818f11254a9e721ad4686ba5b86dc63b97f545fcdf7f12723d6d7e0ed8fbdfd75c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- allegro_api_client (0.0.3)
4
+ allegro_api_client (0.0.4)
5
5
  httparty
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -17,7 +17,7 @@ Or install it yourself as:
17
17
  $ gem install allegro_api_client
18
18
 
19
19
  ## Usage
20
- require 'APIClient'
20
+ require 'allegro_api_client'
21
21
 
22
22
  api_client = ApiClient.new
23
23
  response = api_client.get(path:"/companies?key=id&value=Allegro Networks Ltd")
data/apiclient.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "allegro_api_client"
7
- spec.version = '0.0.3'
7
+ spec.version = '0.0.4'
8
8
  spec.authors = ["@ruby_gem"]
9
9
  spec.email = ["developers@allegro.net"]
10
10
  spec.summary = %q{httpparty wrapper}
@@ -3,7 +3,7 @@ require 'httparty'
3
3
 
4
4
  class APIClient
5
5
  def initialize(http_client:HTTParty)
6
- @base_uri = ENV['DATABASE_URI']
6
+ @base_uri = ENV['API_URI']
7
7
  @auth = {username:'snap', password:ENV['AUTH_TOKEN']}
8
8
  @http_client = http_client
9
9
  end
data/rakefile.rb CHANGED
@@ -30,4 +30,10 @@ end
30
30
 
31
31
  def rake_sh(command)
32
32
  sh command, @run_options
33
+ end
34
+
35
+ task :publish do
36
+ rake_sh('rm -rf pkg')
37
+ rake_sh('rake install')
38
+ puts "gem push ./pkg/*.gem"
33
39
  end
@@ -2,10 +2,16 @@ require 'test/unit'
2
2
  require_relative '../lib/allegro_api_client'
3
3
 
4
4
  class APIClientTests < Test::Unit::TestCase
5
+ def test_environment_variables
6
+ assert_not_nil ENV['API_URI'], "You need to set the API_URI environment variable"
7
+ assert_not_nil ENV['AUTH_TOKEN'], "You need to set the AUTH_TOKEN environment variable"
8
+ end
9
+
5
10
  def test_get
11
+ ENV['API_URI'] = 'https://bob.com'
6
12
  api_client = APIClient.new http_client:self
7
13
  api_client.get(path:'/bob face')
8
- assert_equal('https://allegro-test-database.herokuapp.com/bob%20face',@path)
14
+ assert_equal('https://bob.com/bob%20face',@path)
9
15
  end
10
16
 
11
17
  def get(path, options)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: allegro_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "@ruby_gem"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-17 00:00:00.000000000 Z
11
+ date: 2014-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler