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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 651add74d81586824add3bd02382235ad37acaed
4
- data.tar.gz: 6ae60cb0b136efe794a741c67cce2ecfa8d8c5a3
3
+ metadata.gz: f92ad949e4d626faa7f28146e3b1aa0a7d1eaa87
4
+ data.tar.gz: 21001673473262984a303dfae869cf23b573fb75
5
5
  SHA512:
6
- metadata.gz: b6a5c3cf5875e58f30b6033d782a749845c3f55080e0b5e5d7c095636cd3903add6e31d0d81287f6e4879cb3d81c438ff49bc4031108937b32b23495db1b2dd5
7
- data.tar.gz: 826f761e936d6dd1a7b13db5af56c40174108f27492d72e591c138c77f7b6f071209eae0a1566db89ee8d69054a727bb2430759bc8b8bcc2fb5974a67b29fae3
6
+ metadata.gz: 0c39583e21d7abb9001d933d8ad65d2766d16aa648e197f3a523ec592c73ab40debc4e3fca04b597578b25d674cf9bce9f61427e8c501a5765d1a6fe74f0e101
7
+ data.tar.gz: 2553839c80d87cc306203f2487fd4d7afb1fd94b2d3903cd9e48a00e333741f3aa64a98e69cde32c420418e8ffc0534efbb2c2af8920258b295a6b1addb7f17a
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
+ --require spec_helper
@@ -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
- if File.exist?(project_root + '/Gemfile') ||
21
- File.exist?(project_root + '/package.json') ||
22
- File.exist?(project_root + '.supso')
23
- break
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
@@ -2,7 +2,7 @@ module Supso
2
2
  if !defined?(Supso::VERSION)
3
3
  VERSION_MAJOR = 0
4
4
  VERSION_MINOR = 10
5
- VERSION_PATCH = 1
5
+ VERSION_PATCH = 2
6
6
  VERSION = [VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH].join('.')
7
7
  end
8
8
  end
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.1
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-15 00:00:00.000000000 Z
11
+ date: 2017-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler