compact_enc_det 1.0.0 → 1.0.1
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b84ea6eb09f6bb18fdd147b3d288c2cca24bb0d99910b539cfac7344aa99e779
|
|
4
|
+
data.tar.gz: 6a7910407b201e248ecabe8818718ce0e656ad29679a4f3deaff1a04bb415561
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c24938b24d6f1c86368e5b9042eda438af580b6bacb5e707e9c9c987cc3d4d464bd11d283fae668be95df654b05339b8616483290a2ef8780cb4ceec4cb3a6f
|
|
7
|
+
data.tar.gz: c3f796c6fb437320e6780cfe1b29b7d1c669b188a4375840b085859dd9ab39c00f08a9852596664a641c7954c49f878295982e2cde0802b1d8c5c29534a18583
|
data/README.md
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Ruby bindings for [Google's Compact Encoding Detection](https://github.com/google/compact_enc_det) (CED for short) C++ library
|
|
4
4
|
|
|
5
|
+
> [!NOTE]
|
|
6
|
+
> Bindings temporarily use a [fork of the C++ library](https://github.com/cloudaper/compact_enc_det_fork/commit/e4eda3204bab019564b96c522baae93ee2fffdc8), which fixes the minimum CMake version for the build to pass on modern environments.
|
|
7
|
+
|
|
5
8
|
## Usage
|
|
6
9
|
|
|
7
|
-
You will need [CMake](https://cmake.org) to build the C++ native extension.
|
|
10
|
+
You will need [curl](https://curl.se) and [CMake](https://cmake.org) to build the C++ native extension.
|
|
8
11
|
|
|
9
12
|
> macOS
|
|
10
13
|
>
|
|
@@ -19,7 +22,7 @@ Then you can install the gem from [RubyGems.org](https://rubygems.org/gems/compa
|
|
|
19
22
|
> Either add this to your Gemfile:
|
|
20
23
|
>
|
|
21
24
|
> ```ruby
|
|
22
|
-
> gem 'compact_enc_det', '~> 0
|
|
25
|
+
> gem 'compact_enc_det', '~> 1.0'
|
|
23
26
|
> ```
|
|
24
27
|
> or run the following command to install it:
|
|
25
28
|
>
|
|
@@ -27,8 +30,7 @@ Then you can install the gem from [RubyGems.org](https://rubygems.org/gems/compa
|
|
|
27
30
|
> gem install compact_enc_det
|
|
28
31
|
> ```
|
|
29
32
|
|
|
30
|
-
Now you can detect the encoding via the `CompactEncDet.detect_encoding`,
|
|
31
|
-
which is a thin wrapper around `CompactEncDet::DetectEncoding` and `MimeEncodingName` functions from the C++ library.
|
|
33
|
+
Now you can detect the encoding via the `CompactEncDet.detect_encoding`, which is a thin wrapper around `CompactEncDet::DetectEncoding` and `MimeEncodingName` functions from the C++ library.
|
|
32
34
|
|
|
33
35
|
> ```ruby
|
|
34
36
|
> file = File.read("unknown-encoding.txt", mode: "rb")
|
|
@@ -75,5 +77,4 @@ Tests located at `tests` use the [minitest](https://github.com/minitest/minitest
|
|
|
75
77
|
|
|
76
78
|
## License
|
|
77
79
|
|
|
78
|
-
This gem is released under [MIT license](LICENSE), while the original Google's [Compact Encoding Detection library](https://github.com/google/compact_enc_det) source code,
|
|
79
|
-
located at `ext/compact_enc_det/compact_enc_det`, is under the [Apache-2.0](LICENSE-APACHE) license.
|
|
80
|
+
This gem is released under [MIT license](LICENSE), while the original Google's [Compact Encoding Detection library](https://github.com/google/compact_enc_det) source code, located at `ext/compact_enc_det/compact_enc_det`, is under the [Apache-2.0](LICENSE-APACHE) license.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
# Use of this source code is governed by a BSD-style
|
|
3
3
|
# license that can be found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
#
|
|
6
|
-
cmake_minimum_required(VERSION
|
|
5
|
+
# CMake 4 requires at least 3.5
|
|
6
|
+
cmake_minimum_required(VERSION 3.5)
|
|
7
7
|
|
|
8
8
|
if (WIN32)
|
|
9
9
|
if (NOT EXISTS "compact_enc_det/compact_enc_det.h")
|
|
@@ -44,3 +44,10 @@ project files for Visual Studio.
|
|
|
44
44
|
```
|
|
45
45
|
D:\packages\compact_enc_det> cmake .
|
|
46
46
|
```
|
|
47
|
+
|
|
48
|
+
### 3rd party bindings for other languages
|
|
49
|
+
|
|
50
|
+
- **[sonicdoe/ced](https://github.com/sonicdoe/ced)** Node.js module
|
|
51
|
+
- **[cloudaper/compact_enc_det](https://github.com/cloudaper/compact_enc_det)** Ruby gem
|
|
52
|
+
|
|
53
|
+
Have you created bindings for another language? Open a PR and add it to the list!
|
metadata
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: compact_enc_det
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cloudaper
|
|
8
8
|
- Kryštof Korb
|
|
9
|
-
autorequire:
|
|
9
|
+
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2025-12-26 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: minitest
|
|
@@ -87,7 +87,7 @@ licenses:
|
|
|
87
87
|
- MIT
|
|
88
88
|
- Apache-2.0
|
|
89
89
|
metadata: {}
|
|
90
|
-
post_install_message:
|
|
90
|
+
post_install_message:
|
|
91
91
|
rdoc_options: []
|
|
92
92
|
require_paths:
|
|
93
93
|
- lib
|
|
@@ -102,8 +102,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
103
|
version: '0'
|
|
104
104
|
requirements: []
|
|
105
|
-
rubygems_version: 3.5.
|
|
106
|
-
signing_key:
|
|
105
|
+
rubygems_version: 3.5.22
|
|
106
|
+
signing_key:
|
|
107
107
|
specification_version: 4
|
|
108
108
|
summary: Compact Encoding Detection
|
|
109
109
|
test_files: []
|