"Fossies" - the Fresh Open Source Software Archive

Member "discourse-2.8.3/db/fixtures/004_screened_ip_addresses.rb" (14 Apr 2022, 708 Bytes) of package /linux/www/discourse-2.8.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 # frozen_string_literal: true
    2 
    3 ScreenedIpAddress.seed do |s|
    4   s.id = 1
    5   s.ip_address = "10.0.0.0/8"
    6   s.action_type = ScreenedIpAddress.actions[:do_nothing]
    7 end
    8 
    9 ScreenedIpAddress.seed do |s|
   10   s.id = 2
   11   s.ip_address = "192.168.0.0/16"
   12   s.action_type = ScreenedIpAddress.actions[:do_nothing]
   13 end
   14 
   15 ScreenedIpAddress.seed do |s|
   16   s.id = 3
   17   s.ip_address = "127.0.0.0/8"
   18   s.action_type = ScreenedIpAddress.actions[:do_nothing]
   19 end
   20 
   21 ScreenedIpAddress.seed do |s|
   22   s.id = 4
   23   s.ip_address = "172.16.0.0/12"
   24   s.action_type = ScreenedIpAddress.actions[:do_nothing]
   25 end
   26 
   27 # IPv6
   28 ScreenedIpAddress.seed do |s|
   29   s.id = 5
   30   s.ip_address = "fc00::/7"
   31   s.action_type = ScreenedIpAddress.actions[:do_nothing]
   32 end