floodgate 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/floodgate.gemspec +4 -0
- data/lib/floodgate/client.rb +110 -5
- data/lib/floodgate/config.rb +15 -7
- data/lib/floodgate/control.rb +4 -1
- data/lib/floodgate/railtie.rb +13 -0
- data/lib/floodgate/version.rb +1 -1
- data/lib/floodgate.rb +2 -0
- data/lib/tasks/floodgate_tasks.rake +45 -0
- data/spec/lib/floodgate/client_spec.rb +146 -5
- data/spec/lib/floodgate/config_spec.rb +29 -2
- data/spec/spec_helper.rb +4 -7
- data/spec/support/helpers/ip_address_helpers.rb +6 -0
- data/spec/support/rspec.rb +7 -0
- metadata +64 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02d0a31c5adc8fc0c05a7adfc8851e847f203534
|
4
|
+
data.tar.gz: 48cd70c1585d07a4ded3756439512ce71b31088c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c3a580540a16329b822ca4a99998beeaa44881730fe05a7ffe87233b4946e2625ff41ca516620f5064eead86b2627e7ba773cf85a0b55ce6dfb02a5a03e4623
|
7
|
+
data.tar.gz: 1a97ae00ddeaf916ce97908f3b267f99fdc7a39f2b9b3a4e079d77fbab33128acdbd217efdbf0b4c18623b70b96e6ae4558a99200c772abdb7b3b037b2f2af60
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.1.0
|
data/floodgate.gemspec
CHANGED
@@ -18,6 +18,10 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
+
spec.add_runtime_dependency 'faraday', '~> 0.8.9'
|
22
|
+
spec.add_runtime_dependency 'faraday_middleware', '~> 0.9.0'
|
23
|
+
spec.add_runtime_dependency 'hashie', '~> 2.0.5'
|
24
|
+
|
21
25
|
spec.add_development_dependency 'pry'
|
22
26
|
spec.add_development_dependency 'rake'
|
23
27
|
spec.add_development_dependency 'rspec', '~> 2.14'
|
data/lib/floodgate/client.rb
CHANGED
@@ -1,11 +1,116 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
1
|
+
require 'faraday'
|
2
|
+
require 'faraday_middleware'
|
3
|
+
require 'hashie'
|
3
4
|
|
4
5
|
module Floodgate
|
5
6
|
class Client
|
6
|
-
def self.
|
7
|
-
|
8
|
-
|
7
|
+
def self.add_ip_address(ip_address)
|
8
|
+
return if ip_address.nil? || ip_address.empty?
|
9
|
+
|
10
|
+
params = { ip_address: { ip_address: ip_address } }
|
11
|
+
|
12
|
+
post('ip_addresses', params)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.allowed_ip_addresses
|
16
|
+
status.allowed_ip_addresses
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.close
|
20
|
+
params = { app: { filter_traffic: true } }
|
21
|
+
|
22
|
+
put('', params)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.open
|
26
|
+
params = { app: { filter_traffic: false } }
|
27
|
+
|
28
|
+
put('', params)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.remove_ip_address(ip_address)
|
32
|
+
return if ip_address.nil? || ip_address.empty?
|
33
|
+
|
34
|
+
params = { ip_address: { ip_address: ip_address } }
|
35
|
+
|
36
|
+
delete('ip_addresses', params)
|
37
|
+
end
|
38
|
+
|
39
|
+
def self.set_redirect_url(redirect_url)
|
40
|
+
params = { app: { redirect_url: redirect_url } }
|
41
|
+
|
42
|
+
put('', params)
|
43
|
+
end
|
44
|
+
|
45
|
+
def self.default_status
|
46
|
+
Hashie::Mash.new(
|
47
|
+
default_status: true,
|
48
|
+
filter_traffic: false,
|
49
|
+
allowed_ip_addresses: [],
|
50
|
+
redirect_url: nil
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
54
|
+
def self.status
|
55
|
+
begin
|
56
|
+
get('status')
|
57
|
+
rescue Faraday::Error::ClientError => e
|
58
|
+
# TODO: Log
|
59
|
+
default_status
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.delete(path, params = {})
|
64
|
+
verb_with_params_in_body(:delete, path, params)
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.get(path, params = {})
|
68
|
+
params.merge!(api_token: Config.api_token)
|
69
|
+
|
70
|
+
response = get_connection.get(path, params)
|
71
|
+
|
72
|
+
response.body
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.post(path, params = {})
|
76
|
+
verb_with_params_in_body(:post, path, params)
|
77
|
+
end
|
78
|
+
|
79
|
+
def self.put(path, params = {})
|
80
|
+
verb_with_params_in_body(:put, path, params)
|
81
|
+
end
|
82
|
+
|
83
|
+
def self.verb_with_params_in_body(verb, path, params = {})
|
84
|
+
params.merge!(api_token: Config.api_token)
|
85
|
+
|
86
|
+
response = get_connection.public_send(verb, path) do |request|
|
87
|
+
request.body = params
|
88
|
+
end
|
89
|
+
|
90
|
+
response.body
|
91
|
+
end
|
92
|
+
|
93
|
+
def self.base_url
|
94
|
+
"https://floodgate-api-staging.herokuapp.com/api/v1/apps/#{Config.app_id}"
|
95
|
+
end
|
96
|
+
|
97
|
+
def self.user_agent
|
98
|
+
'FloodgateAgent'
|
99
|
+
end
|
100
|
+
|
101
|
+
def self.get_connection
|
102
|
+
conn = Faraday.new(url: base_url) do |builder|
|
103
|
+
builder.use Faraday::Response::Mashify
|
104
|
+
builder.use FaradayMiddleware::ParseJson, content_type: 'application/json'
|
105
|
+
builder.use Faraday::Request::UrlEncoded
|
106
|
+
builder.use Faraday::Response::RaiseError
|
107
|
+
builder.use Faraday::Adapter::NetHttp
|
108
|
+
end
|
109
|
+
|
110
|
+
conn.headers[:user_agent] = user_agent
|
111
|
+
|
112
|
+
conn
|
9
113
|
end
|
10
114
|
end
|
11
115
|
end
|
116
|
+
|
data/lib/floodgate/config.rb
CHANGED
@@ -1,17 +1,20 @@
|
|
1
1
|
module Floodgate
|
2
2
|
class Config
|
3
|
+
class << self
|
4
|
+
attr_accessor :app_id, :api_token
|
5
|
+
|
6
|
+
def reset
|
7
|
+
@app_id = @api_token = nil
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
3
11
|
attr_accessor \
|
4
12
|
:allowed_ip_addresses,
|
5
|
-
:api_token,
|
6
|
-
:app_id,
|
7
13
|
:filter_traffic,
|
8
14
|
:redirect_url
|
9
15
|
|
10
|
-
def initialize
|
11
|
-
|
12
|
-
@api_token = api_token
|
13
|
-
|
14
|
-
json = Client.status(app_id, api_token)
|
16
|
+
def initialize
|
17
|
+
json = Client.status
|
15
18
|
|
16
19
|
@filter_traffic = json['filter_traffic']
|
17
20
|
@redirect_url = json['redirect_url']
|
@@ -35,5 +38,10 @@ module Floodgate
|
|
35
38
|
def redirect?
|
36
39
|
!redirect_url.nil? && !redirect_url.empty?
|
37
40
|
end
|
41
|
+
|
42
|
+
def reset
|
43
|
+
@redirect_url = nil
|
44
|
+
@filter_traffic = false
|
45
|
+
end
|
38
46
|
end
|
39
47
|
end
|
data/lib/floodgate/control.rb
CHANGED
data/lib/floodgate/version.rb
CHANGED
data/lib/floodgate.rb
CHANGED
@@ -0,0 +1,45 @@
|
|
1
|
+
namespace :floodgate do
|
2
|
+
desc 'Display the floodgate status'
|
3
|
+
task :status => :environment do
|
4
|
+
puts Floodgate::Client.status
|
5
|
+
end
|
6
|
+
|
7
|
+
desc 'Close the floodgate'
|
8
|
+
task :close => :environment do
|
9
|
+
Floodgate::Client.close
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'Open the floodgate'
|
13
|
+
task :open => :environment do
|
14
|
+
Floodgate::Client.open
|
15
|
+
end
|
16
|
+
|
17
|
+
desc 'Set the URL floodgate redirects to when filtering traffic'
|
18
|
+
task :set_redirect_url => :environment do
|
19
|
+
redirect_url = ENV['redirect_url']
|
20
|
+
|
21
|
+
Floodgate::Client.set_redirect_url(redirect_url)
|
22
|
+
end
|
23
|
+
|
24
|
+
namespace :ip_address do
|
25
|
+
desc 'Display a list of allowed IP Addresses'
|
26
|
+
task :all => :environment do
|
27
|
+
puts Floodgate::Client.allowed_ip_addresses
|
28
|
+
end
|
29
|
+
|
30
|
+
desc 'Add an IP Address to allow through the floodgate'
|
31
|
+
task :add => :environment do
|
32
|
+
ip_address = ENV['ip_address']
|
33
|
+
|
34
|
+
Floodgate::Client.add_ip_address(ip_address)
|
35
|
+
end
|
36
|
+
|
37
|
+
desc 'Remove an IP Address from the list allowed through the floodgate'
|
38
|
+
task :remove => :environment do
|
39
|
+
ip_address = ENV['ip_address']
|
40
|
+
|
41
|
+
Floodgate::Client.remove_ip_address(ip_address)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
@@ -2,15 +2,155 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module Floodgate
|
4
4
|
describe Client do
|
5
|
-
let(:
|
5
|
+
let(:app_id) { '9d2852cff163507330242460c0ca5eec' }
|
6
|
+
let(:api_token) { 'f28b5848e158f96e96168aa37f0002f2' }
|
7
|
+
let(:status) { Client.status }
|
8
|
+
|
9
|
+
before do
|
10
|
+
Config.app_id = app_id
|
11
|
+
Config.api_token = api_token
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '.add_ip_address' do
|
15
|
+
context 'when an ip address is specified' do
|
16
|
+
let(:ip_address) { random_ip_address }
|
17
|
+
let(:params) do
|
18
|
+
{ ip_address: { ip_address: ip_address } }
|
19
|
+
end
|
20
|
+
|
21
|
+
after { Client.remove_ip_address(ip_address) }
|
22
|
+
|
23
|
+
it 'adds it to the list of allowed ip addresses' do
|
24
|
+
expect { Client.add_ip_address(ip_address) }.to change { Client.allowed_ip_addresses.include?(ip_address) }.from(false).to(true)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'when an ip address is not specified' do
|
29
|
+
context 'and it is nil' do
|
30
|
+
let(:ip_address) { nil }
|
31
|
+
|
32
|
+
it' does not post' do
|
33
|
+
expect(Client).not_to receive(:post)
|
34
|
+
|
35
|
+
Client.add_ip_address(ip_address)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'and it is empty' do
|
40
|
+
let(:ip_address) { '' }
|
41
|
+
|
42
|
+
it' does not post' do
|
43
|
+
expect(Client).not_to receive(:post)
|
44
|
+
|
45
|
+
Client.add_ip_address(ip_address)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
describe '.allowed_ip_addresses' do
|
52
|
+
let(:ip_address) { random_ip_address }
|
53
|
+
|
54
|
+
before { Client.add_ip_address(ip_address) }
|
55
|
+
after { Client.remove_ip_address(ip_address) }
|
56
|
+
|
57
|
+
it 'returns the allowed ip addresses' do
|
58
|
+
expect(Client.allowed_ip_addresses).to include(ip_address)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe '.close' do
|
63
|
+
before { Client.open }
|
64
|
+
|
65
|
+
it 'changes filter_traffic from false to true' do
|
66
|
+
expect { Client.close }.to change { Client.status.filter_traffic }.from(false).to(true)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe '.open' do
|
71
|
+
before { Client.close }
|
72
|
+
|
73
|
+
it 'changes filter_traffic from true to false' do
|
74
|
+
expect { Client.open }.to change { Client.status.filter_traffic }.from(true).to(false)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
describe '.remove_ip_address' do
|
79
|
+
context 'when an ip address is specified' do
|
80
|
+
let(:ip_address) { random_ip_address }
|
81
|
+
let(:params) do
|
82
|
+
{ ip_address: { ip_address: ip_address } }
|
83
|
+
end
|
84
|
+
|
85
|
+
before { Client.add_ip_address(ip_address) }
|
86
|
+
|
87
|
+
it 'removes it from the list of allowed ip addresses' do
|
88
|
+
expect { Client.remove_ip_address(ip_address) }.to change { Client.allowed_ip_addresses.include?(ip_address) }.from(true).to(false)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
context 'when an ip address is not specified' do
|
93
|
+
context 'and it is nil' do
|
94
|
+
let(:ip_address) { nil }
|
95
|
+
|
96
|
+
it' does not post' do
|
97
|
+
expect(Client).not_to receive(:post)
|
98
|
+
|
99
|
+
Client.remove_ip_address(ip_address)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
context 'and it is empty' do
|
104
|
+
let(:ip_address) { '' }
|
105
|
+
|
106
|
+
it' does not post' do
|
107
|
+
expect(Client).not_to receive(:post)
|
108
|
+
|
109
|
+
Client.remove_ip_address(ip_address)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
describe '.set_redirect_url' do
|
116
|
+
before { Client.set_redirect_url(initial_redirect_url) }
|
117
|
+
|
118
|
+
context 'when a redirect_url is specified' do
|
119
|
+
let(:initial_redirect_url) { nil }
|
120
|
+
let(:redirect_url) { 'http://example.com' }
|
121
|
+
|
122
|
+
it 'changes the redirect_url' do
|
123
|
+
expect { Client.set_redirect_url(redirect_url) }.to change { Client.status.redirect_url }.from(initial_redirect_url).to(redirect_url)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
context 'when nil is specified' do
|
128
|
+
let(:initial_redirect_url) { 'http://example.com' }
|
129
|
+
let(:redirect_url) { nil }
|
130
|
+
|
131
|
+
it 'clears the redirect_url' do
|
132
|
+
expect { Client.set_redirect_url(redirect_url) }.to change { Client.status.redirect_url }
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
describe '.default_status' do
|
138
|
+
it 'does not filter traffic' do
|
139
|
+
expect(Client.default_status.filter_traffic).to be_false
|
140
|
+
end
|
141
|
+
|
142
|
+
it 'has a flag indicating that it is the default status' do
|
143
|
+
expect(Client.default_status.default_status).to be_true
|
144
|
+
end
|
145
|
+
end
|
6
146
|
|
7
147
|
describe '.status' do
|
8
148
|
context 'when the credentials are not valid' do
|
9
149
|
let(:app_id) { 'foo' }
|
10
150
|
let(:api_token) { 'bar' }
|
11
151
|
|
12
|
-
it '
|
13
|
-
expect
|
152
|
+
it 'returns the default status' do
|
153
|
+
expect(status).to eq Client.default_status
|
14
154
|
end
|
15
155
|
end
|
16
156
|
|
@@ -20,7 +160,7 @@ module Floodgate
|
|
20
160
|
let(:api_token) { 'da2f2d06c102eea0f1971c2c90936ee3' }
|
21
161
|
|
22
162
|
it 'filter_traffic is true' do
|
23
|
-
expect(
|
163
|
+
expect(status.filter_traffic).to be_true
|
24
164
|
end
|
25
165
|
end
|
26
166
|
|
@@ -29,10 +169,11 @@ module Floodgate
|
|
29
169
|
let(:api_token) { '349d2b1ee8ec56eb04b909b1eb9993b0' }
|
30
170
|
|
31
171
|
it 'filter_traffic is false' do
|
32
|
-
expect(
|
172
|
+
expect(status.filter_traffic).to be_false
|
33
173
|
end
|
34
174
|
end
|
35
175
|
end
|
36
176
|
end
|
37
177
|
end
|
38
178
|
end
|
179
|
+
|
@@ -2,7 +2,11 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module Floodgate
|
4
4
|
describe Config do
|
5
|
-
before
|
5
|
+
before do
|
6
|
+
Client.stub(:status).and_return json
|
7
|
+
Config.app_id = app_id
|
8
|
+
Config.api_token = api_token
|
9
|
+
end
|
6
10
|
|
7
11
|
let(:json) do
|
8
12
|
{
|
@@ -18,7 +22,7 @@ module Floodgate
|
|
18
22
|
|
19
23
|
let(:app_id) { 'abc123' }
|
20
24
|
let(:api_token) { 'def456' }
|
21
|
-
let(:config) { Config.new
|
25
|
+
let(:config) { Config.new }
|
22
26
|
|
23
27
|
describe '#client_allowed?' do
|
24
28
|
context 'when the environment specifies the client address in REMOTE_ADDR' do
|
@@ -185,6 +189,29 @@ module Floodgate
|
|
185
189
|
end
|
186
190
|
end
|
187
191
|
end
|
192
|
+
|
193
|
+
describe '.reset' do
|
194
|
+
let(:config) { Config.new }
|
195
|
+
let(:filter_traffic) { true }
|
196
|
+
let(:redirect_url) { 'someurl' }
|
197
|
+
|
198
|
+
it 'sets filter_traffic to nil' do
|
199
|
+
expect{ config.reset }. to change{ config.filter_traffic }.from(true).to(false)
|
200
|
+
end
|
201
|
+
|
202
|
+
it 'sets redirect_url to nil' do
|
203
|
+
expect{ config.reset }. to change{ config.redirect_url }.from('someurl').to(nil)
|
204
|
+
end
|
205
|
+
|
206
|
+
it 'sets api_token to nil' do
|
207
|
+
expect{ Config.reset }. to change{ Config.api_token }.from('def456').to(nil)
|
208
|
+
end
|
209
|
+
|
210
|
+
it 'sets app_id to nil' do
|
211
|
+
expect{ Config.reset }. to change{ Config.app_id }.from('abc123').to(nil)
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
188
215
|
end
|
189
216
|
end
|
190
217
|
|
data/spec/spec_helper.rb
CHANGED
@@ -8,10 +8,7 @@ require 'rspec'
|
|
8
8
|
|
9
9
|
require 'floodgate'
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
config.alias_example_to :pit, pending: true
|
16
|
-
config.run_all_when_everything_filtered = true
|
17
|
-
end
|
11
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
12
|
+
# in spec/support/ and its subdirectories.
|
13
|
+
Dir[File.expand_path(File.join(__FILE__, '../support/**/*.rb'))].each { |f| require f }
|
14
|
+
|
@@ -0,0 +1,7 @@
|
|
1
|
+
RSpec.configure do |config|
|
2
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
3
|
+
config.filter_run focused: true
|
4
|
+
config.alias_example_to :fit, focused: true
|
5
|
+
config.alias_example_to :pit, pending: true
|
6
|
+
config.run_all_when_everything_filtered = true
|
7
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: floodgate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark McEahern
|
@@ -9,62 +9,104 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: faraday
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 0.8.9
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 0.8.9
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: faraday_middleware
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: 0.9.0
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 0.9.0
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: hashie
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 2.0.5
|
49
|
+
type: :runtime
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 2.0.5
|
14
56
|
- !ruby/object:Gem::Dependency
|
15
57
|
name: pry
|
16
58
|
requirement: !ruby/object:Gem::Requirement
|
17
59
|
requirements:
|
18
|
-
- -
|
60
|
+
- - ">="
|
19
61
|
- !ruby/object:Gem::Version
|
20
62
|
version: '0'
|
21
63
|
type: :development
|
22
64
|
prerelease: false
|
23
65
|
version_requirements: !ruby/object:Gem::Requirement
|
24
66
|
requirements:
|
25
|
-
- -
|
67
|
+
- - ">="
|
26
68
|
- !ruby/object:Gem::Version
|
27
69
|
version: '0'
|
28
70
|
- !ruby/object:Gem::Dependency
|
29
71
|
name: rake
|
30
72
|
requirement: !ruby/object:Gem::Requirement
|
31
73
|
requirements:
|
32
|
-
- -
|
74
|
+
- - ">="
|
33
75
|
- !ruby/object:Gem::Version
|
34
76
|
version: '0'
|
35
77
|
type: :development
|
36
78
|
prerelease: false
|
37
79
|
version_requirements: !ruby/object:Gem::Requirement
|
38
80
|
requirements:
|
39
|
-
- -
|
81
|
+
- - ">="
|
40
82
|
- !ruby/object:Gem::Version
|
41
83
|
version: '0'
|
42
84
|
- !ruby/object:Gem::Dependency
|
43
85
|
name: rspec
|
44
86
|
requirement: !ruby/object:Gem::Requirement
|
45
87
|
requirements:
|
46
|
-
- - ~>
|
88
|
+
- - "~>"
|
47
89
|
- !ruby/object:Gem::Version
|
48
90
|
version: '2.14'
|
49
91
|
type: :development
|
50
92
|
prerelease: false
|
51
93
|
version_requirements: !ruby/object:Gem::Requirement
|
52
94
|
requirements:
|
53
|
-
- - ~>
|
95
|
+
- - "~>"
|
54
96
|
- !ruby/object:Gem::Version
|
55
97
|
version: '2.14'
|
56
98
|
- !ruby/object:Gem::Dependency
|
57
99
|
name: simplecov
|
58
100
|
requirement: !ruby/object:Gem::Requirement
|
59
101
|
requirements:
|
60
|
-
- - ~>
|
102
|
+
- - "~>"
|
61
103
|
- !ruby/object:Gem::Version
|
62
104
|
version: '0.8'
|
63
105
|
type: :development
|
64
106
|
prerelease: false
|
65
107
|
version_requirements: !ruby/object:Gem::Requirement
|
66
108
|
requirements:
|
67
|
-
- - ~>
|
109
|
+
- - "~>"
|
68
110
|
- !ruby/object:Gem::Version
|
69
111
|
version: '0.8'
|
70
112
|
description: floodgate helps you control access to your app
|
@@ -75,9 +117,9 @@ executables: []
|
|
75
117
|
extensions: []
|
76
118
|
extra_rdoc_files: []
|
77
119
|
files:
|
78
|
-
- .gitignore
|
79
|
-
- .ruby-gemset
|
80
|
-
- .ruby-version
|
120
|
+
- ".gitignore"
|
121
|
+
- ".ruby-gemset"
|
122
|
+
- ".ruby-version"
|
81
123
|
- Gemfile
|
82
124
|
- LICENSE.txt
|
83
125
|
- README.md
|
@@ -87,11 +129,15 @@ files:
|
|
87
129
|
- lib/floodgate/client.rb
|
88
130
|
- lib/floodgate/config.rb
|
89
131
|
- lib/floodgate/control.rb
|
132
|
+
- lib/floodgate/railtie.rb
|
90
133
|
- lib/floodgate/version.rb
|
134
|
+
- lib/tasks/floodgate_tasks.rake
|
91
135
|
- spec/lib/floodgate/client_spec.rb
|
92
136
|
- spec/lib/floodgate/config_spec.rb
|
93
137
|
- spec/lib/floodgate/control_spec.rb
|
94
138
|
- spec/spec_helper.rb
|
139
|
+
- spec/support/helpers/ip_address_helpers.rb
|
140
|
+
- spec/support/rspec.rb
|
95
141
|
homepage: http://github.com/adorableio/floodgate
|
96
142
|
licenses:
|
97
143
|
- MIT
|
@@ -102,17 +148,17 @@ require_paths:
|
|
102
148
|
- lib
|
103
149
|
required_ruby_version: !ruby/object:Gem::Requirement
|
104
150
|
requirements:
|
105
|
-
- -
|
151
|
+
- - ">="
|
106
152
|
- !ruby/object:Gem::Version
|
107
153
|
version: '0'
|
108
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
155
|
requirements:
|
110
|
-
- -
|
156
|
+
- - ">="
|
111
157
|
- !ruby/object:Gem::Version
|
112
158
|
version: '0'
|
113
159
|
requirements: []
|
114
160
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.
|
161
|
+
rubygems_version: 2.2.2
|
116
162
|
signing_key:
|
117
163
|
specification_version: 4
|
118
164
|
summary: floodgate helps you control access to your app
|
@@ -121,3 +167,5 @@ test_files:
|
|
121
167
|
- spec/lib/floodgate/config_spec.rb
|
122
168
|
- spec/lib/floodgate/control_spec.rb
|
123
169
|
- spec/spec_helper.rb
|
170
|
+
- spec/support/helpers/ip_address_helpers.rb
|
171
|
+
- spec/support/rspec.rb
|