bridgetown-plugin-nano 0.2.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6d4e8b58579fa4420e46b3a7971d43e72f4a93dcf78d9cb478077a3d952ea8e
4
- data.tar.gz: c38c74346a665fde4cd252ff64e1a5ecdd47b47dc85239ffb5d65e6868f504b0
3
+ metadata.gz: f665f24f3f5c184da19e2e32971eab372fb02cba9e35e7a1d3a8834eb3bbca47
4
+ data.tar.gz: de969199ab18171eb454a0f6a4423d9fcd3fba9f9782c4c85fbe82651496cbcf
5
5
  SHA512:
6
- metadata.gz: 1c50d7e3edc9424bcd3c9c9dd630801f5349f73b8cbe01823a57e727e4a225da02ff4c2a9b8de20065d73eb6b1ec1e261b60c164381609e4dce6a4e4ed9478ce
7
- data.tar.gz: 489ec22ee1301cd5fd8abb02717edcdea78d22667d08936481cb4422f8a5c7d45a97c991782b3297d3749cf09aa35480f245f31b055f4ef83a7f4b56dc44fd4b
6
+ metadata.gz: 6de7d87350c001e2e3d246966fb4e2b313fa32bf1374a530d9a132dbc64efad00a6ade93eb972be50d10d7a671285ec64dc4236f5f68f0b37e894ef9cb3f8f46
7
+ data.tar.gz: 792b1e1893a07b8c7225c0ce9fabe90f7238de2ef6558a80e87d3928a80a21b0db710c159f900ae9aadf421f3c228f484ecb2451d55a4dc48b2a88c86742f418
data/CHANGELOG.md CHANGED
@@ -1,7 +1,9 @@
1
- # master
1
+ # main
2
2
 
3
- * Use this file to keep track of plugin updates
3
+ # 0.2.1 / 2021-02-13
4
4
 
5
- # 0.1.0 / 2020-05-01
5
+ * Release as gem for further testing
6
6
 
7
- * First version
7
+ # 0.1.0 / 2020-12-28
8
+
9
+ * First test version
@@ -17,10 +17,23 @@ module BridgetownPluginNano
17
17
 
18
18
  inject_into_file "webpack.config.js", <<-JS, after: "\n plugins: [\n"
19
19
  new webpack.DefinePlugin({
20
- NANO_API_URL: JSON.stringify(process.env.NANO_API_URL || "")
20
+ NANO_API_URL: JSON.stringify(process.env.NANO_API_URL || "/backend")
21
21
  }),
22
22
  JS
23
23
 
24
+ append_to_file "frontend/javascript/index.js" do
25
+ <<~JS
26
+
27
+ async function testNanoAPI() {
28
+ const resp = await fetch(`${NANO_API_URL}/nano`)
29
+ const data = await resp.json()
30
+ document.querySelector("main").innerHTML += `<p><code>${JSON.stringify(data)}</code></p>`
31
+ }
32
+
33
+ testNanoAPI()
34
+ JS
35
+ end
36
+
24
37
  append_to_file "Gemfile" do
25
38
  <<~RUBY
26
39
 
@@ -17,4 +17,6 @@ class NanoAPI < Rails::Application
17
17
  config.secret_key_base = ENV["SECRET_KEY_BASE"] # Rails won't boot w/o a secret token for session, cookies, etc.
18
18
  end
19
19
 
20
+ require_relative "base_classes"
21
+
20
22
  NanoAPI.initialize!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownPluginNano
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-plugin-nano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team