Skip to content

Commit 1c8cff6

Browse files
committed
initial commit
0 parents  commit 1c8cff6

File tree

16 files changed

+1237
-0
lines changed

16 files changed

+1237
-0
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*.gem
2+
*.rbc
3+
.bundle
4+
.config
5+
.yardoc
6+
Gemfile.lock
7+
InstalledFiles
8+
_yardoc
9+
coverage
10+
doc/
11+
lib/bundler/man
12+
pkg
13+
rdoc
14+
spec/reports
15+
test/tmp
16+
test/version_tmp
17+
tmp

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
# Specify your gem's dependencies in twitter-typeahead-rails.gemspec
4+
gemspec

LICENSE.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2013 Yousef Ourabi
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Twitter typeahead.js jquery plugin
2+
3+
This asset gem packages the [twitter typeahead.js](https://github.com/twitter/typeahead.js) jquery plugin for the Rails asset pipeline.
4+
5+
To learn more about typeahead.js read the post [Twitter's engineering blog](http://engineering.twitter.com/2013/02/twitter-typeaheadjs-you-autocomplete-me.html).
6+
7+
This gem includes the standard and minified versions of the assets.
8+
9+
## Installation
10+
11+
Add this line to your application's Gemfile:
12+
13+
gem 'twitter-typeahead-rails'
14+
15+
or
16+
17+
gem 'twitter-typeahead-rails', :git => "[email protected]:yourabi/twitter-typeahead-rails.git"
18+
19+
20+
And then execute:
21+
22+
$ bundle
23+
24+
Or install it yourself as:
25+
26+
$ gem install twitter-typeahead-rails
27+
28+
## Usage
29+
30+
To start using the twitter typeahead.js plugin in your rails app enable it via the asset pipeline (app/assets/javascripts/application.js).
31+
32+
Add one the folllwing to your application.js mainifest:
33+
34+
```js
35+
36+
//= require twitter/typeahead
37+
//= require twitter/typeahead.min
38+
39+
```
40+
41+
42+
```js
43+
44+
// Twitter typeahead exmaple.
45+
$(document).ready(function() {
46+
$('.typeahead').typeahead( {name: 'planets', local: [ "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune" ] });
47+
});
48+
49+
```
50+
51+
You'll also probably want to enable include the CSS in your application.css manifest. Include one of the following:
52+
53+
```js
54+
55+
*= require twitter/typeahead
56+
57+
*= require twitter/typeahead.min
58+
59+
```
60+
61+
Currently this version tracks version v0.8.0.
62+
63+
## Contributing
64+
65+
1. Fork it
66+
2. Create your feature branch (`git checkout -b my-new-feature`)
67+
3. Commit your changes (`git commit -am 'Add some feature'`)
68+
4. Push to the branch (`git push origin my-new-feature`)
69+
5. Create new Pull Request

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require "bundler/gem_tasks"

lib/twitter-typeahead-rails.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require "twitter-typeahead-rails/version"
2+
3+
module Twitter
4+
module Typeahead
5+
module Rails
6+
class Engine < ::Rails::Engine
7+
end
8+
end
9+
end
10+
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module Twitter
2+
module Typeahead
3+
module Rails
4+
VERSION = "0.8.0"
5+
end
6+
end
7+
end

twitter-typeahead-rails.gemspec

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# -*- encoding: utf-8 -*-
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4+
require 'twitter-typeahead-rails/version'
5+
6+
Gem::Specification.new do |gem|
7+
gem.name = "twitter-typeahead-rails"
8+
gem.version = Twitter::Typeahead::Rails::VERSION
9+
gem.authors = ["Yousef Ourabi"]
10+
gem.email = ["[email protected]"]
11+
gem.description = %q{twitter-typeahead-rails packages the typeahead.js jquery plugin for rails}
12+
gem.summary = %q{twitter-typeahead-rails packages the typeahead.js jquery plugin for rails}
13+
gem.homepage = "https://github.com/yourabi/twitter-typeahead-rails"
14+
15+
gem.add_dependency 'railties', '>= 3.1'
16+
gem.add_dependency 'actionpack', '>= 3.1'
17+
gem.add_dependency 'jquery-rails'
18+
19+
gem.add_development_dependency 'rails', '>= 3.1'
20+
21+
gem.files = `git ls-files`.split($/)
22+
gem.require_paths = ["lib"]
23+
end
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//=require twitter/typeahead/typeahead.js
2+
3+
4+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//=require twitter/typeahead/typeahead.min.js
2+
3+
4+

0 commit comments

Comments
 (0)