isomorfeus-installer 1.0.0.delta1 → 1.0.0.delta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +21 -0
  3. data/bin/isomorfeus +8 -122
  4. data/lib/isomorfeus/installer/cli.rb +26 -0
  5. data/lib/isomorfeus/installer/databases/arangodb.rb +4 -1
  6. data/lib/isomorfeus/installer/databases/mysql.rb +18 -2
  7. data/lib/isomorfeus/installer/databases/neo4j.rb +7 -2
  8. data/lib/isomorfeus/installer/databases/postgresql.rb +18 -2
  9. data/lib/isomorfeus/installer/databases/sqlite.rb +22 -0
  10. data/lib/isomorfeus/installer/new_project.rb +56 -0
  11. data/lib/isomorfeus/installer/options_mangler.rb +49 -0
  12. data/lib/isomorfeus/installer/other_modules.rb +11 -0
  13. data/lib/isomorfeus/installer/rack_servers.rb +19 -0
  14. data/{Gemfile → lib/isomorfeus/installer/templates/.gitkeep.erb} +0 -0
  15. data/lib/isomorfeus/installer/templates/Gemfile.erb +18 -8
  16. data/lib/isomorfeus/installer/templates/Procfile.erb +2 -2
  17. data/lib/isomorfeus/installer/templates/ProcfileDebug.erb +2 -0
  18. data/lib/isomorfeus/installer/templates/actioncable/actioncable_ru.erb +3 -0
  19. data/lib/isomorfeus/installer/templates/app.rb.erb +35 -0
  20. data/lib/isomorfeus/installer/templates/app_loader.rb.erb +13 -0
  21. data/lib/isomorfeus/installer/{spectre.rb → templates/application.css.erb} +0 -0
  22. data/lib/isomorfeus/installer/templates/application.js.erb +15 -23
  23. data/lib/isomorfeus/installer/templates/application_common.js.erb +23 -0
  24. data/lib/isomorfeus/installer/templates/application_debug.js.erb +9 -0
  25. data/lib/isomorfeus/installer/templates/application_ssr.js.erb +18 -0
  26. data/lib/isomorfeus/installer/templates/application_web_worker.js.erb +5 -0
  27. data/lib/isomorfeus/installer/templates/config_ru.erb +3 -0
  28. data/lib/isomorfeus/installer/templates/isomorfeus_loader.rb.erb +11 -2
  29. data/lib/isomorfeus/installer/templates/isomorfeus_web_worker_loader.rb.erb +2 -0
  30. data/lib/isomorfeus/installer/templates/my_app.rb.erb +1 -1
  31. data/lib/isomorfeus/installer/templates/package.json.erb +20 -6
  32. data/lib/isomorfeus/installer/templates/spec_helper.rb.erb +19 -0
  33. data/lib/isomorfeus/installer/templates/test_spec.rb.erb +13 -0
  34. data/lib/isomorfeus/installer/transport_stores/redis.rb +14 -0
  35. data/lib/isomorfeus/installer/transports/actioncable.rb +33 -1
  36. data/lib/isomorfeus/installer.rb +250 -130
  37. data/readme.md +2 -5
  38. metadata +125 -30
  39. data/isomorfeus-installer.gemspec +0 -19
  40. data/lib/isomorfeus/installer/asset_bundlers/opal_webpack_loader.rb +0 -103
  41. data/lib/isomorfeus/installer/databases/none.rb +0 -11
  42. data/lib/isomorfeus/installer/frameworks/cuba.rb +0 -26
  43. data/lib/isomorfeus/installer/frameworks/rails.rb +0 -78
  44. data/lib/isomorfeus/installer/frameworks/roda.rb +0 -26
  45. data/lib/isomorfeus/installer/frameworks/sinatra.rb +0 -26
  46. data/lib/isomorfeus/installer/templates/cuba/config_ru.erb +0 -48
  47. data/lib/isomorfeus/installer/templates/owl/development.js.erb +0 -145
  48. data/lib/isomorfeus/installer/templates/owl/production.js.erb +0 -93
  49. data/lib/isomorfeus/installer/templates/owl/test.js.erb +0 -0
  50. data/lib/isomorfeus/installer/templates/rails/application.html.erb.head +0 -6
  51. data/lib/isomorfeus/installer/templates/rails/application.html.erb.tail +0 -6
  52. data/lib/isomorfeus/installer/templates/rails/application_controller.rb +0 -5
  53. data/lib/isomorfeus/installer/templates/rails/application_helper.rb.erb +0 -3
  54. data/lib/isomorfeus/installer/templates/rails/assets.rb.erb +0 -1
  55. data/lib/isomorfeus/installer/templates/rails/basic-react.rb +0 -453
  56. data/lib/isomorfeus/installer/templates/rails/index.html +0 -1
  57. data/lib/isomorfeus/installer/templates/rails/routes.rb +0 -5
  58. data/lib/isomorfeus/installer/templates/roda/config_ru.erb +0 -39
  59. data/lib/isomorfeus/installer/templates/sinatra/config_ru.erb +0 -38
  60. data/lib/isomorfeus/installer/transport.rb +0 -0
  61. data/lib/isomorfeus/installer/transport_store.rb +0 -0
