bridgetown-prismic 0.3.0 → 1.0.1
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/CHANGELOG.md +8 -0
- data/README.md +5 -4
- data/bridgetown-prismic.gemspec +2 -2
- data/lib/bridgetown-prismic/builder.rb +0 -2
- data/lib/bridgetown-prismic/origin.rb +2 -2
- data/lib/bridgetown-prismic/version.rb +1 -1
- data/lib/bridgetown-prismic.rb +4 -0
- metadata +4 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89b1b74e994bff779fee47505c7f77a525d9ede0983404396b3779752d0d0e90
|
4
|
+
data.tar.gz: 6edd623ac070d3b979c4d339bccb307c27cf4a87c653b4b75b3792cead5aff30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9b8ee9e19c3ab110ca18d53948a08166bfac59f7611ba4d2c41d23503d39091d678e98f4717e8e5848640915aa486c21d564bcf4e215d3289e69cf9ab5c5404
|
7
|
+
data.tar.gz: 1d5a2172813ec56747851d3dbd8c2a56c0337030b94e5ab90e47f8bf2b2faad879a79fca786f9dab8a465b5096149a015f162f04c1ce4a00f139add2ccdf7c25
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [1.0.1] - 2023-06-09
|
11
|
+
|
12
|
+
- Use updated method signature for origin initializer
|
13
|
+
|
14
|
+
## [1.0.0] - 2022-10-08
|
15
|
+
|
16
|
+
- Upgrade to initializers system in Bridgetown 1.2
|
17
|
+
|
10
18
|
## [0.3.0] - 2022-06-01
|
11
19
|
|
12
20
|
- Support Builder priority feature in Bridgetown 1.1 (fixes #3)
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ This plugin requires Ruby 3 and the latest alpha version of [Bridgetown 1.0](htt
|
|
11
11
|
Add the gem to your Gemfile and set up initial configuration by running the automation script:
|
12
12
|
|
13
13
|
```sh
|
14
|
-
|
14
|
+
bin/bridgetown apply https://github.com/bridgetownrb/bridgetown-prismic
|
15
15
|
```
|
16
16
|
|
17
17
|
This will add a `prismic_repository` setting to your `bridgetown.config.yml` file. Replace that with the subdomain of your Prismic repo.
|
@@ -47,7 +47,7 @@ class RodaApp < Bridgetown::Rack::Roda
|
|
47
47
|
plugin :bridgetown_ssr
|
48
48
|
|
49
49
|
route do |r|
|
50
|
-
|
50
|
+
r.bridgetown
|
51
51
|
end
|
52
52
|
end
|
53
53
|
```
|
@@ -178,7 +178,7 @@ A few notes on the Ruby DSL:
|
|
178
178
|
end.flatten.compact
|
179
179
|
}
|
180
180
|
```
|
181
|
-
|
181
|
+
This would result in a `resource.data.tiles` array with one or more hashes including `backdrop`, `heading`, and `description` keys.
|
182
182
|
|
183
183
|
The Ruby DSL is pretty nifty, but you may occasionally run into a conflict between your variable name and an existing Ruby method. For example, you couldn't add something like `method doc["page.method"] .as_text` because `method` is an existing Ruby object method. Instead, use `set` like so:
|
184
184
|
|
@@ -292,7 +292,8 @@ Please submit an issue to this GitHub repo and we'll address your concerns as so
|
|
292
292
|
|
293
293
|
## Testing This Gem
|
294
294
|
|
295
|
-
* Run `bundle exec rake test` to run the test suite
|
295
|
+
* Run `bundle exec rake test` to run the test suite (make sure to run `bundle
|
296
|
+
install`)
|
296
297
|
* Or run `script/cibuild` to validate with Rubocop and Minitest together.
|
297
298
|
|
298
299
|
## Contributing
|
data/bridgetown-prismic.gemspec
CHANGED
@@ -17,9 +17,9 @@ Gem::Specification.new do |spec|
|
|
17
17
|
|
18
18
|
spec.required_ruby_version = ">= 3.0"
|
19
19
|
|
20
|
-
spec.add_dependency "bridgetown", ">= 1.
|
20
|
+
spec.add_dependency "bridgetown", ">= 1.2.0", "< 2.0"
|
21
21
|
spec.add_dependency "prismic.io", ">= 1.8"
|
22
|
-
spec.add_dependency "async", ">=
|
22
|
+
spec.add_dependency "async", ">= 2.0"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "rake", ">= 13.0"
|
@@ -12,8 +12,8 @@ module BridgetownPrismic
|
|
12
12
|
def self.import_document(document) = new("prismic://#{document.type}/#{document.id}",
|
13
13
|
document).read
|
14
14
|
|
15
|
-
def initialize(id, prismic_document = nil)
|
16
|
-
super(id)
|
15
|
+
def initialize(id, prismic_document = nil, site: Bridgetown::Current.site)
|
16
|
+
super(id, site: site)
|
17
17
|
@relative_path = Pathname.new("#{id.delete_prefix("prismic://")}.html")
|
18
18
|
@prismic_document = prismic_document # could be nil, so model should load preview instance
|
19
19
|
end
|
data/lib/bridgetown-prismic.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-prismic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.2.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '2.0'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.2.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '2.0'
|
@@ -49,9 +49,6 @@ dependencies:
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.30'
|
54
|
-
- - "<"
|
55
52
|
- !ruby/object:Gem::Version
|
56
53
|
version: '2.0'
|
57
54
|
type: :runtime
|
@@ -59,9 +56,6 @@ dependencies:
|
|
59
56
|
version_requirements: !ruby/object:Gem::Requirement
|
60
57
|
requirements:
|
61
58
|
- - ">="
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '1.30'
|
64
|
-
- - "<"
|
65
59
|
- !ruby/object:Gem::Version
|
66
60
|
version: '2.0'
|
67
61
|
- !ruby/object:Gem::Dependency
|