Skip to content

Commit

Permalink
Merge pull request #67 from keyasuda/v0114
Browse files Browse the repository at this point in the history
v0.1.14
  • Loading branch information
keyasuda authored Jan 3, 2023
2 parents ffa23cc + 93afd02 commit e028b18
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.1.14] - 2022-01-03

- avoid TypeError with old app.js

## [0.1.13] - 2022-01-02

- enable JS::Object#await
Expand Down
2 changes: 1 addition & 1 deletion gem/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
bormashino (0.1.13)
bormashino (0.1.14)
json_pure (~> 2.6, >= 2.6.1)
os (~> 1.1, >= 1.1.4)
ruby2_keywords (= 0.0.4)
Expand Down
2 changes: 1 addition & 1 deletion gem/lib/bormashino/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Bormashino
VERSION = '0.1.13'
VERSION = '0.1.14'
end
4 changes: 2 additions & 2 deletions npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bormashino",
"description": "The package to build SPAs with Ruby",
"homepage": "https://github.com/keyasuda/bormashino",
"version": "0.1.13",
"version": "0.1.14",
"main": "src/index.js",
"scripts": {
"test": "jest --notify src/",
Expand Down
3 changes: 3 additions & 0 deletions npm/src/ruby.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export const initVmFromRubyModule = async (
}

const requestToServer = async (method, path, payload, referer) => {
if (typeof window.bormashino == 'undefined') {
window.bormashino = {}
}
window.bormashino.requestSrc = JSON.stringify({
method,
path,
Expand Down
2 changes: 1 addition & 1 deletion test-app/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: ../gem
specs:
bormashino (0.1.13)
bormashino (0.1.14)
json_pure (~> 2.6, >= 2.6.1)
os (~> 1.1, >= 1.1.4)
ruby2_keywords (= 0.0.4)
Expand Down
6 changes: 3 additions & 3 deletions test-app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const main = async () => {
'dispatched: ' + Number(new Date())
})

window.bormashino = RubyApplication
window.rubyVM = vm

const currentPath = () => location.href.replace(location.origin, '')
RubyApplication.request('get', currentPath())
RubyApplication.mount()

window.bormashino = RubyApplication
window.rubyVM = vm
}

main()
2 changes: 1 addition & 1 deletion test-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion test-app/spec/test_app_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
visit 'http://localhost:5000'
loop do
sleep 1
break if page.find(:css, 'h1')
begin
break if page.find(:css, 'h1')
rescue StandardError
end
end
end

Expand Down

0 comments on commit e028b18

Please sign in to comment.