tomlib 0.4.0 → 0.5.0

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
  SHA256:
3
- metadata.gz: fb163d03d5ca307ad810914faacadd2ba5650d01d6ed7458849be829cd0d080b
4
- data.tar.gz: a4e213b0ae1d737d9fd13f0e01381a20a3bf5bfcfa35c8d5021b120b51e1e96c
3
+ metadata.gz: 9598af874f419d93b421990cfced654f3787aa1feb30cb73c10bd42088917e9c
4
+ data.tar.gz: ac5980031b22fc23911e1555ce323fff74e4540071ba26960808325548b5290b
5
5
  SHA512:
6
- metadata.gz: 943608fb548cb2448e83191cacb95aea330fd60a0bdb117c0fd96f2b2adc885f2b8ec2f46bfa455531d3308bee239f6d0996a95f8322e33282580813658d542e
7
- data.tar.gz: 71132c66ba2eaa88cbb7607c847e82883c0f0ffc3aa601e464d7131b2a15406702d1221a4607cc2d3cd9c597670e2be77c7f0afa023b08928f8ab052ffe98ea7
6
+ metadata.gz: 8eb4fe0b0054e2f3e446a62a212d211678c10a55360ea1523b38de9900e76163ec7811ba2b96a3e46db96818ca4d3c9188fe69f3c5107cead1da8fbef4360b76
7
+ data.tar.gz: b22db5ff36ebc41ac9a4d39798ed78a510e1793c05ec2e3c74ad91bb61eb8c92e7325902d592ce909e8d5ce289cbc9b6de624a2b471edfbb098b77252db8cf85
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## [0.4.0] - [2022-08-06]
1
+ ## [0.5.0] - 2022-08-16
2
+
3
+ - Add support for Ruby 2.6
4
+
5
+ ## [0.4.0] - 2022-08-06
2
6
 
3
7
  - Correctly dump empty arrays
4
8
 
data/README.md CHANGED
@@ -11,7 +11,7 @@ It passes both [BurntSushi/toml-test](https://github.com/BurntSushi/toml-test) a
11
11
 
12
12
  ## Installation
13
13
 
14
- Tomlib supports Ruby (MRI) 2.7+
14
+ Tomlib supports Ruby (MRI) 2.6+
15
15
 
16
16
  Add this line to your application's Gemfile:
17
17
 
data/ext/tomlib/tomlib.c CHANGED
@@ -96,7 +96,15 @@ static VALUE toml_timestamp_to_rb_value(const toml_timestamp_t *ts) {
96
96
  VALUE rb_second = rb_rational_raw(DBL2NUM(second), INT2FIX(1000));
97
97
 
98
98
  if (ts->z) {
99
- VALUE rb_tz = rb_str_new2(ts->z);
99
+ VALUE rb_tz;
100
+
101
+ // Ruby 2.6 doesn't accept "Z" as a timezone offset
102
+ if (*ts->z == 'Z' || *ts->z == 'z') {
103
+ rb_tz = rb_str_new2("+00:00");
104
+ } else {
105
+ rb_tz = rb_str_new2(ts->z);
106
+ }
107
+
100
108
  rb_time = rb_funcall(
101
109
  rb_cTime,
102
110
  id_new,
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Tomlib
4
4
  # @api private
5
- VERSION = '0.4.0'
5
+ VERSION = '0.5.0'
6
6
  end
data/tomlib.gemspec CHANGED
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
32
32
 
33
33
  spec.extensions = ['ext/tomlib/extconf.rb']
34
34
 
35
- spec.required_ruby_version = '>= 2.7.0'
35
+ spec.required_ruby_version = '>= 2.6.0'
36
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tomlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Giszczak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-06 00:00:00.000000000 Z
11
+ date: 2022-08-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Fast TOML parser and generator with native extension.
14
14
  email:
@@ -47,7 +47,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 2.7.0
50
+ version: 2.6.0
51
51
  required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="