takelage 0.22.1 → 0.22.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
  SHA256:
3
- metadata.gz: 240831f6c4308e8336a2d476a4ff3f5b728804e7e03d4e1463c9262fff7d2b56
4
- data.tar.gz: 85d29bb364dbaf5758f51813a1f6388c9ad6babd417da65d30b6907283147c9f
3
+ metadata.gz: 3b1bdbf2ad81fedd7484d2b6ce316bc5486be8e38a829fbf44e3f141f6d90eff
4
+ data.tar.gz: ce7345bf4f198b3b488dcb0d729b04c9464bfdd4a6367f8c8eaf208bfa178a07
5
5
  SHA512:
6
- metadata.gz: cfa4649517e1818407361da9e3a17832cb010dbcc6d79139e05e95f355838ae175f09b5959b338972b7953b1a11d8fdf04b31b21f8c7c6451026b93837cd1c55
7
- data.tar.gz: ad5526d627c8cdb72d21936de73c8990782eb85f908ed405eab683bcc67b8e03dab564891636d919ab65c2cf4cce1d329efc4f28e8bd192d2ce2d60b64d15046
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
@@ -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
- path = TakelageProject.instance.config.active['project_root_dir']
38
- main_file = "#{path}/" \
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
- path = TakelageProject.instance.config.active['project_root_dir']
49
- private_file = "#{path}/" \
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
@@ -1 +1 @@
1
- 0.22.1
1
+ 0.22.2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: takelage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.1
4
+ version: 0.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geospin