This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(-> (function-1 data) function-2 function-3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn-spec eligible-to-create-subscription? boolean? | |
"Is the subscription eligible for creating a new one?" | |
[subscription (s/keys :req [::subscription-status])] | |
(case (-> ::subscription-status subscription) | |
(::expired ::canceled ::free-trial ::free-trial-expired) true | |
false)) | |
(s/exercise-fn `eligible-to-create-subscription?) | |
=> | |
([(#:io.cloudrepo.payments{:subscription-status :io.cloudrepo.payments/free-trial-expired}) true] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Pipe, PipeTransform } from '@angular/core'; | |
/* | |
* Convert bytes into largest possible unit. | |
* Takes an precision argument that defaults to 2. | |
* Usage: | |
* bytes | fileSize:precision | |
* Example: | |
* {{ 1024 | fileSize}} | |
* formats to: 1 KB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
- Distribution Management tells maven where to deploy your artifacts when the 'mvn deploy' command is used. | |
- | |
- Repository Parameters: | |
- id: A unique id for each repository, this must correspond to an entry in the settings.xml file used by maven | |
usually located in ~/.m2/settings.xml or specified using the mvn command's -s parameter | |
(ie: mvn -s settings.xml deploy). | |
You can keep the ids as specified below as long as you have only one set (snapshot and release) of | |
CloudRepo maven repositories, otherwise you'll need to have a unique id in your settings.xml file for each |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
- The <repositories> tag is used when you wish to define a maven repository that you want to READ artifacts from. | |
- | |
- While not used in this example, we leave this here in this pom for completeness. If you want to read artifacts from | |
- the repositories that you configured above in <distributionManagement> then these are the tags you'd need. | |
--> | |
<repositories> | |
<repository> | |
<id>io.cloudrepo.maven.releases</id> | |
<name>CloudRepo Release Repositories</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ CLOUDREPO_USERNAME=my-user CLOUDREPO_PASSPHRASE=my-passphrase ./create-settings.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | |
https://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<!-- Complete Documentation for the settings.xml file can be found at https://maven.apache.org/settings.html --> | |
<!-- | |
- <servers> specify the repositories we deploy or release artifacts to. | |
- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: atlassian/default-image:2 | |
pipelines: | |
branches: | |
master: # Trigger this for any pushes to the master branch. | |
- step: | |
name: Build and Deploy Snapshot Artifact | |
trigger: automatic | |
caches: | |
- maven # Cache any dependencies we download, speeds up build times. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<repositories> | |
<repository> | |
<id>central</id> | |
<name>Maven Central</name> | |
<layout>default</layout> | |
<url>https://repo1.maven.org/maven2</url> | |
<snapshots> | |
<enabled>false</enabled> | |
</snapshots> | |
</repository> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<repositories> | |
<repository> | |
<id>central</id> | |
<name>Maven Central</name> | |
<layout>default</layout> | |
<url>https://repo1.maven.org/maven2</url> | |
<releases> | |
<enabled>false</enabled> | |
</releases> | |
<snapshots> |