sixarm_ruby_magic_number_type 2.0.2 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f604e639f12e242afd8bc636bfff5316965ae191
4
- data.tar.gz: 2649815d73848efd748a70b7d1e87ad343027913
3
+ metadata.gz: a8499aa03c69751e6108a582028301af353bfa2a
4
+ data.tar.gz: 7ecbcfafd20b571f82a5422b6803c7cb33e96cb3
5
5
  SHA512:
6
- metadata.gz: a85f8bc28abbea05d568274d4f4cc4c9bcc2b9b2721f8c33916e773bcd90e99347efd78009f1062b0027edc6637d4886f8c6bdd279427f9a14d04bbdc7c8c285
7
- data.tar.gz: ecfa34df4227e8e31e7e6de48d415f1f58c0d0c8c86a2ba59e1dbd6b6ac121e345306d14b85972efaed3b459ce80bf55154ae5f07ec3d3eecdb12f166465a221
6
+ metadata.gz: c9adb51204caef213d94a5449508809f143f2fe6337207f9b7f80391978ea1682d57edc52029a3b1a0a6a69f4a1855bd4a7c3d6919f541402dc48145e179cb4d
7
+ data.tar.gz: e5ef648ba40bd8250b7778999011c9bd92bcc275156cefa7877016826dcf77d5c4167205199e69a66b6d15a932fbda260de957cf0fc3cd121194a8a47f77095b
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -1,8 +1,9 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'rake'
3
- require 'rake/testtask'
2
+ require "rake"
3
+ require "rake/testtask"
4
4
 
5
5
  Rake::TestTask.new(:test) do |t|
6
- t.libs << 'lib' << 'test'
7
- t.pattern = 'test/*.rb'
6
+ t.libs.push("lib", "test")
7
+ t.pattern = "test/**/*.rb"
8
8
  end
9
+ task :default => [:test]
@@ -4,5 +4,5 @@ Please see README
4
4
  =end
5
5
 
6
6
  ['file','io','string'].map{|x|
7
- require File.dirname(__FILE__) + "/sixarm_ruby_magic_number_type/#{x}.rb"
7
+ require_relative "sixarm_ruby_magic_number_type/#{x}"
8
8
  }
@@ -1,9 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'minitest/autorun'
3
- Minitest::Test ||= MiniTest::Unit::TestCase
4
- require 'simplecov'
2
+ require "minitest/autorun"
3
+ require "coveralls"
4
+ require "simplecov"
5
+ Coveralls.wear!
6
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
7
+ SimpleCov::Formatter::HTMLFormatter,
8
+ Coveralls::SimpleCov::Formatter
9
+ ]
5
10
  SimpleCov.start
11
+ require "sixarm_ruby_magic_number_type"
6
12
 
7
- ['file','io','string'].map{|x|
8
- require "sixarm_ruby_magic_number_type_test/#{x}_test.rb"
9
- }
@@ -1,8 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'minitest/autorun'
3
- require 'simplecov'
4
- SimpleCov.start
5
- require 'sixarm_ruby_magic_number_type'
2
+ require "sixarm_ruby_magic_number_type_test"
6
3
 
7
4
  describe File do
8
5
 
@@ -1,8 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'minitest/autorun'
3
- require 'simplecov'
4
- SimpleCov.start
5
- require 'sixarm_ruby_magic_number_type'
2
+ require "sixarm_ruby_magic_number_type_test"
6
3
 
7
4
  describe IO do
8
5
 
@@ -1,9 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
- require 'minitest/autorun'
3
- require 'simplecov'
4
- SimpleCov.start
5
- require 'sixarm_ruby_magic_number_type'
6
-
2
+ require "sixarm_ruby_magic_number_type_test"
7
3
 
8
4
  describe String do
9
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sixarm_ruby_magic_number_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - SixArm
@@ -10,28 +10,122 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MI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Vhud+a0ezdnyNvF520arJWvqA4GrOo8F+TT2vVrjscgYjiVGdSq+8wQv
42
+ Efa5jhe8QwG7R1rdpMMP5yBSAqWuFBczMveX5j4rp9Ifw5/XsZbgwcmdm26bjhzh
43
+ w2grAHIhvR9mztm6uXQlZhv1fu3P+RWHDSYhnZSCJSCdxPzQJ1mG5T5ahiL3HvCZ
44
+ 2AC9FOGkybW6DJEFSFFMlNk0IILsa/gNp8ufGuTVLWF9FUUdMNK+TMbghnifT8/1
45
+ n+ES/gQPOnvmVkLDGw==
32
46
  -----END CERTIFICATE-----
