From c71d256bbdad1a05af28a10590f24b4c18b22bd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franc=CC=A7ois=20Beausoleil?= Date: Thu, 22 Mar 2012 09:57:44 -0400 Subject: [PATCH] Extracted version to own file, to ease bundling This allows us to build / use Watchr as a path in a Gemfile: gem 'watchr', :path => '../watchr' --- lib/watchr.rb | 3 +-- lib/watchr/version.rb | 3 +++ watchr.gemspec | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 lib/watchr/version.rb diff --git a/lib/watchr.rb b/lib/watchr.rb index 3d0b4f4..2c4f832 100644 --- a/lib/watchr.rb +++ b/lib/watchr.rb @@ -1,5 +1,6 @@ require 'pathname' require 'rbconfig' +require 'watchr/version' # Agile development tool that monitors a directory recursively, and triggers a # user defined action whenever an observed file is modified. Its most typical @@ -14,8 +15,6 @@ # $LOAD_PATH.unshift(File.dirname(__FILE__)) module Watchr - VERSION = '0.7' - begin require 'fsevent' HAVE_FSE = true diff --git a/lib/watchr/version.rb b/lib/watchr/version.rb new file mode 100644 index 0000000..3060563 --- /dev/null +++ b/lib/watchr/version.rb @@ -0,0 +1,3 @@ +module Watchr + VERSION = '0.7' +end diff --git a/watchr.gemspec b/watchr.gemspec index 44f9f4c..e8c714c 100644 --- a/watchr.gemspec +++ b/watchr.gemspec @@ -1,4 +1,4 @@ -require 'lib/watchr' +require File.expand_path('../lib/watchr/version', __FILE__) Gem::Specification.new do |s| s.name = "watchr"