diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..28af0fd --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +vendor +*.gem diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..4222dba --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +source 'https://rubygems.org' + +# Specify your gem's dependencies in bootstrap-combobox-rails.gemspec +gemspec diff --git a/README.md b/README.md index ad3ae9e..5cf1ba1 100644 --- a/README.md +++ b/README.md @@ -26,3 +26,7 @@ Then just activate the plugin on a normal select box(suggest having a blank opti ## Live Example http://dl.dropbox.com/u/21368/bootstrap-combobox/index.html + +## Ruby + +This is published/publishable as a ruby gem as well. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..2995527 --- /dev/null +++ b/Rakefile @@ -0,0 +1 @@ +require "bundler/gem_tasks" diff --git a/bootstrap-combobox.gemspec b/bootstrap-combobox.gemspec new file mode 100644 index 0000000..e8a9c79 --- /dev/null +++ b/bootstrap-combobox.gemspec @@ -0,0 +1,33 @@ +# -*- encoding: utf-8 -*- +lib = File.expand_path('../lib', __FILE__) +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) +require 'fileutils' +require 'bootstrap-combobox/version' + +%w{vendor vendor/assets vendor/assets/javascripts vendor/assets/stylesheets }.each do |path| + file = File.join(path.split('/')) + Dir.mkdir(file) unless Dir.exist?(file) +end + +[[File.join(%w{css bootstrap-combobox.css}), File.join(%w{vendor assets stylesheets bootstrap-combobox.css})], + [File.join(%w{js bootstrap-combobox.js}), File.join(%w{vendor assets javascripts bootstrap-combobox.js})]].each do |pair| + FileUtils.cp(pair[0], pair[1]) unless File.exist? pair[1] +end + +Gem::Specification.new do |gem| + gem.name = "bootstrap-combobox" + gem.version = Bootstrap::Combobox::VERSION + gem.authors = %w{ danielfarrell denishaskin } + gem.email = %w{ danielfarrell76@gmail.com denis@constantorbit.com } + gem.description = %q{Combobox for Bootstrap, based on Bootstrap typeahead} + gem.summary = %q{Combobox for Bootstrap, based on Bootstrap typeahead} + gem.homepage = "https://github.com/danielfarrell/bootstrap-combobox" + gem.license = 'MIT' + + gem.files = Dir["{lib,vendor}/**/*"] + ["README.md"] + gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } + gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) + gem.require_paths = ["lib"] + + gem.add_dependency "railties", "~> 3.1" +end diff --git a/lib/bootstrap-combobox.rb b/lib/bootstrap-combobox.rb new file mode 100644 index 0000000..a3108c7 --- /dev/null +++ b/lib/bootstrap-combobox.rb @@ -0,0 +1,11 @@ +require "bootstrap-combobox-rails/version" + +module Bootstrap + module Combobox + module Rails + class Engine < ::Rails::Engine + # Rails, will you please look in our vendor? kthx + end + end + end +end diff --git a/lib/bootstrap-combobox/version.rb b/lib/bootstrap-combobox/version.rb new file mode 100644 index 0000000..f670868 --- /dev/null +++ b/lib/bootstrap-combobox/version.rb @@ -0,0 +1,6 @@ +module Bootstrap + module Combobox + # This version is a little arbitrary; at time of this writing source fork is at 1.1-WIP? + VERSION = "1.1" + end +end