From 2eab67d1d032b6d9282a8c0cd0e9e72ab6b3cc3a Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 13 Apr 2021 01:07:10 -0400 Subject: [PATCH 01/43] updated notes --- release-notes/1.0.alpha1.8.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/release-notes/1.0.alpha1.8.md b/release-notes/1.0.alpha1.8.md index 6df58b68e..349055818 100644 --- a/release-notes/1.0.alpha1.8.md +++ b/release-notes/1.0.alpha1.8.md @@ -5,8 +5,7 @@ | April 12, 2021 | 1.0.alpha1.8 | 127 | 36 | 9 | | April 5, 2021 | 1.0.alpha1.7 | 147 | 35 | 10 | | March 29, 2021 | 1.0.alpha1.6 | 167 | 35 | 10 | -> Open issues includes enhancements, documentation, and discussion issues as well as few bugs. Additional issues -may be closed that are not documented below because of duplicates, documentation updates, and old issues previously closed. +> Open issues includes enhancements, documentation, and discussion issues as well as few bugs. Issues tagged for post launch are not included. Additional issues may be closed that are not documented below because of duplicates, documentation updates, and old issues previously closed. > > The documentation WIP (work in progress) numbers are approx, as more sections may be added. From c7b3d6ada22fc0e2ef0feb66eb9f7fd3dbbf713c Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 13 Apr 2021 01:24:04 -0400 Subject: [PATCH 02/43] updated gemspec links --- ruby/hyper-component/hyper-component.gemspec | 4 +++- ruby/hyper-i18n/hyper-i18n.gemspec | 4 +++- ruby/hyper-model/hyper-model.gemspec | 2 ++ ruby/hyper-operation/hyper-operation.gemspec | 2 ++ ruby/hyper-router/hyper-router.gemspec | 4 +++- ruby/hyper-spec/hyper-spec.gemspec | 4 +++- ruby/hyper-state/hyper-state.gemspec | 4 +++- ruby/hyper-store/hyper-store.gemspec | 4 +++- ruby/hyper-trace/hyper-trace.gemspec | 4 +++- ruby/hyperstack-config/hyperstack-config.gemspec | 2 ++ ruby/rails-hyperstack/rails-hyperstack.gemspec | 2 ++ 11 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index 8b2049eac..e3523426d 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -8,7 +8,9 @@ Gem::Specification.new do |spec| spec.authors = ['David Chang', 'Adam Jahn', 'Mitch VanDuyn', 'Jan Biedermann', 'Adam Creekroad'] spec.email = ['mitch@catprint.com'] - spec.homepage = 'http://hyperstack.org' + spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.summary = 'Opal Ruby wrapper of React.js library.' spec.license = 'MIT' spec.description = 'Write React UI components in pure Ruby.' diff --git a/ruby/hyper-i18n/hyper-i18n.gemspec b/ruby/hyper-i18n/hyper-i18n.gemspec index 568d1a7f9..5b0138efa 100644 --- a/ruby/hyper-i18n/hyper-i18n.gemspec +++ b/ruby/hyper-i18n/hyper-i18n.gemspec @@ -11,7 +11,9 @@ Gem::Specification.new do |spec| spec.email = ['adamgeorge.31@gmail.com'] spec.summary = 'HyperI18n seamlessly brings Rails I18n into your Hyperstack application.' - spec.homepage = 'https://www.github.com/ruby-hyperstack/hyper-i18n' + spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' spec.files = `git ls-files`.split("\n") diff --git a/ruby/hyper-model/hyper-model.gemspec b/ruby/hyper-model/hyper-model.gemspec index 61e8d1788..85bd85398 100644 --- a/ruby/hyper-model/hyper-model.gemspec +++ b/ruby/hyper-model/hyper-model.gemspec @@ -14,6 +14,8 @@ Gem::Specification.new do |spec| 'possible technologies) so changes to records on the server are '\ 'dynamically updated on all authorised clients.' spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' # spec.metadata = { # "homepage_uri" => 'http://ruby-hyperstack.org', diff --git a/ruby/hyper-operation/hyper-operation.gemspec b/ruby/hyper-operation/hyper-operation.gemspec index d4bec9065..0c6e2a774 100644 --- a/ruby/hyper-operation/hyper-operation.gemspec +++ b/ruby/hyper-operation/hyper-operation.gemspec @@ -10,6 +10,8 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'HyperOperations are the swiss army knife of the Hyperstack' spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' # spec.metadata = { # "homepage_uri" => 'http://ruby-hyperstack.org', diff --git a/ruby/hyper-router/hyper-router.gemspec b/ruby/hyper-router/hyper-router.gemspec index 2418fc684..d189fa6c8 100644 --- a/ruby/hyper-router/hyper-router.gemspec +++ b/ruby/hyper-router/hyper-router.gemspec @@ -7,7 +7,9 @@ Gem::Specification.new do |spec| spec.version = HyperRouter::VERSION spec.authors = ['Adam George', 'Jan Biedermann'] spec.email = ['adamgeorge.31@gmail.com', 'jan@kursator.com'] - spec.homepage = 'http://hyperstack.org' + spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' spec.summary = 'hyper-router for Opal, part of the hyperstack framework' diff --git a/ruby/hyper-spec/hyper-spec.gemspec b/ruby/hyper-spec/hyper-spec.gemspec index 0b1d645f5..65fad62b7 100644 --- a/ruby/hyper-spec/hyper-spec.gemspec +++ b/ruby/hyper-spec/hyper-spec.gemspec @@ -12,7 +12,9 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.description = 'A Hyperstack application consists of isomorphic React Components, '\ 'Active Record Models, Stores, Operations and Policiespec. '\ 'Test them all from Rspec, regardless if the code runs on the client or server.' - spec.homepage = 'http://hyperstack.org' + spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-state/hyper-state.gemspec b/ruby/hyper-state/hyper-state.gemspec index 9b1f0b8d1..5ae8c7994 100644 --- a/ruby/hyper-state/hyper-state.gemspec +++ b/ruby/hyper-state/hyper-state.gemspec @@ -9,7 +9,9 @@ Gem::Specification.new do |spec| spec.authors = ['Mitch VanDuyn', 'Adam Creekroad', 'Jan Biedermann'] spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Flux Stores and more for Hyperloop' - spec.homepage = 'https://hyperstack.org' + spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-store/hyper-store.gemspec b/ruby/hyper-store/hyper-store.gemspec index a0b621cef..638cef72f 100644 --- a/ruby/hyper-store/hyper-store.gemspec +++ b/ruby/hyper-store/hyper-store.gemspec @@ -9,7 +9,9 @@ Gem::Specification.new do |spec| spec.authors = ['Mitch VanDuyn', 'Adam Creekroad', 'Jan Biedermann'] spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Flux Stores and more for Hyperloop' - spec.homepage = 'https://hyperstack.org' + spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-trace/hyper-trace.gemspec b/ruby/hyper-trace/hyper-trace.gemspec index 34ecd3095..ba2dfca80 100644 --- a/ruby/hyper-trace/hyper-trace.gemspec +++ b/ruby/hyper-trace/hyper-trace.gemspec @@ -10,7 +10,9 @@ Gem::Specification.new do |spec| spec.email = ["mitch@catprint.com"] spec.summary = %q{Method tracing and conditional breakpoints for Opal Ruby} - spec.homepage = "https://github.com/reactrb/hyper-trace" + spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = "MIT" spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } diff --git a/ruby/hyperstack-config/hyperstack-config.gemspec b/ruby/hyperstack-config/hyperstack-config.gemspec index 3db9ce49c..fc4076990 100644 --- a/ruby/hyperstack-config/hyperstack-config.gemspec +++ b/ruby/hyperstack-config/hyperstack-config.gemspec @@ -10,6 +10,8 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Provides a single point configuration module for hyperstack gems' spec.homepage = 'http://ruby-hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' # spec.metadata = { # "homepage_uri" => 'http://ruby-hyperstack.org', diff --git a/ruby/rails-hyperstack/rails-hyperstack.gemspec b/ruby/rails-hyperstack/rails-hyperstack.gemspec index 123f59b83..597932113 100644 --- a/ruby/rails-hyperstack/rails-hyperstack.gemspec +++ b/ruby/rails-hyperstack/rails-hyperstack.gemspec @@ -11,6 +11,8 @@ Gem::Specification.new do |spec| spec.authors = ['Loic Boutet', 'Adam George', 'Mitch VanDuyn', 'Jan Biedermann'] spec.email = ['loic@boutet.com', 'jan@kursator.com'] spec.homepage = 'http://hyperstack.org' + spec.documentation = 'https://docs.hyperstack.org/' + spec.download = 'https://github.com/hyperstack-org/hyperstack' spec.license = 'MIT' # spec.metadata = { # "homepage_uri" => 'http://hyperstack.org', From 438554f5fcf508462eba6d46b107842d3282e207 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 13 Apr 2021 01:49:42 -0400 Subject: [PATCH 03/43] updated gemspec links again --- ruby/hyper-component/hyper-component.gemspec | 3 +-- ruby/hyper-i18n/hyper-i18n.gemspec | 3 +-- ruby/hyper-model/hyper-model.gemspec | 8 +------- ruby/hyper-operation/hyper-operation.gemspec | 8 +------- ruby/hyper-router/hyper-router.gemspec | 3 +-- ruby/hyper-spec/hyper-spec.gemspec | 3 +-- ruby/hyper-state/hyper-state.gemspec | 3 +-- ruby/hyper-store/hyper-store.gemspec | 3 +-- ruby/hyper-trace/hyper-trace.gemspec | 3 +-- ruby/hyperstack-config/hyperstack-config.gemspec | 3 +-- ruby/rails-hyperstack/rails-hyperstack.gemspec | 3 +-- 11 files changed, 11 insertions(+), 32 deletions(-) diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index e3523426d..61faceefb 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -9,8 +9,7 @@ Gem::Specification.new do |spec| spec.authors = ['David Chang', 'Adam Jahn', 'Mitch VanDuyn', 'Jan Biedermann', 'Adam Creekroad'] spec.email = ['mitch@catprint.com'] spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.summary = 'Opal Ruby wrapper of React.js library.' spec.license = 'MIT' spec.description = 'Write React UI components in pure Ruby.' diff --git a/ruby/hyper-i18n/hyper-i18n.gemspec b/ruby/hyper-i18n/hyper-i18n.gemspec index 5b0138efa..a1be22779 100644 --- a/ruby/hyper-i18n/hyper-i18n.gemspec +++ b/ruby/hyper-i18n/hyper-i18n.gemspec @@ -12,8 +12,7 @@ Gem::Specification.new do |spec| spec.summary = 'HyperI18n seamlessly brings Rails I18n into your Hyperstack application.' spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files`.split("\n") diff --git a/ruby/hyper-model/hyper-model.gemspec b/ruby/hyper-model/hyper-model.gemspec index 85bd85398..d19f28ce4 100644 --- a/ruby/hyper-model/hyper-model.gemspec +++ b/ruby/hyper-model/hyper-model.gemspec @@ -14,14 +14,8 @@ Gem::Specification.new do |spec| 'possible technologies) so changes to records on the server are '\ 'dynamically updated on all authorised clients.' spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' - # spec.metadata = { - # "homepage_uri" => 'http://ruby-hyperstack.org', - # "source_code_uri" => 'https://github.com/ruby-hyperstack/hyper-component' - # } - spec.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(examples|gemfiles|pkg|reactive_record_test_app|spec)/}) } # spec.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } spec.test_files = `git ls-files -- {spec}/*`.split("\n") diff --git a/ruby/hyper-operation/hyper-operation.gemspec b/ruby/hyper-operation/hyper-operation.gemspec index 0c6e2a774..0c213c644 100644 --- a/ruby/hyper-operation/hyper-operation.gemspec +++ b/ruby/hyper-operation/hyper-operation.gemspec @@ -10,14 +10,8 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'HyperOperations are the swiss army knife of the Hyperstack' spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' - # spec.metadata = { - # "homepage_uri" => 'http://ruby-hyperstack.org', - # "source_code_uri" => 'https://github.com/ruby-hyperstack/hyper-component' - # } - spec.files = `git ls-files -z` .split("\x0") .reject { |f| f.match(%r{^(gemfiles|examples|spec)/}) } diff --git a/ruby/hyper-router/hyper-router.gemspec b/ruby/hyper-router/hyper-router.gemspec index d189fa6c8..711b46d9f 100644 --- a/ruby/hyper-router/hyper-router.gemspec +++ b/ruby/hyper-router/hyper-router.gemspec @@ -8,8 +8,7 @@ Gem::Specification.new do |spec| spec.authors = ['Adam George', 'Jan Biedermann'] spec.email = ['adamgeorge.31@gmail.com', 'jan@kursator.com'] spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.summary = 'hyper-router for Opal, part of the hyperstack framework' diff --git a/ruby/hyper-spec/hyper-spec.gemspec b/ruby/hyper-spec/hyper-spec.gemspec index 65fad62b7..265a7f47a 100644 --- a/ruby/hyper-spec/hyper-spec.gemspec +++ b/ruby/hyper-spec/hyper-spec.gemspec @@ -13,8 +13,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength 'Active Record Models, Stores, Operations and Policiespec. '\ 'Test them all from Rspec, regardless if the code runs on the client or server.' spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-state/hyper-state.gemspec b/ruby/hyper-state/hyper-state.gemspec index 5ae8c7994..53de3a72b 100644 --- a/ruby/hyper-state/hyper-state.gemspec +++ b/ruby/hyper-state/hyper-state.gemspec @@ -10,8 +10,7 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Flux Stores and more for Hyperloop' spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-store/hyper-store.gemspec b/ruby/hyper-store/hyper-store.gemspec index 638cef72f..ad994a2e6 100644 --- a/ruby/hyper-store/hyper-store.gemspec +++ b/ruby/hyper-store/hyper-store.gemspec @@ -10,8 +10,7 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Flux Stores and more for Hyperloop' spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-trace/hyper-trace.gemspec b/ruby/hyper-trace/hyper-trace.gemspec index ba2dfca80..68099681e 100644 --- a/ruby/hyper-trace/hyper-trace.gemspec +++ b/ruby/hyper-trace/hyper-trace.gemspec @@ -11,8 +11,7 @@ Gem::Specification.new do |spec| spec.summary = %q{Method tracing and conditional breakpoints for Opal Ruby} spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = "MIT" spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } diff --git a/ruby/hyperstack-config/hyperstack-config.gemspec b/ruby/hyperstack-config/hyperstack-config.gemspec index fc4076990..264855ce1 100644 --- a/ruby/hyperstack-config/hyperstack-config.gemspec +++ b/ruby/hyperstack-config/hyperstack-config.gemspec @@ -10,8 +10,7 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Provides a single point configuration module for hyperstack gems' spec.homepage = 'http://ruby-hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' # spec.metadata = { # "homepage_uri" => 'http://ruby-hyperstack.org', diff --git a/ruby/rails-hyperstack/rails-hyperstack.gemspec b/ruby/rails-hyperstack/rails-hyperstack.gemspec index 597932113..cb0ec8a81 100644 --- a/ruby/rails-hyperstack/rails-hyperstack.gemspec +++ b/ruby/rails-hyperstack/rails-hyperstack.gemspec @@ -11,8 +11,7 @@ Gem::Specification.new do |spec| spec.authors = ['Loic Boutet', 'Adam George', 'Mitch VanDuyn', 'Jan Biedermann'] spec.email = ['loic@boutet.com', 'jan@kursator.com'] spec.homepage = 'http://hyperstack.org' - spec.documentation = 'https://docs.hyperstack.org/' - spec.download = 'https://github.com/hyperstack-org/hyperstack' + spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } spec.license = 'MIT' # spec.metadata = { # "homepage_uri" => 'http://hyperstack.org', From e5d0300c6da9cc95f1aa955c69a70ce55bfebcf1 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 13 Apr 2021 01:54:48 -0400 Subject: [PATCH 04/43] gemspec meta data has to be strings not symbols --- ruby/hyper-component/hyper-component.gemspec | 2 +- ruby/hyper-i18n/hyper-i18n.gemspec | 2 +- ruby/hyper-model/hyper-model.gemspec | 2 +- ruby/hyper-operation/hyper-operation.gemspec | 2 +- ruby/hyper-router/hyper-router.gemspec | 2 +- ruby/hyper-spec/hyper-spec.gemspec | 2 +- ruby/hyper-state/hyper-state.gemspec | 2 +- ruby/hyper-store/hyper-store.gemspec | 2 +- ruby/hyper-trace/hyper-trace.gemspec | 2 +- ruby/hyperstack-config/hyperstack-config.gemspec | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index 61faceefb..098621d3d 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |spec| spec.authors = ['David Chang', 'Adam Jahn', 'Mitch VanDuyn', 'Jan Biedermann', 'Adam Creekroad'] spec.email = ['mitch@catprint.com'] spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.summary = 'Opal Ruby wrapper of React.js library.' spec.license = 'MIT' spec.description = 'Write React UI components in pure Ruby.' diff --git a/ruby/hyper-i18n/hyper-i18n.gemspec b/ruby/hyper-i18n/hyper-i18n.gemspec index a1be22779..a2d66610a 100644 --- a/ruby/hyper-i18n/hyper-i18n.gemspec +++ b/ruby/hyper-i18n/hyper-i18n.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |spec| spec.summary = 'HyperI18n seamlessly brings Rails I18n into your Hyperstack application.' spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files`.split("\n") diff --git a/ruby/hyper-model/hyper-model.gemspec b/ruby/hyper-model/hyper-model.gemspec index d19f28ce4..11dca81b8 100644 --- a/ruby/hyper-model/hyper-model.gemspec +++ b/ruby/hyper-model/hyper-model.gemspec @@ -14,7 +14,7 @@ Gem::Specification.new do |spec| 'possible technologies) so changes to records on the server are '\ 'dynamically updated on all authorised clients.' spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(examples|gemfiles|pkg|reactive_record_test_app|spec)/}) } # spec.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) } diff --git a/ruby/hyper-operation/hyper-operation.gemspec b/ruby/hyper-operation/hyper-operation.gemspec index 0c213c644..1f8b4bdab 100644 --- a/ruby/hyper-operation/hyper-operation.gemspec +++ b/ruby/hyper-operation/hyper-operation.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'HyperOperations are the swiss army knife of the Hyperstack' spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files -z` .split("\x0") diff --git a/ruby/hyper-router/hyper-router.gemspec b/ruby/hyper-router/hyper-router.gemspec index 711b46d9f..7d401e191 100644 --- a/ruby/hyper-router/hyper-router.gemspec +++ b/ruby/hyper-router/hyper-router.gemspec @@ -8,7 +8,7 @@ Gem::Specification.new do |spec| spec.authors = ['Adam George', 'Jan Biedermann'] spec.email = ['adamgeorge.31@gmail.com', 'jan@kursator.com'] spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.summary = 'hyper-router for Opal, part of the hyperstack framework' diff --git a/ruby/hyper-spec/hyper-spec.gemspec b/ruby/hyper-spec/hyper-spec.gemspec index 265a7f47a..02261b929 100644 --- a/ruby/hyper-spec/hyper-spec.gemspec +++ b/ruby/hyper-spec/hyper-spec.gemspec @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength 'Active Record Models, Stores, Operations and Policiespec. '\ 'Test them all from Rspec, regardless if the code runs on the client or server.' spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-state/hyper-state.gemspec b/ruby/hyper-state/hyper-state.gemspec index 53de3a72b..e6121cc27 100644 --- a/ruby/hyper-state/hyper-state.gemspec +++ b/ruby/hyper-state/hyper-state.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Flux Stores and more for Hyperloop' spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-store/hyper-store.gemspec b/ruby/hyper-store/hyper-store.gemspec index ad994a2e6..f5efb902e 100644 --- a/ruby/hyper-store/hyper-store.gemspec +++ b/ruby/hyper-store/hyper-store.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Flux Stores and more for Hyperloop' spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(gemfiles|spec)/}) } spec.bindir = 'exe' diff --git a/ruby/hyper-trace/hyper-trace.gemspec b/ruby/hyper-trace/hyper-trace.gemspec index 68099681e..0be02035e 100644 --- a/ruby/hyper-trace/hyper-trace.gemspec +++ b/ruby/hyper-trace/hyper-trace.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |spec| spec.summary = %q{Method tracing and conditional breakpoints for Opal Ruby} spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = "MIT" spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } diff --git a/ruby/hyperstack-config/hyperstack-config.gemspec b/ruby/hyperstack-config/hyperstack-config.gemspec index 264855ce1..c6955534b 100644 --- a/ruby/hyperstack-config/hyperstack-config.gemspec +++ b/ruby/hyperstack-config/hyperstack-config.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.email = ['mitch@catprint.com', 'jan@kursator.com'] spec.summary = 'Provides a single point configuration module for hyperstack gems' spec.homepage = 'http://ruby-hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' # spec.metadata = { # "homepage_uri" => 'http://ruby-hyperstack.org', From e2106545249b4cbd2f323dc456a4fb0e1f7edd93 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 13 Apr 2021 02:00:41 -0400 Subject: [PATCH 05/43] missed updating rails-hyperspec gemspec --- ruby/rails-hyperstack/rails-hyperstack.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby/rails-hyperstack/rails-hyperstack.gemspec b/ruby/rails-hyperstack/rails-hyperstack.gemspec index cb0ec8a81..f42541c2d 100644 --- a/ruby/rails-hyperstack/rails-hyperstack.gemspec +++ b/ruby/rails-hyperstack/rails-hyperstack.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |spec| spec.authors = ['Loic Boutet', 'Adam George', 'Mitch VanDuyn', 'Jan Biedermann'] spec.email = ['loic@boutet.com', 'jan@kursator.com'] spec.homepage = 'http://hyperstack.org' - spec.metadata = { documentation_uri: 'https://docs.hyperstack.org/' } + spec.metadata = { 'documentation_uri' => 'https://docs.hyperstack.org/' } spec.license = 'MIT' # spec.metadata = { # "homepage_uri" => 'http://hyperstack.org', From 179353ce7a0ff0b73b0b74dd251839c48ae53b2f Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 13 Apr 2021 02:29:00 -0400 Subject: [PATCH 06/43] using mini_racer < 0.4.0 in test because of weird libv8-node checksum problem --- ruby/hyper-component/hyper-component.gemspec | 2 +- ruby/hyper-i18n/hyper-i18n.gemspec | 2 +- ruby/hyper-model/hyper-model.gemspec | 2 +- ruby/hyper-router/hyper-router.gemspec | 2 +- ruby/hyper-spec/hyper-spec.gemspec | 2 +- ruby/hyper-state/hyper-state.gemspec | 2 +- ruby/hyper-store/hyper-store.gemspec | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index 098621d3d..8239235dc 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'jquery-rails' spec.add_development_dependency 'listen' spec.add_development_dependency 'mime-types' - spec.add_development_dependency 'mini_racer' + spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'nokogiri' spec.add_development_dependency 'opal-jquery' spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' diff --git a/ruby/hyper-i18n/hyper-i18n.gemspec b/ruby/hyper-i18n/hyper-i18n.gemspec index a2d66610a..492638eed 100644 --- a/ruby/hyper-i18n/hyper-i18n.gemspec +++ b/ruby/hyper-i18n/hyper-i18n.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'chromedriver-helper' spec.add_development_dependency 'hyper-model', Hyperstack::I18n::VERSION spec.add_development_dependency 'hyper-spec', Hyperstack::I18n::VERSION - spec.add_development_dependency 'mini_racer' + spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0.0' spec.add_development_dependency 'pry' spec.add_development_dependency 'puma' diff --git a/ruby/hyper-model/hyper-model.gemspec b/ruby/hyper-model/hyper-model.gemspec index 11dca81b8..1cb213c15 100644 --- a/ruby/hyper-model/hyper-model.gemspec +++ b/ruby/hyper-model/hyper-model.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'factory_bot_rails' spec.add_development_dependency 'hyper-spec', HyperModel::VERSION spec.add_development_dependency 'hyper-trace', HyperModel::VERSION - spec.add_development_dependency 'mini_racer' + spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'pg' spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' diff --git a/ruby/hyper-router/hyper-router.gemspec b/ruby/hyper-router/hyper-router.gemspec index 7d401e191..6332a7485 100644 --- a/ruby/hyper-router/hyper-router.gemspec +++ b/ruby/hyper-router/hyper-router.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'hyper-spec', HyperRouter::VERSION spec.add_development_dependency 'hyper-store', HyperRouter::VERSION spec.add_development_dependency 'listen' - spec.add_development_dependency 'mini_racer' + spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' diff --git a/ruby/hyper-spec/hyper-spec.gemspec b/ruby/hyper-spec/hyper-spec.gemspec index 02261b929..f2f82ea2a 100644 --- a/ruby/hyper-spec/hyper-spec.gemspec +++ b/ruby/hyper-spec/hyper-spec.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.add_development_dependency 'bundler' spec.add_development_dependency 'hyper-component', HyperSpec::VERSION - spec.add_development_dependency 'mini_racer' + spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'opal-browser', '~> 0.2.0' spec.add_development_dependency 'opal-rails', '>= 0.9.4' spec.add_development_dependency 'pry-rescue' diff --git a/ruby/hyper-state/hyper-state.gemspec b/ruby/hyper-state/hyper-state.gemspec index e6121cc27..000d0046e 100644 --- a/ruby/hyper-state/hyper-state.gemspec +++ b/ruby/hyper-state/hyper-state.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'hyper-component', Hyperstack::State::VERSION spec.add_development_dependency 'hyper-spec', Hyperstack::State::VERSION spec.add_development_dependency 'listen' - # spec.add_development_dependency 'mini_racer', '~> 0.2.4' + # spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency, '~> 0.2.4' spec.add_development_dependency 'opal-browser', '~> 0.2.0' spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' diff --git a/ruby/hyper-store/hyper-store.gemspec b/ruby/hyper-store/hyper-store.gemspec index f5efb902e..922292445 100644 --- a/ruby/hyper-store/hyper-store.gemspec +++ b/ruby/hyper-store/hyper-store.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'hyper-component', Hyperstack::Legacy::Store::VERSION spec.add_development_dependency 'hyper-spec', Hyperstack::Legacy::Store::VERSION spec.add_development_dependency 'listen' - # spec.add_development_dependency 'mini_racer', '~> 0.2.6' + # spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency, '~> 0.2.6' spec.add_development_dependency 'opal-browser', '~> 0.2.0' spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' From 9a6e46682720cd7359feb3e6bed1c9953a5ba945 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 13 Apr 2021 04:01:10 -0400 Subject: [PATCH 07/43] updated readme investigate intermittent spec failure --- docs/hyper-state/README.md | 2 +- ruby/hyper-model/spec/batch3/has_and_belongs_to_many_spec.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/hyper-state/README.md b/docs/hyper-state/README.md index 0f3131d14..863afa1eb 100644 --- a/docs/hyper-state/README.md +++ b/docs/hyper-state/README.md @@ -2,7 +2,7 @@ ### Revisiting the Tic Tac Toe Game -The easiest way to understand HyperState is by example. If you you did not see the Tic-Tac-Toe example, then **[please review it now](client-dsl/interlude-tic-tac-toe.md)**, as we are going to use this to demonstrate how to use the `Hyperstack::State::Observable` module. +The easiest way to understand HyperState is by example. If you you did not see the Tic-Tac-Toe example, then **[please review it now](/client-dsl/interlude-tic-tac-toe.md)**, as we are going to use this to demonstrate how to use the `Hyperstack::State::Observable` module. In our original Tic-Tac-Toe implementation the state of the game was stored in the `DisplayGame` component. State was updated by "bubbling up" events from lower level components up to `DisplayGame` where the event handler updated the state. diff --git a/ruby/hyper-model/spec/batch3/has_and_belongs_to_many_spec.rb b/ruby/hyper-model/spec/batch3/has_and_belongs_to_many_spec.rb index 6b2e2d073..be2fc20e7 100644 --- a/ruby/hyper-model/spec/batch3/has_and_belongs_to_many_spec.rb +++ b/ruby/hyper-model/spec/batch3/has_and_belongs_to_many_spec.rb @@ -88,6 +88,7 @@ class Patient < ActiveRecord::Base expect { Physician.first.patients.count }.on_client_to eq(1) Patient.create(name: 'Spock').physicians << mccoy + sleep 0.2 expect { Hyperstack::Model.load { Physician.first.patients.count } }.on_client_to eq(2) on_client { Patient.create(name: 'Uhuru') } From 4334ccf422f88789668cb26848d6cd3653bec42b Mon Sep 17 00:00:00 2001 From: adamcreekroad Date: Tue, 13 Apr 2021 16:16:21 -0400 Subject: [PATCH 08/43] Mimic ruby handling of send(nil), includes spec --- .../active_record/class_methods.rb | 10 ++++++--- .../active_record/class_methods_spec.rb | 21 +++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 ruby/hyper-model/spec/batch1/active_record/class_methods_spec.rb diff --git a/ruby/hyper-model/lib/reactive_record/active_record/class_methods.rb b/ruby/hyper-model/lib/reactive_record/active_record/class_methods.rb index 4e7a75b79..e4977b83e 100644 --- a/ruby/hyper-model/lib/reactive_record/active_record/class_methods.rb +++ b/ruby/hyper-model/lib/reactive_record/active_record/class_methods.rb @@ -197,14 +197,18 @@ def alias_attribute(new_name, old_name) ] def method_missing(name, *args, &block) - if name == 'human_attribute_name' + # In MRI Ruby we would never get to this point with a nil name argument, + # but currently in Opal we do, so we will mimic MRI Ruby and throw a TypeError. + raise TypeError, "nil is not a symbol nor a string" if name.nil? + + if name == "human_attribute_name" opts = args[1] || {} opts[:default] || args[0] elsif args.count == 1 && name.start_with?("find_by_") && !block - find_by(name.sub(/^find_by_/, '') => args[0]) + find_by(name.sub(/^find_by_/, "") => args[0]) elsif [].respond_to?(name) all.send(name, *args, &block) - elsif name.end_with?('!') + elsif name.end_with?("!") send(name.chop, *args, &block).send(:reload_from_db) rescue nil elsif !SERVER_METHODS.include?(name) raise "#{self.name}.#{name}(#{args}) (called class method missing)" diff --git a/ruby/hyper-model/spec/batch1/active_record/class_methods_spec.rb b/ruby/hyper-model/spec/batch1/active_record/class_methods_spec.rb new file mode 100644 index 000000000..a33a52b85 --- /dev/null +++ b/ruby/hyper-model/spec/batch1/active_record/class_methods_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe "ActiveRecord::ClassMethods", js: true do + context "method_missing" do + it "should return a TypeError if name is nil" do + expect_evaluate_ruby do + error = nil + + begin + User.send(nil) + rescue StandardError => e + error = e + end + + error + end.to eq("nil is not a symbol nor a string") + end + end +end From c130b09577951501b1390ac14bba4c80ce59996f Mon Sep 17 00:00:00 2001 From: catmando Date: Mon, 1 May 2023 14:49:58 -0400 Subject: [PATCH 09/43] testing jammy CI environment --- .travis.yml | 2 +- ruby/hyper-spec/Gemfile | 1 + ruby/hyper-spec/hyper-spec.gemspec | 2 +- ruby/hyper-spec/lib/hyper-spec.rb | 8 +++++--- ruby/hyper-spec/spec/spec_helper.rb | 1 + ruby/rails-hyperstack/.ruby-version | 1 - ruby/rails-hyperstack/Gemfile | 1 + .../lib/hyperstack/server_side_auto_require.rb | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) delete mode 100644 ruby/rails-hyperstack/.ruby-version diff --git a/.travis.yml b/.travis.yml index 3da3e22aa..268ae1288 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: xenial +dist: jammy addons: apt: diff --git a/ruby/hyper-spec/Gemfile b/ruby/hyper-spec/Gemfile index c0e97c691..12fbd76fc 100644 --- a/ruby/hyper-spec/Gemfile +++ b/ruby/hyper-spec/Gemfile @@ -4,4 +4,5 @@ gem 'hyper-store', path: '../hyper-store' gem 'hyper-state', path: '../hyper-state' gem 'hyperstack-config', path: '../hyperstack-config' #gem 'unparser', path: '../../../unparser' +gem 'opal', '1.0.5' gemspec diff --git a/ruby/hyper-spec/hyper-spec.gemspec b/ruby/hyper-spec/hyper-spec.gemspec index 0b1d645f5..a635ddb88 100644 --- a/ruby/hyper-spec/hyper-spec.gemspec +++ b/ruby/hyper-spec/hyper-spec.gemspec @@ -40,7 +40,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.add_development_dependency 'opal-rails', '>= 0.9.4' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'rails', ENV['RAILS_VERSION'] || '>= 5.0.0', '< 7.0' spec.add_development_dependency 'rake' spec.add_development_dependency 'react-rails', '>= 2.3.0', '< 2.5.0' diff --git a/ruby/hyper-spec/lib/hyper-spec.rb b/ruby/hyper-spec/lib/hyper-spec.rb index ba89a70e5..fdb14556d 100644 --- a/ruby/hyper-spec/lib/hyper-spec.rb +++ b/ruby/hyper-spec/lib/hyper-spec.rb @@ -84,9 +84,11 @@ module Selenium module WebDriver module Chrome module Bridge - COMMANDS = remove_const(:COMMANDS).dup - COMMANDS[:get_log] = [:post, 'session/:session_id/log'] - COMMANDS.freeze + if const_defined?(:COMMANDS) + COMMANDS = remove_const(:COMMANDS).dup + COMMANDS[:get_log] = [:post, 'session/:session_id/log'] + COMMANDS.freeze + end def log(type) data = execute :get_log, {}, type: type.to_s diff --git a/ruby/hyper-spec/spec/spec_helper.rb b/ruby/hyper-spec/spec/spec_helper.rb index 2ed740a54..f6d1f3ebf 100644 --- a/ruby/hyper-spec/spec/spec_helper.rb +++ b/ruby/hyper-spec/spec/spec_helper.rb @@ -1,4 +1,5 @@ require 'hyper-spec' +require 'webdrivers' require 'pry' require 'opal-browser' diff --git a/ruby/rails-hyperstack/.ruby-version b/ruby/rails-hyperstack/.ruby-version deleted file mode 100644 index 37c2961c2..000000000 --- a/ruby/rails-hyperstack/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.7.2 diff --git a/ruby/rails-hyperstack/Gemfile b/ruby/rails-hyperstack/Gemfile index cbc05abe0..bb2b68734 100644 --- a/ruby/rails-hyperstack/Gemfile +++ b/ruby/rails-hyperstack/Gemfile @@ -8,4 +8,5 @@ gem 'hyper-router', path: '../hyper-router' gem 'hyper-spec', path: '../hyper-spec' gem 'webpacker' # TODO: figure out why these two are necessary! gem 'turbolinks' +gem "selenium-webdriver", '3.142.7' gemspec diff --git a/ruby/rails-hyperstack/lib/hyperstack/server_side_auto_require.rb b/ruby/rails-hyperstack/lib/hyperstack/server_side_auto_require.rb index a3388d127..3d382eeaa 100644 --- a/ruby/rails-hyperstack/lib/hyperstack/server_side_auto_require.rb +++ b/ruby/rails-hyperstack/lib/hyperstack/server_side_auto_require.rb @@ -1,4 +1,4 @@ -Rails.configuration.autoloader = :classic +Rails.configuration.autoloader = :classic #:zeitwerk module ActiveSupport module Dependencies From 80531d8530d2275f5552c74cce1845ecc1e4ff45 Mon Sep 17 00:00:00 2001 From: catmando Date: Mon, 1 May 2023 15:17:18 -0400 Subject: [PATCH 10/43] trying focal for CI build environment --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 268ae1288..60b688678 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: jammy +dist: focal addons: apt: From f69765a065c216279282902f0b5c713c43a53432 Mon Sep 17 00:00:00 2001 From: catmando Date: Mon, 1 May 2023 15:46:11 -0400 Subject: [PATCH 11/43] keep puma at <= 5.4.0 during test --- ruby/hyper-component/hyper-component.gemspec | 2 +- ruby/hyper-i18n/hyper-i18n.gemspec | 2 +- ruby/hyper-model/hyper-model.gemspec | 2 +- ruby/hyper-operation/hyper-operation.gemspec | 2 +- ruby/hyper-router/hyper-router.gemspec | 2 +- ruby/hyper-state/hyper-state.gemspec | 2 +- ruby/hyper-store/hyper-store.gemspec | 2 +- ruby/hyperstack-config/hyperstack-config.gemspec | 2 +- ruby/rails-hyperstack/rails-hyperstack.gemspec | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index 8239235dc..ea1c05d3c 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'rails', ENV['RAILS_VERSION'] || '>= 5.0.0', '< 7.0' spec.add_development_dependency 'rails-controller-testing' spec.add_development_dependency 'rake' diff --git a/ruby/hyper-i18n/hyper-i18n.gemspec b/ruby/hyper-i18n/hyper-i18n.gemspec index 492638eed..19cf6e290 100644 --- a/ruby/hyper-i18n/hyper-i18n.gemspec +++ b/ruby/hyper-i18n/hyper-i18n.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0.0' spec.add_development_dependency 'pry' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec' spec.add_development_dependency 'rspec-rails' diff --git a/ruby/hyper-model/hyper-model.gemspec b/ruby/hyper-model/hyper-model.gemspec index 1cb213c15..0fb086592 100644 --- a/ruby/hyper-model/hyper-model.gemspec +++ b/ruby/hyper-model/hyper-model.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'pusher' spec.add_development_dependency 'pusher-fake' spec.add_development_dependency 'rails', ENV['RAILS_VERSION'] || '>= 5.0.0', '< 7.0' diff --git a/ruby/hyper-operation/hyper-operation.gemspec b/ruby/hyper-operation/hyper-operation.gemspec index 1f8b4bdab..7b138a51d 100644 --- a/ruby/hyper-operation/hyper-operation.gemspec +++ b/ruby/hyper-operation/hyper-operation.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'pusher' spec.add_development_dependency 'pusher-fake' spec.add_development_dependency 'rails', ENV['RAILS_VERSION'] || '>= 5.0.0', '< 7.0' diff --git a/ruby/hyper-router/hyper-router.gemspec b/ruby/hyper-router/hyper-router.gemspec index 6332a7485..941377c60 100644 --- a/ruby/hyper-router/hyper-router.gemspec +++ b/ruby/hyper-router/hyper-router.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'rails', ENV['RAILS_VERSION'] || '>= 5.0.0', '< 7.0' spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec-collection_matchers' diff --git a/ruby/hyper-state/hyper-state.gemspec b/ruby/hyper-state/hyper-state.gemspec index 000d0046e..9f0650513 100644 --- a/ruby/hyper-state/hyper-state.gemspec +++ b/ruby/hyper-state/hyper-state.gemspec @@ -29,7 +29,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'rails', ENV['RAILS_VERSION'] || '>= 5.0.0', '< 7.0' spec.add_development_dependency 'rake' spec.add_development_dependency 'react-rails', '>= 2.4.0', '< 2.5.0' diff --git a/ruby/hyper-store/hyper-store.gemspec b/ruby/hyper-store/hyper-store.gemspec index 922292445..fbdfa72e3 100644 --- a/ruby/hyper-store/hyper-store.gemspec +++ b/ruby/hyper-store/hyper-store.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'rails', ENV['RAILS_VERSION'] || '>= 5.0.0', '< 7.0' spec.add_development_dependency 'rake' spec.add_development_dependency 'react-rails', '>= 2.4.0', '< 2.5.0' diff --git a/ruby/hyperstack-config/hyperstack-config.gemspec b/ruby/hyperstack-config/hyperstack-config.gemspec index c6955534b..d938c8e34 100644 --- a/ruby/hyperstack-config/hyperstack-config.gemspec +++ b/ruby/hyperstack-config/hyperstack-config.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'rails', ENV['RAILS_VERSION'] || '>= 5.0.0', '< 7.0' spec.add_development_dependency 'rake' spec.add_development_dependency 'rspec', '~> 3.7.0' diff --git a/ruby/rails-hyperstack/rails-hyperstack.gemspec b/ruby/rails-hyperstack/rails-hyperstack.gemspec index f42541c2d..ebcc5176c 100644 --- a/ruby/rails-hyperstack/rails-hyperstack.gemspec +++ b/ruby/rails-hyperstack/rails-hyperstack.gemspec @@ -70,7 +70,7 @@ You can control how much of the stack gets installed as well: spec.add_development_dependency 'chromedriver-helper' spec.add_development_dependency 'hyper-spec', Hyperstack::VERSION spec.add_development_dependency 'pry' - spec.add_development_dependency 'puma' + spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'bootsnap' spec.add_development_dependency 'rspec-rails' spec.add_development_dependency 'rubocop' #, '~> 0.51.0' From 09cbae68744ba5d5bea8a9dac25a57b31bf49967 Mon Sep 17 00:00:00 2001 From: catmando Date: Mon, 1 May 2023 17:31:17 -0400 Subject: [PATCH 12/43] more fixes to get things working again --- .travis.yml | 4 ++-- ruby/hyper-component/Gemfile | 6 +++--- ruby/hyper-spec/lib/hyper-spec.rb | 2 ++ ruby/hyper-spec/spec/spec_helper.rb | 1 - 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60b688678..60988ffa1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,12 +8,12 @@ addons: - sourceline: 'deb http://dl.google.com/linux/chrome/deb/ stable main' key_url: 'https://dl-ssl.google.com/linux/linux_signing_key.pub' packages: - - postgresql-11 + - postgresql-12 - chromium-chromedriver - google-chrome-stable - yarn - redis-server - postgresql: '11' + postgresql: '12' _test_gem_pg: &_test_gem_pg stage: test diff --git a/ruby/hyper-component/Gemfile b/ruby/hyper-component/Gemfile index 7bb59f443..052aad50c 100644 --- a/ruby/hyper-component/Gemfile +++ b/ruby/hyper-component/Gemfile @@ -4,9 +4,9 @@ gem 'hyper-spec', path: '../hyper-spec' gem 'hyperstack-config', path: '../hyperstack-config' gem 'hyper-store', path: '../hyper-store' gem 'hyper-state', path: '../hyper-state' -unless ENV['OPAL_VERSION']&.match("0.11") - gem 'opal-browser', git: 'https://github.com/opal/opal-browser' -end +# unless ENV['OPAL_VERSION']&.match("0.11") +# gem 'opal-browser', git: 'https://github.com/opal/opal-browser' +# end gem 'hyper-trace', path: '../hyper-trace' #gem 'puma', '~> 3.11.0' # As of adding, version 3.12.0 isn't working so we are locking diff --git a/ruby/hyper-spec/lib/hyper-spec.rb b/ruby/hyper-spec/lib/hyper-spec.rb index fdb14556d..d566bb878 100644 --- a/ruby/hyper-spec/lib/hyper-spec.rb +++ b/ruby/hyper-spec/lib/hyper-spec.rb @@ -4,6 +4,8 @@ require 'unparser' require 'method_source' require 'filecache' +require 'webdrivers' + require 'capybara/rspec' require 'hyper-spec/internal/client_execution' diff --git a/ruby/hyper-spec/spec/spec_helper.rb b/ruby/hyper-spec/spec/spec_helper.rb index f6d1f3ebf..2ed740a54 100644 --- a/ruby/hyper-spec/spec/spec_helper.rb +++ b/ruby/hyper-spec/spec/spec_helper.rb @@ -1,5 +1,4 @@ require 'hyper-spec' -require 'webdrivers' require 'pry' require 'opal-browser' From 95c60cb424816f592e4c531d4d7da728909f1d70 Mon Sep 17 00:00:00 2001 From: catmando Date: Mon, 1 May 2023 17:48:18 -0400 Subject: [PATCH 13/43] updating postgresql round 2 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 60988ffa1..b8ad05631 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,10 +26,10 @@ _test_gem_pg: &_test_gem_pg before_install: - echo 'installing postgresql' - - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/11/main/postgresql.conf - - sudo cp /etc/postgresql/{9.6,11}/main/pg_hba.conf + - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf + - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf - sudo service postgresql stop - - sudo service postgresql start 11 + - sudo service postgresql start 12 - postgres --version - sudo rm -f /usr/local/bin/yarn - nvm install 10 From 704818640d6296305c465f16acb9708557df2dcf Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 10:56:32 -0400 Subject: [PATCH 14/43] trying to get postgresql working again --- .travis.yml | 215 +++++++++++++++++++++++++++------------------------- 1 file changed, 110 insertions(+), 105 deletions(-) diff --git a/.travis.yml b/.travis.yml index b8ad05631..5a7d32c4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,12 +8,10 @@ addons: - sourceline: 'deb http://dl.google.com/linux/chrome/deb/ stable main' key_url: 'https://dl-ssl.google.com/linux/linux_signing_key.pub' packages: - - postgresql-12 - chromium-chromedriver - google-chrome-stable - yarn - redis-server - postgresql: '12' _test_gem_pg: &_test_gem_pg stage: test @@ -24,13 +22,17 @@ _test_gem_pg: &_test_gem_pg directories: - node_modules # NPM packages + services: + - postgresql + + before_install: - - echo 'installing postgresql' - - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf - - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf - - sudo service postgresql stop - - sudo service postgresql start 12 - - postgres --version + # - echo 'installing postgresql' + # - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf + # - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf + # - sudo service postgresql stop + # - sudo service postgresql start 12 + # - postgres --version - sudo rm -f /usr/local/bin/yarn - nvm install 10 - rvm install 2.6.3 # was 2.5.1 @@ -42,6 +44,8 @@ _test_gem_pg: &_test_gem_pg - echo before_script $COMPONENT - echo updating chrome driver - cd ruby/$COMPONENT + - echo creating psql database + - psql -c 'create database hyper_mesh_test_db;' -U postgres - bundle install --jobs=3 --retry=3 - bundle exec ruby -e 'require "webdrivers"; Webdrivers::Chromedriver.update; puts Webdrivers::Chromedriver.current_version' - ls -la ~/.webdrivers @@ -78,6 +82,7 @@ _test_gem: &_test_gem mariadb: '10.3' services: - redis-server +\ before_install: - echo installing $COMPONENT # yarn is in /usr/local/bin/yarn version 1.3.2 and is not a package @@ -117,106 +122,106 @@ _deploy_gem: &_deploy_gem jobs: include: - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 - - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - - <<: *_deploy_gem - env: COMPONENT=hyper-i18n - - <<: *_deploy_gem - env: COMPONENT=hyper-trace - - <<: *_deploy_gem - env: COMPONENT=hyper-state - - <<: *_deploy_gem - env: COMPONENT=hyper-component - - <<: *_deploy_gem - env: COMPONENT=hyper-model - - <<: *_deploy_gem - env: COMPONENT=hyper-operation - - <<: *_deploy_gem - env: COMPONENT=hyper-router - - <<: *_deploy_gem - env: COMPONENT=hyper-spec - - <<: *_deploy_gem - env: COMPONENT=hyper-store - - <<: *_deploy_gem - env: COMPONENT=rails-hyperstack - - <<: *_deploy_gem - env: COMPONENT=hyperstack-config + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 + + # - <<: *_test_gem + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + + # - <<: *_test_gem + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + + # - <<: *_deploy_gem + # env: COMPONENT=hyper-i18n + # - <<: *_deploy_gem + # env: COMPONENT=hyper-trace + # - <<: *_deploy_gem + # env: COMPONENT=hyper-state + # - <<: *_deploy_gem + # env: COMPONENT=hyper-component + # - <<: *_deploy_gem + # env: COMPONENT=hyper-model + # - <<: *_deploy_gem + # env: COMPONENT=hyper-operation + # - <<: *_deploy_gem + # env: COMPONENT=hyper-router + # - <<: *_deploy_gem + # env: COMPONENT=hyper-spec + # - <<: *_deploy_gem + # env: COMPONENT=hyper-store + # - <<: *_deploy_gem + # env: COMPONENT=rails-hyperstack + # - <<: *_deploy_gem + # env: COMPONENT=hyperstack-config From 32495c7ec49d7f74e7f15e8a9cbbef5e96bae482 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 11:13:57 -0400 Subject: [PATCH 15/43] removed some deprecation notices: --- .travis.yml | 2 +- .../spec/client_features/component_spec.rb | 8 ++++---- .../spec/client_features/dsl_spec.rb | 2 +- .../spec/client_features/native_library_spec.rb | 2 +- .../opal_jquery_extensions_spec.rb | 2 +- .../client_features/param_declaration_spec.rb | 12 ++++++------ .../spec/client_features/state_spec.rb | 2 +- .../param_declaration_legacy_spec.rb | 16 ++++++++-------- ruby/hyper-component/spec/spec_helper.rb | 8 ++++---- ruby/hyper-model/spec/spec_helper.rb | 4 ++-- ruby/hyper-operation/spec/spec_helper.rb | 2 +- 11 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5a7d32c4d..49eaefbf2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,6 @@ _test_gem_pg: &_test_gem_pg services: - postgresql - before_install: # - echo 'installing postgresql' # - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf @@ -54,6 +53,7 @@ _test_gem_pg: &_test_gem_pg - google-chrome --version - which google-chrome - yarn install + script: - echo running script $COMPONENT - DRIVER=travis bundle exec rake $TASK diff --git a/ruby/hyper-component/spec/client_features/component_spec.rb b/ruby/hyper-component/spec/client_features/component_spec.rb index 8f469c40f..11093b475 100644 --- a/ruby/hyper-component/spec/client_features/component_spec.rb +++ b/ruby/hyper-component/spec/client_features/component_spec.rb @@ -542,7 +542,7 @@ class Lorem; end end Hyperstack::Component::ReactTestUtils.render_component_into_document(Foo, bar: 10, lorem: Lorem.new) end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nRequired prop `foo` was not specified\nProvided prop `bar` could not be converted to String/) end @@ -560,7 +560,7 @@ class Lorem; end end Hyperstack::Component::ReactTestUtils.render_component_into_document(Foo, foo: 10, bar: '10', lorem: Lorem.new) end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")).to_not match(/prop/) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")).to_not match(/prop/) end end @@ -597,7 +597,7 @@ class Foo Hyperstack::Component::ReactTestUtils.render_component_into_document(foo) end - expect(page.driver.browser.manage.logs.get(:browser) + expect(page.driver.browser.logs.get(:browser) .reject { |entry| entry.to_s.include?('Deprecated feature') } .reject { |entry| entry.to_s.include?('Object freezing is not supported by Opal')} .map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n").size) @@ -612,7 +612,7 @@ class Foo < Hyperloop::Component render { Foo } end end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/did you mean to say Foo()/) end end diff --git a/ruby/hyper-component/spec/client_features/dsl_spec.rb b/ruby/hyper-component/spec/client_features/dsl_spec.rb index 81aa0a60a..68daab280 100644 --- a/ruby/hyper-component/spec/client_features/dsl_spec.rb +++ b/ruby/hyper-component/spec/client_features/dsl_spec.rb @@ -182,7 +182,7 @@ class NestedComp < Hyperloop::Component class Comp; end end end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Comp does not appear to be a react component./) end diff --git a/ruby/hyper-component/spec/client_features/native_library_spec.rb b/ruby/hyper-component/spec/client_features/native_library_spec.rb index 2b1f17f3c..1d54d80ba 100644 --- a/ruby/hyper-component/spec/client_features/native_library_spec.rb +++ b/ruby/hyper-component/spec/client_features/native_library_spec.rb @@ -171,7 +171,7 @@ class Foo < Hyperstack::Component::NativeLibrary rename "MispelledComponent" => "Bar" end end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/NativeLibrary.MispelledComponent is undefined/) # TODO was testing for cannot import, but that message gets trunkated end diff --git a/ruby/hyper-component/spec/client_features/opal_jquery_extensions_spec.rb b/ruby/hyper-component/spec/client_features/opal_jquery_extensions_spec.rb index 62d7637ed..089333340 100644 --- a/ruby/hyper-component/spec/client_features/opal_jquery_extensions_spec.rb +++ b/ruby/hyper-component/spec/client_features/opal_jquery_extensions_spec.rb @@ -90,7 +90,7 @@ class Foo < Hyperloop::Component Element[JS.call(:eval, "(function () { return window; })();")] true end.to be_truthy - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .not_to match(/Exception|Error/) end diff --git a/ruby/hyper-component/spec/client_features/param_declaration_spec.rb b/ruby/hyper-component/spec/client_features/param_declaration_spec.rb index 40befc90b..7d159fb2a 100644 --- a/ruby/hyper-component/spec/client_features/param_declaration_spec.rb +++ b/ruby/hyper-component/spec/client_features/param_declaration_spec.rb @@ -125,7 +125,7 @@ class Foo < Hyperloop::Component end end expect(page.body[-60..-19]).to include('
12-string
') - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `foo1` could not be converted to String/) end @@ -155,7 +155,7 @@ class Foo2 < Hyperloop::Component Hyperstack::Component::ReactTestUtils.render_component_into_document(Foo2, bar: 10, lorem: Lorem.new) end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo2`\nRequired prop `foo` was not specified\nProvided prop `bar` could not be converted to String/) end @@ -171,7 +171,7 @@ class Foo < Hyperloop::Component end Hyperstack::Component::ReactTestUtils.render_component_into_document(Foo, foo: 10, bar: '10', lorem: Lorem.new) end - expect(page.driver.browser.manage.logs.get(:browser).reject { |m| m.message =~ /(D|d)eprecated/ }.map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).reject { |m| m.message =~ /(D|d)eprecated/ }.map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .not_to match(/Warning|Error/) end @@ -191,7 +191,7 @@ class Foo < Hyperloop::Component param :bar, type: [] end end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `foo` could not be converted to Array/) end @@ -202,7 +202,7 @@ class Foo < Hyperloop::Component param :bar, type: [String] end end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `foo`\[0\] could not be converted to String/) end @@ -227,7 +227,7 @@ def self._react_param_conversion(json, validate_only) end end expect(page.body[-60..-19]).to include('1, 2') - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `foo` could not be converted to BazWoggle/) end diff --git a/ruby/hyper-component/spec/client_features/state_spec.rb b/ruby/hyper-component/spec/client_features/state_spec.rb index e3dacde8f..29d0b9b40 100644 --- a/ruby/hyper-component/spec/client_features/state_spec.rb +++ b/ruby/hyper-component/spec/client_features/state_spec.rb @@ -40,7 +40,7 @@ class << self end expect_evaluate_ruby("MARKUP").to eq('Boom') expect_evaluate_ruby("StateTest.boom").to be_falsy - expect(page.driver.browser.manage.logs.get(:browser).reject { |entry| + expect(page.driver.browser.logs.get(:browser).reject { |entry| entry_s = entry.to_s entry_s.include?("Deprecated feature") || entry_s.include?("Mount() on the server. This is a no-op.") || diff --git a/ruby/hyper-component/spec/deprecated_features/param_declaration_legacy_spec.rb b/ruby/hyper-component/spec/deprecated_features/param_declaration_legacy_spec.rb index a7156e80b..d767b7b1b 100644 --- a/ruby/hyper-component/spec/deprecated_features/param_declaration_legacy_spec.rb +++ b/ruby/hyper-component/spec/deprecated_features/param_declaration_legacy_spec.rb @@ -49,7 +49,7 @@ def setup element = Hyperstack::Component::ReactAPI.create_element(Foo).on(:foo_submit) { 'bar' } Hyperstack::Component::ReactTestUtils.render_into_document(element) end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to_not match(/Exception raised/) end @@ -73,7 +73,7 @@ def setup element = Hyperstack::Component::ReactAPI.create_element(Foo).on(:foo_invoked) { return [1,2,3], 'bar' } Hyperstack::Component::ReactTestUtils.render_into_document(element) end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to_not match(/Exception raised/) end end @@ -199,7 +199,7 @@ class Foo < Hyperloop::Component end end expect(page.body[-60..-19]).to include('
12-string
') - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `foo1` could not be converted to String/) end @@ -216,7 +216,7 @@ class Foo2 < Hyperloop::Component Hyperstack::Component::ReactTestUtils.render_component_into_document(Foo2, bar: 10, lorem: Lorem.new) end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo2`\nRequired prop `foo` was not specified\nProvided prop `bar` could not be converted to String/) end @@ -233,7 +233,7 @@ class Foo < Hyperloop::Component end Hyperstack::Component::ReactTestUtils.render_component_into_document(Foo, foo: 10, bar: '10', lorem: Lorem.new) end - expect(page.driver.browser.manage.logs.get(:browser).reject { |m| m.message =~ /(D|d)eprecated/ }.map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).reject { |m| m.message =~ /(D|d)eprecated/ }.map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .not_to match(/Warning|Error/) end @@ -254,7 +254,7 @@ class Foo < Hyperloop::Component param :bar, type: [] end end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `foo` could not be converted to Array/) end @@ -265,7 +265,7 @@ class Foo < Hyperloop::Component param :bar, type: [String] end end - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `foo`\[0\] could not be converted to String/) end @@ -290,7 +290,7 @@ def self._react_param_conversion(json, validate_only) end end expect(page.body[-60..-19]).to include('1, 2') - expect(page.driver.browser.manage.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) + expect(page.driver.browser.logs.get(:browser).map { |m| m.message.gsub(/\\n/, "\n") }.to_a.join("\n")) .to match(/Warning: Failed prop( type|Type): In component `Foo`\nProvided prop `foo` could not be converted to BazWoggle/) end diff --git a/ruby/hyper-component/spec/spec_helper.rb b/ruby/hyper-component/spec/spec_helper.rb index 47c233658..13de69f35 100644 --- a/ruby/hyper-component/spec/spec_helper.rb +++ b/ruby/hyper-component/spec/spec_helper.rb @@ -51,13 +51,13 @@ # Fail tests on JavaScript errors in Chrome Headless class JavaScriptError < StandardError; end - config.after(:each, js: true) do |spec| - logs = page.driver.browser.manage.logs.get(:browser) + config.after(:each, js: true) do + logs = page.driver.browser.logs.get(:browser) errors = logs.select { |e| e.level == "SEVERE" && e.message.present? } - .map { |m| m.message.gsub(/\\n/, "\n") }.to_a + .map { |m| m.message.gsub(/\\n/, "\n") }.to_a if client_options[:deprecation_warnings] == :on warnings = logs.select { |e| e.level == "WARNING" && e.message.present? } - .map { |m| m.message.gsub(/\\n/, "\n") }.to_a + .map { |m| m.message.gsub(/\\n/, "\n") }.to_a puts "\033[0;33;1m\nJavascript client console warnings:\n\n" + warnings.join("\n\n") + "\033[0;30;21m" if warnings.present? end unless client_options[:raise_on_js_errors] == :off diff --git a/ruby/hyper-model/spec/spec_helper.rb b/ruby/hyper-model/spec/spec_helper.rb index b860162e1..30273e7b9 100644 --- a/ruby/hyper-model/spec/spec_helper.rb +++ b/ruby/hyper-model/spec/spec_helper.rb @@ -176,7 +176,7 @@ def finished_all_ajax_requests? module CheckErrors def check_errors - logs = page.driver.browser.manage.logs.get(:browser) + logs = page.driver.browser.logs.get(:browser) errors = logs.select { |e| e.level == "SEVERE" && e.message.present? } .map { |m| m.message.gsub(/\\n/, "\n") }.to_a puts "WARNING - FOUND UNEXPECTED ERRORS #{errors}" if errors.present? @@ -308,7 +308,7 @@ class << self class JavaScriptError < StandardError; end config.after(:each, js: true) do |spec| - logs = page.driver.browser.manage.logs.get(:browser) + logs = page.driver.browser.logs.get(:browser) if spec.exception all_messages = logs.select { |e| e.message.present? } .map { |m| m.message.gsub(/\\n/, "\n") }.to_a diff --git a/ruby/hyper-operation/spec/spec_helper.rb b/ruby/hyper-operation/spec/spec_helper.rb index c773c3b06..c6d3924da 100644 --- a/ruby/hyper-operation/spec/spec_helper.rb +++ b/ruby/hyper-operation/spec/spec_helper.rb @@ -125,7 +125,7 @@ def self.on_server? # class JavaScriptError < StandardError; end # config.after(:each, js: true) do |spec| - # errors = page.driver.browser.manage.logs.get(:browser) + # errors = page.driver.browser.logs.get(:browser) # .select { |e| e.level == "SEVERE" && e.message.present? } # #.map { |m| m.message.gsub(/\\n/, "\n") }.to_a # #.reject { |e| e =~ /Unexpected response code: 200/ } From bd01d38ca53a49d7ae68c5e7e4caea323000397b Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 11:29:36 -0400 Subject: [PATCH 16/43] fixed parse error in yaml file --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 49eaefbf2..36ca42851 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,7 +82,7 @@ _test_gem: &_test_gem mariadb: '10.3' services: - redis-server -\ + before_install: - echo installing $COMPONENT # yarn is in /usr/local/bin/yarn version 1.3.2 and is not a package From 698ec629c3dc94b3c61cb1ed8641ea7177cbe9fe Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 11:42:05 -0400 Subject: [PATCH 17/43] postgresql 3 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 36ca42851..a00982df3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,9 @@ addons: - google-chrome-stable - yarn - redis-server +services: + - postgresql + _test_gem_pg: &_test_gem_pg stage: test @@ -22,9 +25,6 @@ _test_gem_pg: &_test_gem_pg directories: - node_modules # NPM packages - services: - - postgresql - before_install: # - echo 'installing postgresql' # - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf From b6cead671f6aaea7cfcf89e06853708d3e0c76fe Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 11:55:45 -0400 Subject: [PATCH 18/43] postgresql 4 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a00982df3..1a2314949 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,9 @@ addons: - redis-server services: - postgresql +env: + global: + - PGPORT=5433 _test_gem_pg: &_test_gem_pg @@ -30,7 +33,7 @@ _test_gem_pg: &_test_gem_pg # - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf # - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf # - sudo service postgresql stop - # - sudo service postgresql start 12 + # - sudo service postgresql start 12 -p 5433 # - postgres --version - sudo rm -f /usr/local/bin/yarn - nvm install 10 From 2242fc37b4bf00d1742ef1a5211c3f6cba4f99cc Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 12:01:49 -0400 Subject: [PATCH 19/43] postgresql 5 --- .travis.yml | 6 +++--- ruby/hyper-component/spec/client_features/component_spec.rb | 1 + .../lib/hyperstack/native_wrapper_compatibility.rb | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1a2314949..770552208 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,11 @@ addons: - google-chrome-stable - yarn - redis-server -services: - - postgresql env: global: - - PGPORT=5433 + - PGPORT=5433 +services: + - postgresql _test_gem_pg: &_test_gem_pg diff --git a/ruby/hyper-component/spec/client_features/component_spec.rb b/ruby/hyper-component/spec/client_features/component_spec.rb index 11093b475..6b3009913 100644 --- a/ruby/hyper-component/spec/client_features/component_spec.rb +++ b/ruby/hyper-component/spec/client_features/component_spec.rb @@ -597,6 +597,7 @@ class Foo Hyperstack::Component::ReactTestUtils.render_component_into_document(foo) end + binding.pry expect(page.driver.browser.logs.get(:browser) .reject { |entry| entry.to_s.include?('Deprecated feature') } .reject { |entry| entry.to_s.include?('Object freezing is not supported by Opal')} diff --git a/ruby/hyperstack-config/lib/hyperstack/native_wrapper_compatibility.rb b/ruby/hyperstack-config/lib/hyperstack/native_wrapper_compatibility.rb index fbb775f19..b8dc25507 100644 --- a/ruby/hyperstack-config/lib/hyperstack/native_wrapper_compatibility.rb +++ b/ruby/hyperstack-config/lib/hyperstack/native_wrapper_compatibility.rb @@ -1,7 +1,7 @@ # allows hyperstack to include Native::Wrapper even if running Opal 0.11 module Native module Wrapper - def self.included(klass) + def self.includedx(klass) if Native.instance_methods.include? :to_n klass.include Native else From c357a4c4e1a9fb72a94894f8674495fe67074c2f Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 12:09:10 -0400 Subject: [PATCH 20/43] postgresql 6 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 770552208..079fe2356 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,9 +32,9 @@ _test_gem_pg: &_test_gem_pg # - echo 'installing postgresql' # - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf # - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf - # - sudo service postgresql stop - # - sudo service postgresql start 12 -p 5433 - # - postgres --version + - sudo service postgresql stop + - sudo service postgresql start 12 -p 5433 + - postgres --version - sudo rm -f /usr/local/bin/yarn - nvm install 10 - rvm install 2.6.3 # was 2.5.1 From 51ebec9ea8641e0c2832ede6092c9d0495f67ea9 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 12:12:21 -0400 Subject: [PATCH 21/43] postgresql 7 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 079fe2356..8ca6d08ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ _test_gem_pg: &_test_gem_pg # - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf - sudo service postgresql stop - sudo service postgresql start 12 -p 5433 - - postgres --version + #- postgres --version - sudo rm -f /usr/local/bin/yarn - nvm install 10 - rvm install 2.6.3 # was 2.5.1 From a5adf04092da3f227388ed819c7788355d750ad8 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 12:25:51 -0400 Subject: [PATCH 22/43] postgresql 8 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8ca6d08ff..99710415a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ addons: - redis-server env: global: - - PGPORT=5433 + - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE services: - postgresql @@ -32,9 +32,9 @@ _test_gem_pg: &_test_gem_pg # - echo 'installing postgresql' # - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf # - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf - - sudo service postgresql stop - - sudo service postgresql start 12 -p 5433 - #- postgres --version + - sudo service postgresql stop # NOTE ADDING THESE TWO LINES MAKES NO DIFFERENCE + - sudo service postgresql start 12 -p 5433 # + - postgresql --version - sudo rm -f /usr/local/bin/yarn - nvm install 10 - rvm install 2.6.3 # was 2.5.1 From ff76a4e1acce1a03b1b38cfb72f992d11e2701fd Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 12:39:12 -0400 Subject: [PATCH 23/43] postgresql 9 --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99710415a..511a5d980 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,9 +12,9 @@ addons: - google-chrome-stable - yarn - redis-server -env: - global: - - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE +# env: +# global: +# - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE services: - postgresql @@ -32,9 +32,9 @@ _test_gem_pg: &_test_gem_pg # - echo 'installing postgresql' # - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf # - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf - - sudo service postgresql stop # NOTE ADDING THESE TWO LINES MAKES NO DIFFERENCE - - sudo service postgresql start 12 -p 5433 # - - postgresql --version + # - sudo service postgresql stop # NOTE ADDING THESE TWO LINES MAKES NO DIFFERENCE + # - sudo service postgresql start 12 -p 5433 # + # - postgresql --version - sudo rm -f /usr/local/bin/yarn - nvm install 10 - rvm install 2.6.3 # was 2.5.1 From 64f6a0458e84ab54928e85e50590f3673196614c Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 13:35:38 -0400 Subject: [PATCH 24/43] postgresql 10 --- .travis.yml | 13 ++++++++----- ruby/hyper-model/spec/spec_helper.rb | 2 +- ruby/hyper-spec/lib/hyper-spec.rb | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 511a5d980..365c29b4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,12 @@ dist: focal +env: + global: + - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE + + addons: + postgresql: "11" apt: sources: - sourceline: 'deb http://dl.yarnpkg.com/debian/ stable main' @@ -12,11 +18,8 @@ addons: - google-chrome-stable - yarn - redis-server -# env: -# global: -# - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE -services: - - postgresql + - postgresql-11 + - postgresql-client-11 _test_gem_pg: &_test_gem_pg diff --git a/ruby/hyper-model/spec/spec_helper.rb b/ruby/hyper-model/spec/spec_helper.rb index 30273e7b9..28c895a47 100644 --- a/ruby/hyper-model/spec/spec_helper.rb +++ b/ruby/hyper-model/spec/spec_helper.rb @@ -336,7 +336,7 @@ class JavaScriptError < StandardError; end # Capybara.register_driver :chrome do |app| # #caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"excludeSwitches" => [ "ignore-certificate-errors" ]}) # caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => {"args" => [ "--window-size=200,200" ]}) - # Capybara::Selenium::Driver.new(app, :browser => :chrome, :desired_capabilities => caps) + # Capybara::Selenium::Driver.new(app, :browser => :chrome, :capabilities => caps) # end # Use legacy hyper-spec on_client behavior diff --git a/ruby/hyper-spec/lib/hyper-spec.rb b/ruby/hyper-spec/lib/hyper-spec.rb index d566bb878..a02b03ede 100644 --- a/ruby/hyper-spec/lib/hyper-spec.rb +++ b/ruby/hyper-spec/lib/hyper-spec.rb @@ -205,7 +205,7 @@ def self.on_server? capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( chromeOptions: options, 'goog:loggingPrefs' => { browser: 'ALL' } ) - Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: capabilities) + Capybara::Selenium::Driver.new(app, browser: :chrome)#, capabilities: capabilities) end Capybara.register_driver :firefox do |app| From c44776f383edc865681c8f12cee1b48a38dcf1a8 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 14:06:27 -0400 Subject: [PATCH 25/43] postgresql 11 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 365c29b4b..3c65c112d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ env: global: - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE +services: + - postgresql addons: postgresql: "11" From af5fabc6250c7771a360da4284cb85f02f52657e Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 14:17:54 -0400 Subject: [PATCH 26/43] postgresql 12 --- .travis.yml | 6 ++--- ruby/hyper-spec/lib/hyper-spec.rb | 45 ++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3c65c112d..993639e12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ services: - postgresql addons: - postgresql: "11" + postgresql: "12.2" apt: sources: - sourceline: 'deb http://dl.yarnpkg.com/debian/ stable main' @@ -20,8 +20,8 @@ addons: - google-chrome-stable - yarn - redis-server - - postgresql-11 - - postgresql-client-11 + - postgresql-12.2 + - postgresql-client-12.2 _test_gem_pg: &_test_gem_pg diff --git a/ruby/hyper-spec/lib/hyper-spec.rb b/ruby/hyper-spec/lib/hyper-spec.rb index a02b03ede..f1ab52569 100644 --- a/ruby/hyper-spec/lib/hyper-spec.rb +++ b/ruby/hyper-spec/lib/hyper-spec.rb @@ -195,19 +195,44 @@ def self.on_server? Capybara.default_max_wait_time = 10 - Capybara.register_driver :chrome do |app| - options = {} - options.merge!( - w3c: false, - args: %w[auto-open-devtools-for-tabs] + Capybara.register_driver :chrome_undocked do |app| + opts = Selenium::WebDriver::Chrome::Options.new(args: %w[auto-open-devtools-for-tabs]) + opts.add_preference( + 'devtools', + 'preferences' => { + 'currentDockState' => '"undocked"', # Or '"bottom"', '"right"', etc. + 'panel-selectedTab' => '"console"' + } ) - options['mobileEmulation'] = { 'deviceName' => ENV['DEVICE'].tr('-', ' ') } if ENV['DEVICE'] - capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( - chromeOptions: options, 'goog:loggingPrefs' => { browser: 'ALL' } + caps = Selenium::WebDriver::Remote::Capabilities.chrome + caps["goog:loggingPrefs"] = { browser: 'ALL' } + + Capybara::Selenium::Driver.new(app, browser: :chrome, options: opts, desired_capabilities: caps) + end + + Capybara.register_driver :chrome_docked do |app| + opts = Selenium::WebDriver::Chrome::Options.new(args: %w[auto-open-devtools-for-tabs]) + opts.add_preference( + 'devtools', + 'preferences' => { + 'currentDockState' => '"right"', # Or '"bottom"', '"undocked"', etc. + 'panel-selectedTab' => '"console"' + } ) - Capybara::Selenium::Driver.new(app, browser: :chrome)#, capabilities: capabilities) + caps = Selenium::WebDriver::Remote::Capabilities.chrome + caps["goog:loggingPrefs"] = { browser: 'ALL' } + + Capybara::Selenium::Driver.new(app, browser: :chrome, options: opts, desired_capabilities: caps) end + Capybara.register_driver :chrome do |app| + caps = Selenium::WebDriver::Remote::Capabilities.chrome + + caps["goog:loggingPrefs"] = { browser: 'ALL' } # if ENV['LOG_JS'] + + Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: caps) + end + Capybara.register_driver :firefox do |app| Capybara::Selenium::Driver.new(app, browser: :firefox) end @@ -242,6 +267,8 @@ def self.on_server? Capybara.javascript_driver = case ENV['DRIVER'] when 'beheaded' then :firefox_headless + when 'chrome_undocked' then :chrome_undocked + when 'chrome_docked' then :chrome_docked when 'chrome' then :chrome when 'ff' then :selenium_with_firebug when 'firefox' then :firefox From 58c7396f3aa542eedefb22f6e0f23f08fd30a60a Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 14:22:13 -0400 Subject: [PATCH 27/43] postgresql 13 --- .travis.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 993639e12..dd9f6e6e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,10 @@ dist: focal -env: - global: - - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE - -services: - - postgresql +# env: +# global: +# - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE addons: - postgresql: "12.2" apt: sources: - sourceline: 'deb http://dl.yarnpkg.com/debian/ stable main' @@ -20,13 +16,12 @@ addons: - google-chrome-stable - yarn - redis-server - - postgresql-12.2 - - postgresql-client-12.2 - _test_gem_pg: &_test_gem_pg stage: test + services: postgresql + language: ruby cache: bundler: true From 7f61a2295877c2e94e8b816753e3d90881cf1bcf Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 14:26:36 -0400 Subject: [PATCH 28/43] postgresql 14 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd9f6e6e0..c5af74721 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ dist: focal -# env: -# global: -# - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE +env: + global: + - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE addons: apt: From 270fb62f2ab44290da59a7afc66251db63d33165 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 17:55:01 -0400 Subject: [PATCH 29/43] fixed a few more issues, but postgresql still not running in CI --- ruby/hyper-component/hyper-component.gemspec | 1 + ruby/hyper-component/spec/client_features/component_spec.rb | 3 +-- ruby/hyper-component/spec/spec_helper.rb | 3 ++- .../spec/test_app/app/hyperstack/components/components.rb | 3 +++ .../spec/test_app/config/initializers/hyperstack.rb | 4 ++++ ruby/hyper-spec/hyper-spec.gemspec | 2 +- ruby/hyperstack-config/hyperstack-config.gemspec | 2 +- ruby/hyperstack-config/lib/hyperstack-config.rb | 6 ++++-- 8 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index ea1c05d3c..91c5e9274 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -30,6 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'mime-types' spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'nokogiri' + spec.add_development_dependency 'opal-browser', '~> 0.3.0' spec.add_development_dependency 'opal-jquery' spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' diff --git a/ruby/hyper-component/spec/client_features/component_spec.rb b/ruby/hyper-component/spec/client_features/component_spec.rb index 6b3009913..adeca9003 100644 --- a/ruby/hyper-component/spec/client_features/component_spec.rb +++ b/ruby/hyper-component/spec/client_features/component_spec.rb @@ -594,10 +594,9 @@ class Foo foo.class_eval do render { "hello" } end - + Hyperstack::Component::ReactTestUtils.render_component_into_document(foo) end - binding.pry expect(page.driver.browser.logs.get(:browser) .reject { |entry| entry.to_s.include?('Deprecated feature') } .reject { |entry| entry.to_s.include?('Object freezing is not supported by Opal')} diff --git a/ruby/hyper-component/spec/spec_helper.rb b/ruby/hyper-component/spec/spec_helper.rb index 13de69f35..b84faf057 100644 --- a/ruby/hyper-component/spec/spec_helper.rb +++ b/ruby/hyper-component/spec/spec_helper.rb @@ -3,6 +3,8 @@ require 'opal' #require 'opal-rspec' require 'opal-jquery' +require 'opal-browser' + begin require File.expand_path('../test_app/config/environment', __FILE__) @@ -12,7 +14,6 @@ require 'rspec/rails' require 'hyper-spec' require 'pry' -require 'opal-browser' require 'timecop' diff --git a/ruby/hyper-component/spec/test_app/app/hyperstack/components/components.rb b/ruby/hyper-component/spec/test_app/app/hyperstack/components/components.rb index 87bfdc23a..d3873ad35 100644 --- a/ruby/hyper-component/spec/test_app/app/hyperstack/components/components.rb +++ b/ruby/hyper-component/spec/test_app/app/hyperstack/components/components.rb @@ -10,6 +10,9 @@ require 'js' # require 'hyper-store' require 'hyperstack/internal/component/haml' +require 'promise' +require 'browser/delay' +require 'browser/interval' # these mechanisms are deprecated in favor of using the features of hyper-spec. However # in order to expedite getting Hyperstack 1.0 released we are just leaving these methods diff --git a/ruby/hyper-component/spec/test_app/config/initializers/hyperstack.rb b/ruby/hyper-component/spec/test_app/config/initializers/hyperstack.rb index e2d0f5642..a483bd561 100644 --- a/ruby/hyper-component/spec/test_app/config/initializers/hyperstack.rb +++ b/ruby/hyper-component/spec/test_app/config/initializers/hyperstack.rb @@ -9,3 +9,7 @@ Hyperstack.import 'react-server', js_import: true, at_head: true, client_only: true Hyperstack.import 'hyperstack/component/jquery', client_only: true Hyperstack.import 'hyperstack/component/server' +Hyperstack.import 'promise', client_only: true +Hyperstack.import 'browser', client_only: true +Hyperstack.import 'browser/delay', client_only: true + diff --git a/ruby/hyper-spec/hyper-spec.gemspec b/ruby/hyper-spec/hyper-spec.gemspec index 3489f92c5..66f36d164 100644 --- a/ruby/hyper-spec/hyper-spec.gemspec +++ b/ruby/hyper-spec/hyper-spec.gemspec @@ -37,7 +37,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.add_development_dependency 'bundler' spec.add_development_dependency 'hyper-component', HyperSpec::VERSION spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency - spec.add_development_dependency 'opal-browser', '~> 0.2.0' + spec.add_development_dependency 'opal-browser', '~> 0.3.0' spec.add_development_dependency 'opal-rails', '>= 0.9.4' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' diff --git a/ruby/hyperstack-config/hyperstack-config.gemspec b/ruby/hyperstack-config/hyperstack-config.gemspec index d938c8e34..8ce8f2934 100644 --- a/ruby/hyperstack-config/hyperstack-config.gemspec +++ b/ruby/hyperstack-config/hyperstack-config.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'listen', '~> 3.0' # for hot loader # spec.add_dependency 'mini_racer', '~> 0.2.6' spec.add_dependency 'opal', ENV['OPAL_VERSION'] || '>= 0.11.0', '< 2.0' - spec.add_dependency 'opal-browser', '~> 0.2.0' + #spec.add_dependency 'opal-browser', '~> 0.3.0' spec.add_dependency 'uglifier' spec.add_dependency 'websocket' # for hot loader diff --git a/ruby/hyperstack-config/lib/hyperstack-config.rb b/ruby/hyperstack-config/lib/hyperstack-config.rb index a10902fe6..6562ab696 100644 --- a/ruby/hyperstack-config/lib/hyperstack-config.rb +++ b/ruby/hyperstack-config/lib/hyperstack-config.rb @@ -15,9 +15,10 @@ def self.naming_convention require 'hyperstack/active_support_string_inquirer.rb' require 'hyperstack_env' require 'hyperstack/hotloader/stub' + # require 'promise' REMOVED DURING UPGRADE TO Opal 1.7 WHY WAS THIS HERE? else require 'opal' - require 'opal-browser' + # require 'opal-browser' REMOVED DURING UPGRADE TO Opal 1.7 WHY WAS THIS HERE? # We need opal-rails to be loaded for Gem code to be properly included by sprockets. begin require 'opal-rails' if defined? Rails @@ -41,7 +42,8 @@ def self.naming_convention Hyperstack.define_setting :hotloader_ping, nil Hyperstack.define_setting :hotloader_ignore_callback_mapping, false Hyperstack.import 'opal', gem: true - Hyperstack.import 'browser', client_only: true + # Hyperstack.import 'promise', client_only: true REMOVED DURING UPGRADE TO Opal 1.7 WHY WAS THIS HERE? + # Hyperstack.import 'browser', client_only: true REMOVED DURING UPGRADE TO Opal 1.7 WHY WAS THIS HERE? Hyperstack.import 'hyperstack-config', gem: true Hyperstack.import 'hyperstack/autoloader' Hyperstack.import 'hyperstack/autoloader_starter' From 3aca99c5ae8a3dccd0929b85ebdd25491895d349 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 2 May 2023 17:59:41 -0400 Subject: [PATCH 30/43] turned rest of specs back on --- .travis.yml | 194 ++++++++++++++++++++++++++-------------------------- 1 file changed, 97 insertions(+), 97 deletions(-) diff --git a/.travis.yml b/.travis.yml index c5af74721..c4367873c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -125,106 +125,106 @@ _deploy_gem: &_deploy_gem jobs: include: - # - <<: *_test_gem - # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db - # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 - - # - <<: *_test_gem - # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - # - <<: *_test_gem - # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - # - <<: *_deploy_gem - # env: COMPONENT=hyper-i18n - # - <<: *_deploy_gem - # env: COMPONENT=hyper-trace - # - <<: *_deploy_gem - # env: COMPONENT=hyper-state - # - <<: *_deploy_gem - # env: COMPONENT=hyper-component - # - <<: *_deploy_gem - # env: COMPONENT=hyper-model - # - <<: *_deploy_gem - # env: COMPONENT=hyper-operation - # - <<: *_deploy_gem - # env: COMPONENT=hyper-router - # - <<: *_deploy_gem - # env: COMPONENT=hyper-spec - # - <<: *_deploy_gem - # env: COMPONENT=hyper-store - # - <<: *_deploy_gem - # env: COMPONENT=rails-hyperstack - # - <<: *_deploy_gem - # env: COMPONENT=hyperstack-config + - <<: *_test_gem + env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 + + - <<: *_test_gem + env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + - <<: *_test_gem + env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + + - <<: *_test_gem + env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + - <<: *_test_gem + env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + + - <<: *_deploy_gem + env: COMPONENT=hyper-i18n + - <<: *_deploy_gem + env: COMPONENT=hyper-trace + - <<: *_deploy_gem + env: COMPONENT=hyper-state + - <<: *_deploy_gem + env: COMPONENT=hyper-component + - <<: *_deploy_gem + env: COMPONENT=hyper-model + - <<: *_deploy_gem + env: COMPONENT=hyper-operation + - <<: *_deploy_gem + env: COMPONENT=hyper-router + - <<: *_deploy_gem + env: COMPONENT=hyper-spec + - <<: *_deploy_gem + env: COMPONENT=hyper-store + - <<: *_deploy_gem + env: COMPONENT=rails-hyperstack + - <<: *_deploy_gem + env: COMPONENT=hyperstack-config From 65fb090c9f89916de2872deb488891c3bc5d51ce Mon Sep 17 00:00:00 2001 From: catmando Date: Wed, 3 May 2023 16:14:34 -0400 Subject: [PATCH 31/43] some fixes but no prerendering busted --- ruby/hyper-component/hyper-component.gemspec | 1 - ruby/hyper-component/spec/spec_helper.rb | 4 --- .../app/hyperstack/components/components.rb | 13 ---------- .../config/initializers/hyperstack.rb | 4 --- ruby/hyper-i18n/spec/hyper_i18n_spec.rb | 26 ++++++++++--------- .../hyper-operation/transport/hyperstack.rb | 2 +- .../spec/test_app/config/application.rb | 1 + ruby/hyper-router/hyper-router.gemspec | 1 - ruby/hyper-spec/hyper-spec.gemspec | 1 - ruby/hyper-spec/spec/spec_helper.rb | 1 - .../hyperstack-config.gemspec | 2 +- .../lib/hyperstack-config.rb | 17 +++++++++--- 12 files changed, 30 insertions(+), 43 deletions(-) diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index 91c5e9274..ea1c05d3c 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -30,7 +30,6 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'mime-types' spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'nokogiri' - spec.add_development_dependency 'opal-browser', '~> 0.3.0' spec.add_development_dependency 'opal-jquery' spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' diff --git a/ruby/hyper-component/spec/spec_helper.rb b/ruby/hyper-component/spec/spec_helper.rb index b84faf057..2c3f55c5c 100644 --- a/ruby/hyper-component/spec/spec_helper.rb +++ b/ruby/hyper-component/spec/spec_helper.rb @@ -1,10 +1,7 @@ ENV["RAILS_ENV"] ||= 'test' require 'opal' -#require 'opal-rspec' require 'opal-jquery' -require 'opal-browser' - begin require File.expand_path('../test_app/config/environment', __FILE__) @@ -16,7 +13,6 @@ require 'pry' require 'timecop' - RSpec.configure do |config| config.color = true config.fail_fast = ENV['FAIL_FAST'] || false diff --git a/ruby/hyper-component/spec/test_app/app/hyperstack/components/components.rb b/ruby/hyper-component/spec/test_app/app/hyperstack/components/components.rb index d3873ad35..edac28d18 100644 --- a/ruby/hyper-component/spec/test_app/app/hyperstack/components/components.rb +++ b/ruby/hyper-component/spec/test_app/app/hyperstack/components/components.rb @@ -1,18 +1,5 @@ -# require 'hyper-component' -# if Hyperstack::Component::IsomorphicHelpers.on_opal_client? -# require 'browser' -# require 'browser/delay' -# #require 'react/ext/opal-jquery/element' -# require 'hyperstack/component/jquery' -# end -# require 'hyperstack/component/server' -# require 'hyperstack/component/auto-import' require 'js' -# require 'hyper-store' require 'hyperstack/internal/component/haml' -require 'promise' -require 'browser/delay' -require 'browser/interval' # these mechanisms are deprecated in favor of using the features of hyper-spec. However # in order to expedite getting Hyperstack 1.0 released we are just leaving these methods diff --git a/ruby/hyper-component/spec/test_app/config/initializers/hyperstack.rb b/ruby/hyper-component/spec/test_app/config/initializers/hyperstack.rb index a483bd561..e2d0f5642 100644 --- a/ruby/hyper-component/spec/test_app/config/initializers/hyperstack.rb +++ b/ruby/hyper-component/spec/test_app/config/initializers/hyperstack.rb @@ -9,7 +9,3 @@ Hyperstack.import 'react-server', js_import: true, at_head: true, client_only: true Hyperstack.import 'hyperstack/component/jquery', client_only: true Hyperstack.import 'hyperstack/component/server' -Hyperstack.import 'promise', client_only: true -Hyperstack.import 'browser', client_only: true -Hyperstack.import 'browser/delay', client_only: true - diff --git a/ruby/hyper-i18n/spec/hyper_i18n_spec.rb b/ruby/hyper-i18n/spec/hyper_i18n_spec.rb index 6a85d00c4..2da168f78 100644 --- a/ruby/hyper-i18n/spec/hyper_i18n_spec.rb +++ b/ruby/hyper-i18n/spec/hyper_i18n_spec.rb @@ -10,26 +10,28 @@ class TestComponent include Hyperstack::Component include Hyperstack::I18n render(DIV) do - DIV(id: :tp1) { t(:the_key) } - DIV(id: :tp2) { I18n.t(:hello) } - DIV(id: :tp3) { l(Time.parse('1/1/2018 12:45')) } - DIV(id: :tp4) { l(Time.parse('1/1/2018 12:45'), '%B %d, %Y at %l:%M %P') } - DIV(id: :tp5) { MyModel.model_name.human } - DIV(id: :tp6) { MyModel.human_attribute_name('the_attribute') } + DIV(id: :tp1) { 'I am a key' } + # DIV(id: :tp1) { t(:the_key) } + # DIV(id: :tp2) { I18n.t(:hello) } + # DIV(id: :tp3) { l(Time.parse('1/1/2018 12:45')) } + # DIV(id: :tp4) { l(Time.parse('1/1/2018 12:45'), '%B %d, %Y at %l:%M %P') } + # DIV(id: :tp5) { MyModel.model_name.human } + # DIV(id: :tp6) { MyModel.human_attribute_name('the_attribute') } end end end end end - [['component rendering', :client_only], ['prerendering', :server_only]].each do |mode, flag| + [['prerendering', :server_only]].each do |mode, flag| # ['component rendering', :client_only], it "will translate during #{mode}", prerendering_on: flag == :server_only do mount 'Components::TestComponent', {}, render_on: flag + binding.pry expect(find('#tp1')).to have_content('I am a key') - expect(find('#tp2')).to have_content('Hello world') - expect(find('#tp3')).to have_content(::I18n.l(Time.parse('1/1/2018 12:45'))) - expect(find('#tp4')).to have_content(::I18n.l(Time.parse('1/1/2018 12:45'), format: '%B %d, %Y at %l:%M %P')) - expect(find('#tp5')).to have_content('My Model') - expect(find('#tp6')).to have_content('The Attribute') + # expect(find('#tp2')).to have_content('Hello world') + # expect(find('#tp3')).to have_content(::I18n.l(Time.parse('1/1/2018 12:45'))) + # expect(find('#tp4')).to have_content(::I18n.l(Time.parse('1/1/2018 12:45'), format: '%B %d, %Y at %l:%M %P')) + # expect(find('#tp5')).to have_content('My Model') + # expect(find('#tp6')).to have_content('The Attribute') end end end diff --git a/ruby/hyper-operation/lib/hyper-operation/transport/hyperstack.rb b/ruby/hyper-operation/lib/hyper-operation/transport/hyperstack.rb index 1d78cc26b..31de6917e 100644 --- a/ruby/hyper-operation/lib/hyper-operation/transport/hyperstack.rb +++ b/ruby/hyper-operation/lib/hyper-operation/transport/hyperstack.rb @@ -70,7 +70,7 @@ def self.reset_operations if connection[:adapter] == :redis require 'redis' - connection[:redis_url] ||= 'redis://127.0.0.1:6379/hyperstack' + connection[:redis_url] ||= 'redis://127.0.0.1:6379/0' end end diff --git a/ruby/hyper-operation/spec/test_app/config/application.rb b/ruby/hyper-operation/spec/test_app/config/application.rb index 424c42ada..b763a19e4 100644 --- a/ruby/hyper-operation/spec/test_app/config/application.rb +++ b/ruby/hyper-operation/spec/test_app/config/application.rb @@ -23,6 +23,7 @@ class Application < Rails::Application config.opal.enable_specs = true config.opal.spec_location = 'spec-opal' config.hyperstack.auto_config = false + config.active_record.yaml_column_permitted_classes = [Symbol, ActiveSupport::HashWithIndifferentAccess] config.assets.cache_store = :null_store # Settings in config/environments/* take precedence over those specified here. diff --git a/ruby/hyper-router/hyper-router.gemspec b/ruby/hyper-router/hyper-router.gemspec index 941377c60..638e801a5 100644 --- a/ruby/hyper-router/hyper-router.gemspec +++ b/ruby/hyper-router/hyper-router.gemspec @@ -17,7 +17,6 @@ Gem::Specification.new do |spec| spec.add_dependency 'hyper-component', HyperRouter::VERSION spec.add_dependency 'hyper-state', HyperRouter::VERSION - spec.add_dependency 'opal-browser', '~> 0.2.0' spec.add_development_dependency 'bundler' spec.add_development_dependency 'chromedriver-helper' diff --git a/ruby/hyper-spec/hyper-spec.gemspec b/ruby/hyper-spec/hyper-spec.gemspec index 66f36d164..2e11da315 100644 --- a/ruby/hyper-spec/hyper-spec.gemspec +++ b/ruby/hyper-spec/hyper-spec.gemspec @@ -37,7 +37,6 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength spec.add_development_dependency 'bundler' spec.add_development_dependency 'hyper-component', HyperSpec::VERSION spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency - spec.add_development_dependency 'opal-browser', '~> 0.3.0' spec.add_development_dependency 'opal-rails', '>= 0.9.4' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' diff --git a/ruby/hyper-spec/spec/spec_helper.rb b/ruby/hyper-spec/spec/spec_helper.rb index 2ed740a54..deee6f270 100644 --- a/ruby/hyper-spec/spec/spec_helper.rb +++ b/ruby/hyper-spec/spec/spec_helper.rb @@ -1,6 +1,5 @@ require 'hyper-spec' require 'pry' -require 'opal-browser' ENV["RAILS_ENV"] ||= 'test' require File.expand_path('../test_app/config/environment', __FILE__) diff --git a/ruby/hyperstack-config/hyperstack-config.gemspec b/ruby/hyperstack-config/hyperstack-config.gemspec index 8ce8f2934..66a567de0 100644 --- a/ruby/hyperstack-config/hyperstack-config.gemspec +++ b/ruby/hyperstack-config/hyperstack-config.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'listen', '~> 3.0' # for hot loader # spec.add_dependency 'mini_racer', '~> 0.2.6' spec.add_dependency 'opal', ENV['OPAL_VERSION'] || '>= 0.11.0', '< 2.0' - #spec.add_dependency 'opal-browser', '~> 0.3.0' + spec.add_dependency 'opal-browser' # this is needed everywhere else so its loaded here spec.add_dependency 'uglifier' spec.add_dependency 'websocket' # for hot loader diff --git a/ruby/hyperstack-config/lib/hyperstack-config.rb b/ruby/hyperstack-config/lib/hyperstack-config.rb index 6562ab696..9e8701416 100644 --- a/ruby/hyperstack-config/lib/hyperstack-config.rb +++ b/ruby/hyperstack-config/lib/hyperstack-config.rb @@ -15,10 +15,14 @@ def self.naming_convention require 'hyperstack/active_support_string_inquirer.rb' require 'hyperstack_env' require 'hyperstack/hotloader/stub' - # require 'promise' REMOVED DURING UPGRADE TO Opal 1.7 WHY WAS THIS HERE? + # because promises and features in opal-browsers are used everywhere we load them here + require 'promise' + require 'opal-browser' else require 'opal' - # require 'opal-browser' REMOVED DURING UPGRADE TO Opal 1.7 WHY WAS THIS HERE? + # because promises and features in opal-browsers are used everywhere we load them here + require 'opal-browser' + # We need opal-rails to be loaded for Gem code to be properly included by sprockets. begin require 'opal-rails' if defined? Rails @@ -42,8 +46,13 @@ def self.naming_convention Hyperstack.define_setting :hotloader_ping, nil Hyperstack.define_setting :hotloader_ignore_callback_mapping, false Hyperstack.import 'opal', gem: true - # Hyperstack.import 'promise', client_only: true REMOVED DURING UPGRADE TO Opal 1.7 WHY WAS THIS HERE? - # Hyperstack.import 'browser', client_only: true REMOVED DURING UPGRADE TO Opal 1.7 WHY WAS THIS HERE? + + # because promises and features in opal-browsers are used everywhere we load them here + Hyperstack.import 'promise', client_only: true + Hyperstack.import 'browser', client_only: true + Hyperstack.import 'browser/delay', client_only: true + Hyperstack.import 'browser/interval', client_only: true + Hyperstack.import 'hyperstack-config', gem: true Hyperstack.import 'hyperstack/autoloader' Hyperstack.import 'hyperstack/autoloader_starter' From 15856ad6de488c5a6e807dac77881db89560cb90 Mon Sep 17 00:00:00 2001 From: catmando Date: Wed, 3 May 2023 17:49:27 -0400 Subject: [PATCH 32/43] prerendering working again after fixing merge mess --- ruby/hyperstack-config/lib/hyperstack-config.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby/hyperstack-config/lib/hyperstack-config.rb b/ruby/hyperstack-config/lib/hyperstack-config.rb index 9e8701416..bf5cf9aa3 100644 --- a/ruby/hyperstack-config/lib/hyperstack-config.rb +++ b/ruby/hyperstack-config/lib/hyperstack-config.rb @@ -15,9 +15,9 @@ def self.naming_convention require 'hyperstack/active_support_string_inquirer.rb' require 'hyperstack_env' require 'hyperstack/hotloader/stub' - # because promises and features in opal-browsers are used everywhere we load them here - require 'promise' - require 'opal-browser' + # uncommenting these lines breaks prerendering + # require 'promise' + # require 'opal-browser' else require 'opal' # because promises and features in opal-browsers are used everywhere we load them here From 75d3d131c88cad9f70ca79c9d7b363c5ae497a17 Mon Sep 17 00:00:00 2001 From: catmando Date: Thu, 4 May 2023 10:37:21 -0400 Subject: [PATCH 33/43] working on pg again --- .travis.yml | 194 +++++++++++++++++++++++++++------------------------- 1 file changed, 101 insertions(+), 93 deletions(-) diff --git a/.travis.yml b/.travis.yml index c4367873c..ff047e65c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,12 @@ dist: focal env: global: - - PGPORT=5433 # NOTE ADDING THIS MAKES NO DIFFERENCE + - PGUSER=postgres + - PGPORT=5432 + - PGHOST=localhost addons: + postgresql: '12' apt: sources: - sourceline: 'deb http://dl.yarnpkg.com/debian/ stable main' @@ -16,11 +19,12 @@ addons: - google-chrome-stable - yarn - redis-server + - postgresql-12 _test_gem_pg: &_test_gem_pg stage: test - services: postgresql + # services: postgresql language: ruby cache: @@ -35,6 +39,10 @@ _test_gem_pg: &_test_gem_pg # - sudo service postgresql stop # NOTE ADDING THESE TWO LINES MAKES NO DIFFERENCE # - sudo service postgresql start 12 -p 5433 # # - postgresql --version + - sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf + - sudo service postgresql restart + - sleep 1 + - postgres --version - sudo rm -f /usr/local/bin/yarn - nvm install 10 - rvm install 2.6.3 # was 2.5.1 @@ -125,106 +133,106 @@ _deploy_gem: &_deploy_gem jobs: include: - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 - - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 + + # - <<: *_test_gem + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - - <<: *_deploy_gem - env: COMPONENT=hyper-i18n - - <<: *_deploy_gem - env: COMPONENT=hyper-trace - - <<: *_deploy_gem - env: COMPONENT=hyper-state - - <<: *_deploy_gem - env: COMPONENT=hyper-component - - <<: *_deploy_gem - env: COMPONENT=hyper-model - - <<: *_deploy_gem - env: COMPONENT=hyper-operation - - <<: *_deploy_gem - env: COMPONENT=hyper-router - - <<: *_deploy_gem - env: COMPONENT=hyper-spec - - <<: *_deploy_gem - env: COMPONENT=hyper-store - - <<: *_deploy_gem - env: COMPONENT=rails-hyperstack - - <<: *_deploy_gem - env: COMPONENT=hyperstack-config + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + + # - <<: *_test_gem + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + + # - <<: *_deploy_gem + # env: COMPONENT=hyper-i18n + # - <<: *_deploy_gem + # env: COMPONENT=hyper-trace + # - <<: *_deploy_gem + # env: COMPONENT=hyper-state + # - <<: *_deploy_gem + # env: COMPONENT=hyper-component + # - <<: *_deploy_gem + # env: COMPONENT=hyper-model + # - <<: *_deploy_gem + # env: COMPONENT=hyper-operation + # - <<: *_deploy_gem + # env: COMPONENT=hyper-router + # - <<: *_deploy_gem + # env: COMPONENT=hyper-spec + # - <<: *_deploy_gem + # env: COMPONENT=hyper-store + # - <<: *_deploy_gem + # env: COMPONENT=rails-hyperstack + # - <<: *_deploy_gem + # env: COMPONENT=hyperstack-config From 09df6fa198ef40cbe7d791f3a1e662587618ccd0 Mon Sep 17 00:00:00 2001 From: catmando Date: Thu, 4 May 2023 12:25:35 -0400 Subject: [PATCH 34/43] rails-hyperstack and hyper-i18n working --- .travis.yml | 190 +++++++++--------- ruby/hyper-i18n/spec/hyper_i18n_spec.rb | 26 ++- ruby/hyper-operation/hyper-operation.gemspec | 2 +- ruby/hyper-state/hyper-state.gemspec | 2 +- ruby/rails-hyperstack/Rakefile | 3 + .../rails-hyperstack/rails-hyperstack.gemspec | 5 +- 6 files changed, 110 insertions(+), 118 deletions(-) diff --git a/.travis.yml b/.travis.yml index ff047e65c..481f869f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,6 @@ addons: _test_gem_pg: &_test_gem_pg stage: test - # services: postgresql - language: ruby cache: bundler: true @@ -33,12 +31,6 @@ _test_gem_pg: &_test_gem_pg - node_modules # NPM packages before_install: - # - echo 'installing postgresql' - # - sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf - # - sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf - # - sudo service postgresql stop # NOTE ADDING THESE TWO LINES MAKES NO DIFFERENCE - # - sudo service postgresql start 12 -p 5433 # - # - postgresql --version - sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf - sudo service postgresql restart - sleep 1 @@ -133,106 +125,106 @@ _deploy_gem: &_deploy_gem jobs: include: - # - <<: *_test_gem - # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db - # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 - - # - <<: *_test_gem - # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 + + - <<: *_test_gem + env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - <<: *_test_gem_pg env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - # - <<: *_test_gem - # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - # - <<: *_deploy_gem - # env: COMPONENT=hyper-i18n - # - <<: *_deploy_gem - # env: COMPONENT=hyper-trace - # - <<: *_deploy_gem - # env: COMPONENT=hyper-state - # - <<: *_deploy_gem - # env: COMPONENT=hyper-component - # - <<: *_deploy_gem - # env: COMPONENT=hyper-model - # - <<: *_deploy_gem - # env: COMPONENT=hyper-operation - # - <<: *_deploy_gem - # env: COMPONENT=hyper-router - # - <<: *_deploy_gem - # env: COMPONENT=hyper-spec - # - <<: *_deploy_gem - # env: COMPONENT=hyper-store - # - <<: *_deploy_gem - # env: COMPONENT=rails-hyperstack - # - <<: *_deploy_gem - # env: COMPONENT=hyperstack-config + - <<: *_test_gem + env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + + - <<: *_test_gem + env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + - <<: *_test_gem + env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + + - <<: *_deploy_gem + env: COMPONENT=hyper-i18n + - <<: *_deploy_gem + env: COMPONENT=hyper-trace + - <<: *_deploy_gem + env: COMPONENT=hyper-state + - <<: *_deploy_gem + env: COMPONENT=hyper-component + - <<: *_deploy_gem + env: COMPONENT=hyper-model + - <<: *_deploy_gem + env: COMPONENT=hyper-operation + - <<: *_deploy_gem + env: COMPONENT=hyper-router + - <<: *_deploy_gem + env: COMPONENT=hyper-spec + - <<: *_deploy_gem + env: COMPONENT=hyper-store + - <<: *_deploy_gem + env: COMPONENT=rails-hyperstack + - <<: *_deploy_gem + env: COMPONENT=hyperstack-config diff --git a/ruby/hyper-i18n/spec/hyper_i18n_spec.rb b/ruby/hyper-i18n/spec/hyper_i18n_spec.rb index 2da168f78..6a85d00c4 100644 --- a/ruby/hyper-i18n/spec/hyper_i18n_spec.rb +++ b/ruby/hyper-i18n/spec/hyper_i18n_spec.rb @@ -10,28 +10,26 @@ class TestComponent include Hyperstack::Component include Hyperstack::I18n render(DIV) do - DIV(id: :tp1) { 'I am a key' } - # DIV(id: :tp1) { t(:the_key) } - # DIV(id: :tp2) { I18n.t(:hello) } - # DIV(id: :tp3) { l(Time.parse('1/1/2018 12:45')) } - # DIV(id: :tp4) { l(Time.parse('1/1/2018 12:45'), '%B %d, %Y at %l:%M %P') } - # DIV(id: :tp5) { MyModel.model_name.human } - # DIV(id: :tp6) { MyModel.human_attribute_name('the_attribute') } + DIV(id: :tp1) { t(:the_key) } + DIV(id: :tp2) { I18n.t(:hello) } + DIV(id: :tp3) { l(Time.parse('1/1/2018 12:45')) } + DIV(id: :tp4) { l(Time.parse('1/1/2018 12:45'), '%B %d, %Y at %l:%M %P') } + DIV(id: :tp5) { MyModel.model_name.human } + DIV(id: :tp6) { MyModel.human_attribute_name('the_attribute') } end end end end end - [['prerendering', :server_only]].each do |mode, flag| # ['component rendering', :client_only], + [['component rendering', :client_only], ['prerendering', :server_only]].each do |mode, flag| it "will translate during #{mode}", prerendering_on: flag == :server_only do mount 'Components::TestComponent', {}, render_on: flag - binding.pry expect(find('#tp1')).to have_content('I am a key') - # expect(find('#tp2')).to have_content('Hello world') - # expect(find('#tp3')).to have_content(::I18n.l(Time.parse('1/1/2018 12:45'))) - # expect(find('#tp4')).to have_content(::I18n.l(Time.parse('1/1/2018 12:45'), format: '%B %d, %Y at %l:%M %P')) - # expect(find('#tp5')).to have_content('My Model') - # expect(find('#tp6')).to have_content('The Attribute') + expect(find('#tp2')).to have_content('Hello world') + expect(find('#tp3')).to have_content(::I18n.l(Time.parse('1/1/2018 12:45'))) + expect(find('#tp4')).to have_content(::I18n.l(Time.parse('1/1/2018 12:45'), format: '%B %d, %Y at %l:%M %P')) + expect(find('#tp5')).to have_content('My Model') + expect(find('#tp6')).to have_content('The Attribute') end end end diff --git a/ruby/hyper-operation/hyper-operation.gemspec b/ruby/hyper-operation/hyper-operation.gemspec index 7b138a51d..773db7ab8 100644 --- a/ruby/hyper-operation/hyper-operation.gemspec +++ b/ruby/hyper-operation/hyper-operation.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'database_cleaner' spec.add_development_dependency 'hyper-spec', Hyperstack::Operation::VERSION spec.add_development_dependency 'mysql2' - spec.add_development_dependency 'opal-browser', '~> 0.2.0' + # spec.add_development_dependency 'opal-browser', '~> 0.2.0' spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' diff --git a/ruby/hyper-state/hyper-state.gemspec b/ruby/hyper-state/hyper-state.gemspec index 9f0650513..c1e0802c0 100644 --- a/ruby/hyper-state/hyper-state.gemspec +++ b/ruby/hyper-state/hyper-state.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'hyper-spec', Hyperstack::State::VERSION spec.add_development_dependency 'listen' # spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency, '~> 0.2.4' - spec.add_development_dependency 'opal-browser', '~> 0.2.0' + # spec.add_development_dependency 'opal-browser', '~> 0.2.0' spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' diff --git a/ruby/rails-hyperstack/Rakefile b/ruby/rails-hyperstack/Rakefile index 70271475f..0ced07979 100644 --- a/ruby/rails-hyperstack/Rakefile +++ b/ruby/rails-hyperstack/Rakefile @@ -21,6 +21,9 @@ namespace :spec do sh('spring stop') sh('bundle exec rails g hyperstack:install') sh('bundle exec rails generate model Sample name:string description:text') + sleep 1 + sh('pwd') + sh('ls app/models') sh('mv app/models/sample.rb app/hyperstack/models/sample.rb') sh("cat ../server_side_sample.rb >> app/models/sample.rb") sh('bundle exec rake db:migrate') diff --git a/ruby/rails-hyperstack/rails-hyperstack.gemspec b/ruby/rails-hyperstack/rails-hyperstack.gemspec index ebcc5176c..498118adc 100644 --- a/ruby/rails-hyperstack/rails-hyperstack.gemspec +++ b/ruby/rails-hyperstack/rails-hyperstack.gemspec @@ -58,9 +58,8 @@ You can control how much of the stack gets installed as well: spec.add_dependency 'hyper-model', Hyperstack::VERSION spec.add_dependency 'hyper-router', Hyperstack::ROUTERVERSION spec.add_dependency 'hyperstack-config', Hyperstack::VERSION - spec.add_dependency 'opal-rails' #, '~> 2.0' - - spec.add_dependency 'opal-browser', '~> 0.2.0' + spec.add_dependency 'opal-rails' + spec.add_dependency 'opal', ENV['OPAL_VERSION'] || '>= 0.11.0', '< 1.1' spec.add_dependency 'react-rails', '>= 2.4.0', '< 2.5.0' # spec.add_dependency 'mini_racer', '~> 0.2.6' # spec.add_dependency 'libv8', '~> 7.3.492.27.1' From 958691c196550fc324ecc4d3c2644ccc30ae10aa Mon Sep 17 00:00:00 2001 From: catmando Date: Thu, 4 May 2023 14:25:15 -0400 Subject: [PATCH 35/43] added promise back in to hyperstack-config now playing with travis --- .travis.yml | 204 +++++++++--------- .../lib/hyperstack-config.rb | 2 +- 2 files changed, 103 insertions(+), 103 deletions(-) diff --git a/.travis.yml b/.travis.yml index 481f869f8..6251a5c91 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,105 +126,105 @@ _deploy_gem: &_deploy_gem jobs: include: - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 - - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' - - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - - - <<: *_deploy_gem - env: COMPONENT=hyper-i18n - - <<: *_deploy_gem - env: COMPONENT=hyper-trace - - <<: *_deploy_gem - env: COMPONENT=hyper-state - - <<: *_deploy_gem - env: COMPONENT=hyper-component - - <<: *_deploy_gem - env: COMPONENT=hyper-model - - <<: *_deploy_gem - env: COMPONENT=hyper-operation - - <<: *_deploy_gem - env: COMPONENT=hyper-router - - <<: *_deploy_gem - env: COMPONENT=hyper-spec - - <<: *_deploy_gem - env: COMPONENT=hyper-store - - <<: *_deploy_gem - env: COMPONENT=rails-hyperstack - - <<: *_deploy_gem - env: COMPONENT=hyperstack-config + env: DISABLE_SPRING=true COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 + + # - <<: *_test_gem + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + + # - <<: *_test_gem + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # - <<: *_test_gem_pg + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # - <<: *_test_gem + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + + # - <<: *_deploy_gem + # env: COMPONENT=hyper-i18n + # - <<: *_deploy_gem + # env: COMPONENT=hyper-trace + # - <<: *_deploy_gem + # env: COMPONENT=hyper-state + # - <<: *_deploy_gem + # env: COMPONENT=hyper-component + # - <<: *_deploy_gem + # env: COMPONENT=hyper-model + # - <<: *_deploy_gem + # env: COMPONENT=hyper-operation + # - <<: *_deploy_gem + # env: COMPONENT=hyper-router + # - <<: *_deploy_gem + # env: COMPONENT=hyper-spec + # - <<: *_deploy_gem + # env: COMPONENT=hyper-store + # - <<: *_deploy_gem + # env: COMPONENT=rails-hyperstack + # - <<: *_deploy_gem + # env: COMPONENT=hyperstack-config diff --git a/ruby/hyperstack-config/lib/hyperstack-config.rb b/ruby/hyperstack-config/lib/hyperstack-config.rb index bf5cf9aa3..f7bca1555 100644 --- a/ruby/hyperstack-config/lib/hyperstack-config.rb +++ b/ruby/hyperstack-config/lib/hyperstack-config.rb @@ -15,8 +15,8 @@ def self.naming_convention require 'hyperstack/active_support_string_inquirer.rb' require 'hyperstack_env' require 'hyperstack/hotloader/stub' + require 'promise' # uncommenting these lines breaks prerendering - # require 'promise' # require 'opal-browser' else require 'opal' From a760fa7c3e075d8bae5931ab18001f11d4e823cc Mon Sep 17 00:00:00 2001 From: catmando Date: Thu, 4 May 2023 14:45:28 -0400 Subject: [PATCH 36/43] trying to get rails-hyperstack passing on travis --- .travis.yml | 2 +- ruby/hyper-component/hyper-component.gemspec | 2 +- ruby/hyper-component/spec/active_support_spec.rb | 1 + ruby/hyperstack-config/hyperstack-config.gemspec | 2 +- ruby/rails-hyperstack/Rakefile | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6251a5c91..61860bdaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -126,7 +126,7 @@ _deploy_gem: &_deploy_gem jobs: include: - <<: *_test_gem - env: DISABLE_SPRING=true COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 + env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 # - <<: *_test_gem # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 # - <<: *_test_gem diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index ea1c05d3c..3eedaaa27 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'nokogiri' spec.add_development_dependency 'opal-jquery' - spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' + spec.add_development_dependency 'opal-rails' #, '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' diff --git a/ruby/hyper-component/spec/active_support_spec.rb b/ruby/hyper-component/spec/active_support_spec.rb index 8d0546730..1fdc08834 100644 --- a/ruby/hyper-component/spec/active_support_spec.rb +++ b/ruby/hyper-component/spec/active_support_spec.rb @@ -18,6 +18,7 @@ def payments GenericEnumerable.new([ Payment.new(5), Payment.new(15), Payment.new(10) ]) end end + binding.pry expect_evaluate_ruby do { Payment.new(5) => 5, Payment.new(15) => 15, Payment.new(10) => 10 } == payments.index_with(&:price) end.to be_truthy diff --git a/ruby/hyperstack-config/hyperstack-config.gemspec b/ruby/hyperstack-config/hyperstack-config.gemspec index 66a567de0..2c59a1cbb 100644 --- a/ruby/hyperstack-config/hyperstack-config.gemspec +++ b/ruby/hyperstack-config/hyperstack-config.gemspec @@ -23,7 +23,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'listen', '~> 3.0' # for hot loader # spec.add_dependency 'mini_racer', '~> 0.2.6' - spec.add_dependency 'opal', ENV['OPAL_VERSION'] || '>= 0.11.0', '< 2.0' + spec.add_dependency 'opal', ENV['OPAL_VERSION'] || '>= 0.11.0', '< 1.1' spec.add_dependency 'opal-browser' # this is needed everywhere else so its loaded here spec.add_dependency 'uglifier' spec.add_dependency 'websocket' # for hot loader diff --git a/ruby/rails-hyperstack/Rakefile b/ruby/rails-hyperstack/Rakefile index 0ced07979..9e31d53fd 100644 --- a/ruby/rails-hyperstack/Rakefile +++ b/ruby/rails-hyperstack/Rakefile @@ -29,6 +29,7 @@ namespace :spec do sh('bundle exec rake db:migrate') sh('RAILS_ENV=test bundle exec rake db:setup') # sh('bundle exec rails dev:cache') # not tested yet... + sh('RAILS_ENV=test bundle exec rails webpacker:compile') end end end From 7f21d93b69002bb8093458817ee8d557ee0b7535 Mon Sep 17 00:00:00 2001 From: catmando Date: Thu, 4 May 2023 15:38:31 -0400 Subject: [PATCH 37/43] still working rails-hyperstack CI issue --- .travis.yml | 2 +- ruby/hyperstack-config/hyperstack-config.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 61860bdaa..8e8c4a02e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,7 +91,7 @@ _test_gem: &_test_gem # yarn is in /usr/local/bin/yarn version 1.3.2 and is not a package # must remove this zombie for new yarn to work - sudo rm -f /usr/local/bin/yarn - - nvm install 10 + - nvm install 14 - rvm install 2.6.3 # was 2.5.1 - gem install bundler - echo 'install completed' diff --git a/ruby/hyperstack-config/hyperstack-config.gemspec b/ruby/hyperstack-config/hyperstack-config.gemspec index 2c59a1cbb..584a25fd2 100644 --- a/ruby/hyperstack-config/hyperstack-config.gemspec +++ b/ruby/hyperstack-config/hyperstack-config.gemspec @@ -30,7 +30,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'bundler' spec.add_development_dependency 'chromedriver-helper' - spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' + spec.add_development_dependency 'opal-rails' #, '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' From 5efd1a9fe0855849a6e8f7802e17805d9c73f66b Mon Sep 17 00:00:00 2001 From: catmando Date: Thu, 4 May 2023 18:06:43 -0400 Subject: [PATCH 38/43] testing Rails 6.1 now --- ruby/hyper-component/hyper-component.gemspec | 2 +- .../spec/active_support_spec.rb | 2 +- .../test_app/app/assets/config/manifest.js | 1 + .../app/xxxjavascript/packs/client_only.js | 7 + ruby/hyper-i18n/hyper-i18n.gemspec | 2 +- ruby/hyper-model/hyper-model.gemspec | 2 +- .../test_app/app/assets/config/manifest.js | 2 + ruby/hyper-model/spec/test_app/db/schema.rb | 122 ------ ruby/hyper-operation/hyper-operation.gemspec | 2 +- .../test_app/app/assets/config/manifest.js | 2 + ruby/hyper-router/hyper-router.gemspec | 3 +- .../test_app/app/assets/config/manifest.js | 3 + .../component_test_helpers working.rbx | 365 ++++++++++++++++++ ruby/hyper-state/hyper-state.gemspec | 2 +- ruby/hyper-store/hyper-store.gemspec | 2 +- .../test_app/app/assets/config/manifest.js | 1 + 16 files changed, 390 insertions(+), 130 deletions(-) create mode 100644 ruby/hyper-component/spec/test_app/app/xxxjavascript/packs/client_only.js create mode 100644 ruby/hyper-model/spec/test_app/app/assets/config/manifest.js delete mode 100644 ruby/hyper-model/spec/test_app/db/schema.rb create mode 100644 ruby/hyper-operation/spec/test_app/app/assets/config/manifest.js create mode 100644 ruby/hyper-router/spec/test_app/app/assets/config/manifest.js create mode 100644 ruby/hyper-spec/lib/hyper-spec/component_test_helpers working.rbx create mode 100644 ruby/hyperstack-config/spec/test_app/app/assets/config/manifest.js diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index 3eedaaa27..cd29a4f2d 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'nokogiri' spec.add_development_dependency 'opal-jquery' - spec.add_development_dependency 'opal-rails' #, '>= 0.9.4', '< 2.0' + spec.add_development_dependency 'opal-rails' , '>= 0.9.4', '< 2.0' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' diff --git a/ruby/hyper-component/spec/active_support_spec.rb b/ruby/hyper-component/spec/active_support_spec.rb index 1fdc08834..a7614ba5f 100644 --- a/ruby/hyper-component/spec/active_support_spec.rb +++ b/ruby/hyper-component/spec/active_support_spec.rb @@ -18,7 +18,7 @@ def payments GenericEnumerable.new([ Payment.new(5), Payment.new(15), Payment.new(10) ]) end end - binding.pry + expect_evaluate_ruby do { Payment.new(5) => 5, Payment.new(15) => 15, Payment.new(10) => 10 } == payments.index_with(&:price) end.to be_truthy diff --git a/ruby/hyper-component/spec/test_app/app/assets/config/manifest.js b/ruby/hyper-component/spec/test_app/app/assets/config/manifest.js index b16e53d6d..27de0df30 100644 --- a/ruby/hyper-component/spec/test_app/app/assets/config/manifest.js +++ b/ruby/hyper-component/spec/test_app/app/assets/config/manifest.js @@ -1,3 +1,4 @@ //= link_tree ../images //= link_directory ../javascripts .js +//= link application.css //= link_directory ../stylesheets .css diff --git a/ruby/hyper-component/spec/test_app/app/xxxjavascript/packs/client_only.js b/ruby/hyper-component/spec/test_app/app/xxxjavascript/packs/client_only.js new file mode 100644 index 000000000..52f446dd4 --- /dev/null +++ b/ruby/hyper-component/spec/test_app/app/xxxjavascript/packs/client_only.js @@ -0,0 +1,7 @@ +//app/javascript/packs/client_only.js +// add any requires for packages that will run client side only +ReactDOM = require('react-dom'); // react-js client side code +jQuery = require('jquery'); // remove if you don't need jQuery +// to add additional NPM packages call run yarn add package-name@version +// then add the require here. + diff --git a/ruby/hyper-i18n/hyper-i18n.gemspec b/ruby/hyper-i18n/hyper-i18n.gemspec index 19cf6e290..304b20aa0 100644 --- a/ruby/hyper-i18n/hyper-i18n.gemspec +++ b/ruby/hyper-i18n/hyper-i18n.gemspec @@ -28,7 +28,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'hyper-model', Hyperstack::I18n::VERSION spec.add_development_dependency 'hyper-spec', Hyperstack::I18n::VERSION spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency - spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0.0' + spec.add_development_dependency 'opal-rails' spec.add_development_dependency 'pry' spec.add_development_dependency 'puma', '<= 5.4.0' spec.add_development_dependency 'rake', '~> 10.0' diff --git a/ruby/hyper-model/hyper-model.gemspec b/ruby/hyper-model/hyper-model.gemspec index 0fb086592..e20545e48 100644 --- a/ruby/hyper-model/hyper-model.gemspec +++ b/ruby/hyper-model/hyper-model.gemspec @@ -32,7 +32,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'hyper-trace', HyperModel::VERSION spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'pg' - spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' + spec.add_development_dependency 'opal-rails' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' diff --git a/ruby/hyper-model/spec/test_app/app/assets/config/manifest.js b/ruby/hyper-model/spec/test_app/app/assets/config/manifest.js new file mode 100644 index 000000000..9c361e667 --- /dev/null +++ b/ruby/hyper-model/spec/test_app/app/assets/config/manifest.js @@ -0,0 +1,2 @@ + //= link_directory ../javascripts .js + //= link_directory ../stylesheets .css \ No newline at end of file diff --git a/ruby/hyper-model/spec/test_app/db/schema.rb b/ruby/hyper-model/spec/test_app/db/schema.rb deleted file mode 100644 index 82639473f..000000000 --- a/ruby/hyper-model/spec/test_app/db/schema.rb +++ /dev/null @@ -1,122 +0,0 @@ -# This file is auto-generated from the current state of the database. Instead -# of editing this file, please use the migrations feature of Active Record to -# incrementally modify your database, and then regenerate this schema definition. -# -# This file is the source Rails uses to define your schema when running `rails -# db:schema:load`. When creating a new database, `rails db:schema:load` tends to -# be faster and is potentially less error prone than running all of your -# migrations from scratch. Old migrations may fail to apply correctly if those -# migrations use external dependencies or application code. -# -# It's strongly recommended that you check this file into your version control system. - -ActiveRecord::Schema.define(version: 2021_02_28_200459) do - - # These are extensions that must be enabled in order to support this database - enable_extension "plpgsql" - - create_table "addresses", force: :cascade do |t| - t.string "street" - t.string "city" - t.string "state" - t.string "zip" - t.datetime "created_at" - t.datetime "updated_at" - end - - create_table "bones", force: :cascade do |t| - t.integer "dog_id" - end - - create_table "child_models", force: :cascade do |t| - t.string "child_attribute" - t.bigint "test_model_id" - t.index ["test_model_id"], name: "index_child_models_on_test_model_id" - end - - create_table "comments", force: :cascade do |t| - t.text "comment" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.bigint "todo_id" - t.bigint "author_id" - t.integer "user_id" - t.integer "todo_item_id" - t.index ["author_id"], name: "index_comments_on_author_id" - t.index ["todo_id"], name: "index_comments_on_todo_id" - end - - create_table "hyperstack_connections", force: :cascade do |t| - t.string "channel" - t.string "session" - t.datetime "created_at" - t.datetime "expires_at" - t.datetime "refresh_at" - end - - create_table "hyperstack_queued_messages", force: :cascade do |t| - t.text "data" - t.integer "connection_id" - end - - create_table "pets", force: :cascade do |t| - t.integer "owner_id" - end - - create_table "scratching_posts", force: :cascade do |t| - t.integer "cat_id" - end - - create_table "test_models", force: :cascade do |t| - t.string "test_attribute" - t.boolean "completed" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - - create_table "todo_items", force: :cascade do |t| - t.string "title" - t.text "description" - t.boolean "complete" - t.datetime "created_at" - t.datetime "updated_at" - t.integer "user_id" - t.integer "comment_id" - end - - create_table "todos", force: :cascade do |t| - t.string "title" - t.text "description" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - t.boolean "completed", default: false, null: false - t.bigint "created_by_id" - t.bigint "owner_id" - t.index ["created_by_id"], name: "index_todos_on_created_by_id" - t.index ["owner_id"], name: "index_todos_on_owner_id" - end - - create_table "users", force: :cascade do |t| - t.string "role" - t.bigint "manager_id" - t.string "first_name" - t.string "last_name" - t.string "email" - t.datetime "created_at" - t.datetime "updated_at" - t.string "address_street" - t.string "address_city" - t.string "address_state" - t.string "address_zip" - t.integer "address_id" - t.string "address2_street" - t.string "address2_city" - t.string "address2_state" - t.string "address2_zip" - t.string "data_string" - t.integer "data_times" - t.integer "test_enum" - t.index ["manager_id"], name: "index_users_on_manager_id" - end - -end diff --git a/ruby/hyper-operation/hyper-operation.gemspec b/ruby/hyper-operation/hyper-operation.gemspec index 773db7ab8..98358a6d8 100644 --- a/ruby/hyper-operation/hyper-operation.gemspec +++ b/ruby/hyper-operation/hyper-operation.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'hyper-spec', Hyperstack::Operation::VERSION spec.add_development_dependency 'mysql2' # spec.add_development_dependency 'opal-browser', '~> 0.2.0' - spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' + spec.add_development_dependency 'opal-rails' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' diff --git a/ruby/hyper-operation/spec/test_app/app/assets/config/manifest.js b/ruby/hyper-operation/spec/test_app/app/assets/config/manifest.js new file mode 100644 index 000000000..9c361e667 --- /dev/null +++ b/ruby/hyper-operation/spec/test_app/app/assets/config/manifest.js @@ -0,0 +1,2 @@ + //= link_directory ../javascripts .js + //= link_directory ../stylesheets .css \ No newline at end of file diff --git a/ruby/hyper-router/hyper-router.gemspec b/ruby/hyper-router/hyper-router.gemspec index 638e801a5..c6d186d38 100644 --- a/ruby/hyper-router/hyper-router.gemspec +++ b/ruby/hyper-router/hyper-router.gemspec @@ -24,7 +24,8 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'hyper-store', HyperRouter::VERSION spec.add_development_dependency 'listen' spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency - spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0.0' + spec.add_development_dependency 'opal-rails' + spec.add_development_dependency 'opal-jquery' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' diff --git a/ruby/hyper-router/spec/test_app/app/assets/config/manifest.js b/ruby/hyper-router/spec/test_app/app/assets/config/manifest.js new file mode 100644 index 000000000..92bfa3059 --- /dev/null +++ b/ruby/hyper-router/spec/test_app/app/assets/config/manifest.js @@ -0,0 +1,3 @@ + //= link_tree ../images + //= link_directory ../javascripts .js + //= link_directory ../stylesheets .css \ No newline at end of file diff --git a/ruby/hyper-spec/lib/hyper-spec/component_test_helpers working.rbx b/ruby/hyper-spec/lib/hyper-spec/component_test_helpers working.rbx new file mode 100644 index 000000000..f41fbe740 --- /dev/null +++ b/ruby/hyper-spec/lib/hyper-spec/component_test_helpers working.rbx @@ -0,0 +1,365 @@ +# see component_test_helpers_spec.rb for examples +require 'parser/current' +require 'unparser' +require 'hyper-spec/unparser_patch' +require 'method_source' +require_relative '../../lib/hyper-spec/time_cop.rb' + +Parser::Builders::Default.emit_procarg0 = true + +module HyperSpec + module ComponentTestHelpers + TOP_LEVEL_COMPONENT_PATCH = + Opal.compile(File.read(File.expand_path('../../sources/top_level_rails_component.rb', __FILE__))) + TIME_COP_CLIENT_PATCH = + Opal.compile(File.read(File.expand_path('../../hyper-spec/time_cop.rb', __FILE__))) + + "\n#{File.read(File.expand_path('../../sources/lolex.js', __FILE__))}" + + class << self + attr_accessor :current_example + attr_accessor :description_displayed + + def display_example_description + "" + end + end + + def build_test_url_for(controller) + unless controller + unless defined?(::HyperstackTestController) + Object.const_set('HyperstackTestController', Class.new(::ActionController::Base)) + end + + controller = ::HyperstackTestController + end + + route_root = controller.name.gsub(/Controller$/, '').underscore + + unless controller.method_defined?(:test) + controller.class_eval do + define_method(:test) do + route_root = self.class.name.gsub(/Controller$/, '').underscore + test_params = ::Rails.cache.read("/#{route_root}/#{params[:id]}") + @component_name = test_params[0] + @component_params = test_params[1] + render_params = test_params[2] + render_on = render_params.delete(:render_on) || :client_only + _mock_time = render_params.delete(:mock_time) + style_sheet = render_params.delete(:style_sheet) + javascript = render_params.delete(:javascript) + code = render_params.delete(:code) + + page = '<%= react_component @component_name, @component_params, '\ + "{ prerender: #{render_on != :client_only} } %>" + unless render_on == :server_only + page = "\n#{page}" + page = "\n#{page}" if code + end + + if render_on != :server_only || Lolex.initialized? + page = "\n#{page}" + end + + if (render_on != :server_only && !render_params[:layout]) || javascript + page = "<%= javascript_include_tag '#{javascript || 'application'}' %>\n#{page}" + end + + if !render_params[:layout] || style_sheet + page = "<%= stylesheet_link_tag '#{style_sheet || 'application'}' %>\n#{page}" + end + page = "\n#{page}" + + title = view_context.escape_javascript(ComponentTestHelpers.current_example.description) + title = "#{title}...continued." if ComponentTestHelpers.description_displayed + + page = "\n#{page}" + + ComponentTestHelpers.description_displayed = true + render_params[:inline] = page + render render_params + end + end + + begin + routes = ::Rails.application.routes + routes.disable_clear_and_finalize = true + routes.clear! + routes.draw do + get "/#{route_root}/:id", to: "#{route_root}#test" + end + ::Rails.application.routes_reloader.paths.each { |path| load(path) } + routes.finalize! + ActiveSupport.on_load(:action_controller) { routes.finalize! } + ensure + routes.disable_clear_and_finalize = false + end + end + + "/#{route_root}/#{@test_id = (@test_id || 0) + 1}" + end + + def isomorphic(&block) + yield + on_client(&block) + end + + def evaluate_ruby(str = '', opts = {}, &block) + insure_mount + if block + str = "#{str}\n#{Unparser.unparse Parser::CurrentRuby.parse(block.source).children.last}" + end + js = Opal.compile(str).gsub("// Prepare super implicit arguments\n", "") + .delete("\n").gsub('(Opal);', '(Opal)') + # workaround for firefox 58 and geckodriver 0.19.1, because firefox is unable to find .$to_json: + # JSON.parse(evaluate_script("(function(){var a=Opal.Array.$new(); a[0]=#{js}; return a.$to_json();})();"), opts).first + JSON.parse(evaluate_script("[#{js}].$to_json()"), opts).first + end + + def expect_evaluate_ruby(str = '', opts = {}, &block) + insure_mount + expect(evaluate_ruby(add_opal_block(str, block), opts)) + end + + def add_opal_block(str, block) + # big assumption here is that we are going to follow this with a .to + # hence .children.first followed by .children.last + # probably should do some kind of "search" to make this work nicely + return str unless block + "#{str}\n"\ + "#{Unparser.unparse Parser::CurrentRuby.parse(block.source).children.first.children.last}" + end + + def evaluate_promise(str = '', opts = {}, &block) + insure_mount + str = "#{str}\n#{Unparser.unparse Parser::CurrentRuby.parse(block.source).children.last}" if block + str = "#{str}.then { |args| args = [args]; `window.hyper_spec_promise_result = args` }" + js = Opal.compile(str).gsub("\n","").gsub("(Opal);","(Opal)") + page.evaluate_script("window.hyper_spec_promise_result = false") + page.execute_script(js) + Timeout.timeout(Capybara.default_max_wait_time) do + loop do + sleep 0.25 + break if page.evaluate_script("!!window.hyper_spec_promise_result") + end + end + JSON.parse(page.evaluate_script("window.hyper_spec_promise_result.$to_json()"), opts).first + end + + def expect_promise(str = '', opts = {}, &block) + insure_mount + expect(evaluate_promise(add_opal_block(str, block), opts)) + end + + def ppr(str) + js = Opal.compile(str).delete("\n").gsub('(Opal);', '(Opal)') + execute_script("console.log(#{js})") + end + + def on_client(&block) + @client_code = + "#{@client_code}#{Unparser.unparse Parser::CurrentRuby.parse(block.source).children.last}\n" + end + + def debugger + `debugger` + nil + end + + def insure_mount + # rescue in case page is not defined... + mount unless page.instance_variable_get('@hyper_spec_mounted') + end + + def client_option(opts = {}) + @client_options ||= {} + @client_options.merge! opts + end + + alias client_options client_option + + def mount(component_name = nil, params = nil, opts = {}, &block) + unless params + params = opts + opts = {} + end + + opts = client_options opts + test_url = build_test_url_for(opts.delete(:controller)) + + if block || @client_code || component_name.nil? + block_with_helpers = <<-code + module ComponentHelpers + def self.js_eval(s) + `eval(s)` + end + def self.dasherize(s) + res = %x{ + s.replace(/[-_\\s]+/g, '-') + .replace(/([A-Z\\d]+)([A-Z][a-z])/g, '$1-$2') + .replace(/([a-z\\d])([A-Z])/g, '$1-$2') + .toLowerCase() + } + res + end + def self.add_class(class_name, styles={}) + style = styles.collect { |attr, value| "\#{dasherize(attr)}:\#{value}" }.join("; ") + cs = class_name.to_s + %x{ + var style_el = document.createElement("style"); + var css = "." + cs + " { " + style + " }"; + style_el.type = "text/css"; + if (style_el.styleSheet){ + style_el.styleSheet.cssText = css; + } else { + style_el.appendChild(document.createTextNode(css)); + } + document.head.appendChild(style_el); + } + end + end + class Hyperstack::Internal::Component::TestDummy + include Hyperstack::Component + render {} + end + #{@client_code} + #{Unparser.unparse(Parser::CurrentRuby.parse(block.source).children.last) if block} + code + opts[:code] = Opal.compile(block_with_helpers) + end + + component_name ||= 'Hyperstack::Internal::Component::TestDummy' + ::Rails.cache.write(test_url, [component_name, params, opts]) + test_code_key = "hyper_spec_prerender_test_code.js" + @@original_server_render_files ||= ::Rails.configuration.react.server_renderer_options[:files] + if opts[:render_on] == :both || opts[:render_on] == :server_only + unless opts[:code].blank? + ::Rails.cache.write(test_code_key, opts[:code]) + ::Rails.configuration.react.server_renderer_options[:files] = @@original_server_render_files + [test_code_key] + ::React::ServerRendering.reset_pool # make sure contexts are reloaded so they dont use code from cache, as the rails filewatcher doesnt look for cache changes + else + ::Rails.cache.delete(test_code_key) + ::Rails.configuration.react.server_renderer_options[:files] = @@original_server_render_files + ::React::ServerRendering.reset_pool # make sure contexts are reloaded so they dont use code from cache, as the rails filewatcher doesnt look for cache changes + end + end + visit test_url + wait_for_ajax unless opts[:no_wait] + page.instance_variable_set('@hyper_spec_mounted', true) + Lolex.init(self, client_options[:time_zone], client_options[:clock_resolution]) + end + + [:callback_history_for, :last_callback_for, :clear_callback_history_for, + :event_history_for, :last_event_for, :clear_event_history_for].each do |method| + define_method(method) do |event_name| + evaluate_ruby("Hyperstack::Internal::Component::TopLevelRailsComponent.#{method}('#{event_name}')") + end + end + + def run_on_client(&block) + script = Opal.compile(Unparser.unparse(Parser::CurrentRuby.parse(block.source).children.last)) + execute_script(script) + end + + def add_class(class_name, style) + @client_code = "#{@client_code}ComponentHelpers.add_class('#{class_name}', #{style})\n" + end + + def open_in_chrome + if false && ['linux', 'freebsd'].include?(`uname`.downcase) + `google-chrome http://#{page.server.host}:#{page.server.port}#{page.current_path}` + else + `open http://#{page.server.host}:#{page.server.port}#{page.current_path}` + end + + while true + sleep 1.hour + end + end + + def pause(message = nil) + if message + puts message + page.evaluate_script "console.log('#{message} (type go() to continue)')" + end + + page.evaluate_script('window.hyper_spec_waiting_for_go = true') + page.evaluate_script('go = function() {window.hyper_spec_waiting_for_go = false}') + loop do + sleep 0.25 + break unless page.evaluate_script('window.hyper_spec_waiting_for_go') + end + end + + def wait_for_size(width, height) + start_time = Capybara::Helpers.monotonic_time + stable_count_w = 0 + stable_count_h = 0 + prev_size = [0, 0] + begin + sleep 0.05 + curr_size = Capybara.current_session.current_window.size + return if [width, height] == curr_size + # some maximum or minimum is reached and size doesnt change anymore + stable_count_w += 1 if prev_size[0] == curr_size[0] + stable_count_h += 1 if prev_size[1] == curr_size[1] + return if stable_count_w > 2 || stable_count_h > 2 + prev_size = curr_size + end while (Capybara::Helpers.monotonic_time - start_time) < Capybara.current_session.config.default_max_wait_time + raise Capybara::WindowError, "Window size not stable within #{Capybara.current_session.config.default_max_wait_time} seconds." + end + + def size_window(width = nil, height = nil) + # return if @window_cannot_be_resized + # original_width = evaluate_script('window.innerWidth') + # original_height = evaluate_script('window.innerHeight') + width, height = [height, width] if width == :portrait + width, height = width if width.is_a? Array + portrait = true if height == :portrait + + case width + when :small + width, height = [480, 320] + when :mobile + width, height = [640, 480] + when :tablet + width, height = [960, 640] + when :large + width, height = [1920, 6000] + when :default, nil + width, height = [1024, 768] + end + + width, height = [height, width] if portrait + + unless RSpec.configuration.debugger_width + Capybara.current_session.current_window.resize_to(1000, 500) + wait_for_size(1000, 500) + inner_width = evaluate_script('window.innerWidth') + RSpec.configuration.debugger_width = 1000 - inner_width + end + Capybara.current_session.current_window + .resize_to(width + RSpec.configuration.debugger_width, height) + wait_for_size(width + RSpec.configuration.debugger_width, height) + end + end + + RSpec.configure do |config| + config.before(:each) do |example| + ComponentTestHelpers.current_example = example + ComponentTestHelpers.description_displayed = false + end + + if defined?(ActiveRecord) + config.before(:all) do + ActiveRecord::Base.class_eval do + def attributes_on_client(page) + page.evaluate_ruby("#{self.class.name}.find(#{id}).attributes", symbolize_names: true) + end + end + end + end + end +end diff --git a/ruby/hyper-state/hyper-state.gemspec b/ruby/hyper-state/hyper-state.gemspec index c1e0802c0..1917a787a 100644 --- a/ruby/hyper-state/hyper-state.gemspec +++ b/ruby/hyper-state/hyper-state.gemspec @@ -26,7 +26,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'listen' # spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency, '~> 0.2.4' # spec.add_development_dependency 'opal-browser', '~> 0.2.0' - spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' + spec.add_development_dependency 'opal-rails' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' diff --git a/ruby/hyper-store/hyper-store.gemspec b/ruby/hyper-store/hyper-store.gemspec index fbdfa72e3..7fb885a73 100644 --- a/ruby/hyper-store/hyper-store.gemspec +++ b/ruby/hyper-store/hyper-store.gemspec @@ -27,7 +27,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'listen' # spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency, '~> 0.2.6' spec.add_development_dependency 'opal-browser', '~> 0.2.0' - spec.add_development_dependency 'opal-rails', '>= 0.9.4', '< 2.0' + spec.add_development_dependency 'opal-rails' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' diff --git a/ruby/hyperstack-config/spec/test_app/app/assets/config/manifest.js b/ruby/hyperstack-config/spec/test_app/app/assets/config/manifest.js new file mode 100644 index 000000000..6f71952ea --- /dev/null +++ b/ruby/hyperstack-config/spec/test_app/app/assets/config/manifest.js @@ -0,0 +1 @@ + //= link_directory ../javascripts .js From 256feb05898a72a1abc34f738a355014d86f8a66 Mon Sep 17 00:00:00 2001 From: catmando Date: Thu, 4 May 2023 18:13:53 -0400 Subject: [PATCH 39/43] turned on first batch of tests back on --- .travis.yml | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8e8c4a02e..113998892 100644 --- a/.travis.yml +++ b/.travis.yml @@ -127,30 +127,30 @@ jobs: include: - <<: *_test_gem env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 - # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db - # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db - # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db + - <<: *_test_gem + env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 # - <<: *_test_gem # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' From 6f7ff47da70d9f05e3f9d6dd3a91f8ec2dcf0165 Mon Sep 17 00:00:00 2001 From: catmando Date: Fri, 5 May 2023 11:28:54 -0400 Subject: [PATCH 40/43] fixed spec for hyper-component and rails 6.1 --- .travis.yml | 27 +++++++++++++++++++ ruby/hyper-component/hyper-component.gemspec | 2 +- .../spec/test_app/config/application.rb | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 113998892..e839c6349 100644 --- a/.travis.yml +++ b/.travis.yml @@ -179,6 +179,33 @@ jobs: # - <<: *_test_gem # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + - <<: *_test_gem + env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem + env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem + env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem + env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem + env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem + env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem + env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem + env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part1 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part2 DB=hyper_mesh_test_db + - <<: *_test_gem_pg + env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part3 DB=hyper_mesh_test_db + - <<: *_test_gem + env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + # - <<: *_test_gem # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' # - <<: *_test_gem diff --git a/ruby/hyper-component/hyper-component.gemspec b/ruby/hyper-component/hyper-component.gemspec index cd29a4f2d..9c1c773c4 100644 --- a/ruby/hyper-component/hyper-component.gemspec +++ b/ruby/hyper-component/hyper-component.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'mini_racer', '< 0.4.0' # something is busted with 0.4.0 and its libv8-node dependency spec.add_development_dependency 'nokogiri' spec.add_development_dependency 'opal-jquery' - spec.add_development_dependency 'opal-rails' , '>= 0.9.4', '< 2.0' + spec.add_development_dependency 'opal-rails' spec.add_development_dependency 'pry-rescue' spec.add_development_dependency 'pry-stack_explorer' spec.add_development_dependency 'puma', '<= 5.4.0' diff --git a/ruby/hyper-component/spec/test_app/config/application.rb b/ruby/hyper-component/spec/test_app/config/application.rb index 383ddfaec..1b198059e 100644 --- a/ruby/hyper-component/spec/test_app/config/application.rb +++ b/ruby/hyper-component/spec/test_app/config/application.rb @@ -5,7 +5,7 @@ # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups(assets: %w(development test))) -# require 'jquery-rails' +require 'jquery-rails' # require 'opal' # require 'opal-jquery' # require 'opal-browser' From e118e8c0a3be24ceded83c75f6c659923f34124c Mon Sep 17 00:00:00 2001 From: catmando Date: Mon, 8 May 2023 13:42:45 -0400 Subject: [PATCH 41/43] now working with zeitwerk loader --- .../hyperstack/server_side_auto_require.rb | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/ruby/rails-hyperstack/lib/hyperstack/server_side_auto_require.rb b/ruby/rails-hyperstack/lib/hyperstack/server_side_auto_require.rb index 3d382eeaa..ee500361c 100644 --- a/ruby/rails-hyperstack/lib/hyperstack/server_side_auto_require.rb +++ b/ruby/rails-hyperstack/lib/hyperstack/server_side_auto_require.rb @@ -1,4 +1,17 @@ -Rails.configuration.autoloader = :classic #:zeitwerk +# require "hyperstack/server_side_auto_require.rb" in your hyperstack initializer +# to autoload shadowed server side files that match files +# in the hyperstack directory + +if Rails.configuration.try(:autoloader) == :zeitwerk + Rails.autoloaders.each do |loader| + loader.on_load do |_cpath, _value, abspath| + ActiveSupport::Dependencies.add_server_side_dependency(abspath) do |load_path| + loader.send(:log, "Hyperstack loading server side shadowed file: #{load_path}") if loader&.logger + require("#{load_path}.rb") + end + end + end +end module ActiveSupport module Dependencies @@ -11,7 +24,7 @@ class << self # and add that as a dependency def require_or_load(file_name, const_path = nil) - add_server_side_dependency(file_name) + add_server_side_dependency(file_name) { |load_path| require_dependency load_path } original_require_or_load(file_name, const_path) end @@ -20,7 +33,7 @@ def require_or_load(file_name, const_path = nil) # the filename, and if a ruby file exists at that location then # add it as a dependency - def add_server_side_dependency(file_name) + def add_server_side_dependency(file_name, loader = nil) path = File.expand_path(file_name.chomp(".rb")) .split(File::SEPARATOR).reverse hs_index = path.find_index(HYPERSTACK_DIR) @@ -32,7 +45,7 @@ def add_server_side_dependency(file_name) return unless File.exist? "#{load_path}.rb" - require_dependency load_path + yield load_path end end end From 687582d6a1395065b1647e2a66d78bd68062369d Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 16 May 2023 14:28:58 -0400 Subject: [PATCH 42/43] trying to get travis working again --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index e839c6349..90250a8f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,6 +88,13 @@ _test_gem: &_test_gem before_install: - echo installing $COMPONENT + - sudo apt-get remove --purge mysql-server mysql-client mysql-common + - sudo apt-get autoremove + - sudo apt-get autoclean + - sudo rm -rf /var/lib/mysql + - sudo rm -rf /etc/mysql + - sudo apt install mariadb-server mariadb-client -y + # yarn is in /usr/local/bin/yarn version 1.3.2 and is not a package # must remove this zombie for new yarn to work - sudo rm -f /usr/local/bin/yarn From 52a06b26d3ab81520bd9c5667367e880dbe90e99 Mon Sep 17 00:00:00 2001 From: catmando Date: Tue, 16 May 2023 14:44:56 -0400 Subject: [PATCH 43/43] trying to get travis working round 2 --- .travis.yml | 205 ++++++++++++++++++++++++++-------------------------- 1 file changed, 103 insertions(+), 102 deletions(-) diff --git a/.travis.yml b/.travis.yml index 90250a8f7..fc3867f3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,6 +94,7 @@ _test_gem: &_test_gem - sudo rm -rf /var/lib/mysql - sudo rm -rf /etc/mysql - sudo apt install mariadb-server mariadb-client -y + - sudo apt-get install libmysqlclient-dev # yarn is in /usr/local/bin/yarn version 1.3.2 and is not a package # must remove this zombie for new yarn to work @@ -132,133 +133,133 @@ _deploy_gem: &_deploy_gem jobs: include: - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 - - # - <<: *_test_gem - # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 + - <<: *_test_gem + env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part1 DB=hyper_mesh_test_db # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part2 DB=hyper_mesh_test_db # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 TASK=part3 DB=hyper_mesh_test_db # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 - - <<: *_test_gem - env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem - env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem - env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem - env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem - env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem - env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem - env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem - env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem - env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part1 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part2 DB=hyper_mesh_test_db - - <<: *_test_gem_pg - env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part3 DB=hyper_mesh_test_db - - <<: *_test_gem - env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + # # - <<: *_test_gem + # # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' + # # - <<: *_test_gem_pg + # # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # # - <<: *_test_gem_pg + # # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # # - <<: *_test_gem_pg + # # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # # - <<: *_test_gem + # # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 OPAL_VERSION='~>0.11' RAILS_VERSION='~>5.0' # - <<: *_test_gem - # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem - # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem - # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem - # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem - # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem - # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem - # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem - # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem - # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part1 DB=hyper_mesh_test_db # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part2 DB=hyper_mesh_test_db # - <<: *_test_gem_pg - # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' TASK=part3 DB=hyper_mesh_test_db # - <<: *_test_gem - # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>6.0.0' + + # # - <<: *_test_gem + # # env: COMPONENT=rails-hyperstack RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-spec RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-trace RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyperstack-config RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-state RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-component RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-router RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-store RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem + # # env: COMPONENT=hyper-operation RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' + # # - <<: *_test_gem_pg + # # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part1 DB=hyper_mesh_test_db + # # - <<: *_test_gem_pg + # # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part2 DB=hyper_mesh_test_db + # # - <<: *_test_gem_pg + # # env: COMPONENT=hyper-model RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' TASK=part3 DB=hyper_mesh_test_db + # # - <<: *_test_gem + # # env: COMPONENT=hyper-i18n RUBY_VERSION=2.5.1 RAILS_VERSION='~>5.0' - # - <<: *_deploy_gem - # env: COMPONENT=hyper-i18n - # - <<: *_deploy_gem - # env: COMPONENT=hyper-trace - # - <<: *_deploy_gem - # env: COMPONENT=hyper-state - # - <<: *_deploy_gem - # env: COMPONENT=hyper-component - # - <<: *_deploy_gem - # env: COMPONENT=hyper-model - # - <<: *_deploy_gem - # env: COMPONENT=hyper-operation - # - <<: *_deploy_gem - # env: COMPONENT=hyper-router - # - <<: *_deploy_gem - # env: COMPONENT=hyper-spec - # - <<: *_deploy_gem - # env: COMPONENT=hyper-store - # - <<: *_deploy_gem - # env: COMPONENT=rails-hyperstack - # - <<: *_deploy_gem - # env: COMPONENT=hyperstack-config + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-i18n + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-trace + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-state + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-component + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-model + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-operation + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-router + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-spec + # # - <<: *_deploy_gem + # # env: COMPONENT=hyper-store + # # - <<: *_deploy_gem + # # env: COMPONENT=rails-hyperstack + # # - <<: *_deploy_gem + # # env: COMPONENT=hyperstack-config