openstax_content 0.2.1 → 0.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
2
  SHA256:
3
- metadata.gz: 760f80ecbe0193cdb9597862fd3d62e2bd687affa9c392ca07cd41440f5e7a62
4
- data.tar.gz: f357ee9efc8c537f6c84c8e02fc15e0919691be79be677e413ba7542220a1ab0
3
+ metadata.gz: 4aebb8f3f720b66d54a35964a2c7471a4c1791b1eddf3a79278fb42974c1b03b
4
+ data.tar.gz: 743c42fe074b7e8aabc47540785d53ff2dec03c0f3b40eb12f79f0624d1e0f9c
5
5
  SHA512:
6
- metadata.gz: 78bf8346586fea75e4cc1d5eed2f5e083a6feb75974f71838b83c90383f9df1f6742a47203a60d9e3e293b855b5bf30bbe7eb78e5536f1f6b4847757fc24b3a0
7
- data.tar.gz: 162cf2c108e2c94e1c11dea32baf337c82ec0965783aa6358209b58888cc389ecc7953e637c802511ce167603f1b9081fb346e3e32b787304f9a4c6740fbe75b
6
+ metadata.gz: af95d3a223033476027839a1c4d49e01a9e8d72c8be9185059d83dd13bf8544e79d291984eec3ac2473ff63850ddb45e1d5bca4a1bfc70d6e86fa99429db2c7f
7
+ data.tar.gz: 0eae65c706c57ef7a9e27125124972e62c8edaa77d22a9d16785ac2efcb6723693b1f18bc1c9ffdb82d699c6134bfa3453b1b491e6d7ccffc73df399e470aa11
@@ -28,10 +28,6 @@ class OpenStax::Content::Archive
28
28
  end
29
29
 
30
30
  if uri.absolute?
31
- OpenStax::Content.logger.warn do
32
- "#{self.class.name} received an unexpected absolute URL in url_for: \"#{object}\""
33
- end
34
-
35
31
  # Force absolute URLs to be https
36
32
  uri.scheme = 'https'
37
33
  return uri.to_s
@@ -12,9 +12,11 @@ class OpenStax::Content::Fragment::Html < OpenStax::Content::Fragment
12
12
  @to_html = @node.to_html
13
13
  end
14
14
 
15
- def as_json(*args)
16
- # Don't attempt to serialize @node (it would fail)
17
- super.except('node')
15
+ # Serialization methods use #instance_variables to iterate through and dump all instance variables
16
+ # Nokogiri classes are not serializable, so we do not want to dump the @node variable
17
+ # Instead, we recreate it by parsing the HTML again if needed
18
+ def instance_variables
19
+ super - [ :@node ]
18
20
  end
19
21
 
20
22
  def blank?
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Content
3
- VERSION = '0.2.1'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dante Soares
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-24 00:00:00.000000000 Z
11
+ date: 2021-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -168,7 +168,7 @@ homepage: https://github.com/openstax/content-ruby
168
168
  licenses:
169
169
  - AGPL-3.0
170
170
  metadata: {}
171
- post_install_message:
171
+ post_install_message:
172
172
  rdoc_options: []
173
173
  require_paths:
174
174
  - lib
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  requirements: []
186
186
  rubygems_version: 3.2.19
187
- signing_key:
187
+ signing_key:
188
188
  specification_version: 4
189
189
  summary: Ruby bindings to read and parse the OpenStax ABL and the content archive
190
190
  test_files: []