sticapi_client 0.1.2 → 0.1.3

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: 49b325b1eb2aa8b6daa5f17c481594da32e03989
4
- data.tar.gz: a96b5987bad1a6466322bb618c74382f4ee31f56
3
+ metadata.gz: cf18fe6fad043acaa4128623adffe1163923a40f
4
+ data.tar.gz: 15c597e2f555bc893894ffb4f38d49355e3ee253
5
5
  SHA512:
6
- metadata.gz: 54a71222bdfe435ce391f29dad4b05e849212f88ba6e7e30b11a939a0d7cf58dc3bf214adad2696d55cd1b80d7543b6f1d4888e0a696467b18a774e719a50c63
7
- data.tar.gz: 3731720af9c0719106051a3fbcefaab3e804c36e43d397202dee62b0e338961556c5106decf0793b7fca4156f2c0471ba2fcf336f29a3aebe5679ece557fae0b
6
+ metadata.gz: 50c270950a3356b4695c51a9cc1967ca56657db676c21c3e1b37c43da3d33d0ff935b4342280fb85cfd2baa83edc99aa252c69a8ccd59a1832d5243e3495d41e
7
+ data.tar.gz: '07478757078379e8e0c72455657de08781e2eee5818073ce88b70cd2c6ed5b1bcdf916babb2834b19b42933325311cf8934a7872f16e750fde94e6d6ac1005ce'
@@ -11,6 +11,7 @@ module SticapiClient
11
11
  include Singleton
12
12
 
13
13
  attr_accessor :host
14
+ attr_accessor :urn
14
15
  attr_accessor :port
15
16
  attr_accessor :user
16
17
  attr_accessor :password
@@ -23,8 +24,9 @@ module SticapiClient
23
24
  configs = YAML.load_file("#{Rails.root}/config/sticapi.yml")[Rails.env]
24
25
  # configs = YAML.load_file("/home/ricardo/dev/sticapi_client/lib/generators/sticapi_client/templates/sticapi.yml")[Rails.env]
25
26
  @host = configs['host']
26
- @port = configs['port']
27
+ @port = configs['port'] || 80
27
28
  @user = configs['user']
29
+ @urn = configs['urn'] || '/sticapi'
28
30
  @password = configs['password']
29
31
  @access_token = ''
30
32
  @client = ''
@@ -35,7 +37,7 @@ module SticapiClient
35
37
  def get_token
36
38
  if @access_token.blank?
37
39
  uri = ''
38
- uri = URI.parse("http://#{@host}:#{@port}/auth/sign_in")
40
+ uri = URI.parse("http://#{@host}:#{@port}#{@urn}/auth/sign_in")
39
41
  http = Net::HTTP.new(uri.host, uri.port)
40
42
  request = Net::HTTP::Post.new(uri.request_uri)
41
43
  request['email'] = @user
@@ -1,3 +1,3 @@
1
1
  module SticapiClient
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sticapi_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Viana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-25 00:00:00.000000000 Z
11
+ date: 2017-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails