forked from mark-rushakoff/whiteboard
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
User from the XYZ office IPs is taken to XYZ board
- Loading branch information
Daniel Grippi and Jeff Saracco
committed
Nov 6, 2012
1 parent
0c1497d
commit c44c430
Showing
12 changed files
with
88 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddIpKeyToStandups < ActiveRecord::Migration | ||
def change | ||
add_column :standups, :ip_key, :string | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
module WithAuthorizedIps | ||
def with_authorized_ips(ips) | ||
def with_authorized_ips(ips=nil) | ||
old_value = AuthorizedIps::AUTHORIZED_IP_ADDRESSES | ||
Kernel::silence_warnings { AuthorizedIps.const_set('AUTHORIZED_IP_ADDRESSES', {sf: [IPAddr.new("127.0.0.1/27")]}) } | ||
|
||
ips ||= {sf: [IPAddr.new("127.0.0.1/27")]} | ||
Kernel::silence_warnings { AuthorizedIps.const_set('AUTHORIZED_IP_ADDRESSES', ips) } | ||
|
||
yield | ||
|
||
Kernel::silence_warnings { AuthorizedIps.const_set('AUTHORIZED_IP_ADDRESSES', old_value) } | ||
end | ||
end | ||
end |