Skip to content

Commit

Permalink
Make publishable as a gem. danielfarrell#80.
Browse files Browse the repository at this point in the history
  • Loading branch information
denishaskin committed Jul 22, 2013
1 parent 0421f16 commit 406cf9c
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor
*.gem
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in bootstrap-combobox-rails.gemspec
gemspec
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require "bundler/gem_tasks"
33 changes: 33 additions & 0 deletions bootstrap-combobox.gemspec
Original file line number Diff line number Diff line change
@@ -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{ [email protected] [email protected] }
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
11 changes: 11 additions & 0 deletions lib/bootstrap-combobox.rb
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions lib/bootstrap-combobox/version.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 406cf9c

Please sign in to comment.