j1-template 2020.0.1 → 2020.0.2

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: d18f32e5ab9ccde33c8aca296cbe35757142303fd7d6c3d16ebddf51ff3dd2d0
4
- data.tar.gz: 7bbad0a22167049f7d9b16a4b8cb9f0d62a2418f3daa49731543ff47d1d08d29
3
+ metadata.gz: d7984c1650f6ccb9ef434fa65f54e85cd625bd133435fc073ba851a9cb83abe2
4
+ data.tar.gz: f4b738d93a3f61f97af77ffe7d052b921fe15255752eb0b11e3b2645e81db7ce
5
5
  SHA512:
6
- metadata.gz: 8020d52ec42867f7a79b2404875fcc0463408a6a8add3c4430f0f46ce45c0a6cff1da40b3a7373490436454b74283dc7afa8a8564342ab7b6eb23c4fd2657635
7
- data.tar.gz: ccbed08f143dd02d0d2cc7cfbb7f1ea9c7f1a55d1ec26f9dbe35f6c20225eb0fbaacc0dde338a8d09fac7c6f16578f94b80e0d33b1012971791d6cef4260bc11
6
+ metadata.gz: 186ea24e4f24ee80ddb74957ace1f6a42f4ba8c741f2a7ae6fe4df1400979772a1ee9fa404a883a95e4e09e7d6c6a9236352648c66e846c0885606e65d34d75d
7
+ data.tar.gz: df3b80e39aa47a1704ec296b3c8a87cdb9ff71f9b3866657ead7143d7a797dfeb12020d6e3283a7968a06382bab603a01852a4398dcdf1cf749fb49d2d7b92d2
@@ -1,3 +1,3 @@
1
1
  module J1
2
- VERSION = '2020.0.1'
2
+ VERSION = '2020.0.2'
3
3
  end
@@ -53,15 +53,11 @@ module J1App
53
53
  include J1App::GithubHelpers
54
54
 
55
55
  # ==========================================================================
56
- # SET project base
56
+ # SET j1 project home folder
57
57
  # ==========================================================================
58
- # set project path to folder where 'config.ru' is located
58
+ # set project path (preferred set by ENV var J1_PROJECT_HOME )
59
59
  #
60
- #
61
- puts "FickDich: #{ARGV.join(':')}"
62
-
63
- project_path = J1App.work_dir
64
- puu = File.dirname(Dir.pwd)
60
+ project_path = J1App.project_path
65
61
 
66
62
  # ==========================================================================
67
63
  # Initialize middleware resources
@@ -499,7 +495,7 @@ module J1App
499
495
  # jadams, 2019-08-08: writeCookie of 'j1.user.session' is needed to
500
496
  # track the requested_page. This cause the potential risk to
501
497
  # corrupt the cookie (now, for unknown reason)
502
- # ------------------------------------------------------------------
498
+ # ------------------------------------------------------------------
503
499
  writeCookie(user_session_cookie, session_json)
504
500
  j1_mw_auth_mgr_preflight.info 'write user session data: ' + "#{session_json}"
505
501
  j1_mw_auth_mgr_preflight.info 'pass to error page: access_denied'
@@ -614,25 +610,25 @@ module J1App
614
610
  The Control Center is accessing #{provider} for user #{nickname}.<br>
615
611
  Providing authentication data ..</p>
616
612
  </div>
617
-
613
+
618
614
  <script>
619
- (function() {
615
+ (function() {
620
616
  // Register an event handler to listen for messages of the child window
621
617
  window.addEventListener("message", receiveMessage, false);
622
-
618
+
623
619
  // Post a authorizing message to the parent window (Netlify CMS App)
624
620
  // as a handshake with the parent window
625
621
  window.opener.postMessage("authorizing:#{provider}", "*");
626
-
622
+
627
623
  function receiveMessage() {
628
624
  // send message to main (parent) window (Netlify CMS App)
629
625
  window.opener.postMessage(
630
626
  'authorization:#{provider}:success:{"token":"#{token}","provider":"#{provider}"}'
631
627
  )
632
- } // end receiveMessage
628
+ } // end receiveMessage
633
629
  })()
634
630
  </script>
635
-
631
+
636
632
  </body>
637
633
  </html>
638
634
  IIF
@@ -805,20 +801,20 @@ IIF
805
801
  </div>
806
802
 
807
803
  <script>
808
- (function() {
804
+ (function() {
809
805
  // Register an event handler to listen for messages of the child window
810
806
  window.addEventListener("message", receiveMessage, false);
811
-
807
+
812
808
  // Post a authorizing message to the parent window (Netlify CMS App)
813
809
  // as a handshake with the parent window
814
810
  window.opener.postMessage("authorizing:#{provider}", "*");
815
-
811
+
816
812
  function receiveMessage() {
817
813
  // send message to main (parent) window (Netlify CMS App)
818
814
  window.opener.postMessage(
819
815
  'authorization:#{provider}:success:{"token":"#{token}","provider":"#{provider}"}'
820
816
  )
821
- } // end receiveMessage
817
+ } // end receiveMessage
822
818
  })()
823
819
  </script>
824
820
 
@@ -1,20 +1,24 @@
1
1
  module J1App
2
2
 
3
- # set work dir to path
3
+ # set j1 project path
4
4
  #
5
- def self.work_dir
6
- unless ARGV.grep(/config.ru/)[0] == nil
7
- # set work dir to path of ARGV argument for config.ru
8
- # if app is called from commandline
5
+ def self.project_path
6
+ # set project folder to the path set by ENV var J1_PROJECT_HOME (preferred)
7
+ #
8
+ if ENV['J1_PROJECT_HOME'] != nil
9
+ ENV['J1_PROJECT_HOME']
10
+ elsif ARGV.grep(/config.ru/)[0] != nil
11
+ # set project folder to path of ARGV argument for config.ru if available.
12
+ # This will work, if the app is called from commandline (rackup)
9
13
  #
10
14
  File.dirname(ARGV.grep(/config.ru/)[0])
11
15
  else
12
- # set work dir work dir if app is called from
13
- # application manager (e.g. passenger)
16
+ # set project folder if app is called from application manager
17
+ # (e.g. passenger) to current work dir
14
18
  # NOTE:
15
19
  # Unclear why File.join resolves the PATH correctly
16
- # but File.dirname doesn't
17
- # File.dirname(Dir.pwd)
20
+ # but File.dirname doesn't:
21
+ # File.dirname(Dir.pwd)
18
22
  #
19
23
  File.join(Dir.pwd, "")
20
24
  end
@@ -46,7 +46,7 @@ module J1App
46
46
  # Register static content
47
47
  # --------------------------------------------------------------------------
48
48
  register Sinatra::Index
49
- root = File.expand_path(J1App.destination, J1App.work_dir)
49
+ root = File.expand_path(J1App.destination, J1App.project_path)
50
50
  set :public_folder, root
51
51
  use_static_index "index.html"
52
52
 
@@ -51,7 +51,7 @@ gem 'jekyll', '~> 4.0'
51
51
 
52
52
  # Theme Rubies, default: J1 Template
53
53
  #
54
- gem 'j1-template', '~> 2020.0.1'
54
+ gem 'j1-template', '~> 2020.0.2'
55
55
 
56
56
  # ------------------------------------------------------------------------------
57
57
  # PRODUCTION: Gem needed for the Jekyll and J1 prod environment
@@ -110,7 +110,7 @@ group :jekyll_plugins do
110
110
  # gem 'jekyll-gist', '>= 1.5.0'
111
111
  # gem 'jekyll-sitemap', '>= 1.2.0'
112
112
  # gem 'jekyll-redirect-from', '>= 0.13.0'
113
- gem 'j1-paginator', '>= 2020.0.1'
113
+ gem 'j1-paginator', '>= 2020.0.2'
114
114
  gem 'jekyll-sass-converter', '>= 1.5.1'
115
115
  end
116
116
 
@@ -53,7 +53,7 @@ environment: development
53
53
  # ------------------------------------------------------------------------------
54
54
  # Sets the build version of J1 Template Gem
55
55
  #
56
- version: 2020.0.1
56
+ version: 2020.0.2
57
57
 
58
58
  # version
59
59
  # ------------------------------------------------------------------------------
@@ -176,24 +176,6 @@ var j1 = (function () {
176
176
  };
177
177
 
178
178
  // user STATE cookie (initial values)
179
- // var user_state = {
180
- // 'theme_css': default_theme_css,
181
- // 'theme_extension_css': '{{themer_options.includeBootswatch}}',
182
- // 'theme_name': default_theme_name,
183
- // 'theme_author': default_theme_author,
184
- // 'theme_author_url': '{{template_config.theme_author_url}}',
185
- // 'theme_link': default_theme_link,
186
- // 'theme_version': '{{site.version}}',
187
- // 'cookies_accepted': 'pending',
188
- // 'whitelistedPages': default_white_listed_pages,
189
- // 'deleteOnDecline': false,
190
- // 'showConsentOnPending': false,
191
- // 'stopScrolling': true,
192
- // 'session_active': false,
193
- // 'last_session_ts': '',
194
- // 'cc_authenticated': false
195
- // };
196
-
197
179
  var user_state = {
198
180
  'theme_css': default_theme_css,
199
181
  'theme_extension_css': themeExtensionCss,
@@ -308,10 +290,10 @@ var j1 = (function () {
308
290
  user_state.last_session_ts = timestamp_now;
309
291
 
310
292
  // DANGEROUS (??): delete user session in browser using MULTI_TAB!
311
- if (j1.existsCookie(cookie_names.user_session)) {
312
- var bla = cookie_names.user_session;
313
- j1.deleteCookie(cookie_names.user_session)
314
- }
293
+ // if (j1.existsCookie(cookie_names.user_session)) {
294
+ // var bla = cookie_names.user_session;
295
+ // j1.deleteCookie(cookie_names.user_session)
296
+ // }
315
297
 
316
298
  j1.writeCookie({
317
299
  name: cookie_user_state_name,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "j1_starter",
4
- "version": "2020.0.1",
4
+ "version": "2020.0.2",
5
5
  "description": "J1 Template starter Web",
6
6
  "homepage": "https://your.site",
7
7
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "utls",
4
- "version": "2020.0.1",
4
+ "version": "2020.0.2",
5
5
  "description": "J1 Template Utility Server",
6
6
  "homepage": "https://jekyll.one",
7
7
  "author": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": true,
3
3
  "name": "utls",
4
- "version": "2020.0.1",
4
+ "version": "2020.0.2",
5
5
  "description": "J1 Template Utility Server",
6
6
  "homepage": "https://jekyll.one",
7
7
  "author": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: j1-template
3
3
  version: !ruby/object:Gem::Version
4
- version: 2020.0.1
4
+ version: 2020.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - juergen_jekyll_one
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-15 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll