fog-json 1.1.0 → 1.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9f03dc26da6edab121ae034987776a075d4ddb1f
4
- data.tar.gz: 17352341453ac628e94c233b726a48568bd4001a
2
+ SHA256:
3
+ metadata.gz: c9b7cc355f6ffbb4c2416177c547952da1222bf9517e0e56014601b0a86659b1
4
+ data.tar.gz: 187e11b64808bb008c8486865565dc1adb7a2a06c5490864aa2052b35edd89bd
5
5
  SHA512:
6
- metadata.gz: aa0e84e21ba00d1ec6959ac233b659c89fa37eac8f432a68c7224dcf8d983448e8e636a0c2e47a1e41718cbdd034d079e9cc578640afe5e8a088d42e082eafdd
7
- data.tar.gz: 4c62a352d36ce787074695437f220db71b8eafb7d9c22d081c61327ed75b8ffd3c6a44bb31d33482ffa7cf25e955f4bddb410efde12ba7887b04b35094da5c35
6
+ metadata.gz: 90cc93266b9f15a6cb308c839a25bf11bd2b6772cd48b004048de3dd79259222743429cbf37424f4aa9fb580ad7583090c63ec4c7d07388a6bed52c3e42be882
7
+ data.tar.gz: 41223f3cca7aa167c7ff4476e51fe71113eb29789b40f1f13befa0afb635a585c1f172a3db1f15fe98e1f84330e08f512df999209093f59f3ad17032b40f9a09
@@ -0,0 +1,2 @@
1
+ github: geemus
2
+ tidelift: rubygems/fog-json
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
@@ -0,0 +1,16 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+ schedule:
9
+ - cron: '0 0 * * 1' # At 00:00 on Monday.
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ Shared:
16
+ uses: fog/.github/.github/workflows/ci.yml@v1.6.0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ v1.3.0
2
+
3
+ * fix deprecated multijson usage
4
+
5
+ v1.2.0
6
+
7
+ * Fix time parsing issue
8
+ * Remove duplicated software licence
9
+ * Remove `fog-core` version dependency
10
+
1
11
  v1.1.0
2
12
 
3
13
  * bump fog-core dependency