@@ -1,145 +0,0 @@
1
- // require requirements used below
2
- const path = require('path');
3
- const webpack = require('webpack');
4
- const OwlResolver = require('opal-webpack-loader/resolver'); // to resolve ruby files
5
-
6
- module.exports = {
7
- parallelism: 8,
8
- context: path.resolve(__dirname, '<%= isomorfeus_path %>'),
9
- mode: "development",
10
- optimization: {
11
- minimize: false // dont minimize in development, to speed up hot reloads
12
- },
13
- performance: {
14
- maxAssetSize: 20000000, // isomorfeus is some code
15
- maxEntrypointSize: 20000000
16
- },
17
- // use one of these below for source maps, disable for faster hot reloads
18
- // devtool: 'source-map', // this works well, good compromise between accuracy and performance
19
- // devtool: 'cheap-eval-source-map', // less accurate
20
- // devtool: 'inline-source-map', // slowest
21
- // devtool: 'inline-cheap-source-map',
22
- entry: {
23
- application: [path.resolve(__dirname, '<%= entrypoint_path %>')], // entrypoint for isomorfeus
24
- },
25
- output: {
26
- // webpack-serve keeps the output in memory
27
- filename: '[name].js',
28
- path: path.resolve(__dirname, '<%= asset_output_path %>'),
29
- publicPath: 'http://localhost:3035/assets/'
30
- },
31
- resolve: {
32
- plugins: [
33
- // this makes it possible for webpack to find ruby files
34
- new OwlResolver('resolve', 'resolved')
35
- ],
36
- alias: {
37
- 'react-dom': 'react-dom/profiling',
38
- 'schedule/tracing': 'schedule/tracing-profiling',
39
- }
40
- },
41
- plugins: [
42
- // both for hot reloading
43
- new webpack.NamedModulesPlugin(),
44
- new webpack.HotModuleReplacementPlugin()
45
- ],
46
- module: {
47
- rules: [
48
- {
49
- // loader for .scss files
50
- // test means "test for for file endings"
51
- test: /.scss$/,
52
- use: [
53
- {
54
- loader: "style-loader",
55
- options: {
56
- hmr: true
57
- }
58
- },
59
- {
60
- loader: "css-loader",
61
- options: {
62
- // sourceMap: true, // set to false to speed up hot reloads
63
- minimize: false // set to false to speed up hot reloads
64
- }
65
- },
66
- {
67
- loader: "sass-loader",
68
- options: {
69
- includePaths: [path.resolve(__dirname, '<%= stylesheets_path %>')],
70
- // sourceMap: true // set to false to speed up hot reloads
71
- }
72
- }
73
- ]
74
- },
75
- {
76
- // loader for .css files
77
- test: /.css$/,
78
- use: [
79
- {
80
- loader: "style-loader",
81
- options: {
82
- hmr: true
83
- }
84
- },
85
- {
86
- loader: "css-loader",
87
- options: {
88
- // sourceMap: true, // set to false to speed up hot reloads
89
- minimize: false // set to false to speed up hot reloads
90
- }
91
- }
92
- ]
93
- },
94
- {
95
- test: /.(png|svg|jpg|gif)$/,
96
- use: [
97
- 'file-loader'
98
- ]
99
- },
100
- {
101
- test: /.(woff|woff2|eot|ttf|otf)$/,
102
- use: [
103
- 'file-loader'
104
- ]
105
- },
106
- {
107
- // opal-webpack-loader will compile and include ruby files in the pack
108
- test: /.(rb|js.rb)$/,
109
- use: [
110
- {
111
- loader: 'opal-webpack-loader',
112
- options: {
113
- // sourceMap: true
114
- }
115
- }
116
- ]
117
- }
118
- ]
119
- },
120
- // configuration for webpack-dev-server
121
- devServer: {
122
- open: false,
123
- lazy: false,
124
- port: 3035,
125
- hot: true,
126
- // hotOnly: true,
127
- inline: true,
128
- https: false,
129
- disableHostCheck: true,
130
- headers: {
131
- "Access-Control-Allow-Origin": "*",
132
- "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
133
- "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
134
- },
135
- watchOptions: {
136
- // in case of problems with hot reloading uncomment the following two lines:
137
- // aggregateTimeout: 250,
138
- // poll: 50,
139
- ignored: /\bnode_modules\b/
140
- },
141
- contentBase: path.resolve(__dirname, 'public')
142
- // watchContentBase: true
143
- }
144
- };
145
-
@@ -1,93 +0,0 @@
1
- const path = require('path');
2
- const OwlResolver = require('opal-webpack-loader/resolver');
3
- const CompressionPlugin = require("compression-webpack-plugin"); // for gzipping the packs
4
- const ManifestPlugin = require('webpack-manifest-plugin'); // for generating the manifest
5
-
6
- module.exports = {
7
- parallelism: 8,
8
- context: path.resolve(__dirname, '<%= isomorfeus_path %>'),
9
- mode: "production",
10
- optimization: {
11
- minimize: true // minimize
12
- },
13
- performance: {
14
- maxAssetSize: 20000000, // isomorfeus is some code
15
- maxEntrypointSize: 20000000
16
- },
17
- entry: {
18
- application: [path.resolve(__dirname, '<%= entrypoint_path %>')],
19
- },
20
- plugins: [
21
- new CompressionPlugin({ test: /.js/ }), // gzip compress
22
- new ManifestPlugin() // generate manifest
23
- ],
24
- output: {
25
- filename: '[name]-[chunkhash].js', // include fingerprint in file name, so browsers get the latest
26
- path: path.resolve(__dirname, '<%= asset_output_path %>'),
27
- publicPath: '/assets/'
28
- },
29
- resolve: {
30
- plugins: [
31
- // resolve ruby files
32
- new OwlResolver('resolve', 'resolved')
33
- ]
34
- },
35
- module: {
36
- rules: [
37
- {
38
- test: /.scss$/,
39
- use: [
40
- {
41
- loader: "style-loader",
42
- options: {
43
- hmr: false
44
- }
45
- },
46
- {
47
- loader: "css-loader"
48
- },
49
- {
50
- loader: "sass-loader",
51
- options: {
52
- includePath: [
53
- path.resolve(__dirname, '<%= stylesheets_path %>')
54
- ]
55
- }
56
- }
57
- ]
58
- },
59
- {
60
- test: /.css$/,
61
- use: [
62
- 'style-loader',
63
- 'css-loader'
64
- ]
65
- },
66
- {
67
- test: /.(png|svg|jpg|gif)$/,
68
- use: [
69
- 'file-loader'
70
- ]
71
- },
72
- {
73
- test: /.(woff|woff2|eot|ttf|otf)$/,
74
- use: [
75
- 'file-loader'
76
- ]
77
- },
78
- {
79
- // opal-webpack-loader will compile and include ruby files in the pack
80
- test: /.(rb|js.rb)$/,
81
- use: [
82
- {
83
- loader: 'opal-webpack-loader',
84
- options: {
85
- sourceMap: false
86
- }
87
- }
88
- ]
89
- }
90
- ]
91
- }
92
- };
93
-
File without changes
@@ -1,6 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>IntestRails</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
@@ -1,6 +0,0 @@
1
- </head>
2
-
3
- <body>
4
- <%= yield %>
5
- </body>
6
- </html>
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- def index
3
-
4
- end
5
- end
@@ -1,3 +0,0 @@
1
- module ApplicationHelper
2
- <%= asset_bundler_includes %>
3
- end
@@ -1 +0,0 @@
1
- <%= asset_bundler_config %>