From 55aec8bf0a37a38b1dd6615d2828bad3b66804e9 Mon Sep 17 00:00:00 2001 From: Michael Hellein Date: Fri, 20 Sep 2013 16:06:55 -0400 Subject: [PATCH] Removed json dependency. --- lib/select2-bootstrap/version.rb | 10 ++++++---- select2-bootstrap-css.gemspec | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/select2-bootstrap/version.rb b/lib/select2-bootstrap/version.rb index 01d9775..828ac8a 100644 --- a/lib/select2-bootstrap/version.rb +++ b/lib/select2-bootstrap/version.rb @@ -1,7 +1,9 @@ -require 'json' - module Select2 module Bootstrap - VERSION = JSON.parse(File.read(File.expand_path('../../../package.json', __FILE__)))['version'] + # This is updated via the `grunt bump` command, which has a pretty + # unflexible matching syntax. + VERSION_STRING = "'version': '1.2.2'" + # Then, just the version. + VERSION = VERSION_STRING.match(/\d+\.\d+\.\d+/)[0] end -end +end \ No newline at end of file diff --git a/select2-bootstrap-css.gemspec b/select2-bootstrap-css.gemspec index 5b8b75d..ee0fe2f 100644 --- a/select2-bootstrap-css.gemspec +++ b/select2-bootstrap-css.gemspec @@ -18,6 +18,5 @@ Gem::Specification.new do |s| s.require_paths = ['lib'] s.rubyforge_project = '[none]' - s.add_dependency 'json' s.add_development_dependency 'jekyll' end