bridgetown-prismic 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56e0eed8c50d51d6f538fab3b668a91a7d3f7f3f46d57d2c490c8aacb52eff05
4
- data.tar.gz: a75e8798afc0371f4ffc527c7039e041949d5bb81de7385272363cab80809ccc
3
+ metadata.gz: 89b1b74e994bff779fee47505c7f77a525d9ede0983404396b3779752d0d0e90
4
+ data.tar.gz: 6edd623ac070d3b979c4d339bccb307c27cf4a87c653b4b75b3792cead5aff30
5
5
  SHA512:
6
- metadata.gz: d425281cac0cb61fa3bc7c125d8dfdc1314656fce1fca3a33eb4e8f34ec03cf3307bf8dc2b181f00243791cbccae1661c6682ab71d60b51e01774c41b08272e8
7
- data.tar.gz: f93e824937a93b293fe0b10ca48086f3ad95d1df4540ff21171ac9273f7da45a82362735ab7626c48c379cd0fe9f2cb061a5be515e79cd2de42ca20f25e4c4a3
6
+ metadata.gz: e9b8ee9e19c3ab110ca18d53948a08166bfac59f7611ba4d2c41d23503d39091d678e98f4717e8e5848640915aa486c21d564bcf4e215d3289e69cf9ab5c5404
7
+ data.tar.gz: 1d5a2172813ec56747851d3dbd8c2a56c0337030b94e5ab90e47f8bf2b2faad879a79fca786f9dab8a465b5096149a015f162f04c1ce4a00f139add2ccdf7c25
data/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ 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
+
10
14
  ## [1.0.0] - 2022-10-08
11
15
 
12
16
  - Upgrade to initializers system in Bridgetown 1.2
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
- $ bin/bridgetown apply https://github.com/bridgetownrb/bridgetown-prismic
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
- Bridgetown::Rack::Routes.start! self
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
- This would result in a `resource.data.tiles` array with one or more hashes including `backdrop`, `heading`, and `description` keys.
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
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
 
18
18
  spec.required_ruby_version = ">= 3.0"
19
19
 
20
- spec.add_dependency "bridgetown", ">= 1.2.0.beta2", "< 2.0"
20
+ spec.add_dependency "bridgetown", ">= 1.2.0", "< 2.0"
21
21
  spec.add_dependency "prismic.io", ">= 1.8"
22
22
  spec.add_dependency "async", ">= 2.0"
23
23
 
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownPrismic
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
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: 1.0.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: 2022-10-09 00:00:00.000000000 Z
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.2.0.beta2
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.2.0.beta2
29
+ version: 1.2.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'