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.
@@ -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
- "/vagrant" if File.exists?("/vagrant")
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
@@ -1,3 +1,3 @@
1
1
  module Underglow
2
- VERSION = "0.0.91"
2
+ VERSION = "0.0.92"
3
3
  end
data/underglow.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "underglow"
8
- s.version = "0.0.91"
8
+ s.version = "0.0.92"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Hu"]
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.91
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: -729885998492206179
122
+ hash: 820083652646455417
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  none: false
125
125
  requirements: