openstax_content 1.0.0 → 1.1.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 +4 -4
- data/lib/openstax/content/page.rb +3 -2
- data/lib/openstax/content/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b5c44db02299099f4ac183c14f7f819c1e9a97718368e96d824098f52ac8c5b2
|
|
4
|
+
data.tar.gz: 77609137d353ea7cb987e196c83b9b0b037ad2a3540cc390cfa61defcf05ded0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 55e497de225847314bce4a2a2b22a4956fd313b032bcce0a9e2ff72f9c405672c2ad6d8b1dd59273dd457f2be5a4fcdad76dd71fa7bb47dfbf80cf47fee133ff
|
|
7
|
+
data.tar.gz: 7bcb8889c471a1d8748385367cd33438ffdb069da7c7e68c12d0a8109b4c8ab0c81c20f9f68716f1d0f650a49aee53f954c00b502f6e2b30e8fe5eb72777be30
|
|
@@ -32,7 +32,7 @@ class OpenStax::Content::Page
|
|
|
32
32
|
node.at_css(feature_id_css)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
-
def initialize(book: nil, hash: {}, uuid: nil, url: nil, title: nil, content: nil)
|
|
35
|
+
def initialize(book: nil, hash: {}, uuid: nil, url: nil, title: nil, slug: nil, content: nil)
|
|
36
36
|
@uuid = uuid || hash['id']&.split('@', 2)&.first
|
|
37
37
|
raise ArgumentError, 'Either uuid or hash with id key is required' if @uuid.nil?
|
|
38
38
|
|
|
@@ -40,11 +40,12 @@ class OpenStax::Content::Page
|
|
|
40
40
|
@hash = hash
|
|
41
41
|
@url = url
|
|
42
42
|
@title = title || hash['title']
|
|
43
|
+
@slug = slug || hash['slug']
|
|
43
44
|
@content = content
|
|
44
45
|
end
|
|
45
46
|
|
|
46
47
|
attr_accessor :chapter_section
|
|
47
|
-
attr_reader :uuid, :hash
|
|
48
|
+
attr_reader :uuid, :hash, :slug
|
|
48
49
|
|
|
49
50
|
def book
|
|
50
51
|
raise ArgumentError, 'Book was not specified' if @book.nil?
|
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: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dante Soares
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-03-
|
|
11
|
+
date: 2022-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-s3
|