sneaql 0.0.23-java → 0.0.24-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sneaql_lib/core.rb +23 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3253ac685539dd5150b384369ff631ec34d4898118e9ee3275dc400a9f6c55d6
4
- data.tar.gz: 514fd1ba705a7ea5797c36d4d4fc440432f63f88c82b8c04ec481c5ea6a6f553
3
+ metadata.gz: 85565f6e7d4e73862b2daa42dd78b0fb30c784dc1b3ed8e6b1e5cb730b3615a7
4
+ data.tar.gz: 4d9d936e4f6cd118458ed5423101c8d9d7727746f1c013a478a2e0a9c57f12e6
5
5
  SHA512:
6
- metadata.gz: 1e7360df8b0e665ef210a769aa48839fa600fc6cc3ca43a8e129abbda28a305f8be1f9c52b6278ff0ad294114e7a06fbd5a45dee0d8428ab5b0223d0f8ca567a
7
- data.tar.gz: 970cdcb674d360849579f548dfc25a0df6e034975e5251c810665275722cf7ab721f6fab99b2f36fc3193c71dd2085795a427ecc1fac55436cd61f9d32cf4fa6
6
+ metadata.gz: 31e37fc79ea30be430b88da2cada16bb2ee6a578cea5e654ee575039684f4f5e750f1a0c9254b0d4b03b46955e5bd8516a7a1d5da866794cb3d61c6eb1897057
7
+ data.tar.gz: 74c7f1a247f98d0f297666e881b811aa85310577bd82a7fcf11dcff790bf860fedf48cebf932d4374bc11d12e842b78f82785c8bc46ac74a0a4094598ab82f8c
@@ -498,6 +498,29 @@ module Sneaql
498
498
  )
499
499
  end
500
500
  end
501
+
502
+ # raises a fatal error to exit the transform if the condition evaluates to true
503
+ class SneaqlFailIf < Sneaql::Core::SneaqlCommand
504
+ Sneaql::Core::RegisterMappedClass.new(
505
+ :command,
506
+ 'fail_if',
507
+ Sneaql::Core::Commands::SneaqlExitIf
508
+ )
509
+
510
+ # @param [String] operand1 expression as left operand
511
+ # @param [String] operator comparison operator supported by expression handler
512
+ # @param [String] operand2 expression as right operand
513
+ def action(operand1, operator, operand2)
514
+ if @expression_handler.compare_expressions(operator, operand1, operand2)
515
+ raise Sneaql::Exceptions::ForceFailure
516
+ end
517
+ end
518
+
519
+ # argument types
520
+ def arg_definition
521
+ [:expression, :operator, :expression]
522
+ end
523
+ end
501
524
  end
502
525
  end
503
526
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sneaql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.23
4
+ version: 0.0.24
5
5
  platform: java
6
6
  authors:
7
7
  - jeremy winters
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-04 00:00:00.000000000 Z
11
+ date: 2017-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement