Code Monkey home page Code Monkey logo

continuent-tools-core's Introduction

continuent-tools-core

The continuent-tools-core is a package of libraries that are found in Tungsten Replicator. When the gem is built, these files are automatically exported from https://code.google.com/p/tungsten-replicator/.

gem install continuent-tools-core

Script Structure

Every Tungsten script should create a new class and include the 'TungstenScript' module. To execute the class, run 'YourClassScript.new().run()'.

The class must at least define the 'main' and 'script_name' methods. All other methods have a base definition and aren't required.

Accepting Arguments

Inside of the configure command, you may define options that will be accepted from the command line.

add_option(:option_name, {
  :on => "--option-name String",
  :aliases => ["-o String"],
  :help => "A description of the option",
  :default => "Default Value"
})

In order to access this value, you may run the opt() command.

opt(:option_name)

Samples

The first two examples show the base script outline for running against Continuent Tungsten, and running a script that doesn't require Continuent Tungsten.

  • samples/active-tungsten-script

    This script will look for $CONTINUENT_ROOT and load the configuration associated with that directory. If the environment variable isn't available, the --directory option is required to locate the right path.

  • samples/independent-script

    This script will still look for $CONTINUENT_ROOT but it will not fail if Continuent Tungsten is not found.

Viewing The Source Code

The source code for this gem is available at code.google.com project. The tungsten.rb and tungsten directory are packaged into the gem. All other files are required via the gemspec.

continuent-tools-core's People

Contributors

jeffmace avatar

Watchers

Neil Armitage avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.