data/SECURITY.md ADDED
@@ -0,0 +1,6 @@
1
+ ## Security contact information
2
+
3
+ To report a security vulnerability, please contact
4
+ [Tidelift security](https://tidelift.com/security).
5
+
6
+ Tidelift will coordinate the fix and disclosure.
data/fog-json.gemspec CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "fog-core", "~> 2.0"
22
+ spec.add_dependency "fog-core"
23
23
  spec.add_dependency "multi_json", "~> 1.10"
24
24
 
25
- spec.add_development_dependency "bundler", "~> 1.5"
25
+ spec.add_development_dependency "bundler"
26
26
  spec.add_development_dependency "rake"
27
27
  spec.add_development_dependency "minitest"
28
28
  end
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Json
3
- VERSION = "1.1.0"
3
+ VERSION = "1.3.0"
4
4
  end
5
5
  end
data/lib/fog/json.rb CHANGED
@@ -22,7 +22,7 @@ module Fog
22
22
  when Hash
23
23
  data.each { |key, value| data[key] = sanitize(value) }
24
24
  when ::Time
25
- data.strftime("%Y-%m-%dT%H:%M:%SZ")
25
+ data.strftime("%Y-%m-%dT%H:%M:%S%:z")
26
26
  else
27
27
  data
28
28
  end
@@ -31,13 +31,13 @@ module Fog
31
31
  # Do the MultiJson introspection at this level so we can define our encode/decode methods and
32
32
  # perform the introspection only once rather than once per call.
33
33
  def self.encode(obj)
34
- MultiJson.encode(obj)
34
+ MultiJson.dump(obj)
35
35
  rescue => err
36
36
  raise EncodeError.slurp(err)
37
37
  end
38
38
 
39
39
  def self.decode(obj)
40
- MultiJson.decode(obj)
40
+ MultiJson.load(obj)
41
41
  rescue => err
42
42
  raise DecodeError.slurp(err)
43
43
  end
@@ -15,6 +15,6 @@ class TestJSONDecoding < Minitest::Test
15
15
  end
16
16
 
17
17
  def test_decode_with_nil
18
- assert_raises(Fog::JSON::DecodeError) { Fog::JSON.decode(nil) }
18
+ assert_nil Fog::JSON.decode(nil)
19
19
  end
20
20
  end
@@ -8,19 +8,19 @@ class TestJSONSanitizing < Minitest::Test
8
8
 
9
9
  def test_sanitize_with_array
10
10
  @data = [@time]
11
- @expected = ["2014-02-14T12:34:56Z"]
11
+ @expected = ["2014-02-14T12:34:56+00:00"]
12
12
  assert_equal @expected, Fog::JSON.sanitize(@data)
13
13
  end
14
14
 
15
15
  def test_sanitize_with_hash
16
16
  @data = { "key" => @time }
17
- @expected = { "key" => "2014-02-14T12:34:56Z" }
17
+ @expected = { "key" => "2014-02-14T12:34:56+00:00" }
18
18
  assert_equal @expected, Fog::JSON.sanitize(@data)
19
19
  end
20
20
 
21
21
  def test_sanitize_with_time
22
22
  @data = @time
23
- @expected = "2014-02-14T12:34:56Z"
23
+ @expected = "2014-02-14T12:34:56+00:00"
24
24
  assert_equal @expected, Fog::JSON.sanitize(@data)
25
25
  end
26
26
 
metadata CHANGED
@@ -1,31 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wesley Beary (geemus)
8
8
  - Paul Thornthwaite (tokengeek)
9
9
  - The fog team
10
- autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2018-01-08 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: fog-core
17
16
  requirement: !ruby/object:Gem::Requirement
18
17
  requirements:
19
- - - "~>"
18
+ - - ">="
20
19
  - !ruby/object:Gem::Version
21
- version: '2.0'
20
+ version: '0'
22
21
  type: :runtime
23
22
  prerelease: false
24
23
  version_requirements: !ruby/object:Gem::Requirement
25
24
  requirements:
26
- - - "~>"
25
+ - - ">="
27
26
  - !ruby/object:Gem::Version
28
- version: '2.0'
27
+ version: '0'
29
28
  - !ruby/object:Gem::Dependency
30
29
  name: multi_json
31
30
  requirement: !ruby/object:Gem::Requirement
@@ -44,16 +43,16 @@ dependencies:
44
43
  name: bundler
45
44
  requirement: !ruby/object:Gem::Requirement
46
45
  requirements:
47
- - - "~>"
46
+ - - ">="
48
47
  - !ruby/object:Gem::Version
49
- version: '1.5'
48
+ version: '0'
50
49
  type: :development
51
50
  prerelease: false
52
51
  version_requirements: !ruby/object:Gem::Requirement
53
52
  requirements:
54
- - - "~>"
53
+ - - ">="
55
54
  - !ruby/object:Gem::Version
56
- version: '1.5'
55
+ version: '0'
57
56
  - !ruby/object:Gem::Dependency
58
57
  name: rake
59
58
  requirement: !ruby/object:Gem::Requirement
@@ -92,18 +91,19 @@ executables: []
92
91
  extensions: []
93
92
  extra_rdoc_files: []
94
93
  files:
94
+ - ".github/FUNDING.yml"
95
+ - ".github/dependabot.yml"
96
+ - ".github/workflows/ci.yml"
95
97
  - ".gitignore"
96
- - ".travis.yml"
97
98
  - CHANGELOG.md
98
99
  - CONTRIBUTING.md
99
100
  - CONTRIBUTORS.md
100
101
  - Gemfile
101
102
  - LICENSE.md
102
- - LICENSE.txt
103
103
  - README.md
104
104
  - Rakefile
105
+ - SECURITY.md
105
106
  - fog-json.gemspec
106
- - gemfiles/Gemfile-1.8.7
107
107
  - lib/fog/json.rb
108
108
  - lib/fog/json/version.rb
109
109
  - test/json_decode_test.rb
@@ -113,7 +113,6 @@ homepage: http://github.com/fog/fog-json
113
113
  licenses:
114
114
  - MIT
115
115
  metadata: {}
116
- post_install_message:
117
116
  rdoc_options: []
118
117
  require_paths:
119
118
  - lib
@@ -128,9 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
127
  - !ruby/object:Gem::Version
129
128
  version: '0'
130
129
  requirements: []
131
- rubyforge_project:
132
- rubygems_version: 2.6.13
133
- signing_key:
130
+ rubygems_version: 4.0.3
134
131
  specification_version: 4
135
132
  summary: JSON parsing for fog providers
136
133
  test_files:
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- language: ruby
2
-
3
- matrix:
4
- include:
5
- - rvm: 1.8.7
6
- gemfile: gemfiles/Gemfile-1.8.7
7
- - rvm: jruby-18mode
8
- gemfile: gemfiles/Gemfile-1.8.7
9
- - rvm: 1.9.3
10
- gemfile: Gemfile
11
- - rvm: jruby-19mode
12
- gemfile: Gemfile
13
- - rvm: 2.0.0
14
- gemfile: Gemfile
15
- - rvm: 2.1.0
16
- gemfile: Gemfile
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 Wes Beary
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,5 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "rake", "~> 10.1.0"
4
- gem "mime-types", "~>1.16"
5
- gemspec :path => ".."