j1-template 2021.0.1 → 2021.0.2

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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/assets/data/quicklinks.html +2 -2
  3. data/assets/themes/j1/adapter/js/j1.js +28 -7
  4. data/assets/themes/j1/modules/iframeResizer/LICENSE +21 -21
  5. data/assets/themes/j1/modules/lightbox/LICENSE +22 -22
  6. data/assets/themes/j1/modules/twemoji/js/LICENSE +21 -21
  7. data/assets/themes/j1/modules/twemoji/js/picker/LICENSE +21 -21
  8. data/exe/j1 +2 -0
  9. data/lib/j1/commands/generate.rb +47 -47
  10. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6/fastfilereaderext.so +0 -0
  11. data/lib/j1/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6/rubyeventmachine.so +0 -0
  12. data/lib/j1/utils/exec.rb +1 -1
  13. data/lib/j1/version.rb +1 -1
  14. data/lib/j1_app/j1_auth_manager/commands.rb +1 -1
  15. data/lib/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6/fastfilereaderext.so +0 -0
  16. data/lib/patches/rubygems/eventmachine-1.2.7-x64-mingw32/lib/2.6/rubyeventmachine.so +0 -0
  17. data/lib/starter_web/Gemfile +18 -8
  18. data/lib/starter_web/_config.yml +2 -2
  19. data/lib/starter_web/_data/modules/defaults/authentication.yml +44 -42
  20. data/lib/starter_web/_data/modules/themer.yml +0 -95
  21. data/lib/starter_web/_data/resources.yml +2 -2
  22. data/lib/starter_web/_includes/attributes.asciidoc +1 -1
  23. data/lib/starter_web/_includes/documents/licenses/mit.asciidoc +19 -19
  24. data/lib/starter_web/_includes/tables/jekyll_variables.asciidoc +45 -45
  25. data/lib/starter_web/_includes/tables/template_variables.asciidoc +46 -46
  26. data/lib/starter_web/assets/images/modules/icons/d1/scalable/d1.svg +1 -1
  27. data/lib/starter_web/assets/images/pages/j1_webhooks/uml/auth_mgmr_signin_request_flow.uxf +632 -632
  28. data/lib/starter_web/assets/images/pages/j1_webhooks/uml/webhook_flow.uxf +648 -648
  29. data/lib/starter_web/collections/posts/public/featured/_posts/2019-06-01-about-cookies.adoc +198 -198
  30. data/lib/starter_web/collections/posts/public/featured/_posts/_includes/documents/readme +1 -0
  31. data/lib/starter_web/collections/posts/public/featured/_posts/_includes/documents/unsplash-badge.asciidoc +31 -31
  32. data/lib/starter_web/collections/posts/public/series/_posts/_includes/documents/100-docker-using-shared-folders.asciidoc +430 -430
  33. data/lib/starter_web/collections/posts/public/series/_posts/_includes/tables/debug_variables.asciidoc +47 -48
  34. data/lib/starter_web/config.ru +23 -24
  35. data/lib/starter_web/dot.nojekyll +19 -19
  36. data/lib/starter_web/package.json +46 -40
  37. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/documents/300_first_awesome_web.asciidoc +11 -12
  38. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/tables/debug_variables.asciidoc +47 -48
  39. data/lib/starter_web/pages/public/learn/kickstarter/web_in_a_day/_includes/tables/readme +1 -0
  40. data/lib/starter_web/pages/public/learn/roundtrip/600_lunr.adoc +236 -236
  41. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_bottom_info.asciidoc +14 -14
  42. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_bottom_left_warning.asciidoc +11 -11
  43. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_bottom_right_danger.asciidoc +11 -11
  44. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_central_success.asciidoc +11 -11
  45. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_full_height_left_info.asciidoc +11 -11
  46. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_full_height_right_success.asciidoc +11 -11
  47. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_top_info.asciidoc +11 -11
  48. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_top_left_info.asciidoc +11 -11
  49. data/lib/starter_web/pages/public/learn/roundtrip/_includes/documents/410_top_right_success.asciidoc +11 -11
  50. data/lib/starter_web/pages/public/legal/en/eu/cookie.policy.asciidoc +50 -55
  51. data/lib/starter_web/pages/public/previewer/_includes/documents/licenses/mit.asciidoc +19 -19
  52. data/lib/starter_web/utilsrv/_defaults/package.json +1 -1
  53. data/lib/starter_web/utilsrv/package.json +1 -1
  54. metadata +31 -31
  55. data/lib/j1_app/j1_auth_manager/views/auth_manager_ui.erb.kapott +0 -234
  56. data/lib/j1_app/j1_auth_manager/views/auth_manager_ui.new.erb +0 -297
  57. data/lib/starter_web/_data/modules/defaults/jekyll_search.yml +0 -151
  58. data/lib/starter_web/_data/modules/jekyll_search.yml +0 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb4ea556df1c2514cded65555531b7add3ae38beec9740e551a4986e88540caa
4
- data.tar.gz: 8ea1e5d4c28e135b48eace616080dc70471059094298be0d10c98b1af49d23dc
3
+ metadata.gz: 78b9b8ca348f5542404ec5d83801c27390a39b1fc631fab75820bf0b378d1466
4
+ data.tar.gz: 55df56b251e33da3732819465b7333392eef5cb127ebd4930812e63e3eb0cdec
5
5
  SHA512:
6
- metadata.gz: 3506edd17e1231f53a8723d7f97aafe65ce741037108c8f1d5545c247cc456c65faa775712b8e94f4738ecb99ebd24492cbee04435d0b20f777fa85a12111ee7
7
- data.tar.gz: 8e4f75ce3de082e7663cab7ab77226875ec2ad2e4f9505a5acece5ee2cee97fb890f14339a049764f19f3119ddf24d63eb3e56810555031265199506cf68e0b7
6
+ metadata.gz: dd52c15615836184a449e7eb4585dd1e2d20430a4a96081189276aba60459a74c58d97d1d03ac80ea777ad856fd4a509f5b8da5e495016b09a25d8cd96c01c8a
7
+ data.tar.gz: 5bd1b8621ef7e4454cf27ce12e433808d1fbbd6b1cf2320bce5a907f2262e27b596a19d24aa9e6c12575b2ac501a77892968569b00165a991e9656fb2cf556ea
@@ -40,8 +40,8 @@ regenerate: true
40
40
  {% assign navigator_settings = modules.navigator.settings %}
41
41
  {% assign cookie_defaults = modules.defaults.cookiebar.defaults %}
42
42
  {% assign cookie_settings = modules.cookiebar.settings %}
43
- {% assign quick_search_defaults = modules.defaults.jekyll_search.defaults %}
44
- {% assign quick_search_settings = modules.jekyll_search.settings %}
43
+ {% assign quick_search_defaults = modules.defaults.lunr_search.defaults %}
44
+ {% assign quick_search_settings = modules.lunr_search.settings %}
45
45
 
46
46
  {% comment %} Control Center disabled
47
47
  --------------------------------------------------------------------------------
@@ -1198,13 +1198,24 @@ var j1 = (function () {
1198
1198
  // writeCookie()
1199
1199
  // Write 'data' to a cookie 'name'. If not exists, the cookie gets
1200
1200
  // created. Returns 'true' if cookie was written, otherwise 'false'.
1201
+ // -------------------------------------------------------------------------
1202
+ // NOTE:
1203
+ // https://web.dev/samesite-cookies-explained/
1204
+ // https://developer.mozilla.org/de/docs/Web/HTTP/Headers/Set-Cookie/SameSite
1205
+ // https://www.smarketer.de/blog/chrome-update-80-cookies/
1206
+ // -------------------------------------------------------------------------
1207
+ // TODO:
1208
+ // Change attribute "Secure" to true, if HTTPS is used.
1209
+ // Checks and config changes are to be done.
1210
+ // -------------------------------------------------------------------------
1201
1211
  //
1202
- writeCookie: function (options /*name, data, [path, expires, secure]*/) {
1212
+ writeCookie: function (options /*name, data, [path, expires, SameSite, secure]*/) {
1203
1213
  var defaults = {
1204
- name: '',
1205
1214
  data: {},
1206
- path: '/',
1215
+ name: '',
1207
1216
  expires: 0,
1217
+ path: '/',
1218
+ SameSite: 'Strict',
1208
1219
  secure: false
1209
1220
  };
1210
1221
  var settings = $.extend(defaults, options);
@@ -1225,18 +1236,28 @@ var j1 = (function () {
1225
1236
  data_encoded = window.btoa(data_json);
1226
1237
 
1227
1238
  if (settings.expires > 0) {
1228
- Cookies.set(settings.name, data_encoded, { expires: settings.expires });
1239
+ Cookies.set(settings.name, data_encoded, {
1240
+ expires: settings.expires,
1241
+ SameSite: settings.SameSite
1242
+ });
1229
1243
  } else {
1230
- Cookies.set(settings.name, data_encoded);
1244
+ Cookies.set(settings.name, data_encoded, {
1245
+ SameSite: settings.SameSite
1246
+ });
1231
1247
  }
1232
1248
  } else {
1233
1249
  cookie_data = settings.data;
1234
1250
  data_json = JSON.stringify(settings.data);
1235
1251
  data_encoded = window.btoa(data_json);
1236
1252
  if (settings.expires > 0) {
1237
- Cookies.set(settings.name, data_encoded, { expires: settings.expires });
1253
+ Cookies.set(settings.name, data_encoded, {
1254
+ expires: settings.expires,
1255
+ SameSite: settings.SameSite
1256
+ });
1238
1257
  } else {
1239
- Cookies.set(settings.name, data_encoded);
1258
+ Cookies.set(settings.name, data_encoded, {
1259
+ SameSite: settings.SameSite
1260
+ });
1240
1261
  }
1241
1262
  }
1242
1263
 
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2013-2019 David J. Bradshaw
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013-2019 David J. Bradshaw
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1,22 +1,22 @@
1
-
2
- The MIT License (MIT)
3
-
4
- Copyright (c) 2015 Lokesh Dhakar
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
1
+
2
+ The MIT License (MIT)
3
+
4
+ Copyright (c) 2015 Lokesh Dhakar
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2018 Twitter, Inc and other contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Twitter, Inc and other contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 xLs51
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 xLs51
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/exe/j1 CHANGED
@@ -17,6 +17,8 @@ Mercenary.program(:j1) do |p|
17
17
  c.description 'Generates a starter site scaffold in PATH'
18
18
  c.option 'force', '--force', 'Force a site to be created even the PATH already exists'
19
19
  c.option "skip-bundle", "--skip-bundle", "Skip 'bundle install'"
20
+ c.option "skip-patches", "--skip-patches", "Skip to install any PATCHES buildin with J1"
21
+ c.option "system", "--system", "Run 'bundle install' for the Ruby SYSTEM gem folder"
20
22
  c.action do |args, options|
21
23
  J1::Commands::Generate.process(args, options)
22
24
  end
@@ -1,4 +1,6 @@
1
1
  require 'erb'
2
+ require 'rbconfig'
3
+ require 'fileutils'
2
4
 
3
5
  module J1
4
6
  module Commands
@@ -11,7 +13,8 @@ module J1
11
13
  c.description 'Generates a starter site scaffold in PATH'
12
14
  c.option 'force', '--force', 'Force a site to be created even the PATH already exists'
13
15
  c.option 'skip-bundle', '--skip-bundle', "Skip 'bundle install'"
14
-
16
+ c.option "skip-patches", "--skip-patches", "Skip to install any PATCHES buildin with J1"
17
+ c.option "system", "--system", "Run 'bundle install' for the Ruby SYSTEM gem folder"
15
18
  c.action do |args, options|
16
19
  J1::Commands::Generate.process(args, options)
17
20
  end
@@ -19,6 +22,10 @@ module J1
19
22
 
20
23
  end
21
24
 
25
+ def is_windows?
26
+ RbConfig::CONFIG["host_os"] =~ %r!mswin|mingw|cygwin!i
27
+ end
28
+
22
29
  def process(args, options = {})
23
30
  raise ArgumentError, 'You must specify a path.' if args.empty?
24
31
  new_blog_path = File.expand_path(args.join(' '), Dir.pwd)
@@ -48,7 +55,6 @@ module J1
48
55
  end
49
56
 
50
57
  # Internal: Gets the filename of the sample post to be created
51
- #
52
58
  # Returns the filename of the sample post, as a String
53
59
  def initialized_post_name
54
60
  "collections/posts/public/featured/_posts/#{Time.now.strftime("%Y-%m-%d")}-welcome-to-j1-template.adoc"
@@ -56,53 +62,12 @@ module J1
56
62
 
57
63
  private
58
64
 
59
- def gemfile_contents
60
- <<-RUBY
61
- source "https://rubygems.org"
62
- #ruby RUBY_VERSION
63
-
64
- # Hello! This is where you manage which Jekyll version is used to run.
65
- # When you want to use a different version, change it below, save the
66
- # file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
67
- #
68
- # bundle exec jekyll serve
69
- #
70
- # This will help ensure the proper Jekyll version is running.
71
- # Happy Jekylling!
72
- # jadams
73
- #gem "jekyll", "#{Jekyll::VERSION}"
74
- gem "jekyll", "~> 3.8"
75
-
76
- # This is the default theme for generate Jekyll sites. You may change this to anything you like.
77
- gem "minima", "~> 2.0"
78
-
79
- # If you want to use GitHub Pages, remove the "gem "jekyll"" above and
80
- # uncomment the line below. To upgrade, run `bundle update github-pages`.
81
- # gem "github-pages", group: :jekyll_plugins
82
-
83
- # If you have any plugins, put them here!
84
- group :jekyll_plugins do
85
- gem "jekyll-feed", "~> 0.6"
86
- end
87
-
88
- # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
89
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
90
-
91
- RUBY
92
- end
93
-
94
65
  def create_site(new_blog_path)
95
66
  create_sample_files new_blog_path
96
67
 
97
68
  File.open(File.expand_path(initialized_post_name, new_blog_path), 'w') do |f|
98
69
  f.write(scaffold_post_content)
99
70
  end
100
-
101
- # jadams, do NOT generate a buildin Gemfile
102
- #
103
- # File.open(File.expand_path("Gemfile", new_blog_path), "w") do |f|
104
- # f.write(gemfile_contents)
105
- # end
106
71
  end
107
72
 
108
73
  def preserve_source_location?(path, options)
@@ -125,23 +90,33 @@ module J1
125
90
  # After a generate blog has been created, print a success notification and
126
91
  # then automatically execute bundle install from within the generate blog dir
127
92
  # unless the user opts to generate a blank blog or skip 'bundle install'.
128
-
129
93
  def after_install(path, options = {})
130
94
  unless options['skip-bundle']
131
- bundle_install path
95
+ bundle_install(path, options)
96
+ unless options['skip-patches']
97
+ patch_install(options)
98
+ else
99
+ J1.logger.info "Install patches skipped ..."
100
+ end
132
101
  end
133
102
  unless options['force']
134
103
  J1.logger.info "Generated Jekyll site installed in folder #{path}"
135
104
  else
136
105
  J1.logger.info "Generated Jekyll site force installed in folder #{path}"
137
106
  end
138
- J1.logger.info 'Installation of RubyGems (bundle) skipped' if options['skip-bundle']
107
+ J1.logger.info 'Installation (bundle) of RubyGems skipped' if options['skip-bundle']
139
108
  end
140
109
 
141
- def bundle_install(path)
110
+ def bundle_install(path, options)
142
111
  J1::External.require_with_graceful_fail 'bundler'
143
112
  J1.logger.info "Running bundle install in #{path} ..."
144
113
  Dir.chdir(path) do
114
+ if options['system']
115
+ J1.logger.info "Install bundle in Ruby gem SYSTEM folder ..."
116
+ else
117
+ J1.logger.info "Install bundle in USER gem folder ~/.gem ..."
118
+ process, output = J1::Utils::Exec.run('bundle', 'config', 'set', '--local', 'path', '~/.gem')
119
+ end
145
120
  process, output = J1::Utils::Exec.run('bundle', 'install')
146
121
  output.to_s.each_line do |line|
147
122
  J1.logger.info('Bundler:', line.strip) unless line.to_s.empty?
@@ -149,6 +124,31 @@ module J1
149
124
  raise SystemExit unless process.success?
150
125
  end
151
126
  end
127
+
128
+ def patch_install(options)
129
+ if is_windows?
130
+ curr_path = File.expand_path(File.dirname(File.dirname(__FILE__)))
131
+ patch_gem = 'eventmachine-1.2.7-x64-mingw32'
132
+ patch_source_path = curr_path + '/../patches/rubygems' + '/' + patch_gem + '/lib/2.6'
133
+
134
+ J1.logger.info "Install patches in USER gem folder ~/.gem ..."
135
+ process, output = J1::Utils::Exec.run('gem', 'env', 'gempath')
136
+ raise SystemExit unless process.success?
137
+
138
+ result = output.split(';')
139
+ user_path = result[0]
140
+ system_path = result[1]
141
+ if options['system']
142
+ J1.logger.info "Install patches on path #{system_path} ..."
143
+ else
144
+ J1.logger.info "Install patches on path #{user_path} ..."
145
+ src = patch_source_path
146
+ dest = user_path + '/gems/' + patch_gem + '/lib'
147
+ FileUtils.cp_r(src, dest)
148
+ end
149
+ end
150
+ end
151
+
152
152
  end
153
153
  end
154
154
  end
@@ -17,7 +17,7 @@ module J1
17
17
  err = stderr.read.strip
18
18
 
19
19
  [stdin, stdout, stderr].each(&:close)
20
- [process.value, out + err]
20
+ [process.value, out + ';' + err]
21
21
  end
22
22
 
23
23
  end
@@ -1,3 +1,3 @@
1
1
  module J1
2
- VERSION = '2021.0.1'
2
+ VERSION = '2021.0.2'
3
3
  end
@@ -1,7 +1,7 @@
1
1
  module J1App
2
2
  class Commands
3
3
 
4
- FILES = %w(Rakefile config.ru .gitignore dotenv).freeze
4
+ FILES = %w(Rakefile config.ru .gitignore).freeze
5
5
  VARS = %w(client_id client_secret team_id org_name).freeze
6
6
 
7
7
  def self.execute_command(*args)