Giter Site home page Giter Site logo

ruby-kit's Introduction

Ruby development kit for prismic.io

Gem Version Build Status

Getting Started

The prismic kit is compatible with Ruby 1.9.3 or later.

Install the kit for your project

(Assuming that Ruby is installed on your computer, as well as RubyGems)

To install the gem on your computer, run in shell:

gem install prismic.io --pre

then add in your code:

require 'prismic'

To add the gem as a dependency to your project with Bundler, you can add this line in your Gemfile:

gem 'prismic.io', require: 'prismic'

Get started

The quickstart is not available for Ruby yet, but if you understand Javascript you can easily adapt the code.

Configuring Alternative API Caches

The default cache stores data in-memory, in the server. You may want to use a different cache, for example to share it between several servers (with memcached or similar). A null cache (does no caching) is also available if you need a predictible behavior for testing or VCR. To use it (or any other compliant cache), simply add api_cache: Prismic::BasicNullCache.new to the options passed to Prismic.api.

Changelog

Need to see what changed, or to upgrade your kit? We keep our changelog on this repository's "Releases" tab.

Install the kit locally

Of course, you're going to need Ruby installed on your computer, as well as RubyGems and Bundler.

Clone the kit, then run bundle install.

Test

Please write tests for any bugfix or new feature, by placing your tests in the spec/ folder, following the RSpec syntax. Launch the tests by running rspec

If you find existing code that is not optimally tested and wish to make it better, we really appreciate it; but you should document it on its own branch and its own pull request.

Documentation

Please document any bugfix or new feature, using the Yard syntax. Don't worry about generating the doc, we'll take care of that.

If you find existing code that is not optimally documented and wish to make it better, we really appreciate it; but you should document it on its own branch and its own pull request.

Licence

This software is licensed under the Apache 2 license, quoted below.

Copyright 2013 Zengularity (http://www.zengularity.com).

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

ruby-kit's People

Contributors

dohzya avatar rudyrigot avatar erwan avatar dinduks avatar srenault avatar levimykel avatar marcmcintosh avatar raph22 avatar francois2metz avatar smd686s avatar orlezio avatar arnaudlewis avatar patrickae avatar alterenzo avatar mbrung avatar cooknat avatar

Watchers

James Cloos 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.