DEPRECATED Runtime for Rugs
Switch branches/tags
1.0.0-m.7 1.0.0-m.7+travis3053 1.0.0-m.6 1.0.0-m.6+travis3039 1.0.0-m.5 1.0.0-m.5+travis2962 1.0.0-m.4 1.0.0-m.4+travis2883 1.0.0-m.3 1.0.0-m.3+travis2691 1.0.0-m.2 1.0.0-m.2+travis2572 1.0.0-m.1 1.0.0-m.1+travis2566 1.0.0-20170830045005+travis3056 1.0.0-20170828012239+travis3055 1.0.0-20170827110732+travis3054 1.0.0-20170825011657+travis3052 1.0.0-20170825002358+travis3051 1.0.0-20170824215028+travis3050 1.0.0-20170820184457+travis3046 1.0.0-20170818210311+travis3043 1.0.0-20170817081319+travis3038 1.0.0-20170817080046+travis3037 1.0.0-20170816140738+travis3034 1.0.0-20170816122823+travis3032 1.0.0-20170816012254+travis3027 1.0.0-20170812142542+travis3025 1.0.0-20170809213747+travis3024 1.0.0-20170807015619+travis3023 1.0.0-20170802061000+travis3020 1.0.0-20170801092425+travis3019 1.0.0-20170728102101+travis3018 1.0.0-20170728065612+travis3017 1.0.0-20170722151141+travis3010 1.0.0-20170718012215+travis3007 1.0.0-20170715141010+travis2998 1.0.0-20170713214604+travis2994 1.0.0-20170713120241+travis2990 1.0.0-20170712113051+travis2978 1.0.0-20170711214702+travis2973 1.0.0-20170711210058+travis2970 1.0.0-20170711130329+travis2964 1.0.0-20170711091121+travis2963 1.0.0-20170710112406+travis2958 1.0.0-20170705070236+travis2950 1.0.0-20170701090350+travis2946 1.0.0-20170701081340+travis2945 1.0.0-20170629070330+travis2939 1.0.0-20170625014316+travis2925 1.0.0-20170622142856+travis2923 1.0.0-20170622103610+travis2922 1.0.0-20170617222556+travis2918 1.0.0-20170617154121+travis2917 1.0.0-20170609011313+travis2913 1.0.0-20170608065255+travis2905 1.0.0-20170608064215+travis2904 1.0.0-20170607230402+travis2903 1.0.0-20170607055624+travis2902 1.0.0-20170606040849+travis2901 1.0.0-20170605203335+travis2900 1.0.0-20170602144934+travis2896 1.0.0-20170602122708+travis2890 1.0.0-20170602034820+travis2889 1.0.0-20170601151317+travis2886 1.0.0-20170601143235+travis2885 1.0.0-20170601092925+travis2884 1.0.0-20170601063640+travis2878 1.0.0-20170601043731+travis2877 1.0.0-20170601015500+travis2874 1.0.0-20170601015326+travis2873 1.0.0-20170601015229+travis2872 1.0.0-20170601012807+travis2871 1.0.0-20170531115447+travis2866 1.0.0-20170531031738+travis2865 1.0.0-20170530221641+travis2864 1.0.0-20170530101352+travis2863 1.0.0-20170526032155+travis2858 1.0.0-20170525203058+travis2852 1.0.0-20170525132405+travis2847 1.0.0-20170524102122+travis2839 1.0.0-20170524013741+travis2836 1.0.0-20170524012911+travis2835 1.0.0-20170523212018+travis2824 1.0.0-20170523065823+travis2818 1.0.0-20170522162818+travis2805 1.0.0-20170522094719+travis2799 1.0.0-20170519210454+travis2793 1.0.0-20170519055221+travis2792 1.0.0-20170518094744+travis2791 1.0.0-20170518085550+travis2790 1.0.0-20170518075831+travis2789 1.0.0-20170517161303+travis2788 1.0.0-20170517150051+travis2787 1.0.0-20170517141152+travis2785 1.0.0-20170516115401+travis2784 1.0.0-20170516112512+travis2783 1.0.0-20170516110802+travis2782 1.0.0-20170516032133+travis2777 1.0.0-20170515224700+travis2776
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.atomist
docs
src
.atomist.yml
.gitignore
.settings.xml
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
atomist_sec.gpg.enc
pom.xml

README.md

DEPRECATED 'rug'

Build Status

The Rug runtime: Support for Atomist project operations and handlers (aka rugs). Rugs are authored in JavaScript or any language that compiles to JavaScript capable of executing in Nashorn. We recommend TypeScript and provide TypeScript interfaces for the Atomist project and team model.

