isomorfeus-installer 1.0.0.epsilon4 → 1.0.0.zeta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b1ec1843516cda2d865efdb67abfa725a2fa75261e56ce3c6df116baa17c455a
4
- data.tar.gz: bbc779e133a823c4ea7ba1714efbf8ef4075a6ff452cc1d014bb103ad9835b82
3
+ metadata.gz: 41089b8ee762827b0b24b4c2434186f73ad4f6053cd398ee83b16ebb6d287c61
4
+ data.tar.gz: a76d16e2c0edf82e4d93b430d9ac831b3a6e162bd7a278d8afd2946fde23dc8d
5
5
  SHA512:
6
- metadata.gz: e4159f54580333bf03293ef2437e2a8dd38549b778f6d7dea04b55c73db44dd0b5637b6d89d40002bcb1562cabca75f27c29d13bc267b3b10660ccc8ba2273b5
7
- data.tar.gz: 5feb1517862a5929b973084b10be6aac127684d79d9d5318f9c2b3928cf3f6fdd950a13a505f484d73605048ce15692d56446bb8c6d0cba23f8e5248e82ee216
6
+ metadata.gz: 48e32d3ebce9f2cd23adf4d161628c6c0f05282d0065a885824db568eab5b52a8e5bdab474346915bc4aa4b75062d4f96751a4d80368abc0a4adcf6c95db5385
7
+ data.tar.gz: ef6d3d0c8dcd9916cfac4cab002fbc29e9651412316c42daa722b9d284aac5e66fcdcbe3fe42e6aea4fcd7ee861a5e7e35542e6e29135650d4f6dd17a213bfb7
@@ -152,6 +152,7 @@ module Isomorfeus
152
152
  data_hash = { app_require: app_require, app_class: app_class }
153
153
  create_file_from_template('config.ru.erb', 'config.ru', data_hash)
154
154
  create_file_from_template(File.join('app_loader.rb.erb'), 'app_loader.rb', {})
155
+ create_file_from_template(File.join('.gitignore.erb'), '.gitignore', {})
155
156
  end
156
157
 
157
158
  def self.install_isomorfeus_entries
@@ -0,0 +1,25 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore all logfiles and tempfiles.
11
+ /log/*
12
+ /tmp/*
13
+ !/log/.keep
14
+ !/tmp/.keep
15
+
16
+ node_modules
17
+ public/assets/*
18
+
19
+ .byebug_history
20
+
21
+ yarn-error.log
22
+ yarn-debug.log*
23
+ .yarn-integrity
24
+
25
+ .DS_Store
@@ -8,10 +8,10 @@ gem 'roda', '~> 3.22.0'
8
8
 
9
9
  gem 'opal', github: 'janbiedermann/opal', branch: 'es6_modules_1_1'
10
10
  gem 'opal-activesupport', '~> 0.3.3'
11
- gem 'opal-webpack-loader', '>= 0.9.2'
11
+ gem 'opal-webpack-loader', '>= 0.9.5'
12
12
 
13
13
  gem 'isomorfeus-redux', '~> 4.0.11'
14
- gem 'isomorfeus-react', '>= 16.9.5'
14
+ gem 'isomorfeus-react', '>= 16.9.8'
15
15
  gem 'isomorfeus-policy', <%= isomorfeus_policy %>
16
16
  gem 'isomorfeus-transport', <%= isomorfeus_transport %>
17
17
  gem 'isomorfeus-i18n', <%= isomorfeus_i18n %>
@@ -11,7 +11,10 @@ class <%= app_class %> < Roda
11
11
  use_isomorfeus_middlewares
12
12
  plugin :public, root: 'public'
13
13
 
14
- def page_content(host, location)
14
+ def page_content(env, location)
15
+ locale = env.http_accept_language.preferred_language_from(Isomorfeus.available_locales)
16
+ locale = env.http_accept_language.compatible_language_from(Isomorfeus.available_locales) unless locale
17
+ locale = Isomorfeus.locale unless locale
15
18
  <<~HTML
16
19
  <html>
17
20
  <head>
@@ -19,7 +22,7 @@ class <%= app_class %> < Roda
19
22
  #{owl_script_tag 'application.js'}
20
23
  </head>
21
24
  <body>
22
- #{mount_component('<%= app_class %>', location_host: host, location: location)}
25
+ #{mount_component('<%= app_class %>', location_host: env['HTTP_HOST'], location: location, locale: locale)}
23
26
  </body>
24
27
  </html>
25
28
  HTML
@@ -27,7 +30,7 @@ class <%= app_class %> < Roda
27
30
 
28
31
  route do |r|
29
32
  r.root do
30
- page_content(env['HTTP_HOST'], '/')
33
+ page_content(env, '/')
31
34
  end
32
35
 
33
36
  r.public
@@ -37,7 +40,7 @@ class <%= app_class %> < Roda
37
40
  end
38
41
 
39
42
  r.get do
40
- content = page_content(env['HTTP_HOST'], env['PATH_INFO'])
43
+ content = page_content(env, env['PATH_INFO'])
41
44
  response.status = ssr_response_status
42
45
  content
43
46
  end
@@ -132,4 +132,4 @@ const browser = Object.assign({}, common_config, browser_config);
132
132
  const ssr = Object.assign({}, common_config, ssr_config);
133
133
  const web_worker = Object.assign({}, common_config, web_worker_config);
134
134
 
135
- module.exports = [ browser, ssr ];
135
+ module.exports = [ browser ];
@@ -113,4 +113,4 @@ const browser = Object.assign({}, common_config, browser_config);
113
113
  const ssr = Object.assign({}, common_config, ssr_config);
114
114
  const web_worker = Object.assign({}, common_config, web_worker_config);
115
115
 
116
- module.exports = [ browser, ssr ];
116
+ module.exports = [ browser ];
@@ -2,7 +2,7 @@
2
2
  "name": "<%= application_name %>",
3
3
  "private": true,
4
4
  "dependencies": {
5
- "opal-webpack-loader": "^0.9.4",
5
+ "opal-webpack-loader": "^0.9.5",
6
6
  "react": "^16.9.0",
7
7
  "react-dom": "^16.9.0",
8
8
  "react-router": "^5.0.1",
@@ -21,10 +21,6 @@ const common_config = {
21
21
  publicPath: '/assets/'
22
22
  },
23
23
  resolve: { plugins: [new OwlResolver('resolve', 'resolved')] }, // resolve ruby files
24
- plugins: [
25
- new CompressionPlugin({ test: /^((?!application_ssr).)*$/, cache: true }), // gzip compress, exclude application_ssr.js
26
- new WebpackAssetsManifest({ publicPath: true, merge: true }) // generate manifest
27
- ],
28
24
  module: {
29
25
  rules: [
30
26
  {
@@ -63,17 +59,28 @@ const common_config = {
63
59
  const browser_config = {
64
60
  target: 'web',
65
61
  entry: { application: [path.resolve(__dirname, '../isomorfeus/imports/application.js')] },
62
+ plugins: [
63
+ new CompressionPlugin({ test: /^((?!application_ssr).)*$/, cache: true }), // gzip compress, exclude application_ssr.js
64
+ new WebpackAssetsManifest({ publicPath: true, merge: true }) // generate manifest
65
+ ],
66
66
  externals: { crypto: 'Crypto' }
67
67
  };
68
68
 
69
69
  const ssr_config = {
70
70
  target: 'node',
71
- entry: { application_ssr: [path.resolve(__dirname, '../isomorfeus/imports/application_ssr.js')] }
71
+ entry: { application_ssr: [path.resolve(__dirname, '../isomorfeus/imports/application_ssr.js')] },
72
+ plugins: [
73
+ new WebpackAssetsManifest({ publicPath: true, merge: true }) // generate manifest
74
+ ]
72
75
  };
73
76
 
74
77
  const web_worker_config = {
75
78
  target: 'webworker',
76
79
  entry: { web_worker: [path.resolve(__dirname, '../isomorfeus/imports/application_web_worker.js')] },
80
+ plugins: [
81
+ new CompressionPlugin({ test: /^((?!application_ssr).)*$/, cache: true }), // gzip compress, exclude application_ssr.js
82
+ new WebpackAssetsManifest({ publicPath: true, merge: true }) // generate manifest
83
+ ],
77
84
  externals: { crypto: 'Crypto' }
78
85
  };
79
86
 
@@ -1,5 +1,5 @@
1
1
  module Isomorfeus
2
2
  module Installer
3
- VERSION = '1.0.0.epsilon4'
3
+ VERSION = '1.0.0.zeta1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-installer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.epsilon4
4
+ version: 1.0.0.zeta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-19 00:00:00.000000000 Z
11
+ date: 2019-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,28 +30,28 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 3.8.0
33
+ version: 3.9.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 3.8.0
40
+ version: 3.9.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: opal-webpack-loader
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.9.4
47
+ version: 0.9.5
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.9.4
54
+ version: 0.9.5
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: thor
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +129,7 @@ files:
129
129
  - lib/isomorfeus/installer/new_project.rb
130
130
  - lib/isomorfeus/installer/options_mangler.rb
131
131
  - lib/isomorfeus/installer/rack_servers.rb
132
+ - lib/isomorfeus/installer/templates/.gitignore.erb
132
133
  - lib/isomorfeus/installer/templates/.gitkeep.erb
133
134
  - lib/isomorfeus/installer/templates/Gemfile.erb
134
135
  - lib/isomorfeus/installer/templates/Procfile.erb