simpli 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/{simpli → simply} +2 -2
- data/lib/simpli/script_finder.rb +3 -9
- data/lib/simpli/version.rb +1 -1
- data/lib/simpli.rb +4 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73bad84441a3fd12e066004667bda760c981b97f
|
4
|
+
data.tar.gz: 5dd4231917b74608b6dd3b121f30289bf330e7b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 319b684bb349f3579002a1d48f4deea54e2c37accb33b0f61386dfe7373d821d845aae1ce27ad436ee97a5847e29d8986c7cccd4e5c6dfb39d6d4ed1de4d152c
|
7
|
+
data.tar.gz: 91094eac95feaba5efa509da6b5ece8a8e7f3f760f1c23f860711cfb55a1827a16586f557d081cfec4fd30a8314501e94cbf7e9c3ebddf215cbf7fd076e96977
|
data/bin/{simpli → simply}
RENAMED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
require 'simpli'
|
4
4
|
|
5
|
-
simply_script_path = Simpli.
|
5
|
+
simply_script_path = Simpli.locate_script('./simply')
|
6
6
|
|
7
7
|
raise '***ERROR: Simply script could not be found' unless simply_script_path
|
8
8
|
|
9
9
|
command = [simply_script_path, ARGV].flatten.join(' ')
|
10
|
-
|
10
|
+
|
11
11
|
exec(command)
|
data/lib/simpli/script_finder.rb
CHANGED
@@ -1,13 +1,7 @@
|
|
1
1
|
module Simpli
|
2
2
|
class ScriptFinder
|
3
|
-
|
4
|
-
|
5
|
-
class << self
|
6
|
-
def find(start_dir)
|
7
|
-
script_finder = Simpli::ScriptFinder.new
|
8
|
-
dir_path = File.expand_path(start_dir || Dir.pwd)
|
9
|
-
script_finder.upsearch(dir_path)
|
10
|
-
end
|
3
|
+
def initialize(relative_script_path)
|
4
|
+
@relative_script_path = relative_script_path
|
11
5
|
end
|
12
6
|
|
13
7
|
def upsearch(dir_path)
|
@@ -18,7 +12,7 @@ module Simpli
|
|
18
12
|
private
|
19
13
|
|
20
14
|
def path_to_simply_script(dir_path)
|
21
|
-
Dir.glob("#{dir_path}/#{
|
15
|
+
Dir.glob("#{dir_path}/#{@relative_script_path}").first
|
22
16
|
end
|
23
17
|
|
24
18
|
def search_in_parent_directory(dir_path)
|
data/lib/simpli/version.rb
CHANGED
data/lib/simpli.rb
CHANGED
@@ -3,8 +3,10 @@ require 'simpli/script_finder'
|
|
3
3
|
|
4
4
|
module Simpli
|
5
5
|
class << self
|
6
|
-
def
|
7
|
-
Simpli::ScriptFinder.
|
6
|
+
def locate_script(script_name, start_dir = Dir.pwd)
|
7
|
+
script_finder = Simpli::ScriptFinder.new(script_name)
|
8
|
+
dir_path = File.expand_path(start_dir)
|
9
|
+
script_finder.upsearch(dir_path)
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simpli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Schüttel
|
@@ -13,11 +13,11 @@ dependencies: []
|
|
13
13
|
description:
|
14
14
|
email: mario.schuettel@simplificator.com
|
15
15
|
executables:
|
16
|
-
-
|
16
|
+
- simply
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- bin/
|
20
|
+
- bin/simply
|
21
21
|
- lib/simpli.rb
|
22
22
|
- lib/simpli/script_finder.rb
|
23
23
|
- lib/simpli/version.rb
|