fileinfo 0.1.0 → 0.1.1

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: d118d43747ad299895b1f1d8cdf958617a98ebf6
4
- data.tar.gz: 1bc3e0c4c74d6e308f7ca0aa8914407fade41039
3
+ metadata.gz: c124025418981cc96ac44d4ac28578f467525090
4
+ data.tar.gz: 9b5f75376d8a00a164008d56509050890fcf1c2c
5
5
  SHA512:
6
- metadata.gz: 8555f22f4c06c74e2e90aef4150b9637bd03030adc0ccc4e7e114f499ff801844574f59fd5d3cbe9eed8a83f7cc54a62ee1831aa1d6487f298c123054e47e779
7
- data.tar.gz: 9a19e2014c9545ec433570177aa443b5312ad6c012128168603414913f1dd58be5392dca55b60d8b6a6e6badb2ce90a5678cec0b0531f86f6ca8d031106ab1f8
6
+ metadata.gz: 0312736c47f08456871bc0388f8256357a0f0d02b8f51b8aa53d32ffef8f071668c6109e45d8ada4c074c0b99e6de91913fd25d87aa9d7d8591e6d9fba297836
7
+ data.tar.gz: 30af589caf9862fb79ddba612938fe10af64c13dfeec55d54af9b65b01cd7ffee9171ed85621ae1c11a1bddd57e2abd91380809d50a70a257055ec6216ca6029
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 2.0.0
5
+ - 1.9.3
6
+
7
+ script: bundle exec rspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # FileInfo
2
2
 
3
- FileInfo extracts encoding from strings and files using the [wonderful Unix `file` command](http://en.wikipedia.org/wiki/File_\(command\)).
3
+ FileInfo detects encoding from strings and files using the [wonderful Unix `file` command](http://en.wikipedia.org/wiki/File_\(command\)).
4
4
 
5
5
  ## Installation
6
6
 
@@ -45,3 +45,7 @@ FileInfo.load(filename).encoding # => #<Encoding:ISO-8859-1>
45
45
  3. Commit your changes (`git commit -am 'Add some feature'`)
46
46
  4. Push to the branch (`git push origin my-new-feature`)
47
47
  5. Create new Pull Request
48
+
49
+ ---
50
+
51
+ © 2013 [Rafaël Blais Masson](http://heliom.ca). FileInfo is released under the MIT license.
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = FileInfo::VERSION
9
9
  spec.authors = ['Rafaël Blais Masson']
10
10
  spec.email = ['rafael@heliom.ca']
11
- spec.description = "FileInfo extracts encoding from strings and files using the wonderful Unix `file` command."
12
- spec.summary = "FileInfo extracts encoding from strings and files using the wonderful Unix `file` command."
11
+ spec.description = "FileInfo detects encoding from strings and files using the wonderful Unix `file` command."
12
+ spec.summary = "FileInfo detects encoding from strings and files using the wonderful Unix `file` command."
13
13
  spec.homepage = 'http://github.com/rafBM/fileinfo'
14
14
  spec.license = 'MIT'
15
15
 
@@ -1,3 +1,3 @@
1
1
  class FileInfo
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -7,14 +7,14 @@ describe FileInfo do
7
7
  let(:utf8_file) { fixture('encoding_utf8.csv') }
8
8
 
9
9
  describe '.load' do
10
- it 'extracts encoding from filename' do
10
+ it 'detects encoding from file' do
11
11
  expect(FileInfo.load(ascii_file.path).encoding).to eq Encoding::US_ASCII
12
12
  expect(FileInfo.load(isolatin_file.path).encoding).to eq Encoding::ISO_8859_1
13
13
  expect(FileInfo.load(isowindows_file.path).encoding).to eq Encoding::ISO_8859_1
14
14
  expect(FileInfo.load(utf8_file.path).encoding).to eq Encoding::UTF_8
15
15
  end
16
16
 
17
- it 'extracts encoding from filename with space' do
17
+ it 'detects encoding from file with space in filename' do
18
18
  old_filename = fixture('encoding_utf8.csv').path
19
19
  new_filename = old_filename.sub('_', ' ')
20
20
  FileUtils.cp(old_filename, new_filename)
@@ -24,7 +24,7 @@ describe FileInfo do
24
24
  FileUtils.rm(new_filename)
25
25
  end
26
26
 
27
- it 'extracts encoding from filename with space and quote' do
27
+ it 'detects encoding from file with space and quote in filename' do
28
28
  old_filename = fixture('encoding_utf8.csv').path
29
29
  new_filename = old_filename.sub('_', ' " ')
30
30
  FileUtils.cp(old_filename, new_filename)
@@ -40,7 +40,7 @@ describe FileInfo do
40
40
  end
41
41
 
42
42
  describe '.parse' do
43
- it 'extracts encoding from string' do
43
+ it 'detects encoding from string' do
44
44
  expect(FileInfo.parse(ascii_file.read).encoding).to eq Encoding::US_ASCII
45
45
  expect(FileInfo.parse(isolatin_file.read).encoding).to eq Encoding::ISO_8859_1
46
46
  expect(FileInfo.parse(isowindows_file.read).encoding).to eq Encoding::ISO_8859_1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fileinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafaël Blais Masson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-08 00:00:00.000000000 Z
11
+ date: 2013-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.14'
55
- description: FileInfo extracts encoding from strings and files using the wonderful
55
+ description: FileInfo detects encoding from strings and files using the wonderful
56
56
  Unix `file` command.
57
57
  email:
58
58
  - rafael@heliom.ca
@@ -62,6 +62,7 @@ extra_rdoc_files: []
62
62
  files:
63
63
  - .gitignore
64
64
  - .rspec
65
+ - .travis.yml
65
66
  - Gemfile
66
67
  - LICENSE.txt
67
68
  - README.md
@@ -99,7 +100,7 @@ rubyforge_project:
99
100
  rubygems_version: 2.0.3
100
101
  signing_key:
101
102
  specification_version: 4
102
- summary: FileInfo extracts encoding from strings and files using the wonderful Unix
103
+ summary: FileInfo detects encoding from strings and files using the wonderful Unix
103
104
  `file` command.
104
105
  test_files:
105
106
  - spec/file_info_spec.rb