Key areas of functionality of this project:

Area Purpose Base Package/Path Remarks
Tree model Models project and file structure (e.g. ASTs) as a unified tree com.atomist.tree Used by parser and path expressions
Project operation support Editors and executors com.atomist.project Project operations are authored in TypeScript, JavaScript or any language that compiles to JavaScript.
Parsing support Support for parsing files and preserving positional information to allow clean in-place updates com.atomist.tree.content.text Integrates with Scala parser combinators and Antlr.
JavaScript/TypeScript integration Allows project operations to be written in JavaScript/TypeScript com.atomist.rug.runtime.js Uses Nashorn
Path expression language XPath-like language for conveniently navigating trees com.atomist.tree Central concept for navigating project and model structure
TypeScript library A node module to simplify authoring TypeScript rugs src/main/typescript See architectural overview. Will eventually be moved into a separate project.

See

Using

Most users will not need to use this project directly, but will use tools, e.g., rug-cli, that build on this project.

If you wish to develop tools using this project, you will need to add this project as a dependency and the maven repository where it is published to your build tool's configuration. For example, if you use maven, add the dependency to the <dependencies> section and the repository to the <repositories> section of your pom.xml:

<?xml version='1.0' encoding='UTF-8'?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
	<modelVersion>4.0.0</modelVersion>
    ...
    <dependencies>
        ...
		<dependency>
			<groupId>com.atomist</groupId>
			<artifactId>rug</artifactId>
			<version>0.3.2</version>
			<exclusions>
				<exclusion>
					<groupId>ch.qos.logback</groupId>
					<artifactId>logback-classic</artifactId>
				</exclusion>
				<exclusion>
					<groupId>ch.qos.logback</groupId>
					<artifactId>logback-access</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
        ...
	</dependencies>
    ...
	<repositories>
		<repository>
			<id>public-atomist-release</id>
			<name>Atomist Release</name>
			<url>https://atomist.jfrog.io/atomist/libs-release</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>
    ...
</project>

Be sure to change the <version> to the one you want to use.

Support

General support questions should be discussed in the #support channel on our community slack team at atomist-community.slack.com.

If you find a problem, please create an issue.

Development

You can build, test, and install the project locally with Maven.

$ mvn install

This will build, test, and locally install the Rug library. To build the Rug TypeScript @atomist/rug and @atomist/cortex modules, the "npm-release" profile must be used. Unlike the cortex build, the cortex model is not downloaded dynamically because Rug tracks the latest, perhaps unreleased, version of the model.

To build the TypeScript modules and their documentation, generated from the TypeScript modules using TypeDoc, execute at least through the Maven lifecycle test phase using the npm-release profile.

$ mvn -P npm-release test

The documentation for all of the Rug extensions will be in a directory named target/typedoc.

Development versions of the @atomist/rug npm module are published to https://atomist.jfrog.io/atomist/api/npm/npm-dev. The most straightforward way to get these versions without making changes to your configuration is:

$ npm install @atomist/rug --registry https://atomist.jfrog.io/atomist/api/npm/npm-dev

Alternatively, if you always want the latest snapshot, you can change your config for the @atomist scope:

npm config set @atomist:registry https://atomist.jfrog.io/atomist/api/npm/npm-dev

Release

Releasing Rug involves releasing the JVM artifacts to a Maven repository, the TypeScript module to NPM, and the documentation to GitHub pages for this repository, available at http://apidocs.atomist.com/ . Releasing Rug can be a multi-stepped process, depending on the changes that have been made.

If there are no changes to the TypeScript API, to create a release simply push a tag of the form M.N.P where M, N, and P are integers that form the next appropriate semantic version for release. For example:

$ git tag -a 1.2.3

The Travis CI build (see badge at the top of this page) will upload the needed artifacts and automatically create a GitHub release using the tag name for the release and the comment provided on the annotated tag as the contents of the release notes. The released artifacts are:

Note that while the @atomist/cortex module is built as part of the rug build, it is published by the cortex repository build. The cortex release process also publishes the cortex TypeDoc to http://cortex.atomist.com . So if the API of cortex has changed at all, you will need to initiate a release of that repository. This confusion will need to be resolved at some point in the future.

If there have been changes to either the @atomist/rug or @atomist/cortex TypeScript APIs, you will need to update the dependencies in the rugs repository package.json and initiate a new release of that repository to publish a new version of the @atomist/rugs TypeScript module, which is the dependency everyone uses to bring in rug and cortex. This should all be automated, perhaps in a separate repository or by chaining events to span repositories.


Created by Atomist. Need Help? Join our Slack team.