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