supso 0.10.1 → 0.10.2
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 +4 -4
- data/.rspec +1 -0
- data/lib/supso/commands.rb +8 -1
- data/lib/supso/util.rb +9 -4
- data/lib/supso/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: f92ad949e4d626faa7f28146e3b1aa0a7d1eaa87
|
4
|
+
data.tar.gz: 21001673473262984a303dfae869cf23b573fb75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c39583e21d7abb9001d933d8ad65d2766d16aa648e197f3a523ec592c73ab40debc4e3fca04b597578b25d674cf9bce9f61427e8c501a5765d1a6fe74f0e101
|
7
|
+
data.tar.gz: 2553839c80d87cc306203f2487fd4d7afb1fd94b2d3903cd9e48a00e333741f3aa64a98e69cde32c420418e8ffc0534efbb2c2af8920258b295a6b1addb7f17a
|
data/.rspec
CHANGED
data/lib/supso/commands.rb
CHANGED
@@ -50,7 +50,7 @@ module Supso
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def self.advanced_commands
|
53
|
-
['logout', 'login', 'show', 'update', 'whoami']
|
53
|
+
['logout', 'login', 'show', 'update', 'whereami', 'whoami']
|
54
54
|
end
|
55
55
|
|
56
56
|
def self.simple_commands
|
@@ -64,6 +64,13 @@ module Supso
|
|
64
64
|
def self.update
|
65
65
|
Updater.update
|
66
66
|
end
|
67
|
+
|
68
|
+
def self.whereami
|
69
|
+
puts "Project = #{ Supso.project_root }"
|
70
|
+
puts "Project Config = #{ Supso.project_supso_config_root }"
|
71
|
+
puts "User Config = #{ Supso.user_supso_config_root }"
|
72
|
+
puts "Supso Gem = #{ Supso.gem_root }"
|
73
|
+
end
|
67
74
|
|
68
75
|
def self.whoami
|
69
76
|
user = User.current_user
|
data/lib/supso/util.rb
CHANGED
@@ -10,6 +10,7 @@ module Supso
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def Util.detect_project_root
|
13
|
+
base_file_names = ['Gemfile', 'package.json', '.supso', 'environment.yml', 'requirements.txt', 'setup.py']
|
13
14
|
project_root = Dir.getwd
|
14
15
|
while true
|
15
16
|
if project_root == ""
|
@@ -17,16 +18,20 @@ module Supso
|
|
17
18
|
break
|
18
19
|
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
for name in base_file_names
|
22
|
+
if File.exist?(project_root + '/' + name)
|
23
|
+
break
|
24
|
+
end
|
24
25
|
end
|
25
26
|
|
26
27
|
detect_project_root_splits = project_root.split("/")
|
27
28
|
detect_project_root_splits = detect_project_root_splits[0..detect_project_root_splits.length - 2]
|
28
29
|
project_root = detect_project_root_splits.join("/")
|
29
30
|
end
|
31
|
+
|
32
|
+
if project_root == nil || project_root == ''
|
33
|
+
project_root = Dir.getwd
|
34
|
+
end
|
30
35
|
|
31
36
|
project_root
|
32
37
|
end
|
data/lib/supso/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: supso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Super Source
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|