33
- date: 2015-01-06 00:00:00.000000000 Z
34
- dependencies: []
47
+ date: 2015-07-19 00:00:00.000000000 Z
48
+ dependencies:
49
+ - !ruby/object:Gem::Dependency
50
+ name: minitest
51
+ requirement: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: 5.7.0
56
+ - - "<"
57
+ - !ruby/object:Gem::Version
58
+ version: '6'
59
+ type: :development
60
+ prerelease: false
61
+ version_requirements: !ruby/object:Gem::Requirement
62
+ requirements:
63
+ - - ">="
64
+ - !ruby/object:Gem::Version
65
+ version: 5.7.0
66
+ - - "<"
67
+ - !ruby/object:Gem::Version
68
+ version: '6'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">"
74
+ - !ruby/object:Gem::Version
75
+ version: 10.4.2
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: '11'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">"
84
+ - !ruby/object:Gem::Version
85
+ version: 10.4.2
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '11'
89
+ - !ruby/object:Gem::Dependency
90
+ name: simplecov
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: 0.10.0
96
+ - - "<"
97
+ - !ruby/object:Gem::Version
98
+ version: '2'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: 0.10.0
106
+ - - "<"
107
+ - !ruby/object:Gem::Version
108
+ version: '2'
109
+ - !ruby/object:Gem::Dependency
110
+ name: coveralls
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: 0.8.2
116
+ - - "<"
117
+ - !ruby/object:Gem::Version
118
+ version: '2'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: 0.8.2
126
+ - - "<"
127
+ - !ruby/object:Gem::Version
128
+ version: '2'
35
129
  description: Tool to parse the first bytes of a file and compare it to a list of known
36
130
  mime types.
37
131
  email: sixarm@sixarm.com
@@ -39,11 +133,7 @@ executables: []
39
133
  extensions: []
40
134
  extra_rdoc_files: []
41
135
  files:
42
- - ".gemtest"
43
- - CONTRIBUTING.md
44
- - README.md
45
136
  - Rakefile
46
- - VERSION
47
137
  - lib/sixarm_ruby_magic_number_type.rb
48
138
  - lib/sixarm_ruby_magic_number_type/file.rb
49
139
  - lib/sixarm_ruby_magic_number_type/io.rb
@@ -88,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
178
  version: '0'
89
179
  requirements: []
90
180
  rubyforge_project:
91
- rubygems_version: 2.4.5
181
+ rubygems_version: 2.4.8
92
182
  signing_key:
93
183
  specification_version: 4
94
184
  summary: SixArm.com » Ruby » Magic number type inspects bytes to decide on a mime
@@ -110,3 +200,4 @@ test_files:
110
200
  - test/sixarm_ruby_magic_number_type_test/samples/sample.tiff
111
201
  - test/sixarm_ruby_magic_number_type_test/samples/sample.bz2
112
202
  - test/sixarm_ruby_magic_number_type_test/samples/sample.gz
