jelastic 0.1.1 → 0.1.2

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: 530e7a27577ec3e9998584f70760afa569f88202
4
- data.tar.gz: 76ba2dd50a9df4486fdb9caa4df70c70bf4b7b80
3
+ metadata.gz: 61cb2ea36154ab01aeaf03bf2e851fbf045121d3
4
+ data.tar.gz: 6f37618f955a5260722d17f0cb3e65b7c5e9017c
5
5
  SHA512:
6
- metadata.gz: 4e389ca1eb91fef91a29d291240e2ada46b25c142179aae998000a8b9540965436017545b0fee5a8b7d141fd74ade94c7cbc89fbcade53b57a1e075fcfaf39fd
7
- data.tar.gz: 53857abd3b533fa07ecbef84519e7a2f27e64d25be02908624e3100da94db1a253ec0397ec8a056ade0c73e8e3c36319de0dbbbcae4b80d39dd624eef6880f27
6
+ metadata.gz: 32ff0506b2e23818c02042415fdaea3a957f7b02ed187e49ca73aa871339b375e549222db7c16eb668e9b002f7d2cd5114c7155e9cbf90b32afa131248bcda46
7
+ data.tar.gz: ccacbab148e2eaf8405eb627da79895ce27caf835c4687fe37dae27211a23185f3c71dbe2441f8436c1b5e33d93491d85369c505da1748990ec33aff717f6997
@@ -5,7 +5,6 @@ rvm:
5
5
  - 2.2
6
6
  - jruby-9.1.1.0
7
7
  - jruby-head
8
- - rbx-2
9
8
  - ruby-head
10
9
 
11
10
  sudo: false
data/README.md CHANGED
@@ -25,7 +25,9 @@ Or install it yourself as:
25
25
  client = Jelastic::Client.new do |config|
26
26
  config.login = 'LOGIN'
27
27
  config.password = 'PASSWORD'
28
- config.api_url = 'API URL HOST PROVIDER' # e.g. https://app.jelastic.dogado.eu/1.0/
28
+ config.api_url = 'API URL HOST PROVIDER' # e.g. https://app.j.layershift.co.uk/1.0/
29
+ # add unique id to have multiple connections from the same ip
30
+ config.user_agent = nil # e.g. Task1-UniqueID1
29
31
  end
30
32
  ```
31
33
 
@@ -7,7 +7,7 @@ module Jelastic
7
7
  include REST::API
8
8
  extend Forwardable
9
9
 
10
- attr_accessor :login, :password, :api_url
10
+ attr_accessor :login, :password, :api_url, :user_agent
11
11
  attr_reader :user
12
12
 
13
13
  def_delegator :user, :session
@@ -25,7 +25,7 @@ module Jelastic
25
25
 
26
26
  def send
27
27
  uri = URI.join(client.api_url, path)
28
- req = Net::HTTP::Post.new(uri.path)
28
+ req = Net::HTTP::Post.new(uri.path, request_options)
29
29
  req.set_form_data(params)
30
30
 
31
31
  http = Net::HTTP.new(uri.host, uri.port)
@@ -54,5 +54,13 @@ module Jelastic
54
54
  new_path
55
55
  end.join('/')
56
56
  end
57
+
58
+ def request_options
59
+ options = {}
60
+
61
+ options['User-Agent'] = client.user_agent unless client.user_agent.nil?
62
+
63
+ options
64
+ end
57
65
  end
58
66
  end
@@ -1,3 +1,3 @@
1
1
  module Jelastic
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jelastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcin Prokop
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-19 00:00:00.000000000 Z
11
+ date: 2016-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler