no-style-please2-plugins 0.9.1 → 0.9.4

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
  SHA256:
3
- metadata.gz: e4446905faa51bb7713c567160bd2461951a5ec5443ea219b5485efdc8ecbf2f
4
- data.tar.gz: 900dfe6baaefc8bc5e13c8f6fba766ff856e845f753c7cf117e8daac2037e562
3
+ metadata.gz: 450a16c71cf4718757f6373a7edfb471cc81a24e80c4d9298360739b9aa4f62d
4
+ data.tar.gz: 6c7a0319ddfd0cd887eadcdac6038f0d1fe7b801fabbdbba539fd0dc2347239a
5
5
  SHA512:
6
- metadata.gz: fa92049758036c9a4256f13af7d10018a52c06f02cc4e473093aabc03c442d5c6c70f43883b90ee6e1308773f24242b4742ba918fe0729b84e89c2bb10908a22
7
- data.tar.gz: f19c43180d4a043c9cb414aef28edc9900f682b81cc4d1419c77c3dc58c2acebd20cb6ffa878b51cda86936ca5cd1662871e288621e983b807bc179ce281f73e
6
+ metadata.gz: 891bc3333fb3d6192f6853c1acdb11ac4565eed9d70aed320f96414de3a342e0e2ada9755613b4d66e270ea1f0098abd9b5b58a6f593c9fe8d83c94ab34edcc1
7
+ data.tar.gz: 953b48d83fe57c71c71943d8142782f86c21dbd81484001d764c8fed2e1924544afb32a540505214ad91922670e26b9808b41763cf12070aafb00319aa184a8c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- no-style-please2-plugins (0.9.0)
4
+ no-style-please2-plugins (0.9.1)
5
5
  digest
6
6
  jekyll (~> 4.0)
7
7
  ltec (~> 0.1.4)
@@ -55,7 +55,7 @@ GEM
55
55
  listen (3.9.0)
56
56
  rb-fsevent (~> 0.10, >= 0.10.3)
57
57
  rb-inotify (~> 0.9, >= 0.9.10)
58
- ltec (0.1.4)
58
+ ltec (0.1.4.1)
59
59
  openssl
60
60
  mercenary (0.4.0)
61
61
  openssl (3.3.0)
data/lib/enc.rb CHANGED
@@ -205,11 +205,14 @@ module Jekyll
205
205
  Base64.strict_decode64(encrypt_content_v2(EncFilter.hex2bin(keyHex2Enc),hexKey))
206
206
  end
207
207
  Base64.strict_encode64(newArr.join)
208
-
209
208
  end
210
-
209
+ def gen_test_data_forkey(pswHex)
210
+ rndBf = Base64.strict_encode64(EncFilter.hex2bin(rand_bytes('',63)))
211
+ encData = encrypt_content_v2(rndBf,pswHex)
212
+ rndBf + '.' + encData
211
213
 
212
-
214
+ end
215
+
213
216
  end
214
217
 
215
218
 
data/lib/ext.rb CHANGED
@@ -151,13 +151,21 @@ module Jekyll
151
151
  def initialize(tag_name, text, tokens)
152
152
 
153
153
  rootPath = $g_config['code_root_path'] || 'static'
154
- filePath = "#{rootPath}/#{text}".strip!()
154
+ if text.start_with?("/")
155
+ filePath = "#{text}"[1..-1].strip!()
156
+ else
157
+ filePath = "#{rootPath}/#{text}".strip!()
158
+ end
159
+ filePath = File.expand_path(filePath)
160
+ puts '--------- inluce code-------'
161
+ puts filePath
162
+
155
163
  begin
156
164
  file = File.open(filePath)
157
165
  @filecontent = file.read()
158
166
  rescue => exception
159
167
  puts exception
160
- @filecontent = "load file:#{text} failed"
168
+ @filecontent = "load file:#{filePath} failed"
161
169
 
162
170
  end
163
171
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NoStylePlease2
4
- VERSION = "0.9.1"
4
+ VERSION = "0.9.4"
5
5
  end
data/test.rb CHANGED
@@ -77,3 +77,14 @@ end.pack('C*')
77
77
  puts a.unpack1('H*')
78
78
 
79
79
  puts Jekyll::Test.encrypt_content_v2('333333a','00000000000000052f5c9b07ebc4464717978b174c440573df03e2962d98946c')
80
+ text = "oo"
81
+ if text.start_with?("/")
82
+ puts "aaa"
83
+ else
84
+ puts "bbb"
85
+ end
86
+
87
+ puts "12334"[1..2]
88
+ puts "12334"[1...2]
89
+ puts "12334"[1..-1]
90
+ puts "12334"[1...-1]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: no-style-please2-plugins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - vitock
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-16 00:00:00.000000000 Z
11
+ date: 2025-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll