openstax_content 1.2.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 +4 -4
- data/lib/openstax/content/abl.rb +3 -1
- data/lib/openstax/content/book.rb +12 -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: 82eddc2890b74eeea7b59646cda86001dbb0385ddc00ad874ae5f69573441d57
|
|
4
|
+
data.tar.gz: a8f83e6c1a5bb7c0e5cda4e6171da21da8cfce91e1e89c74ecc954a8299015eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34fe275a54727deb10d3636fbc82cf3c9a86461d67f6695ea157209b71ae0ded2660d4c0e4f100af332c5db9bb5b8b54769ce22f060ff96d13e2b3be9a3f98cc
|
|
7
|
+
data.tar.gz: 05ec447981510aac02c672ba6606aaf111ffe785ffdc5b7a8d1a0223f7e8c3807da7168b61551e1acc23d48cf31134a6d080e2a65ee4864a7a2491787b85eac3
|
data/lib/openstax/content/abl.rb
CHANGED
|
@@ -71,7 +71,9 @@ class OpenStax::Content::Abl
|
|
|
71
71
|
uuid: book[:uuid],
|
|
72
72
|
version: version[:commit_sha][0..6],
|
|
73
73
|
slug: book[:slug],
|
|
74
|
-
style: book[:style]
|
|
74
|
+
style: book[:style],
|
|
75
|
+
min_code_version: version[:min_code_version],
|
|
76
|
+
committed_at: commit_metadata[:committed_at]
|
|
75
77
|
)
|
|
76
78
|
end
|
|
77
79
|
end
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
require 'forwardable'
|
|
1
2
|
require_relative 'book_part'
|
|
2
3
|
|
|
3
4
|
class OpenStax::Content::Book
|
|
4
5
|
extend Forwardable
|
|
5
6
|
|
|
6
|
-
attr_reader :archive, :uuid, :version, :slug, :style
|
|
7
|
+
attr_reader :archive, :uuid, :version, :slug, :style, :min_code_version, :committed_at
|
|
7
8
|
|
|
8
|
-
def initialize(
|
|
9
|
+
def initialize(
|
|
10
|
+
archive:, uuid:, version:,
|
|
11
|
+
url: nil, hash: nil, slug: nil, style: nil, min_code_version: nil, committed_at: nil
|
|
12
|
+
)
|
|
9
13
|
@archive = archive
|
|
10
14
|
@uuid = uuid
|
|
11
15
|
@version = version
|
|
@@ -13,6 +17,12 @@ class OpenStax::Content::Book
|
|
|
13
17
|
@hash = hash
|
|
14
18
|
@slug = slug
|
|
15
19
|
@style = style
|
|
20
|
+
@min_code_version = min_code_version
|
|
21
|
+
@committed_at = committed_at
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def valid?
|
|
25
|
+
min_code_version.nil? || min_code_version <= archive.version
|
|
16
26
|
end
|
|
17
27
|
|
|
18
28
|
def url
|
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.3.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-
|
|
11
|
+
date: 2022-08-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-s3
|