Permalink
Browse files

Work with ruby 1.8.7 or 1.9.2

  • Loading branch information...
1 parent 9cc80ef commit 191a31df7159c9f17e65eea6ef28bd0d4a0b245b @kindkid committed Jul 29, 2011
Showing with 6 additions and 10 deletions.
  1. +1 −1 .rvmrc
  2. +4 −7 lib/constantinople.rb
  3. +1 −1 lib/constantinople/version.rb
  4. +0 −1 spec/spec_helper.rb
View
2 .rvmrc
@@ -1 +1 @@
-rvm use ruby-1.9.2@constantinople
+rvm use ruby-1.8.7@constantinople
View
@@ -1,6 +1,5 @@
require "map"
require "yaml"
-YAML::ENGINE.yamler = 'syck'
require "deep_merge/core"
require "constantinople/deep_merge_map"
require "constantinople/version"
@@ -42,7 +41,7 @@ def self.environment
def self.caller_config_directories
possible_caller_config_directories do |dir|
- yield dir if Dir.exist?(dir)
+ yield dir if File.directory?(dir)
end
end
@@ -57,11 +56,9 @@ def self.caller_directories
results = []
regex = /^(.*)\:\d+\:in .*$/
caller.each do |trace|
- next unless match = regex.match(trace)
- file = match[1]
- next unless file && File.exist?(file)
- dir = File.dirname(file)
- yield dir unless results.include?(dir)
+ dir = File.dirname(trace)
+ yield dir unless results.include?(dir) || !File.directory?(dir)
+ results << dir
end
end
@@ -1,3 +1,3 @@
module Constantinople
- VERSION = "0.0.2"
+ VERSION = "0.0.3"
end
View
@@ -1,4 +1,3 @@
-YAML::ENGINE.yamler = 'syck'
require 'simplecov'
SimpleCov.start

0 comments on commit 191a31d

Please sign in to comment.