rblade 1.0.4 → 1.0.5

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: 9124479cbf9e4fd7355470943bafcbd009c367abf8593d19bc3f8a967eb0e4cf
4
- data.tar.gz: c0d9f34089ae943df7263298cb9e08951b23b2ebfcbc3a221c4e8a2940ee959c
3
+ metadata.gz: 7334cbd159959066834b8d7407b4b8e0eb8af1aa57501fd3a3ea352b1a043058
4
+ data.tar.gz: 104b6b0f7abbf9aee1f35c6ca74ffedc0c771b5d0cfe32796e593ddc55730828
5
5
  SHA512:
6
- metadata.gz: 78e173dcbdb4e085fd46840597f828e08df016874d8cfecccd756155b254be37924d20c81682373c45146518754e3a079d4b35aa5443b57ce67de9ac10c162ce
7
- data.tar.gz: e27154636512a2fc28c6f279c13bfcad0ca8639f1d404b73a91803435de93012d43aed89bcdd2aa02a76e59d3c485e7214a93dc710f8d20adabc285c5aae8208
6
+ metadata.gz: a9956d9b662c3bf264bdd9228087fdaf72ff51972427ae21eb1d33c10358fefcf4e0fcd1a8aa362a6df237d3cee51a3bf8d1831750b0b9e55f6e20709dcefb85
7
+ data.tar.gz: 6de71435e6f099b719b907ab9157eb117a6cd8cfd8c6854b657e533525e67d97b5e66b40ccb0aa97c91cc25fd3340897b0db75971383868e4eeaefd21ae3f44a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.0.5 [2024-08-14]
2
+ - Allow use of variables in @method directive
3
+
1
4
  ## 1.0.4 [2024-08-14]
2
5
  - Fix printing ruby member variables (#8)
3
6
 
@@ -5,9 +5,8 @@ module RBlade
5
5
  if args&.count != 1
6
6
  raise StandardError.new "Method statement: wrong number of arguments (given #{args&.count || 0}, expecting 1)"
7
7
  end
8
- method = RBlade.h(args[0].tr("\"'", ""))
9
8
 
10
- %(_out<<'<input type="hidden" name="_method" value="#{method}">';)
9
+ %(_out<<'<input type="hidden" name="_method" value="'<<#{args[0]}<<'">';)
11
10
  end
12
11
 
13
12
  def compileDelete args
@@ -15,7 +14,7 @@ module RBlade
15
14
  raise StandardError.new "Delete statement: wrong number of arguments (given #{args.count}, expecting 0)"
16
15
  end
17
16
 
18
- compileMethod(["DELETE"])
17
+ compileMethod(["'DELETE'"])
19
18
  end
20
19
 
21
20
  def compilePatch args
@@ -23,7 +22,7 @@ module RBlade
23
22
  raise StandardError.new "Patch statement: wrong number of arguments (given #{args.count}, expecting 0)"
24
23
  end
25
24
 
26
- compileMethod(["PATCH"])
25
+ compileMethod(["'PATCH'"])
27
26
  end
28
27
 
29
28
  def compilePut args
@@ -31,7 +30,7 @@ module RBlade
31
30
  raise StandardError.new "Put statement: wrong number of arguments (given #{args.count}, expecting 0)"
32
31
  end
33
32
 
34
- compileMethod(["PUT"])
33
+ compileMethod(["'PUT'"])
35
34
  end
36
35
 
37
36
  def compileOld args
data/rblade.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "rblade"
3
- s.version = "1.0.4"
3
+ s.version = "1.0.5"
4
4
  s.summary = "A component-first templating engine for Rails"
5
5
  s.description = "RBlade is a simple, yet powerful templating engine for Ruby on Rails, inspired by Laravel Blade."
6
6
  s.authors = ["Simon J"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rblade
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon J