takelage 0.22.1 → 0.22.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/takelage/info/project/cli.rb +13 -0
- data/lib/takelage/lib/project.rb +8 -5
- data/lib/takelage/version +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b1bdbf2ad81fedd7484d2b6ce316bc5486be8e38a829fbf44e3f141f6d90eff
|
4
|
+
data.tar.gz: ce7345bf4f198b3b488dcb0d729b04c9464bfdd4a6367f8c8eaf208bfa178a07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d02d2ba911590af68e157717de71903bf32726f8f7e6ca4548b662019d9c5e081d65c0d167eba3c3e04474df4a8d6745d46db89eb081d3b627dab78450e7ff6
|
7
|
+
data.tar.gz: 124474a3f2ed1db88b0e49bb02979a885c6db223a1b9105235daff4b945cef5558fd2496abb9f6ed78407cf37e8b3f57065a481e2a5307a0de3551f136f0a307
|
data/README.md
CHANGED
@@ -84,6 +84,7 @@ tau [git check clean](features/cucumber/features/git/git.check.clean.feature) |
|
|
84
84
|
tau [git check main](features/cucumber/features/git/git.check.main.feature) | Check if we are on the git main branch
|
85
85
|
tau [git check workspace](features/cucumber/features/git/git.check.workspace.feature) | Check if a git workspace exists
|
86
86
|
tau [info project active](features/cucumber/features/info/info.project.active.feature) | Print active project info
|
87
|
+
tau [info project dir](features/cucumber/features/info/info.project.dir.feature) | Print project root directory
|
87
88
|
tau [info project main](features/cucumber/features/info/info.project.main.feature) | Print main project info
|
88
89
|
tau [info project private](features/cucumber/features/info/info.project.private.feature) | Print private project info
|
89
90
|
tau [self config active](features/cucumber/features/self/self.config.active.feature) | Print active takelage configuration
|
@@ -52,5 +52,18 @@ module Takelage
|
|
52
52
|
say project_main_yaml
|
53
53
|
true
|
54
54
|
end
|
55
|
+
|
56
|
+
#
|
57
|
+
# info project dir
|
58
|
+
#
|
59
|
+
desc 'dir', 'Print project root directory'
|
60
|
+
long_desc <<-LONGDESC.gsub("\n", "\x5")
|
61
|
+
Print project root directory
|
62
|
+
LONGDESC
|
63
|
+
# Print project root directory.
|
64
|
+
def dir
|
65
|
+
say project.dir
|
66
|
+
true
|
67
|
+
end
|
55
68
|
end
|
56
69
|
end
|
data/lib/takelage/lib/project.rb
CHANGED
@@ -9,12 +9,13 @@ module ProjectModule
|
|
9
9
|
include SystemModule
|
10
10
|
include ConfigModule
|
11
11
|
|
12
|
-
attr_accessor :active, :private, :main
|
12
|
+
attr_accessor :active, :private, :main, :dir
|
13
13
|
|
14
14
|
def initialize
|
15
15
|
@active = {}
|
16
16
|
@private = {}
|
17
17
|
@main = {}
|
18
|
+
@dir = {}
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
@@ -23,6 +24,8 @@ module ProjectModule
|
|
23
24
|
TakelageProject.instance.main = _project_read_main
|
24
25
|
TakelageProject.instance.private = _project_read_private
|
25
26
|
TakelageProject.instance.active = _project_merge_active
|
27
|
+
TakelageProject.instance.dir =
|
28
|
+
TakelageProject.instance.config.active['project_root_dir']
|
26
29
|
end
|
27
30
|
|
28
31
|
# @return [Object] global singleton project
|
@@ -34,8 +37,8 @@ module ProjectModule
|
|
34
37
|
|
35
38
|
# Read main YAML file.
|
36
39
|
def _project_read_main
|
37
|
-
|
38
|
-
main_file = "#{
|
40
|
+
dir = TakelageProject.instance.config.active['project_root_dir']
|
41
|
+
main_file = "#{dir}/" \
|
39
42
|
"#{TakelageProject.instance.config.active['info_project_main']}"
|
40
43
|
|
41
44
|
return {} unless File.exist? main_file
|
@@ -45,8 +48,8 @@ module ProjectModule
|
|
45
48
|
|
46
49
|
# Read private YAML file.
|
47
50
|
def _project_read_private
|
48
|
-
|
49
|
-
private_file = "#{
|
51
|
+
dir = TakelageProject.instance.config.active['project_root_dir']
|
52
|
+
private_file = "#{dir}/" \
|
50
53
|
"#{TakelageProject.instance.config.active['info_project_private']}"
|
51
54
|
|
52
55
|
return {} unless File.exist? private_file
|
data/lib/takelage/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.22.
|
1
|
+
0.22.2
|