charlock_holmes 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
+
3
+ require 'charlock_holmes'
4
+ require 'rspec'
5
+
6
+ RSpec.configure do |config|
7
+ config.expect_with :stdlib
8
+ config.alias_example_to :test
9
+ end
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+ require 'charlock_holmes/string'
3
+
4
+ describe String do
5
+ test 'has a detect_encoding method' do
6
+ str = 'test'
7
+ str.respond_to? :detect_encoding
8
+
9
+ detected = str.detect_encoding
10
+ assert_equal 'ISO-8859-1', detected[:encoding]
11
+ end
12
+
13
+ if RUBY_VERSION =~ /1.9/
14
+ test 'has a detect_encoding! method' do
15
+ str = 'test'
16
+ str.respond_to? :detect_encoding!
17
+
18
+ str.detect_encoding!
19
+ assert_equal Encoding.find('ISO-8859-1'), str.encoding
20
+ end
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: charlock_holmes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Brian Lopez
9
+ - Vicent Martí
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2011-08-24 00:00:00.000000000 -07:00
14
+ default_executable:
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: rake-compiler
18
+ requirement: &70293348071280 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ! '>='
22
+ - !ruby/object:Gem::Version
23
+ version: 0.7.5
24
+ type: :development
25
+ prerelease: false
26
+ version_requirements: *70293348071280
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: &70293348070780 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ! '>='
33
+ - !ruby/object:Gem::Version
34
+ version: 2.0.0
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: *70293348070780
38
+ - !ruby/object:Gem::Dependency
39
+ name: chardet
40
+ requirement: &70293348070400 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ type: :development
47
+ prerelease: false
48
+ version_requirements: *70293348070400
49
+ description:
50
+ email: seniorlopez@gmail.com
51
+ executables: []
52
+ extensions:
53
+ - ext/charlock_holmes/extconf.rb
54
+ extra_rdoc_files: []
55
+ files:
56
+ - .gitignore
57
+ - .rspec
58
+ - Gemfile
59
+ - Gemfile.lock
60
+ - MIT-LICENSE
61
+ - README.md
62
+ - Rakefile
63
+ - benchmark/detection.rb
64
+ - benchmark/test.txt
65
+ - charlock_holmes.gemspec
66
+ - ext/charlock_holmes/charlock_holmes.c
67
+ - ext/charlock_holmes/extconf.rb
68
+ - lib/charlock_holmes.rb
69
+ - lib/charlock_holmes/encoding_detector.rb
70
+ - lib/charlock_holmes/string.rb
71
+ - lib/charlock_holmes/version.rb
72
+ - spec/encoding_detector_spec.rb
73
+ - spec/fixtures/AnsiGraph.psm1
74
+ - spec/fixtures/TwigExtensionsDate.es.yml
75
+ - spec/fixtures/cl-messagepack.lisp
76
+ - spec/fixtures/core.rkt
77
+ - spec/fixtures/laholator.py
78
+ - spec/fixtures/repl2.cljs
79
+ - spec/spec_helper.rb
80
+ - spec/string_method_spec.rb
81
+ has_rdoc: true
82
+ homepage: http://github.com/brianmario/charlock_holmes
83
+ licenses: []
84
+ post_install_message:
85
+ rdoc_options:
86
+ - --charset=UTF-8
87
+ require_paths:
88
+ - lib
89
+ - ext
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ! '>='
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ required_rubygems_version: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubyforge_project:
104
+ rubygems_version: 1.6.2
105
+ signing_key:
106
+ specification_version: 3
107
+ summary: Character encoding detection, brought to you by ICU
108
+ test_files:
109
+ - spec/encoding_detector_spec.rb
110
+ - spec/fixtures/AnsiGraph.psm1
111
+ - spec/fixtures/TwigExtensionsDate.es.yml
112
+ - spec/fixtures/cl-messagepack.lisp
113
+ - spec/fixtures/core.rkt
114
+ - spec/fixtures/laholator.py
115
+ - spec/fixtures/repl2.cljs
116
+ - spec/spec_helper.rb
117
+ - spec/string_method_spec.rb