jsg 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/exe/jsg +3 -2
  3. data/jsg.rb +6 -1
  4. data/lib/jsg/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 403d8e26f8694b1dcd29406d069d6b1a64774f3290f5422347b0bad791b9ee5c
4
- data.tar.gz: 8771f3e2158e38ad976f3d188bfcf2fbd890d211d543139031718dc68376f593
3
+ metadata.gz: 3e678932e88c5f4332664d8f94c855c6cf5c37eccb4c0ff55779061d20ee7a8f
4
+ data.tar.gz: eded22db06e19449e076d82332e9aa00db620fff95fd6c69d1b3a6710815eb2c
5
5
  SHA512:
6
- metadata.gz: 85c2708f22fef8d75a31dcbc2ed67f27a35a33490f21e2a4611a791cc7c9c644898be362afea8701115da932b6709ea9c91eb92d5166a5b99e523c24768b234c
7
- data.tar.gz: 7bd3d4203d3a39baaabc4acffb9a88f1a0246c69fcb6db0a512205e3ced2868803d241489c55c84eb04b05a54d244132283d942134185ff56a00cb9edb610789
6
+ metadata.gz: e7f34af3bdec9dd82ed50497bbe141bfd95c2bfc8dd0417fa9312a2893ce1547ddeb438d806070f151693aef6695bfd8fd79571fc010edcdf66dd72b84a8b742
7
+ data.tar.gz: 1cb61dbdeb8b53b6697e3521b86ef0db32e3050d66ac69fc658a7a22601cc3a6c62fe08c402e205a7378546f9f8761cfdd6914063b93881f3c45204badab815c
data/exe/jsg CHANGED
@@ -19,8 +19,7 @@ module JSG
19
19
  Dir.glob("#{base_path}/**/*").each do |file_path|
20
20
  next if File.directory?(file_path)
21
21
 
22
- p file_path
23
-
22
+
24
23
  content = File.read(file_path)
25
24
  result = if file_path.end_with?(".erb")
26
25
  template = ERB.new(content)
@@ -32,6 +31,8 @@ module JSG
32
31
  relative_path = file_path.sub("#{base_path}/", "").gsub(/\.erb$/, "")
33
32
  new_file_path = File.join(destination, relative_path)
34
33
 
34
+ p new_file_path
35
+
35
36
  new_file_path.gsub!("gitignore", ".gitignore")
36
37
  FileUtils.mkdir_p(File.dirname(new_file_path))
37
38
  File.write(new_file_path, result)
data/jsg.rb CHANGED
@@ -154,6 +154,7 @@ end
154
154
  # Applying the JSG module to JS::Object to patch existing methods and add new ones
155
155
  class JS::Object
156
156
  include JSGPatch
157
+
157
158
  end
158
159
 
159
160
  # Extending the JS module to include new class methods
@@ -163,6 +164,8 @@ module JS
163
164
  end
164
165
 
165
166
  module JSG
167
+ class Error < StandardError; end
168
+
166
169
  def self.window(*args)
167
170
  JS.send(:global, *args)
168
171
  end
@@ -179,6 +182,8 @@ module JSG
179
182
  singleton_class.alias_method :d, :document
180
183
  singleton_class.alias_method :q, :querySelectorAll
181
184
 
185
+
186
+
182
187
  def self.method_missing(method, *args, &block)
183
188
  if JS.respond_to?(method)
184
189
  JS.send(method, *args, &block)
@@ -190,4 +195,4 @@ module JSG
190
195
  def self.respond_to_missing?(method, include_private = false)
191
196
  JS.respond_to?(method, include_private) || super
192
197
  end
193
- end
198
+ end
data/lib/jsg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSG
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-14 00:00:00.000000000 Z
11
+ date: 2024-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erb