env.rb 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  testapp
6
+ tmp/
data/Gemfile CHANGED
@@ -3,5 +3,6 @@ source "http://rubygems.org"
3
3
  # Specify your gem's dependencies in env.gemspec
4
4
  gemspec
5
5
 
6
- gem 'ruby-debug19'
6
+ gem 'ruby-debug19', :platform => :mri_19
7
+ gem 'ruby-debug', :platform => :mri_18
7
8
  gem 'rspec'
data/lib/env.rb CHANGED
@@ -5,6 +5,14 @@ require 'forwardable'
5
5
  class EnvironmentError < StandardError
6
6
  end
7
7
 
8
+ unless defined? BasicObject
9
+ class BasicObject
10
+ instance_methods.each do |m|
11
+ undef_method(m) if m.to_s !~ /(?:^__|^nil?$|^send$|^object_id$)/
12
+ end
13
+ end
14
+ end
15
+
8
16
  module Env
9
17
  RACK = %w{GEM_HOME TMPDIR HTTPS}
10
18
  HEROKU = %w{TMP TEMP} + RACK
@@ -1,3 +1,3 @@
1
1
  module Env
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -1,3 +1,11 @@
1
+ unless Kernel.respond_to?(:require_relative)
2
+ module Kernel
3
+ def require_relative(path)
4
+ require File.join(File.dirname(caller[0]), path.to_str)
5
+ end
6
+ end
7
+ end
8
+
1
9
  require_relative '../lib/env'
2
10
 
3
11
  def envfile(string)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: env.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-19 00:00:00.000000000 -07:00
12
+ date: 2011-08-24 00:00:00.000000000 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: Allows your to manage many ENV vars by declaring them as dependencies