source_locator 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/showme +5 -2
- data/lib/source_locator/dictionary.rb +3 -2
- data/lib/source_locator/version.rb +1 -1
- metadata +3 -3
data/bin/showme
CHANGED
@@ -7,8 +7,11 @@ rails_env_file = File.join(Dir.pwd, 'config', 'environment.rb')
|
|
7
7
|
data_dump_file = File.join(Dir.pwd,SourceLocator::IndexFile)
|
8
8
|
|
9
9
|
if File.exists? data_dump_file
|
10
|
-
data =
|
11
|
-
|
10
|
+
data = {}
|
11
|
+
File.open(data_dump_file) do |f|
|
12
|
+
data = Marshal.load(f)
|
13
|
+
end
|
14
|
+
storage = SourceLocator::Dictionary.new data, data_dump_file
|
12
15
|
else
|
13
16
|
if File.exists? rails_env_file
|
14
17
|
puts "Loading Rails env..."
|
@@ -2,6 +2,7 @@ module SourceLocator
|
|
2
2
|
class Dictionary
|
3
3
|
def initialize(data, dump_file)
|
4
4
|
@dict = data
|
5
|
+
@dump_file = dump_file
|
5
6
|
end
|
6
7
|
|
7
8
|
def find(method)
|
@@ -9,8 +10,8 @@ module SourceLocator
|
|
9
10
|
end
|
10
11
|
|
11
12
|
def export
|
12
|
-
File.open(dump_file) do |f|
|
13
|
-
|
13
|
+
File.open(@dump_file, 'w+') do |f|
|
14
|
+
Marshal.dump(@dict, f)
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: source_locator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Unnikrishnan KP
|