curlybars 1.1.1 → 1.1.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: ffd4c878a09558bd0d7a796da62d69f5c871634d00a904ac949801b02fdbeeac
4
- data.tar.gz: 48e2a90bb4b69275bcc619f741a28c0292a0094065a76a8223e2808a397e4f28
3
+ metadata.gz: 0ed9940570c86fee9f74999c8c87d78e39e8f276496d9dde4a235aa4fa09e60b
4
+ data.tar.gz: cb01e427034963764cfac30318f3f637ba26e80bde93b70e30e0843643d61e20
5
5
  SHA512:
6
- metadata.gz: de10a323a835c7f9909ffc429ea74f178f6da7c189360256bc7b861e0785c4bdc5d8a78e40671245fe3dd45a71d6e971148424ef4f26d4c1d6d898b5a8f46e1c
7
- data.tar.gz: f9c2f4bebff76ca529dacff54293d5908da92e3939c599d4c2a4138948a13e3074d874bda5303ca69f98c4ab37c4296ff02bf89fa0ad2919a760a79372f16a3b
6
+ metadata.gz: c8e8af79c0b43dd99478dd3b8ab3e77efaf9abe423844850adb1ea50decb7a7084644e7f6d987bdc9142706317a77d7ff50b756be69e0c5fd4ed63d4b6559c28
7
+ data.tar.gz: 42e0b53b95a8398a4c6dc53c64a0e9753a9844f342d2a1ee8e1abb47c9ab2847e5a7f83cc4e6b70cb487a5047ff5ddd44565d6fb6511c651ce70733f23ba1360
@@ -9,7 +9,7 @@ module Curlybars
9
9
  RUBY
10
10
  end
11
11
 
12
- def validate(branches)
12
+ def validate(branches, check_type: :anything)
13
13
  # Nothing to validate here.
14
14
  end
15
15
 
@@ -15,7 +15,7 @@ module Curlybars
15
15
  RUBY
16
16
  end
17
17
 
18
- def validate(branches)
18
+ def validate(branches, check_type: :anything)
19
19
  # Nothing to validate here.
20
20
  end
21
21
 
@@ -1,3 +1,3 @@
1
1
  module Curlybars
2
- VERSION = '1.1.1'.freeze
2
+ VERSION = '1.1.2'.freeze
3
3
  end
@@ -233,7 +233,7 @@ describe "{{#helper arg1 arg2 ... key=value ...}}...<{{else}}>...{{/helper}}" do
233
233
  let(:presenter_class) { double(:presenter_class) }
234
234
 
235
235
  it "without errors when global helper" do
236
- allow(Curlybars.configuration).to receive(:global_helpers_provider_classes).and_return([IntegrationTest::GlobalHelperProvider])
236
+ allow(Curlybars.configuration).to receive(:global_helpers_provider_classes) { [IntegrationTest::GlobalHelperProvider] }
237
237
 
238
238
  dependency_tree = {}
239
239
 
@@ -84,6 +84,18 @@ describe "{{#if}}...{{else}}...{{/if}}" do
84
84
  describe "#validate" do
85
85
  let(:presenter_class) { double(:presenter_class) }
86
86
 
87
+ it "validates without errors the literal condition" do
88
+ dependency_tree = {}
89
+
90
+ source = <<-HBS
91
+ {{#if 42}}{{else}}{{/if}}
92
+ HBS
93
+
94
+ errors = Curlybars.validate(dependency_tree, source)
95
+
96
+ expect(errors).to be_empty
97
+ end
98
+
87
99
  it "validates with errors the condition" do
88
100
  dependency_tree = {}
89
101
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curlybars
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Libo Cannici
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-08-16 00:00:00.000000000 Z
16
+ date: 2018-08-29 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionpack
@@ -81,16 +81,16 @@ dependencies:
81
81
  name: byebug
82
82
  requirement: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - "~>"
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
- version: '3.5'
86
+ version: '0'
87
87
  type: :development
88
88
  prerelease: false
89
89
  version_requirements: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - "~>"
91
+ - - ">="
92
92
  - !ruby/object:Gem::Version
93
- version: '3.5'
93
+ version: '0'
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: railties
96
96
  requirement: !ruby/object:Gem::Requirement
@@ -131,42 +131,42 @@ dependencies:
131
131
  requirements:
132
132
  - - "~>"
133
133
  - !ruby/object:Gem::Version
134
- version: '3.5'
134
+ version: '3.8'
135
135
  type: :development
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
138
138
  requirements:
139
139
  - - "~>"
140
140
  - !ruby/object:Gem::Version
141
- version: '3.5'
141
+ version: '3.8'
142
142
  - !ruby/object:Gem::Dependency
143
143
  name: rubocop
144
144
  requirement: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - "~>"
147
147
  - !ruby/object:Gem::Version
148
- version: 0.52.1
148
+ version: 0.58.2
149
149
  type: :development
150
150
  prerelease: false
151
151
  version_requirements: !ruby/object:Gem::Requirement
152
152
  requirements:
153
153
  - - "~>"
154
154
  - !ruby/object:Gem::Version
155
- version: 0.52.1
155
+ version: 0.58.2
156
156
  - !ruby/object:Gem::Dependency
157
157
  name: rubocop-rspec
158
158
  requirement: !ruby/object:Gem::Requirement
159
159
  requirements:
160
160
  - - "~>"
161
161
  - !ruby/object:Gem::Version
162
- version: 1.22.0
162
+ version: 1.28.0
163
163
  type: :development
164
164
  prerelease: false
165
165
  version_requirements: !ruby/object:Gem::Requirement
166
166
  requirements:
167
167
  - - "~>"
168
168
  - !ruby/object:Gem::Version
169
- version: 1.22.0
169
+ version: 1.28.0
170
170
  description: |-
171
171
  A view layer for your Rails apps that separates structure and logic, using Handlebars templates.
172
172
  Strongly inspired by Curly Template gem by Daniel Schierbeck.