hyper-rails 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9283b7e105a7586095ee4d390814806e57d0cace
4
- data.tar.gz: 8cd6a49c0af0f8e2ab7b2a93496f86d31bdb4914
3
+ metadata.gz: d8d69a0fa205442996903dd3474c826e2e0a97a2
4
+ data.tar.gz: 72858e02b70f30e40ea6610f8b19e1227ef60c4c
5
5
  SHA512:
6
- metadata.gz: 592162996aaff48519514cc91ed0dbd77cdbe6696003b9c8e4b7fab8e73708b153ad268510d4ed49bec6be5067be8a91e85f9c9dbfb8404a163fe2d8af721809
7
- data.tar.gz: 3813ecd460c9a8a34069d0eaafad764eb04b6d41e252d162067fe949633991250b5384bc9e03957f1e1ec5f83c9e0f48771d720eba341a47398e9547f74597b3
6
+ metadata.gz: b14de7e0f9a50d1069a025812c2d0c7e53490edd785db4b4a37a835a8e718bf92b731227150c11a50876d614c928cb3565cf82737a76f704e78abb3006f4a514
7
+ data.tar.gz: 8bee2a4ae528cb76e939a6b52f41ece9362cbe72ceb154e8063b23741e41a78649097eebda4acd5b36f4d8346489c7d4627252230cbd23b44acd6dbf087691c5
@@ -10,6 +10,8 @@ module Hyperloop
10
10
  prepend_file 'app/assets/javascripts/application.js' do
11
11
  <<-'JS'
12
12
  // added by hyper-rails: These lines must preceed other requires especially turbo_links
13
+ //= require 'opal'
14
+ //= require 'react/react-source'
13
15
  //= require 'components'
14
16
  //= require 'react_ujs'
15
17
  JS
@@ -55,7 +57,6 @@ end if Rails.env.development?
55
57
  create_file 'app/views/components.rb', <<-FILE
56
58
  # app/views/components.rb
57
59
  require 'opal'
58
- require 'react/react-source'
59
60
  require 'hyper-react'
60
61
  if React::IsomorphicHelpers.on_opal_client?
61
62
  require 'opal-jquery'
@@ -73,18 +74,16 @@ require_tree './components'
73
74
  if options[:'hyper-mesh'] || options[:all]
74
75
  create_file 'app/models/models.rb', <<-FILE
75
76
  # app/models/models.rb
76
- require_tree './public'
77
+ require_tree './public' if RUBY_ENGINE == 'opal'
77
78
  FILE
78
79
  end
79
80
  end
80
81
 
81
82
  def add_config
82
83
  application 'config.assets.paths << ::Rails.root.join(\'app\', \'models\').to_s'
83
- application 'config.autoload_paths += %W(#{config.root}/app/views/components)'
84
84
  if options[:'hyper-mesh'] || options[:all]
85
85
  application 'config.autoload_paths += %W(#{config.root}/app/models/public)'
86
86
  end
87
- application 'config.eager_load_paths += %W(#{config.root}/app/views/components)'
88
87
  if options[:'hyper-mesh'] || options[:all]
89
88
  application 'config.eager_load_paths += %W(#{config.root}/app/models/public)'
90
89
  end
@@ -94,9 +93,8 @@ require_tree './public'
94
93
  end
95
94
 
96
95
  def add_gems
97
-
98
- gem "opal-rails"
99
- gem "opal-browser"
96
+ gem 'opal-rails'
97
+ gem 'opal-browser'
100
98
  gem 'hyper-react'
101
99
  gem 'therubyracer', platforms: :ruby
102
100
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyper-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loic Boutet
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-14 00:00:00.000000000 Z
11
+ date: 2016-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails