app_root 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -12
- data/lib/app_root.rb +0 -16
- data/lib/app_root/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dde66a774bb05622663922ee15f79974f4322230
|
4
|
+
data.tar.gz: 99bdef3bfca28ea8546f5c9fbfb968773d8503c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c49dc3d5830abafb3f5171fb27a4da7179c9bc50dc7dbbb97056be67302b6f28050c2e15f6cf4281c131f4a999fbc5163d41b68b0a85aa1f28c1f130edca398
|
7
|
+
data.tar.gz: bcbf98a07f9fb081227c92eef4e79aaded131f9a3a3df26dff9a0ec291879ba12b0fcaf3fa353630bfcecec45f874225754e288561341ccbfe0bda4add21ec0c
|
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
# AppRoot
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/app_root.svg)](https://badge.fury.io/rb/app_root)
|
3
|
+
|
2
4
|
Detect the application's root directory.
|
3
5
|
|
4
6
|
## Installation
|
@@ -37,18 +39,6 @@ class MyApp
|
|
37
39
|
end
|
38
40
|
```
|
39
41
|
|
40
|
-
Including AppRoot:
|
41
|
-
|
42
|
-
```ruby
|
43
|
-
class MyApp
|
44
|
-
include AppRoot
|
45
|
-
|
46
|
-
def self.root_flag
|
47
|
-
"config.ru"
|
48
|
-
end
|
49
|
-
end
|
50
|
-
```
|
51
|
-
|
52
42
|
## Development
|
53
43
|
|
54
44
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/app_root.rb
CHANGED
@@ -7,10 +7,6 @@ module AppRoot
|
|
7
7
|
end
|
8
8
|
alias_method :path, :find_with_flag
|
9
9
|
|
10
|
-
def included(base)
|
11
|
-
base.extend(ClassMethods)
|
12
|
-
end
|
13
|
-
|
14
10
|
private
|
15
11
|
|
16
12
|
def called_from
|
@@ -43,16 +39,4 @@ module AppRoot
|
|
43
39
|
Pathname.new(File.realpath(root))
|
44
40
|
end
|
45
41
|
end
|
46
|
-
|
47
|
-
module ClassMethods
|
48
|
-
def root
|
49
|
-
AppRoot.find_with_flag(root_flag)
|
50
|
-
end
|
51
|
-
|
52
|
-
private
|
53
|
-
|
54
|
-
def root_flag
|
55
|
-
raise(NotImplementedError, "You must implement #{self}.#{__method__}")
|
56
|
-
end
|
57
|
-
end
|
58
42
|
end
|
data/lib/app_root/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_root
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nownabe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|