snippr 0.15.23 → 0.15.24

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
  SHA1:
3
- metadata.gz: 054173010859c69d009993fdcb3c2b3dba1c480e
4
- data.tar.gz: 3aff7b7072677405dcd33849f675975daa1a4392
3
+ metadata.gz: eae2d0b5629b7140a0d8b124a4e16299c0b9ded4
4
+ data.tar.gz: 8b6c014d9e147e85f0243a1b76ef4d2e33a6c0d2
5
5
  SHA512:
6
- metadata.gz: bf7d237b5c1f753bf381b9b16b98981870a52af3e8512cfdf4003f37ba5f321c2863390e28862973104f27249b68067934d109fce5a0ed8a8c21243171e4b48b
7
- data.tar.gz: a2f91dd07711ce6fc54172f9f2e7c713c200797addcfd564ae02911501adb9734f415188fdf6434cc674d1f73b4fde696f6fb6e4872c79ad5f7e0f35ec46c225
6
+ metadata.gz: d4ad49375b5ab78a91a1a626769f30911289050a616cbb9b74fb2d039b8201e37cd763bc0bf8c681ad6db511305ffeeac058042ddefb3b2f38f9e47b9817a8cb
7
+ data.tar.gz: d5f6b0fd8c8c939a70f61f9991ebefa25f2e666ad8d5532ae5a1854b86f472e3a152399bee0752831b18967d3c2c3aedc2d2153e861aa786ce305153f4ff8497
@@ -47,7 +47,7 @@ module Snippr
47
47
  (?:\|(.*?))? # $5: optional default value when snippet content empty
48
48
  \} # and thats it
49
49
  ) # end capture of variable area
50
- ([^"]|$) # $6: this allows he capture of method calls in method calls
50
+ ((?!"[),])|$) # $6: this allows he capture of method calls in method calls
51
51
  }xm
52
52
  end
53
53
 
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = "snippr"
4
- s.version = '0.15.23'
4
+ s.version = '0.15.24'
5
5
  s.date = Time.now
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["Daniel Harrington", "Thomas Jachmann", "Frank Schumacher"]
@@ -18,6 +18,11 @@ describe Snippr::Processor::Dynamics do
18
18
  })).to eq("Your topup of 15,00 € at #{today} was successful.")
19
19
  end
20
20
 
21
+ it 'parses the placeholden when surrounded by quotes' do
22
+ tpl = 'start class="{var}" end'
23
+ expect(subject.process(tpl, :var => "cssclass")).to eq('start class="cssclass" end');
24
+ end
25
+
21
26
  it "parses multi-line parameters" do
22
27
  tpl = "An instance {var.method2(\"PARAM\t\nETER\")}"
23
28
  expect(subject.process(tpl, :var => Klass.new)).to eq("An instance METHOD WITH PARAMETER")
@@ -43,12 +48,6 @@ describe Snippr::Processor::Dynamics do
43
48
  expect(subject.process(tpl, :var => Klass.new)).to eq("An instance METHOD WITH PARAMETER1 AND PARAMETER2")
44
49
  end
45
50
 
46
- it "allows usage of snippr substitution inside method call parameters" do
47
- pending 'fix it or use version 0.15.19'
48
- tpl = 'An instance {var.method3("{var2.method()}","PARAMETER2")}'
49
- expect(subject.process(tpl, :var => Klass.new, :var2 => Klass.new)).to eq('An instance METHOD WITH METHOD AND PARAMETER2')
50
- end
51
-
52
51
  it "keeps the {snip} if calling a method but the method is not defined" do
53
52
  expect(subject.process("An instance {var.method_not_exist()}", :var => Klass.new)).to eq("An instance {var.method_not_exist()}")
54
53
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snippr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.23
4
+ version: 0.15.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Harrington
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-06-16 00:00:00.000000000 Z
13
+ date: 2014-06-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: i18n