perf_check 0.1.17 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/perf_check/server.rb +5 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 652fdb1324ce2aa4643aa2918473efc2542bde0e
4
- data.tar.gz: f6efe52a88e37d5ffc70f025f00982dc42920cfe
3
+ metadata.gz: a5210e19711849c1d31c9a59f11f3a7f492e9c48
4
+ data.tar.gz: e57b035135efc2569d20d3a18cb776c979894274
5
5
  SHA512:
6
- metadata.gz: 6e2e64a0443959db20be5f795178845f1866ba39b7f74edf3cbb187bac7a1aefd3845e61863cef9dd28bb02179a3857cbc7fa4fa3f50f148de391348fd243fdc
7
- data.tar.gz: 3a0edc3fdb8da04684ae10797459a12f1b3175e3cad80b1c17bda25938b05f7e77088fd6390b07997889edad7f6fceadfcb63dc5a744a5e3e0b1d8b667df13d2
6
+ metadata.gz: 588ac42f1b7b9b649f798395c8876430862f7fb6f56e56423172b65c8cc53f4a4390ceed18c1a73c2129649d54f3fcebc540dffce51f36f082ddc2ee9ffdc3a9
7
+ data.tar.gz: 85e004752e36cb9176ad4543dfee9d6ba9043d478ab58505f992b6267667ff2b0474040a3dae53717d8ddba3677b2b2ff5ea73a41b877f54bdc56135d5d0d8df
@@ -18,17 +18,19 @@ class PerfCheck
18
18
 
19
19
  controller.send(:define_method, :get_perf_check_session, &block)
20
20
  controller.send(:define_method, action) do
21
- get_perf_check_session(params[:login], params[:route])
21
+ login = params[:login_symbol].presence.try(:to_sym) || params[:login]
22
+ get_perf_check_session(login, params[:route])
22
23
  render :nothing => true
23
24
  end
24
25
  controller.send(:skip_before_filter, :verify_authenticity_token)
25
26
 
26
27
  authorization do |login, route|
27
28
  http = Net::HTTP.new(host, port)
29
+ params = login.is_a?(Symbol) ? "login_symbol=#{login}" : "login=#{login}"
28
30
  if method == :post
29
- response = http.post(login_route, "login=#{login}")
31
+ response = http.post(login_route, params)
30
32
  elsif method == :get
31
- response = http.get(login_route+"?login=#{login}")
33
+ response = http.get(login_route+"?#{params}")
32
34
  end
33
35
 
34
36
  response['Set-Cookie']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perf_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubytune