All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Download JAR files tagged by line with all dependencies

Search JAR files by class name

netbeans-color-codes-preview from group com.junichi11.netbeans.modules (version 0.13.4)

Show color codes preview per line in a sidebar area of an editor. <h2>Disable / Enable</h2> Check/Uncheck View > Show Colors <h2>Supported color patterns</h2> <ul> <li>Hex color code (e.g. #ffffff, #000)</li> <li>Css rgb/rgba values (e.g. rgb(0,0,0), rgba(255, 255, 255, 0.8))</li> <li>Css hsl/hsla values (e.g. hsl(0, 100%, 50%), hsla(120, 100%, 50%, 0.5))</li> <li>Named colors (e.g. red, blue)</li> <li>Java Color class (e.g. Color.black, new Color(100, 100, 100))</li> </ul> <h2>Multiple colors</h2> <ul> <li>Show top two colors in a sidebar if there are multiple colors in a line.</li> <li>If you want to check all colors, please click a specific rectangle. They will be shown as a list.</li> </ul> <h2>Change a color using the color chooser</h2> <ul> <li>Click a colored rectangle</li> <li>Click a color value of a list</li> <li>Select a new color in the color chooser</li> <li>An old color value will be changed to new one with the same format</li> </ul> <h2>Generate color codes</h2><p>You can generate color codes via a code generator(<kbd>Alt</kbd> + <kbd>Ins</kbd>).</p> <ol> <li>Run a code generator(Alt + Ins)</li> <li>Choose <code>Color...</code></li> <li>Choose format you expect (e.g. <code>new Color(r, g, b)</code>)</li> <li>Choose a color</li> <li>Click the OK button</li> <li>A color code is generated at the caret position</li> </ol> <h2>Options</h2> Tools > Options > Miscellaneous > Color Codes Preview <h3>Regex for enabled mime-types for Hex and CSS colors</h3> Default value is `^text/(x-)?(css|less|sass|scss)$`. If you would like to disable/enable some mime-types, please change the default regex. This pattern is used when the plugin checks a mime-type. <h3>Named Colors</h3> This option is `false` by default. If you would like to show named colors, please check it. <h2>NOTE</h2> <ul> <li>If you would like to show colors of `Color.decode(<hex>)` e.g. `Color.decode(#000000)`, Please add `java` to "Regex for enabled mime-types" of Hex and CSS e.g. (`^text/(x-)?(css|less|sass|scss|java)$`)</li> <li>Colors may be shown if they are not color codes. e.g. "#feature" contains #fea. This plugin recognizes it as a hex color code.</li> <li>If you use the GTK Look and Feel, you cannot change an alpha value in the color chooser.</li> <li>Hsl or hsla color values may not be changed correctly when you use the color chooser. (There may be 1% errors.)</li> </ul>

Group: com.junichi11.netbeans.modules Artifact: netbeans-color-codes-preview
Show all versions 
 

0 downloads
Artifact netbeans-color-codes-preview
Group com.junichi11.netbeans.modules
Version 0.13.4
Last update 10. October 2021
Organization not specified
URL https://github.com/junichi11/netbeans-color-codes-preview
License Apache License, Version 2.0
Dependencies amount 16
Dependencies org-netbeans-api-annotations-common, org-netbeans-modules-editor-lib2, org-netbeans-modules-editor-lib, org-openide-util, org-openide-util-ui, org-netbeans-modules-editor-mimelookup, org-openide-util-lookup, org-netbeans-modules-editor-settings, org-netbeans-modules-editor, org-openide-dialogs, org-netbeans-modules-editor-fold, org-openide-text, org-netbeans-modules-options-api, org-openide-awt, org-netbeans-modules-editor-document, org-openide-modules,
There are maybe transitive dependencies!

netbeans-textlint from group com.junichi11.netbeans.modules (version 1.1.0)

This plugin provides support for textlint. <h3>What&rsquo;s the textlint?</h3> <p>See <a href="https://github.com/textlint/textlint">https://github.com/textlint/textlint</a></p> <h3>Usage</h3> <h4>Install textlint and rules</h4> <p>Of course, it assumes that nodejs and npm are installed.</p> <p>e.g.</p> <pre><code>$ mkdir txtlint $ cd txtlint $ npm init $ npm install textlint --save-dev $ npm install textlint-rule-max-ten textlint-rule-spellcheck-tech-word textlint-rule-no-mix-dearu-desumasu --save-dev </code></pre> <h4>Create .textlintrc</h4> <pre><code>$ touch .textlintrc </code></pre> <pre><code class="json">{ &quot;rules&quot;: { &quot;max-ten&quot;: { &quot;max&quot;: 3 }, &quot;spellcheck-tech-word&quot;: true, &quot;no-mix-dearu-desumasu&quot;: true } } </code></pre> <p>You can also set parameters to Options (see below).</p> <h4>Set textlint and .textlintrc paths</h4> <p>Set paths to the Options (see below).</p> <p>e.g.</p> <ul> <li>textlint Path: /path/to/txtlint/node_modules/.bin/textlint (textlint.cmd in Windows)</li> <li>.textlintrc Path: /path/to/textlint/.textlintrc</li> </ul> <h4>Open Action Items window</h4> <ul> <li>Click Window > Action Items.</li> <li>Click &ldquo;Show action items for currently edited file only&rdquo; icon.</li> <li>Open your markdown or text file.</li> </ul> <h3>Options</h3> <p>Tools > Options > Editor > textlint</p> <ul> <li>textlint Path: Absolute path to textlint</li> <li>.textlintrc Path: Absolute path to .textlintrc</li> <li>Options : You can set options for the textlint command</li> <li>Enable in HTML files: To use the html plugin, you can check this</li> <li>Refresh on Save: To scan the document on save, you can check this (Checked by default)</li> <li>Show Annotations: To show annotations in the glyph gutter, you can check this (Checked by default)</li> </ul> <h3>Actions</h3> <h4>Fix</h4> <p>You have to save your file before you run this action.<br/> If there is a fixable rule&rsquo;s error, you can fix it. Right-click an item > Click <code>Fix</code>.<br/> To refresh items, your document is saved once.</p> <h4>Fix All</h4> <p>You have to save your file before you run this action.<br/> If there are fixable rule&rsquo;s errors, you can fix them. Right-click an item > Click <code>Fix All</code>.<br/> This action runs <code>textlint --fix</code> command.</p> <h4>Refresh</h4> <p>You can refresh results forcibly by the following action: Right-click your editor > Click "textlint Refresh".</p> <p>You can also set the shortcut key(Tools > Options > Keymap). </p> <h3>NOTE</h3> <ul> <li>The plugin scans only current file.</li> <li>The plugin does not refresh results automatically. Please save your file or run the refresh action.</li> <li>Use <code>UTF-8</code> as file encoding and <code>LF</code> as line endings.</li> <li>This plugin may not work properly in Windows. (Please try to check above.)</li> <li>If you cannot get expected results, just try to run the <code>textlint</code> commands once in your CLI.</li> </ul>

Group: com.junichi11.netbeans.modules Artifact: netbeans-textlint

 

0 downloads
Artifact netbeans-textlint
Group com.junichi11.netbeans.modules
Version 1.1.0
Last update 21. June 2020
Organization not specified
URL https://github.com/junichi11/netbeans-textlint-plugin
License Apache License, Version 2.0
Dependencies amount 23
Dependencies commons-lang3, gson, org-netbeans-api-annotations-common, org-netbeans-spi-tasklist, org-openide-filesystems, org-openide-util-lookup, org-netbeans-modules-extexecution, org-netbeans-modules-extexecution-base, org-openide-windows, org-openide-io, org-netbeans-modules-editor-lib2, org-openide-text, org-netbeans-modules-csl-api, org-netbeans-modules-editor-lib, org-openide-loaders, org-openide-dialogs, org-openide-util, org-openide-nodes, org-openide-util-ui, org-netbeans-modules-options-api, org-openide-awt, org-openide-filesystems-nb, org-netbeans-api-progress,
There are maybe transitive dependencies!

pact-jvm-consumer-specs2_2.12 from group au.com.dius (version 4.0.10)

pact-jvm-consumer-specs2 ======================== ## Specs2 Bindings for the pact-jvm library ## Dependency In the root folder of your project in build.sbt add the line: ```scala libraryDependencies += &quot;au.com.dius&quot; %% &quot;pact-jvm-consumer-specs2&quot; % &quot;3.2.11&quot; ``` or if you are using Gradle: ```groovy dependencies { testCompile &quot;au.com.dius:pact-jvm-consumer-specs2_2.11:3.2.11&quot; } ``` __*Note:*__ `PactSpec` requires spec2 3.x. Also, for spray users there&apos;s an incompatibility between specs2 v3.x and spray. Follow these instructions to resolve that problem: https://groups.google.com/forum/#!msg/spray-user/2T6SBp4OJeI/AJlnJuAKPRsJ ## Usage To author a test, mix `PactSpec` into your spec First we define a service client called `ConsumerService`. In our example this is a simple wrapper for `dispatch`, an HTTP client. The source code can be found in the test folder alongside the `ExamplePactSpec`. Here is a simple example: ``` import au.com.dius.pact.consumer.PactSpec class ExamplePactSpec extends Specification with PactSpec { val consumer = &quot;My Consumer&quot; val provider = &quot;My Provider&quot; override def is = uponReceiving(&quot;a request for foo&quot;) .matching(path = &quot;/foo&quot;) .willRespondWith(body = &quot;{}&quot;) .withConsumerTest { providerConfig =&gt; Await.result(ConsumerService(providerConfig.url).simpleGet(&quot;/foo&quot;), Duration(1000, MILLISECONDS)) must beEqualTo(200, Some(&quot;{}&quot;)) } } ``` This spec will be run along with the rest of your specs2 unit tests and will output your pact json to ``` /target/pacts/&lt;Consumer&gt;_&lt;Provider&gt;.json ``` # Forcing pact files to be overwritten (3.6.5+) By default, when the pact file is written, it will be merged with any existing pact file. To force the file to be overwritten, set the Java system property `pact.writer.overwrite` to `true`.

Group: au.com.dius Artifact: pact-jvm-consumer-specs2_2.12
Show all versions Show documentation Show source 
 

0 downloads
Artifact pact-jvm-consumer-specs2_2.12
Group au.com.dius
Version 4.0.10
Last update 18. April 2020
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 5
Dependencies pact-jvm-consumer, json, specs2-core_2.12, async-http-client, scala-java8-compat_2.12,
There are maybe transitive dependencies!

pact-jvm-consumer-specs2_2.11 from group au.com.dius (version 3.5.24)

pact-jvm-consumer-specs2 ======================== ## Specs2 Bindings for the pact-jvm library ## Dependency In the root folder of your project in build.sbt add the line: ```scala libraryDependencies += &quot;au.com.dius&quot; %% &quot;pact-jvm-consumer-specs2&quot; % &quot;3.2.11&quot; ``` or if you are using Gradle: ```groovy dependencies { testCompile &quot;au.com.dius:pact-jvm-consumer-specs2_2.11:3.2.11&quot; } ``` __*Note:*__ `PactSpec` requires spec2 3.x. Also, for spray users there&apos;s an incompatibility between specs2 v3.x and spray. Follow these instructions to resolve that problem: https://groups.google.com/forum/#!msg/spray-user/2T6SBp4OJeI/AJlnJuAKPRsJ ## Usage To author a test, mix `PactSpec` into your spec First we define a service client called `ConsumerService`. In our example this is a simple wrapper for `dispatch`, an HTTP client. The source code can be found in the test folder alongside the `ExamplePactSpec`. Here is a simple example: ``` import au.com.dius.pact.consumer.PactSpec class ExamplePactSpec extends Specification with PactSpec { val consumer = &quot;My Consumer&quot; val provider = &quot;My Provider&quot; override def is = uponReceiving(&quot;a request for foo&quot;) .matching(path = &quot;/foo&quot;) .willRespondWith(body = &quot;{}&quot;) .withConsumerTest { providerConfig =&gt; Await.result(ConsumerService(providerConfig.url).simpleGet(&quot;/foo&quot;), Duration(1000, MILLISECONDS)) must beEqualTo(200, Some(&quot;{}&quot;)) } } ``` This spec will be run along with the rest of your specs2 unit tests and will output your pact json to ``` /target/pacts/&lt;Consumer&gt;_&lt;Provider&gt;.json ```

Group: au.com.dius Artifact: pact-jvm-consumer-specs2_2.11
Show all versions Show documentation Show source 
 

0 downloads
Artifact pact-jvm-consumer-specs2_2.11
Group au.com.dius
Version 3.5.24
Last update 04. November 2018
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 10
Dependencies kotlin-stdlib-jdk8, kotlin-reflect, slf4j-api, groovy-all, kotlin-logging, scala-library, scala-logging_2.11, pact-jvm-consumer_2.11, specs2-core_2.11, async-http-client,
There are maybe transitive dependencies!

pact-jvm-consumer-specs2_2.10 from group au.com.dius (version 2.4.20)

pact-jvm-consumer-specs2 ======================== ## Specs2 Bindings for the pact-jvm library ## Dependency In the root folder of your project in build.sbt add the line: ```scala libraryDependencies += &quot;au.com.dius&quot; %% &quot;pact-jvm-consumer-specs2&quot; % &quot;3.2.2&quot; ``` or if you are using Gradle: ```groovy dependencies { testCompile &quot;au.com.dius:pact-jvm-consumer-specs2_2.11:3.2.2&quot; } ``` __*Note:*__ `PactSpec` requires spec2 3.x. Also, for spray users there&apos;s an incompatibility between specs2 v3.x and spray. Follow these instructions to resolve that problem: https://groups.google.com/forum/#!msg/spray-user/2T6SBp4OJeI/AJlnJuAKPRsJ ## Usage To author a test, mix `PactSpec` into your spec First we define a service client called `ConsumerService`. In our example this is a simple wrapper for `dispatch`, an HTTP client. The source code can be found in the test folder alongside the `ExamplePactSpec`. Here is a simple example: ``` import au.com.dius.pact.consumer.PactSpec class ExamplePactSpec extends Specification with PactSpec { val consumer = &quot;My Consumer&quot; val provider = &quot;My Provider&quot; override def is = uponReceiving(&quot;a request for foo&quot;) .matching(path = &quot;/foo&quot;) .willRespondWith(body = &quot;{}&quot;) .withConsumerTest { providerConfig =&gt; Await.result(ConsumerService(providerConfig.url).simpleGet(&quot;/foo&quot;), Duration(1000, MILLISECONDS)) must beEqualTo(200, Some(&quot;{}&quot;)) } } ``` This spec will be run along with the rest of your specs2 unit tests and will output your pact json to ``` /target/pacts/&lt;Consumer&gt;_&lt;Provider&gt;.json ```

Group: au.com.dius Artifact: pact-jvm-consumer-specs2_2.10
Show all versions Show documentation Show source 
 

0 downloads
Artifact pact-jvm-consumer-specs2_2.10
Group au.com.dius
Version 2.4.20
Last update 14. April 2018
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 4
Dependencies slf4j-api, scala-library, pact-jvm-consumer_2.10, specs2-core_2.10,
There are maybe transitive dependencies!

straightedge from group com.massisframework (version 0.8)

Includes 2 main parts: - Path finding through 2D polygons using the A star algorithm and navigation-mesh generation Field of vision / shadows / line of sight / lighting. The basic polygon and point classes are the KPolygon and KPoint. KPolygon contains a list of KPoints for vertices as well as a center (centroid), area, and radius (circular bound or distance from center to furthest point). KPolygon was born out of the need for a more game-oriented and flexible polygon class than the Path2D class in the standard Java library. KPolygon implements java.awt.geom.Shape so it can be easily drawn and filled by Java2D's Graphics2D object. - This API provides path-finding and field-of-vision. For other complex geometric operations such as buffering (fattening and shrinking) and constructive area geometry (intersections and unions) it is recommended to use the excellent Java Topology Suite (JTS). The standard Java2D library also provides the Area class which can be used for some constructive area geometry operations. Note that there is a utility class PolygonConverter that can quickly convert KPolygons to JTS polygons and vice versa.

Group: com.massisframework Artifact: straightedge
Show documentation Show source 
 

1 downloads
Artifact straightedge
Group com.massisframework
Version 0.8
Last update 21. December 2015
Organization not specified
URL https://github.com/rpax/straightedge
License New BSD License
Dependencies amount 1
Dependencies jts,
There are maybe transitive dependencies!

sourcetohtml from group com.sourcetohtml (version 0.8.1)

This project aims to build a command line tool that can create HTML view with syntax highlighted source code. It uses Jedit syntax highlighting engine and support all languages that are supported in JEdit. Which are currently: ActionScript, Ada 95, ANTLR, Apache HTTPD, APDL, AppleScript, ASP, Aspect-J, Assembly, AWK, B formal method, Batch, BBj, BCEL, BibTeX, C, C++, C#, CHILL, CIL, COBOL, ColdFusion, CSS, CVS Commit, D, DOxygen, DSSSL, Eiffel, EmbPerl, Erlang, Factor, Fortran, Foxpro, FreeMarker, Fortran, Gettext, Groovy, Haskell, HTML, Icon, IDL, Inform, INI, Inno Setup, Informix 4GL, Interlis, Io, Java, JavaScript, JCL, JHTML, JMK, JSP, Latex, Lilypond, Lisp, LOTOS, Lua, Makefile, Maple, ML, Modula-3, MoinMoin, MQSC, NetRexx, NQC, NSIS2, Objective C, ObjectRexx, Occam, Omnimark, Parrot, Pascal, Patch, Perl, PHP, Pike, PL-SQL, PL/I, Pop11, PostScript, Povray, PowerDynamo, Progress 4GL, Prolog, Properties, PSP, PV-WAVE, Pyrex, Python, REBOL, Redcode, Relax-NG, RelationalView, Rest, Rib, RPM spec, RTF, Ruby, Ruby-HTML, RView, S+, S#, SAS, Scheme, SDL/PL, SGML, Shell Script, SHTML, Smalltalk, SMI MIB, SQR, Squidconf, SVN Commit, Swig, TCL, TeX, Texinfo, TPL, Transact-SQL, UnrealScript, VBScript, Velocity, Verilog, VHDL, XML, XSL, ZPT

Group: com.sourcetohtml Artifact: sourcetohtml
Show source 
 

0 downloads
Artifact sourcetohtml
Group com.sourcetohtml
Version 0.8.1
Last update 31. March 2009
Organization not specified
URL http://www.sourcetohtml.com
License GNU GENERAL PUBLIC LICENSE, version 3
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!

specs2_2.13 from group au.com.dius.pact.consumer (version 4.2.21)

pact-jvm-consumer-specs2 ======================== ## Specs2 Bindings for the pact-jvm library ## Dependency In the root folder of your project in build.sbt add the line: ```scala libraryDependencies += &quot;au.com.dius.pact.consumer&quot; %% &quot;specs2&quot; % &quot;4.0.1&quot; ``` or if you are using Gradle: ```groovy dependencies { testCompile &quot;au.com.dius.pact.consumer:specs2_2.13:4.0.1&quot; } ``` __*Note:*__ `PactSpec` requires spec2 3.x. Also, for spray users there&apos;s an incompatibility between specs2 v3.x and spray. Follow these instructions to resolve that problem: https://groups.google.com/forum/#!msg/spray-user/2T6SBp4OJeI/AJlnJuAKPRsJ ## Usage To author a test, mix `PactSpec` into your spec First we define a service client called `ConsumerService`. In our example this is a simple wrapper for `dispatch`, an HTTP client. The source code can be found in the test folder alongside the `ExamplePactSpec`. Here is a simple example: ``` import au.com.dius.pact.consumer.PactSpec class ExamplePactSpec extends Specification with PactSpec { val consumer = &quot;My Consumer&quot; val provider = &quot;My Provider&quot; override def is = uponReceiving(&quot;a request for foo&quot;) .matching(path = &quot;/foo&quot;) .willRespondWith(body = &quot;{}&quot;) .withConsumerTest { providerConfig =&gt; Await.result(ConsumerService(providerConfig.url).simpleGet(&quot;/foo&quot;), Duration(1000, MILLISECONDS)) must beEqualTo(200, Some(&quot;{}&quot;)) } } ``` This spec will be run along with the rest of your specs2 unit tests and will output your pact json to ``` /target/pacts/&lt;Consumer&gt;_&lt;Provider&gt;.json ``` # Forcing pact files to be overwritten (3.6.5+) By default, when the pact file is written, it will be merged with any existing pact file. To force the file to be overwritten, set the Java system property `pact.writer.overwrite` to `true`. # Test Analytics We are tracking anonymous analytics to gather important usage statistics like JVM version and operating system. To disable tracking, set the &apos;pact_do_not_track&apos; system property or environment variable to &apos;true&apos;.

Group: au.com.dius.pact.consumer Artifact: specs2_2.13
Show all versions Show documentation Show source 
 

0 downloads
Artifact specs2_2.13
Group au.com.dius.pact.consumer
Version 4.2.21
Last update 13. May 2022
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 5
Dependencies consumer, json, specs2-core_2.13, async-http-client, scala-java8-compat_2.13,
There are maybe transitive dependencies!

pact-jvm-provider-lein_2.12 from group au.com.dius (version 3.6.15)

# Leiningen plugin to verify a provider [version 2.2.14+, 3.0.3+] Leiningen plugin for verifying pacts against a provider. The plugin provides a `pact-verify` task which will verify all configured pacts against your provider. ## To Use It ### 1. Add the plugin to your project plugins, preferably in it&apos;s own profile. ```clojure :profiles { :pact { :plugins [[au.com.dius/pact-jvm-provider-lein_2.11 &quot;3.2.11&quot; :exclusions [commons-logging]]] :dependencies [[ch.qos.logback/logback-core &quot;1.1.3&quot;] [ch.qos.logback/logback-classic &quot;1.1.3&quot;] [org.apache.httpcomponents/httpclient &quot;4.4.1&quot;]] }}} ``` ### 2. Define the pacts between your consumers and providers You define all the providers and consumers within the `:pact` configuration element of your project. ```clojure :pact { :service-providers { ; You can define as many as you need, but each must have a unique name :provider1 { ; All the provider properties are optional, and have sensible defaults (shown below) :protocol &quot;http&quot; :host &quot;localhost&quot; :port 8080 :path &quot;/&quot; :has-pact-with { ; Again, you can define as many consumers for each provider as you need, but each must have a unique name :consumer1 { ; pact file can be either a path or an URL :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` ### 3. Execute `lein with-profile pact pact-verify` You will have to have your provider running for this to pass. ## Enabling insecure SSL For providers that are running on SSL with self-signed certificates, you need to enable insecure SSL mode by setting `:insecure true` on the provider. ```clojure :pact { :service-providers { :provider1 { :protocol &quot;https&quot; :host &quot;localhost&quot; :port 8443 :insecure true :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` ## Specifying a custom trust store For environments that are running their own certificate chains: ```clojure :pact { :service-providers { :provider1 { :protocol &quot;https&quot; :host &quot;localhost&quot; :port 8443 :trust-store &quot;relative/path/to/trustStore.jks&quot; :trust-store-password &quot;changeme&quot; :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` `:trust-store` is relative to the current working (build) directory. `:trust-store-password` defaults to `changeit`. NOTE: The hostname will still be verified against the certificate. ## Modifying the requests before they are sent Sometimes you may need to add things to the requests that can&apos;t be persisted in a pact file. Examples of these would be authentication tokens, which have a small life span. The Leiningen plugin provides a request filter that can be set to an anonymous function on the provider that will be called before the request is made. This function will receive the HttpRequest object as a parameter. ```clojure :pact { :service-providers { :provider1 { ; function that adds an Authorization header to each request :request-filter #(.addHeader % &quot;Authorization&quot; &quot;oauth-token eyJhbGciOiJSUzI1NiIsIm...&quot;) :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` __*Important Note:*__ You should only use this feature for things that can not be persisted in the pact file. By modifying the request, you are potentially modifying the contract from the consumer tests! ## Modifying the HTTP Client Used The default HTTP client is used for all requests to providers (created with a call to `HttpClients.createDefault()`). This can be changed by specifying a function assigned to `:create-client` on the provider that returns a `CloseableHttpClient`. The function will receive the provider info as a parameter. ## Turning off URL decoding of the paths in the pact file [version 3.3.3+] By default the paths loaded from the pact file will be decoded before the request is sent to the provider. To turn this behaviour off, set the system property `pact.verifier.disableUrlPathDecoding` to `true`. __*Important Note:*__ If you turn off the url path decoding, you need to ensure that the paths in the pact files are correctly encoded. The verifier will not be able to make a request with an invalid encoded path. ## Plugin Properties The following plugin options can be specified on the command line: |Property|Description| |--------|-----------| |:pact.showStacktrace|This turns on stacktrace printing for each request. It can help with diagnosing network errors| |:pact.showFullDiff|This turns on displaying the full diff of the expected versus actual bodies [version 3.3.6+]| |:pact.filter.consumers|Comma seperated list of consumer names to verify| |:pact.filter.description|Only verify interactions whose description match the provided regular expression| |:pact.filter.providerState|Only verify interactions whose provider state match the provided regular expression. An empty string matches interactions that have no state| |:pact.verifier.publishResults|Publishing of verification results will be skipped unless this property is set to &apos;true&apos; [version 3.5.18+]| |:pact.matching.wildcard|Enables matching of map values ignoring the keys when this property is set to &apos;true&apos;| Example, to run verification only for a particular consumer: ``` $ lein with-profile pact pact-verify :pact.filter.consumers=:consumer2 ``` ## Provider States For each provider you can specify a state change URL to use to switch the state of the provider. This URL will receive the `providerState` description from the pact file before each interaction via a POST. The `:state-change-uses-body` controls if the state is passed in the request body or as a query parameter. These values can be set at the provider level, or for a specific consumer. Consumer values take precedent if both are given. ```clojure :pact { :service-providers { :provider1 { :state-change-url &quot;http://localhost:8080/tasks/pactStateChange&quot; :state-change-uses-body false ; defaults to true :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` If the `:state-change-uses-body` is not specified, or is set to true, then the provider state description will be sent as JSON in the body of the request. If it is set to false, it will passed as a query parameter. As for normal requests (see Modifying the requests before they are sent), a state change request can be modified before it is sent. Set `:state-change-request-filter` to an anonymous function on the provider that will be called before the request is made. #### Returning values that can be injected (3.6.11+) You can have values from the provider state callbacks be injected into most places (paths, query parameters, headers, bodies, etc.). This works by using the V3 spec generators with provider state callbacks that return values. One example of where this would be useful is API calls that require an ID which would be auto-generated by the database on the provider side, so there is no way to know what the ID would be beforehand. There are methods on the consumer DSLs that can provider an expression that contains variables (like &apos;/api/user/${id}&apos; for the path). The provider state callback can then return a map for values, and the `id` attribute from the map will be expanded in the expression. For URL callbacks, the values need to be returned as JSON in the response body. ## Filtering the interactions that are verified You can filter the interactions that are run using three properties: `:pact.filter.consumers`, `:pact.filter.description` and `:pact.filter.providerState`. Adding `:pact.filter.consumers=:consumer1,:consumer2` to the command line will only run the pact files for those consumers (consumer1 and consumer2). Adding `:pact.filter.description=a request for payment.*` will only run those interactions whose descriptions start with &apos;a request for payment&apos;. `:pact.filter.providerState=.*payment` will match any interaction that has a provider state that ends with payment, and `:pact.filter.providerState=` will match any interaction that does not have a provider state. ## Starting and shutting down your provider For the pact verification to run, the provider needs to be running. Leiningen provides a `do` task that can chain tasks together. So, by creating a `start-app` and `terminate-app` alias, you could so something like: $ lein with-profile pact do start-app, pact-verify, terminate-app However, if the pact verification fails the build will abort without running the `terminate-app` task. To have the start and terminate tasks always run regardless of the state of the verification, you can assign them to `:start-provider-task` and `:terminate-provider-task` on the provider. ```clojure :aliases {&quot;start-app&quot; ^{:doc &quot;Starts the app&quot;} [&quot;tasks to start app ...&quot;] ; insert tasks to start the app here &quot;terminate-app&quot; ^{:doc &quot;Kills the app&quot;} [&quot;tasks to terminate app ...&quot;] ; insert tasks to stop the app here } :pact { :service-providers { :provider1 { :start-provider-task &quot;start-app&quot; :terminate-provider-task &quot;terminate-app&quot; :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` Then you can just run: $ lein with-profile pact pact-verify and the `start-app` and `terminate-app` tasks will run before and after the provider verification. ## Specifying the provider hostname at runtime [3.0.4+] If you need to calculate the provider hostname at runtime (for instance it is run as a new docker container or AWS instance), you can give an anonymous function as the provider host that returns the host name. The function will receive the provider information as a parameter. ```clojure :pact { :service-providers { :provider1 { :host #(calculate-host-name %) :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ```

Group: au.com.dius Artifact: pact-jvm-provider-lein_2.12
Show all versions Show documentation Show source 
 

0 downloads
Artifact pact-jvm-provider-lein_2.12
Group au.com.dius
Version 3.6.15
Last update 29. April 2020
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 8
Dependencies pact-jvm-provider_2.12, clojure, core.match, leiningen-core, logback-core, logback-classic, httpclient, jansi,
There are maybe transitive dependencies!

pact-jvm-provider-lein from group au.com.dius (version 4.0.10)

# Leiningen plugin to verify a provider Leiningen plugin for verifying pacts against a provider. The plugin provides a `pact-verify` task which will verify all configured pacts against your provider. ## To Use It ### 1. Add the plugin to your project plugins, preferably in it&apos;s own profile. ```clojure :profiles { :pact { :plugins [[au.com.dius/pact-jvm-provider-lein &quot;4.0.0&quot; :exclusions [commons-logging]]] :dependencies [[ch.qos.logback/logback-core &quot;1.1.3&quot;] [ch.qos.logback/logback-classic &quot;1.1.3&quot;] [org.apache.httpcomponents/httpclient &quot;4.4.1&quot;]] }}} ``` ### 2. Define the pacts between your consumers and providers You define all the providers and consumers within the `:pact` configuration element of your project. ```clojure :pact { :service-providers { ; You can define as many as you need, but each must have a unique name :provider1 { ; All the provider properties are optional, and have sensible defaults (shown below) :protocol &quot;http&quot; :host &quot;localhost&quot; :port 8080 :path &quot;/&quot; :has-pact-with { ; Again, you can define as many consumers for each provider as you need, but each must have a unique name :consumer1 { ; pact file can be either a path or an URL :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` ### 3. Execute `lein with-profile pact pact-verify` You will have to have your provider running for this to pass. ## Enabling insecure SSL For providers that are running on SSL with self-signed certificates, you need to enable insecure SSL mode by setting `:insecure true` on the provider. ```clojure :pact { :service-providers { :provider1 { :protocol &quot;https&quot; :host &quot;localhost&quot; :port 8443 :insecure true :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` ## Specifying a custom trust store For environments that are running their own certificate chains: ```clojure :pact { :service-providers { :provider1 { :protocol &quot;https&quot; :host &quot;localhost&quot; :port 8443 :trust-store &quot;relative/path/to/trustStore.jks&quot; :trust-store-password &quot;changeme&quot; :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` `:trust-store` is relative to the current working (build) directory. `:trust-store-password` defaults to `changeit`. NOTE: The hostname will still be verified against the certificate. ## Modifying the requests before they are sent Sometimes you may need to add things to the requests that can&apos;t be persisted in a pact file. Examples of these would be authentication tokens, which have a small life span. The Leiningen plugin provides a request filter that can be set to an anonymous function on the provider that will be called before the request is made. This function will receive the HttpRequest object as a parameter. ```clojure :pact { :service-providers { :provider1 { ; function that adds an Authorization header to each request :request-filter #(.addHeader % &quot;Authorization&quot; &quot;oauth-token eyJhbGciOiJSUzI1NiIsIm...&quot;) :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` __*Important Note:*__ You should only use this feature for things that can not be persisted in the pact file. By modifying the request, you are potentially modifying the contract from the consumer tests! ## Modifying the HTTP Client Used The default HTTP client is used for all requests to providers (created with a call to `HttpClients.createDefault()`). This can be changed by specifying a function assigned to `:create-client` on the provider that returns a `CloseableHttpClient`. The function will receive the provider info as a parameter. ## Turning off URL decoding of the paths in the pact file By default the paths loaded from the pact file will be decoded before the request is sent to the provider. To turn this behaviour off, set the system property `pact.verifier.disableUrlPathDecoding` to `true`. __*Important Note:*__ If you turn off the url path decoding, you need to ensure that the paths in the pact files are correctly encoded. The verifier will not be able to make a request with an invalid encoded path. ## Plugin Properties The following plugin options can be specified on the command line: |Property|Description| |--------|-----------| |:pact.showStacktrace|This turns on stacktrace printing for each request. It can help with diagnosing network errors| |:pact.showFullDiff|This turns on displaying the full diff of the expected versus actual bodies [version 3.3.6+]| |:pact.filter.consumers|Comma seperated list of consumer names to verify| |:pact.filter.description|Only verify interactions whose description match the provided regular expression| |:pact.filter.providerState|Only verify interactions whose provider state match the provided regular expression. An empty string matches interactions that have no state| |:pact.verifier.publishResults|Publishing of verification results will be skipped unless this property is set to &apos;true&apos; [version 3.5.18+]| |:pact.matching.wildcard|Enables matching of map values ignoring the keys when this property is set to &apos;true&apos;| Example, to run verification only for a particular consumer: ``` $ lein with-profile pact pact-verify :pact.filter.consumers=:consumer2 ``` ## Provider States For each provider you can specify a state change URL to use to switch the state of the provider. This URL will receive the `providerState` description from the pact file before each interaction via a POST. The `:state-change-uses-body` controls if the state is passed in the request body or as a query parameter. These values can be set at the provider level, or for a specific consumer. Consumer values take precedent if both are given. ```clojure :pact { :service-providers { :provider1 { :state-change-url &quot;http://localhost:8080/tasks/pactStateChange&quot; :state-change-uses-body false ; defaults to true :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` If the `:state-change-uses-body` is not specified, or is set to true, then the provider state description will be sent as JSON in the body of the request. If it is set to false, it will passed as a query parameter. As for normal requests (see Modifying the requests before they are sent), a state change request can be modified before it is sent. Set `:state-change-request-filter` to an anonymous function on the provider that will be called before the request is made. #### Returning values that can be injected (3.6.11+) You can have values from the provider state callbacks be injected into most places (paths, query parameters, headers, bodies, etc.). This works by using the V3 spec generators with provider state callbacks that return values. One example of where this would be useful is API calls that require an ID which would be auto-generated by the database on the provider side, so there is no way to know what the ID would be beforehand. There are methods on the consumer DSLs that can provider an expression that contains variables (like &apos;/api/user/${id}&apos; for the path). The provider state callback can then return a map for values, and the `id` attribute from the map will be expanded in the expression. For URL callbacks, the values need to be returned as JSON in the response body. ## Filtering the interactions that are verified You can filter the interactions that are run using three properties: `:pact.filter.consumers`, `:pact.filter.description` and `:pact.filter.providerState`. Adding `:pact.filter.consumers=:consumer1,:consumer2` to the command line will only run the pact files for those consumers (consumer1 and consumer2). Adding `:pact.filter.description=a request for payment.*` will only run those interactions whose descriptions start with &apos;a request for payment&apos;. `:pact.filter.providerState=.*payment` will match any interaction that has a provider state that ends with payment, and `:pact.filter.providerState=` will match any interaction that does not have a provider state. ## Starting and shutting down your provider For the pact verification to run, the provider needs to be running. Leiningen provides a `do` task that can chain tasks together. So, by creating a `start-app` and `terminate-app` alias, you could so something like: $ lein with-profile pact do start-app, pact-verify, terminate-app However, if the pact verification fails the build will abort without running the `terminate-app` task. To have the start and terminate tasks always run regardless of the state of the verification, you can assign them to `:start-provider-task` and `:terminate-provider-task` on the provider. ```clojure :aliases {&quot;start-app&quot; ^{:doc &quot;Starts the app&quot;} [&quot;tasks to start app ...&quot;] ; insert tasks to start the app here &quot;terminate-app&quot; ^{:doc &quot;Kills the app&quot;} [&quot;tasks to terminate app ...&quot;] ; insert tasks to stop the app here } :pact { :service-providers { :provider1 { :start-provider-task &quot;start-app&quot; :terminate-provider-task &quot;terminate-app&quot; :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ``` Then you can just run: $ lein with-profile pact pact-verify and the `start-app` and `terminate-app` tasks will run before and after the provider verification. ## Specifying the provider hostname at runtime If you need to calculate the provider hostname at runtime (for instance it is run as a new docker container or AWS instance), you can give an anonymous function as the provider host that returns the host name. The function will receive the provider information as a parameter. ```clojure :pact { :service-providers { :provider1 { :host #(calculate-host-name %) :has-pact-with { :consumer1 { :pact-file &quot;path/to/provider1-consumer1-pact.json&quot; } } } } } ```

Group: au.com.dius Artifact: pact-jvm-provider-lein
Show all versions Show documentation Show source 
 

0 downloads
Artifact pact-jvm-provider-lein
Group au.com.dius
Version 4.0.10
Last update 18. April 2020
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 10
Dependencies pact-jvm-provider, clojure, core.match, leiningen-core, maven-aether-provider, aether-connector-file, aether-connector-wagon, httpclient, jansi, groovy,
There are maybe transitive dependencies!



Page 193 from 194 (items total 1940)


© 2015 - 2024 Weber Informatics LLC | Privacy Policy