load_path 0.2.0 → 0.2.1
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.
- checksums.yaml +8 -8
- data/.gitignore +2 -0
- data/CHANGELOG.md +2 -0
- data/img/test_case.png +0 -0
- data/lib/load_path.rb +1 -0
- data/lib/path_builder.rb +1 -0
- data/lib/version.rb +3 -0
- data/load_path.gemspec +19 -0
- data/test/grandparent/grandparent_file.rb +4 -0
- data/test/grandparent/parent/parent_file.rb +4 -0
- data/test/grandparent/parent/root/child/child_file.rb +4 -0
- data/test/grandparent/parent/root/child/grandchild/grandchild_file.rb +4 -0
- data/test/grandparent/parent/root/test_path.rb +28 -0
- data/test/grandparent/parent/sibling/sibling_file.rb +4 -0
- metadata +23 -7
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDU0MDE1MjA4YjllNTliMGUyNmFlMTE4ZDY3YWQwZmU4MGNmYjNhMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjBmNzdkMWIwZjBlZWQ5YzZiZmFjNWI5MzFkZWJlODI0NDNlYjZkNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTY5ZTA4MzI5YTYwNmQxMTM2N2IwNTVhN2EwMTNiZTgzMzM3ZWVjOWE1OWQw
|
10
|
+
NTE3YjIzZTQ0YTQzODFkNGM5MTcwZjJjYTA3NmVjNjQzOTM5NzgxYTQ3N2Qw
|
11
|
+
NTExMGRhOTg1Y2IwNzIyMTdkODBjMTc2ODQwYTkyMGNmMDRmN2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzBhNTMxNzcxNGRhYTJmNDNjNDIyYWI3NmI0MzQ2ZmNlNGI4NzhmZDA5ZmIy
|
14
|
+
Mzg0MDEzODMzNzhmZjJhMTI1MjM1OWI4YzljYmU3MTA5OGFkZjU1Yjc1YjRi
|
15
|
+
YWJiNzFlNGUwN2NiYmNlZjI5ZGZkYzY4NmUxMWUzYTIwM2U1NDg=
|
data/.gitignore
ADDED
data/CHANGELOG.md
CHANGED
data/img/test_case.png
ADDED
Binary file
|
data/lib/load_path.rb
CHANGED
data/lib/path_builder.rb
CHANGED
data/lib/version.rb
ADDED
data/load_path.gemspec
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
$: << (File.expand_path('../lib', __FILE__))
|
2
|
+
require 'version'
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'load_path'
|
6
|
+
s.version = LoadPath::VERSION
|
7
|
+
s.author = 'Nayyara Samuel'
|
8
|
+
s.email = 'nayyara.samuel@opower.com'
|
9
|
+
s.homepage = 'https://github.com/nayyara-samuel/load-path'
|
10
|
+
s.platform = Gem::Platform::RUBY
|
11
|
+
s.summary = 'Cleaner way to setup your load path'
|
12
|
+
|
13
|
+
s.files = `git ls-files`.split("\n") - ['.rvmrc', 'Gemfile.lock']
|
14
|
+
s.test_files = s.files.grep(%r{^test/})
|
15
|
+
s.require_paths << 'lib'
|
16
|
+
s.has_rdoc = true
|
17
|
+
s.extra_rdoc_files = ['README.md']
|
18
|
+
s.rdoc_options << '--title' << 'load_path' << '--main' << 'README.md' << '-ri'
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative '../../../../lib/load_path'
|
2
|
+
|
3
|
+
LoadPath.configure do
|
4
|
+
add parent_directory('grandparent', up: 2)
|
5
|
+
add parent_directory('parent')
|
6
|
+
add sibling_directory('sibling')
|
7
|
+
add child_directory('child')
|
8
|
+
add child_directory('grandchild', relative_path: ['child'])
|
9
|
+
|
10
|
+
# Must first add desired directory to load path
|
11
|
+
require_files parent_directory('grandparent', up: 2)
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
require 'parent_file'
|
16
|
+
require 'sibling_file'
|
17
|
+
require 'child_file'
|
18
|
+
require 'grandchild_file'
|
19
|
+
|
20
|
+
GrandParent.grand_parent
|
21
|
+
Parent.parent
|
22
|
+
Sibling.sibling
|
23
|
+
Child.child
|
24
|
+
GrandChild.grand_child
|
25
|
+
|
26
|
+
puts "Testing complete"
|
27
|
+
|
28
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: load_path
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nayyara Samuel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: nayyara.samuel@opower.com
|
@@ -17,13 +17,23 @@ extensions: []
|
|
17
17
|
extra_rdoc_files:
|
18
18
|
- README.md
|
19
19
|
files:
|
20
|
-
-
|
21
|
-
- lib/path_builder.rb
|
20
|
+
- .gitignore
|
22
21
|
- CHANGELOG.md
|
23
22
|
- Gemfile
|
24
|
-
- Rakefile
|
25
23
|
- README.md
|
26
|
-
|
24
|
+
- Rakefile
|
25
|
+
- img/test_case.png
|
26
|
+
- lib/load_path.rb
|
27
|
+
- lib/path_builder.rb
|
28
|
+
- lib/version.rb
|
29
|
+
- load_path.gemspec
|
30
|
+
- test/grandparent/grandparent_file.rb
|
31
|
+
- test/grandparent/parent/parent_file.rb
|
32
|
+
- test/grandparent/parent/root/child/child_file.rb
|
33
|
+
- test/grandparent/parent/root/child/grandchild/grandchild_file.rb
|
34
|
+
- test/grandparent/parent/root/test_path.rb
|
35
|
+
- test/grandparent/parent/sibling/sibling_file.rb
|
36
|
+
homepage: https://github.com/nayyara-samuel/load-path
|
27
37
|
licenses: []
|
28
38
|
metadata: {}
|
29
39
|
post_install_message:
|
@@ -52,4 +62,10 @@ rubygems_version: 2.1.3
|
|
52
62
|
signing_key:
|
53
63
|
specification_version: 4
|
54
64
|
summary: Cleaner way to setup your load path
|
55
|
-
test_files:
|
65
|
+
test_files:
|
66
|
+
- test/grandparent/grandparent_file.rb
|
67
|
+
- test/grandparent/parent/parent_file.rb
|
68
|
+
- test/grandparent/parent/root/child/child_file.rb
|
69
|
+
- test/grandparent/parent/root/child/grandchild/grandchild_file.rb
|
70
|
+
- test/grandparent/parent/root/test_path.rb
|
71
|
+
- test/grandparent/parent/sibling/sibling_file.rb
|