Skip to content

Make publishable as a gem. #80 #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.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"
31 changes: 31 additions & 0 deletions bootstrap-combobox.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- 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"]
end
9 changes: 9 additions & 0 deletions lib/bootstrap-combobox.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require "bootstrap-combobox/version"

module Bootstrap
module Combobox
class Engine < ::Rails::Engine
# Rails, will you please look in our vendor? kthx
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.2.6"
end
end