epom 0.9.2 → 0.9.4

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: 704a1517489f105e9f8b4b60715cd2fbc935d073
4
- data.tar.gz: 81b3b9ece2afb49ae2d3ff75b709afa87c65b98b
3
+ metadata.gz: 9e9c4113502fefbc5778f90f4628a2250a020696
4
+ data.tar.gz: 87235b12a06a778f3715e8987db9b7f80a443463
5
5
  SHA512:
6
- metadata.gz: 9e19efee295eb68d2e0f8a212efb82a7dfc6f3aeb40b98812106a01d4999f3d1496fb6e529192f302210b94b2b9aa76af2efc960551094513e497fcd4c98901e
7
- data.tar.gz: 02951bda3a96026067cb322ee6ac4541d5f4917961f52d74a8b2d056559a94caba8a1c38306630e453715f9b4f15d77106a5906fd80946b0c364ff967948c0d4
6
+ metadata.gz: d2cfb0b0537ff0e3446d00e5e8a5846cb630059d57704c3d9bf2d528e95dc797b25acba45ab94313b7ba82cd6628c6672f4b3dd4fd7d67202f9ae05f23553b1c
7
+ data.tar.gz: d7402c2236109432922ed6f62c96f88244de4f5e6a6e590107e24faf88a7055e14f1962cc6db3e2688e2cd3fbdfd0b9a25c90f04e42ecc3d88358ca38f6e0103
@@ -17,9 +17,13 @@ module Epom
17
17
  # need a Class for 3.0
18
18
  class Configuration #:nodoc:
19
19
  include ActiveSupport::Configurable
20
- config_accessor :public_key
21
- config_accessor :private_key
22
20
  config_accessor :epom_server
21
+ config_accessor :username
22
+ config_accessor :password
23
+ config_accessor :proxy_address
24
+ config_accessor :proxy_port
25
+ config_accessor :proxy_user
26
+ config_accessor :proxy_password
23
27
 
24
28
  def param_name
25
29
  config.param_name.respond_to?(:call) ? config.param_name.call : config.param_name
@@ -6,8 +6,8 @@ module Epom
6
6
  debug_output $stderr
7
7
 
8
8
  def self.login(username, password)
9
- @@username = username
10
- @@password = password
9
+ Epom.config.username = username
10
+ Epom.config.password = password
11
11
  end
12
12
 
13
13
  def self.extended_methods
@@ -47,17 +47,17 @@ module Epom
47
47
 
48
48
  timestamp = Time.now.to_i * 1000
49
49
  if body_params_signature.include?(:hash) and not body_params[:hash]
50
- body_params[:hash] = Epom.create_hash(Epom.create_hash(@@password), timestamp)
50
+ body_params[:hash] = Epom.create_hash(Epom.create_hash(Epom.config.password), timestamp)
51
51
  end
52
52
  if body_params_signature.include?(:timestamp) and not body_params[:timestamp]
53
53
  body_params[:timestamp] = timestamp
54
54
  end
55
55
  if body_params_signature.include?(:username) and not body_params[:username]
56
- body_params[:username] = @@username
56
+ body_params[:username] = Epom.config.username
57
57
  end
58
58
 
59
59
  if params_validation(url_params, url_params_signature) and params_validation(body_params, body_params_signature)
60
- http_proxy ENV['proxy_address'], ENV['proxy_port'], ENV['proxy_user'], ENV['proxy_password']
60
+ http_proxy Epom.config.proxy_address, Epom.config.proxy_port, Epom.config.proxy_user, Epom.config.proxy_password
61
61
  base_uri Epom.config.epom_server
62
62
  response = send(method, url, :query => body_params)
63
63
  if response.success?
@@ -1,3 +1,3 @@
1
1
  module Epom
2
- VERSION = '0.9.2'
2
+ VERSION = '0.9.4'
3
3
  end
@@ -4,6 +4,9 @@ module Epom
4
4
 
5
5
  def copy_epom_file
6
6
  template 'epom.rb', 'config/initializers/epom.rb'
7
+ if File.exist?('.gitignore')
8
+ inject_into_file '.gitignore', after: "/.bundle" do "\nconfig/initializers/epom.rb" end
9
+ end
7
10
  end
8
11
  end
9
12
  end
@@ -1,5 +1,10 @@
1
1
  Epom.configure do |config|
2
- config.public_key = 'public_key'
3
- config.private_key = 'private_key'
4
2
  config.epom_server = 'https://n29.epom.com/'
3
+ config.username = 'username'
4
+ config.password = 'password'
5
+
6
+ config.proxy_address = ''
7
+ config.proxy_port = ''
8
+ config.proxy_user = ''
9
+ config.proxy_password = ''
5
10
  end
@@ -1,5 +1,10 @@
1
1
  Epom.configure do |config|
2
- config.public_key = 'public_key'
3
- config.private_key = 'private_key'
4
2
  config.epom_server = 'https://n29.epom.com/'
3
+ config.username = 'username'
4
+ config.password = 'password'
5
+
6
+ config.proxy_address = ''
7
+ config.proxy_port = ''
8
+ config.proxy_user = ''
9
+ config.proxy_password = ''
5
10
  end
@@ -58,9 +58,11 @@ def define_get_tests_auto(klass)
58
58
  end
59
59
 
60
60
  Epom.configure do |config|
61
- config.public_key = ENV['public_key']
62
- config.private_key = ENV['private_key']
63
61
  config.epom_server = ENV['epom_server']
62
+ config.proxy_address = ENV['proxy_address']
63
+ config.proxy_port = ENV['proxy_port']
64
+ config.proxy_user = ENV['proxy_user']
65
+ config.proxy_password = ENV['proxy_password']
64
66
  end
65
67
 
66
68
  Epom::EpomElement.login(ENV['username'], ENV['password'])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pedro Quintero
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-06-22 00:00:00.000000000 Z
13
+ date: 2015-06-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -198,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  version: '0'
199
199
  requirements: []
200
200
  rubyforge_project:
201
- rubygems_version: 2.4.6
201
+ rubygems_version: 2.4.8
202
202
  signing_key:
203
203
  specification_version: 4
204
204
  summary: Epom gem.