iana-data 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ccc684f77c372ae813ac2a6d6618bf93fe23dc58
4
+ data.tar.gz: 0f77640e7ff7b7a4a443b61077293c4cae300aa9
5
+ SHA512:
6
+ metadata.gz: 2752d111927c4ccebb353e05dd67d06f31cf3f71b759bb50416e1f7d7ede11491388c352e7fb4c1dd4b46f8d739822a3117714bc27d97c02eac11c0de2a7ae39
7
+ data.tar.gz: e93ec9eb7e3a7a0d9d7501e5cd235fc64c8947962b4ff5bb5bc433a3a1bbb7ab76369715fe8805c9a2d20956908edd2f95a7efedddc34747d27b4e9e447841ab
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ *.swp
2
+ .DS_Store
3
+ .yardoc
4
+ cache
5
+ data
6
+ doc
7
+ Manifest
8
+ pkg
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --no-private --protected lib/**/*.rb - README LICENSE
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in eeana.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,39 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ iana-data (1.1.2)
5
+ open-uri-cached (= 0.0.5)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.2.5)
11
+ open-uri-cached (0.0.5)
12
+ rake (10.5.0)
13
+ rspec (3.4.0)
14
+ rspec-core (~> 3.4.0)
15
+ rspec-expectations (~> 3.4.0)
16
+ rspec-mocks (~> 3.4.0)
17
+ rspec-core (3.4.4)
18
+ rspec-support (~> 3.4.0)
19
+ rspec-expectations (3.4.0)
20
+ diff-lcs (>= 1.2.0, < 2.0)
21
+ rspec-support (~> 3.4.0)
22
+ rspec-mocks (3.4.1)
23
+ diff-lcs (>= 1.2.0, < 2.0)
24
+ rspec-support (~> 3.4.0)
25
+ rspec-support (3.4.1)
26
+ yard (0.8.7.6)
27
+
28
+ PLATFORMS
29
+ ruby
30
+
31
+ DEPENDENCIES
32
+ bundler (~> 1.11)
33
+ iana-data!
34
+ rake (~> 10.0)
35
+ rspec (~> 3.0)
36
+ yard (~> 0.8, >= 0.8.7)
37
+
38
+ BUNDLED WITH
39
+ 1.11.2
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2008-2011, Ramsey Dow. All rights reserved.
4
+ Copyright (c) 2016, Runar Ingebrigtsen
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ ## What
2
+ IANA Ruby module version 1.1.2
3
+
4
+ Look up TCP/IP port numbers, protocols, top-level domains, et al.
5
+
6
+ Get data from the Internet Assigned Numbers Authority (IANA) and make it
7
+ available to your programs.
8
+
9
+ ## Install
10
+
11
+ gem 'iana', github: 'ringe/iana'
12
+
13
+ ## Usage
14
+
15
+ ```ruby
16
+ require 'iana'
17
+ ```
18
+
19
+ The IANA Ruby module loads the data into conveniently searchable data
20
+ structures. The flat files the IANA Ruby module consume as data are hosted at
21
+ iana.org. You will need to fetch them so you can process the content locally.
22
+ I grab these files with with curl (but you can use wget or whatever if you
23
+ don't use curl):
24
+
25
+ curl -L -O http://www.iana.org/assignments/port-numbers
26
+ curl -L -O http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xml
27
+ curl -L -O http://www.iana.org/assignments/ethernet-numbers
28
+
29
+ TLD data is downloaded automatically using open-uri, so no need to fetch yourself.
30
+
31
+ ## Examples
32
+ When you run the example programs, do it like so:
33
+
34
+ ruby examples/ports.rb port-numbers
35
+
36
+ Use these example programs to see how you might use and otherwise integrate
37
+ IANA data functionality into your own programs.
38
+
39
+ ## Contribute
40
+ The source is availble at https://github.com/ringe/iana
41
+
42
+ Fork, patch and send a pull request.
data/Rakefile ADDED
@@ -0,0 +1,56 @@
1
+ #!/usr/bin/env ruby
2
+ # vim: expandtab tabstop=2 softtabstop=2 shiftwidth=2
3
+
4
+ # Rakefile
5
+ # coding:utf-8
6
+
7
+ require 'rubygems'
8
+ require 'rake'
9
+ require 'yard'
10
+
11
+ require 'rake/clean'
12
+ require 'rake/testtask'
13
+
14
+ CLEAN.include('cache/*', 'Manifest', 'iana.gemspec')
15
+ CLOBBER.include('cache')
16
+
17
+ task :default do
18
+ system("rake -T")
19
+ end
20
+
21
+ # override RDoc with YARD
22
+ desc 'generate documentation'
23
+ task :doc do
24
+ system("yard --doc")
25
+ end
26
+
27
+ # run test suite
28
+ Rake::TestTask.new do |t|
29
+ t.libs << "test"
30
+ t.test_files = FileList['test/*.rb']
31
+ t.verbose = true
32
+ end
33
+
34
+ desc 'count source lines of code'
35
+ task :count do
36
+ system('cloc lib')
37
+ end
38
+
39
+ namespace :todo do
40
+ desc 'List TODOs in all .rb files under lib/'
41
+ task(:list) do
42
+ FileList["lib/**/*.rb", "bin/**/*.rb"].egrep(/TODO/)
43
+ end
44
+
45
+ desc 'Edit all TODOs in VIM' # or your favorite editor
46
+ task(:edit) do
47
+ # jump to the first TODO in the first file
48
+ cmd = 'vim +/TODO/'
49
+
50
+ filelist = []
51
+ FileList["lib/**/*.rb"].egrep(/TODO/) { |fn,cnt,line| filelist << fn }
52
+
53
+ # will fork a new process and exit, if you're using gvim
54
+ system("#{cmd} #{filelist.sort.join(' ')}")
55
+ end
56
+ end