Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
nashby committed Dec 4, 2012
0 parents commit 1747bd4
Show file tree
Hide file tree
Showing 9 changed files with 483 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
@@ -0,0 +1,17 @@
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
3 changes: 3 additions & 0 deletions Gemfile
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gemspec
22 changes: 22 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,22 @@
Copyright (c) 2012 Vasiliy Ermolovich

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31 changes: 31 additions & 0 deletions README.md
@@ -0,0 +1,31 @@
# garlicjs-rails

garlicjs-rails wraps the [Garlic.js](http://garlicjs.org/) library in a rails engine for simple use with the asset pipeline provided by rails 3.1. The gem includes the development (non-minified) source for ease of exploration. The asset pipeline will minify in production.

Garlic.js allows you to automatically persist your forms' text field values locally, until the form is submitted. This way, your users don't lose any precious data if they accidentally close their tab or browser.

It strives to have a javascript agnostic interface for UI/UX developers that might want to use it. Just add some data-persist="garlic" in your form tags, and you're good to go!

## Installation

Add this line to your application's Gemfile:

gem 'garlicjs-rails'

## Usage

Add the following directive to your Javascript manifest file (application.js):

//= require garlic

## Versioning

garlicjs-rails 1.0.2 == Garlic.js 1.0.2

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
1 change: 1 addition & 0 deletions Rakefile
@@ -0,0 +1 @@
require "bundler/gem_tasks"
17 changes: 17 additions & 0 deletions garlicjs-rails.gemspec
@@ -0,0 +1,17 @@
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'garlicjs-rails/version'

Gem::Specification.new do |gem|
gem.name = "garlicjs-rails"
gem.version = Garlicjs::Rails::VERSION
gem.authors = ["Vasiliy Ermolovich"]
gem.email = ["younash@gmail.com"]
gem.description = %q{Garlic.js allows you to automatically persist your forms' text field values locally, until the form is submitted}
gem.summary = %q{Garlic.js allows you to automatically persist your forms' text field values locally, until the form is submitted}
gem.homepage = "http://github.com/nashby/garlicjs-rails"

gem.files = `git ls-files`.split($/)
gem.require_paths = ["lib"]
end
8 changes: 8 additions & 0 deletions lib/garlicjs-rails.rb
@@ -0,0 +1,8 @@
require "garlicjs-rails/version"

module Garlicjs
module Rails
class Engine < ::Rails::Engine
end
end
end
5 changes: 5 additions & 0 deletions lib/garlicjs-rails/version.rb
@@ -0,0 +1,5 @@
module Garlicjs
module Rails
VERSION = "1.0.2"
end
end

0 comments on commit 1747bd4

Please sign in to comment.