idonethis-cli 0.13.2 → 0.13.3
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/lib/adapters/git_adapter.rb +5 -1
- data/lib/adapters/io/directory_info.rb +5 -3
- data/lib/idonethis/cli/version.rb +1 -1
- data/lib/idonethis/use_cases/git.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad72f615c54b128363ee1c9fd8699c959e1a8ab4
|
4
|
+
data.tar.gz: 4ca4a45b5f536128f08f6539f770c48a4ca3aefd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab930ebcf25bce33c13366ff66389c7356bc57940ab688aa2ca469efcea2d047bf834b527dc7d5d5700abde63fcbb0179ee22ee940797bb1d6b91e0598f3f2f2
|
7
|
+
data.tar.gz: e50373789f9eaffa75133cc1e0dc747bcb6fa06c3faebb8d40d26765b4e325e9a6d7e40cdcaf4a7587e80f78815b10937d39d9ff517a1104b770be9c5e4551f6
|
data/lib/adapters/git_adapter.rb
CHANGED
@@ -3,14 +3,16 @@ module Idonethis::Adapters
|
|
3
3
|
module DirectoryInfo
|
4
4
|
class << self
|
5
5
|
def modified_today?(dir)
|
6
|
-
|
6
|
+
return [] unless File.exists?(dir)
|
7
|
+
|
8
|
+
now = Time.now
|
7
9
|
|
8
|
-
_in(dir).select{|it| any_file_inside_changed?(it,
|
10
|
+
_in(dir).select{|it| any_file_inside_changed?(it, now) }
|
9
11
|
end
|
10
12
|
|
11
13
|
private
|
12
14
|
|
13
|
-
def any_file_inside_changed?(dir,
|
15
|
+
def any_file_inside_changed?(dir, now)
|
14
16
|
Dir["#{dir}/**/**"].each do |file|
|
15
17
|
return true if today?(File.ctime(file), now)
|
16
18
|
end
|
@@ -19,8 +19,8 @@ module Idonethis::UseCases
|
|
19
19
|
if dir == FileUtils.pwd
|
20
20
|
view.call "Scanning the current directory <#{dir}>\n\n"
|
21
21
|
else
|
22
|
-
dirs = fs.modified_today?(dir)
|
23
|
-
|
22
|
+
dirs = fs.modified_today?(dir).select{|dir| git.repo?(dir) }
|
23
|
+
|
24
24
|
view.call "Scanning dir <#{dir}>, which has <#{dirs.size}> repositories that have changed today\n\n"
|
25
25
|
end
|
26
26
|
|