From 406cf9c303c9f752b7dd18fc00ebd0e1304386a0 Mon Sep 17 00:00:00 2001 From: denishaskin Date: Mon, 22 Jul 2013 14:01:48 -0400 Subject: [PATCH 1/5] Make publishable as a gem. #80. --- .gitignore | 2 ++ Gemfile | 4 ++++ README.md | 4 ++++ Rakefile | 1 + bootstrap-combobox.gemspec | 33 +++++++++++++++++++++++++++++++ lib/bootstrap-combobox.rb | 11 +++++++++++ lib/bootstrap-combobox/version.rb | 6 ++++++ 7 files changed, 61 insertions(+) create mode 100644 .gitignore create mode 100644 Gemfile create mode 100644 Rakefile create mode 100644 bootstrap-combobox.gemspec create mode 100644 lib/bootstrap-combobox.rb create mode 100644 lib/bootstrap-combobox/version.rb 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 From 0ca1d35968454cbf3f33a1df9aecb008208c6503 Mon Sep 17 00:00:00 2001 From: denishaskin Date: Mon, 22 Jul 2013 14:59:50 -0400 Subject: [PATCH 2/5] Fix leftover -rails and ::Rails references, oops. --- Gemfile | 2 +- lib/bootstrap-combobox.rb | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 4222dba..61198e1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -# Specify your gem's dependencies in bootstrap-combobox-rails.gemspec +# Specify your gem's dependencies in bootstrap-combobox.gemspec gemspec diff --git a/lib/bootstrap-combobox.rb b/lib/bootstrap-combobox.rb index a3108c7..608684c 100644 --- a/lib/bootstrap-combobox.rb +++ b/lib/bootstrap-combobox.rb @@ -1,11 +1,9 @@ -require "bootstrap-combobox-rails/version" +require "bootstrap-combobox/version" module Bootstrap module Combobox - module Rails - class Engine < ::Rails::Engine - # Rails, will you please look in our vendor? kthx - end - end + class Engine < ::Rails::Engine + # Rails, will you please look in our vendor? kthx + end end end From 721d2cd69f05ae9ac237c920044abed9180f4488 Mon Sep 17 00:00:00 2001 From: denishaskin Date: Tue, 18 Feb 2014 16:59:38 -0500 Subject: [PATCH 3/5] Remove railties version dependency. --- bootstrap-combobox.gemspec | 2 -- 1 file changed, 2 deletions(-) diff --git a/bootstrap-combobox.gemspec b/bootstrap-combobox.gemspec index e8a9c79..1900be6 100644 --- a/bootstrap-combobox.gemspec +++ b/bootstrap-combobox.gemspec @@ -28,6 +28,4 @@ Gem::Specification.new do |gem| 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 From 58569781d2931ccb9f211858282f621038a3ed1a Mon Sep 17 00:00:00 2001 From: denishaskin Date: Tue, 18 Feb 2014 17:00:22 -0500 Subject: [PATCH 4/5] Bump version. --- lib/bootstrap-combobox/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootstrap-combobox/version.rb b/lib/bootstrap-combobox/version.rb index f670868..baaa52a 100644 --- a/lib/bootstrap-combobox/version.rb +++ b/lib/bootstrap-combobox/version.rb @@ -1,6 +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" + VERSION = "1.2" end end From 4f50ecc9c16dc15e5505304769d251be405dd232 Mon Sep 17 00:00:00 2001 From: denishaskin Date: Tue, 18 Feb 2014 17:00:54 -0500 Subject: [PATCH 5/5] Bump version. --- lib/bootstrap-combobox/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bootstrap-combobox/version.rb b/lib/bootstrap-combobox/version.rb index baaa52a..da2a897 100644 --- a/lib/bootstrap-combobox/version.rb +++ b/lib/bootstrap-combobox/version.rb @@ -1,6 +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" + VERSION = "1.2.6" end end