ahn-restful-rpc 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ahn-restful-rpc.rb +4 -4
  2. metadata +9 -9
@@ -13,11 +13,11 @@ def ip_allowed?(ip)
13
13
 
14
14
  octets = ip.split "."
15
15
 
16
- case COMPONENTS.restful_rpc["access"]
16
+ case COMPONENTS.send(:'ahn-restful-rpc')["access"]
17
17
  when "everyone"
18
18
  true
19
19
  when "whitelist"
20
- whitelist = COMPONENTS.restful_rpc["whitelist"]
20
+ whitelist = COMPONENTS.send(:'ahn-restful-rpc')["whitelist"]
21
21
  !! whitelist.find do |pattern|
22
22
  pattern_octets = pattern.split "."
23
23
  # Traverse both arrays in parallel
@@ -26,7 +26,7 @@ def ip_allowed?(ip)
26
26
  end == [true, true, true, true]
27
27
  end
28
28
  when "blacklist"
29
- blacklist = COMPONENTS.restful_rpc["blacklist"]
29
+ blacklist = COMPONENTS.send(:'ahn-restful-rpc')["blacklist"]
30
30
  ! blacklist.find do |pattern|
31
31
  pattern_octets = pattern.split "."
32
32
  # Traverse both arrays in parallel
@@ -47,7 +47,7 @@ RESTFUL_API_HANDLER = lambda do |env|
47
47
 
48
48
  json = JSON.parse json
49
49
 
50
- nesting = COMPONENTS.restful_rpc["path_nesting"]
50
+ nesting = COMPONENTS.send(:'ahn-restful-rpc')["path_nesting"]
51
51
  path = env["PATH_INFO"]
52
52
 
53
53
  return [404, {}, "This resource does not respond to #{path.inspect}"] unless path[0...nesting.size] == nesting
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ahn-restful-rpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: adhearsion
17
- requirement: &2156809400 !ruby/object:Gem::Requirement
17
+ requirement: &2152989840 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2156809400
25
+ version_requirements: *2152989840
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: json
28
- requirement: &2156808940 !ruby/object:Gem::Requirement
28
+ requirement: &2152989380 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2156808940
36
+ version_requirements: *2152989380
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rack
39
- requirement: &2156808520 !ruby/object:Gem::Requirement
39
+ requirement: &2152988960 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2156808520
47
+ version_requirements: *2152988960
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &2156808100 !ruby/object:Gem::Requirement
50
+ requirement: &2152988540 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2156808100
58
+ version_requirements: *2152988540
59
59
  description: Allows remote procedure calls over an HTTP API integrated in Adhearsion
60
60
  email: dev&adhearsion.com
61
61
  executables: []