203
+ has_rdoc: true
metadata.gz.sig CHANGED
Binary file
data/.gemtest DELETED
File without changes
data/CONTRIBUTING.md DELETED
@@ -1,28 +0,0 @@
1
- # Contributing
2
-
3
- Thank you for contributing!
4
-
5
- If you would like to contribute a donation, an easy way is to use PayPal to sixarm@sixarm.com.
6
-
7
- If you would like to contribute help, the next section is for you.
8
-
9
-
10
- ## Contributing to the source
11
-
12
- We love pull requests for improvments to the source code and documentation.
13
-
14
- There are three easy steps:
15
-
16
- 1. Fork the repo.
17
-
18
- * Before you do any work please run our existing tests to make sure the code runs cleanly.
19
-
20
- 2. Work as you like.
21
-
22
- * Please create tests. This helps us know that all your code runs cleanly.
23
-
24
- 3. Push to your fork and submit a pull request.
25
-
26
- * We'll take a look as soon as we can; this is typically within a business day.
27
-
28
- Thank you again!
data/README.md DELETED
@@ -1,105 +0,0 @@
1
- # SixArm.com » Ruby » <br> MagicNumberType infers mime types from leading bits
2
-
3
- * Doc: <http://sixarm.com/sixarm_ruby_magic_number_type/doc>
4
- * Gem: <http://rubygems.org/gems/sixarm_ruby_magic_number_type>
5
- * Repo: <http://github.com/sixarm/sixarm_ruby_magic_number_type>
6
- * Email: Joel Parker Henderson, <joel@sixarm.com>
7
-
8
-
9
- ## Introduction
10
-
11
- Magic numbers are the first bits of a file or data stream
12
- which uniquely identify the type of file or data stream.
13
-
14
- For example when the first bits are "BM",
15
- this identifies the file as a bitmap image file.
16
-
17
- For docs go to <http://sixarm.com/sixarm_ruby_magic_number_type/doc>
18
-
19
- Want to help? We're happy to get pull requests.
20
-
21
-
22
- ## Install quickstart
23
-
24
- Install:
25
-
26
- gem install sixarm_ruby_magic_number_type
27
-
28
- Gemfile:
29
-
30
- gem "sixarm_ruby_magic_number_type", "~>2.0", ">=2.0.2"
31
-
32
- Require:
33
-
34
- require "sixarm_ruby_magic_number_type"
35
-
36
-
37
- ## Install with security (optional)
38
-
39
- To enable high security for all our gems:
40
-
41
- wget http://sixarm.com/sixarm.pem
42
- gem cert --add sixarm.pem
43
- gem sources --add http://sixarm.com
44
-
45
- To install with high security:
46
-
47
- gem install sixarm_ruby_magic_number_type --test --trust-policy HighSecurity
48
-
49
-
50
- ## Details
51
-
52
- This gem infers based on widespread programming conventions for data file formats.
53
-
54
- These magic numbers are by convention and we are using this guide:
55
- http://www.astro.keele.ac.uk/oldusers/rno/Computing/File_magic.html
56
-
57
- Typical uses of magic numbers:
58
-
59
- * to quickly identify a file's data type
60
- * to check if data matches the file's MIME type or extension
61
- * to check if a web form file upload matches its HTTP content type
62
-
63
- Compare:
64
-
65
- * MIME::Types ruby library
66
- * Unix magic() command for testing files on disk
67
- * http://shared-mime.rubyforge.org/
68
-
69
-
70
- ## Changes
71
-
72
- * 2015-01-05 2.0.2 Unify duplicate "MZ" to one value
73
- * 2015-01-04 2.0.1 Updates for Ruby 2.2: signing certificate, gemspec, tilde version
74
- * 2012-09-08 2.0.0 Upgrade with more formats, samples, classes, and hex packing
75
- * 2012-04-20 1.2.0 Upgrade to much faster algorithm
76
- * 2012-03-14 1.1.0 Update docs, tests
77
-
78
-
79
- ## License
80
-
81
- You may choose any of these open source licenses:
82
-
83
- * Apache License
84
- * BSD License
85
- * CreativeCommons License, Non-commercial Share Alike
86
- * GNU General Public License Version 2 (GPL 2)
87
- * GNU Lesser General Public License (LGPL)
88
- * MIT License
89
- * Perl Artistic License
90
- * Ruby License
91
-
92
- The software is provided "as is", without warranty of any kind,
93
- express or implied, including but not limited to the warranties of
94
- merchantability, fitness for a particular purpose and noninfringement.
95
-
96
- In no event shall the authors or copyright holders be liable for any
97
- claim, damages or other liability, whether in an action of contract,
98
- tort or otherwise, arising from, out of or in connection with the
99
- software or the use or other dealings in the software.
100
-
101
- This license is for the included software that is created by SixArm;
102
- some of the included software may have its own licenses, copyrights,
103
- authors, etc. and these do take precedence over the SixArm license.
104
-
105
- Copyright (c) 2005-2012 Joel Parker Henderson
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 2.0.1