geoip2_c 0.4.1 → 0.4.2

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: 25a17a86c77f7e092f8f24a224cd8a57d6bba8595f51d0e052e3a846a3fd67e8
4
- data.tar.gz: 1bb129e6fba2ff42f583dff127ba4168d958c12af6a7c1521d23a07fbf59dab8
3
+ metadata.gz: be0139fe8310eeddcc99082fec01452e6b5d6c5e4e1b7a443b2c0a2a35f2c84d
4
+ data.tar.gz: 7a8acb86f461912d09f21568ecf00ea1ed3741ae3301891aef14c02bc636a471
5
5
  SHA512:
6
- metadata.gz: 22d90d27edebbf88c8d0a9ec2edc304fc0265b1f6814012ca47e4cd5b9ef5f8422fe3b92a63ed90bbba1f3a2eb874c98d1f52f9d28d246f8df83f5d19e3a4819
7
- data.tar.gz: 4ba29b9f46963e6be9c298c686885b6224e4b7346069da485972d48ac91f0baf025fa882461df943461a0798102a3429cd165d7c13340c7c1aecae576e0fbf97
6
+ metadata.gz: fd2d57cf649ba0837d28788e202a945e0ffdd375aaa4660183a8fc68ea360094c4a47f459a726726b2d49445b9746efd2c728f07726a9af12ffe689bcd70989a
7
+ data.tar.gz: 0bd0c14de214a6c3239086b1076c485215be3326740809bf861b6b11fab172065e6e879751504577dc7e566e490894cb928cebd7fba33cdaf092dbfe089acd25
@@ -13,7 +13,7 @@ jobs:
13
13
  uses: ruby/actions/.github/workflows/ruby_versions.yml@master
14
14
  with:
15
15
  engine: cruby
16
- min_version: 3.0
16
+ min_version: 3.2
17
17
  build:
18
18
  needs: ruby-versions
19
19
  runs-on: ubuntu-latest
@@ -23,11 +23,11 @@ jobs:
23
23
  exclude:
24
24
  - ruby: head
25
25
  steps:
26
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
26
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
27
27
  with:
28
28
  submodules: true
29
29
  - name: Setup ruby
30
- uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0
30
+ uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
31
31
  with:
32
32
  ruby-version: ${{ matrix.ruby }}
33
33
  bundler: latest
@@ -33,15 +33,11 @@ jobs:
33
33
  # * https://github.com/oneclick/rubyinstaller2/blob/8225034c22152d8195bc0aabc42a956c79d6c712/lib/ruby_installer/build/dll_directory.rb
34
34
  ruby-lib-opt: RUBYLIB=%RUNNER_TOOL_CACHE%/Ruby/3.0.3/x64/lib/ruby/gems/3.0.0/gems/fiddle-1.1.0/lib
35
35
  steps:
36
- - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
36
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
37
37
  with:
38
38
  submodules: true
39
- - name: Install dependencies
40
- run: |
41
- ridk enable
42
- pacman -Sy --noconfirm mingw-w64-x86_64-libmaxminddb
43
39
  - name: Setup ruby
44
- uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # v1.315.0
40
+ uses: ruby/setup-ruby@14594264cd68ce8a2345dd349bc3d138a4ef85c8 # v1.327.0
45
41
  with:
46
42
  ruby-version: ${{ matrix.ruby }}
47
43
  bundler: latest
@@ -1,10 +1,14 @@
1
1
  require "mkmf"
2
2
  require "mini_portile2"
3
3
 
4
- maxminddb_version = "1.13.3"
4
+ maxminddb_version = "1.14.1"
5
+ maxminddb_sha256 = "ca5c87d41339f8bc4daabb53e8a9356b3c995f2d2419b85d7bff823b2ecc252d"
5
6
 
6
7
  recipe = MiniPortile.new("libmaxminddb", maxminddb_version)
7
- recipe.files = ["https://github.com/maxmind/libmaxminddb/releases/download/#{maxminddb_version}/libmaxminddb-#{maxminddb_version}.tar.gz"]
8
+ recipe.files = [{
9
+ url: "https://github.com/maxmind/libmaxminddb/releases/download/#{maxminddb_version}/libmaxminddb-#{maxminddb_version}.tar.gz",
10
+ sha256: maxminddb_sha256
11
+ }]
8
12
  recipe.cook
9
13
  recipe.activate
10
14
 
@@ -12,6 +16,4 @@ $INCFLAGS = "-I#{File.join(recipe.path, 'include')} " + $INCFLAGS
12
16
  $LDFLAGS << " -L#{File.join(recipe.path, 'lib')} -lmaxminddb"
13
17
  $CFLAGS << " -std=c99 -fPIC -fms-extensions -I#{File.join(recipe.path, 'include')}"
14
18
 
15
- have_func("rb_sym2str", "ruby.h")
16
-
17
19
  create_makefile("geoip2/geoip2")
data/ext/geoip2/geoip2.c CHANGED
@@ -1,7 +1,7 @@
1
+ #include <stdbool.h>
1
2
  #include <ruby.h>
2
3
  #include <ruby/encoding.h>
3
4
  #include <maxminddb.h>
4
- #include "rb_compat.h"
5
5
 
6
6
  VALUE rb_mGeoIP2;
7
7
  VALUE rb_cGeoIP2Database;
data/geoip2_c.gemspec CHANGED
@@ -8,10 +8,14 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["okkez"]
9
9
  spec.email = ["okkez000@gmail.com"]
10
10
 
11
- spec.summary = %q{Write a short summary, because Rubygems requires one.}
12
- spec.description = %q{Write a longer description or delete this line.}
13
- spec.homepage = ""
11
+ spec.summary = %q{Ruby binding for libmaxminddb}
12
+ spec.description = %q{geoip2_c is a Ruby binding for libmaxminddb to read MaxMind DB files such as GeoIP2. It does not traverse all elements in a lookup result by default, so you can get the element you want fast.}
13
+ spec.homepage = "https://github.com/fluent-plugins-nursery/geoip2_c"
14
14
  spec.license = "Apache-2.0"
15
+ spec.metadata = {
16
+ "source_code_uri" => "https://github.com/fluent-plugins-nursery/geoip2_c",
17
+ "bug_tracker_uri" => "https://github.com/fluent-plugins-nursery/geoip2_c/issues",
18
+ }
15
19
 
16
20
  spec.files = `git ls-files -z --recurse-submodules`.split("\x0").reject do |f|
17
21
  f.match(%r{^(test|spec|features|benchmark)/})
@@ -20,6 +24,7 @@ Gem::Specification.new do |spec|
20
24
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
25
  spec.require_paths = ["lib"]
22
26
  spec.extensions = ["ext/geoip2/extconf.rb"]
27
+ spec.required_ruby_version = ">= 2.3.0"
23
28
 
24
29
  spec.add_dependency('mini_portile2', '~> 2.8')
25
30
  spec.add_development_dependency "appraisal"
@@ -1,3 +1,3 @@
1
1
  module GeoIP2
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geoip2_c
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - okkez
@@ -93,7 +93,9 @@ dependencies:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
95
  version: '3.2'
96
- description: Write a longer description or delete this line.
96
+ description: geoip2_c is a Ruby binding for libmaxminddb to read MaxMind DB files
97
+ such as GeoIP2. It does not traverse all elements in a lookup result by default,
98
+ so you can get the element you want fast.
97
99
  email:
98
100
  - okkez000@gmail.com
99
101
  executables: []
@@ -118,16 +120,17 @@ files:
118
120
  - dockerfiles/Dockerfile-ruby2.7
119
121
  - ext/geoip2/extconf.rb
120
122
  - ext/geoip2/geoip2.c
121
- - ext/geoip2/rb_compat.h
122
123
  - geoip2_c.gemspec
123
124
  - lib/geoip2.rb
124
125
  - lib/geoip2/database.rb
125
126
  - lib/geoip2/lookup_result.rb
126
127
  - lib/geoip2/version.rb
127
- homepage: ''
128
+ homepage: https://github.com/fluent-plugins-nursery/geoip2_c
128
129
  licenses:
129
130
  - Apache-2.0
130
- metadata: {}
131
+ metadata:
132
+ source_code_uri: https://github.com/fluent-plugins-nursery/geoip2_c
133
+ bug_tracker_uri: https://github.com/fluent-plugins-nursery/geoip2_c/issues
131
134
  rdoc_options: []
132
135
  require_paths:
133
136
  - lib
@@ -135,14 +138,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
138
  requirements:
136
139
  - - ">="
137
140
  - !ruby/object:Gem::Version
138
- version: '0'
141
+ version: 2.3.0
139
142
  required_rubygems_version: !ruby/object:Gem::Requirement
140
143
  requirements:
141
144
  - - ">="
142
145
  - !ruby/object:Gem::Version
143
146
  version: '0'
144
147
  requirements: []
145
- rubygems_version: 4.0.15
148
+ rubygems_version: 4.0.20
146
149
  specification_version: 4
147
- summary: Write a short summary, because Rubygems requires one.
150
+ summary: Ruby binding for libmaxminddb
148
151
  test_files: []
@@ -1,10 +0,0 @@
1
- #ifndef __RB_COMPAT_H__
2
- #define __RB_COMPAT_H__
3
-
4
- #include <ruby.h>
5
-
6
- #ifndef HAVE_RB_SYM2STR
7
- # define rb_sym2str(name) (rb_id2str(SYM2ID(name)))
8
- #endif
9
-
10
- #endif