underglow 0.0.91 → 0.0.92
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/lib/underglow/rails/environment.rb +10 -2
- data/lib/underglow/version.rb +1 -1
- data/underglow.gemspec +1 -1
- metadata +2 -2
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
|
1
3
|
# Require this file for quick access to Rails environment properties
|
2
4
|
unless defined? Rails
|
3
5
|
# Mock a Rails class that supplies the env and root if it's not defined
|
@@ -9,13 +11,19 @@ unless defined? Rails
|
|
9
11
|
def self.root
|
10
12
|
# File.dirname(File.dirname(File.expand_path(__FILE__)))
|
11
13
|
if env == "development"
|
12
|
-
|
14
|
+
if File.exists?("/vagrant")
|
15
|
+
root = "/vagrant"
|
16
|
+
else
|
17
|
+
raise Exception, "Couldn't find root!"
|
18
|
+
end
|
13
19
|
else
|
14
20
|
caller_path = "#{Dir.pwd}/#{caller.last.split(":").first}"
|
15
21
|
|
16
22
|
# Assume we are using capistrano, so whatever is /*/current would be the root
|
17
|
-
caller_path.sub(/\/current\/.*/, "/current")
|
23
|
+
root = caller_path.sub(/\/current\/.*/, "/current")
|
18
24
|
end
|
25
|
+
|
26
|
+
Pathname.new(root)
|
19
27
|
end
|
20
28
|
end
|
21
29
|
end
|
data/lib/underglow/version.rb
CHANGED
data/underglow.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: underglow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.92
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -119,7 +119,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
segments:
|
121
121
|
- 0
|
122
|
-
hash:
|
122
|
+
hash: 820083652646455417
|
123
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
124
|
none: false
|
125
125
|
requirements:
|