lookfile 0.1.0 → 0.1.1
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/README.md +1 -1
- data/lib/commands/look.rb +2 -1
- data/lib/commands/show.rb +25 -0
- data/lib/lookfile/version.rb +1 -1
- data/lib/lookfile.rb +7 -0
- data/lookfile.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e81295ad028f562c07f5de7aca606ea1f8063f30
|
4
|
+
data.tar.gz: 892e0d1b304818d8ae5f31f8b69377cee5d09569
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4c79c99dca630ff7e4216da129d4649f9678e1b78d36a174c2e717d2f38093ae0cc2fd43154677bfee5f96ede337f9c8780932f904b6194d4386114228be16e
|
7
|
+
data.tar.gz: 3d1200d46d34761c15c2610d3292641e13051e7f5bbeae4508bd0d436a61904d0bde4202467af08af2663c8eec47c8262822ae71376b81e7b8c0462a0feb9789
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Lookfile [](https://travis-ci.org/LucianoPC/lookfile) [](https://codeclimate.com/github/LucianoPC/lookfile)
|
1
|
+
# Lookfile [](https://travis-ci.org/LucianoPC/lookfile) [](https://codeclimate.com/github/LucianoPC/lookfile) [](https://badge.fury.io/rb/lookfile)
|
2
2
|
|
3
3
|
Version files usage on day-to-day can be cansative and exaustive, mainly
|
4
4
|
because that files are on diferent folders, and group there it's a hard
|
data/lib/commands/look.rb
CHANGED
@@ -3,6 +3,7 @@ require 'commands/init'
|
|
3
3
|
require 'commands/add'
|
4
4
|
require 'commands/set_repository'
|
5
5
|
require 'commands/update'
|
6
|
+
require 'commands/show'
|
6
7
|
|
7
8
|
# Command 'lookfile' implementation
|
8
9
|
class Look < Command
|
@@ -19,6 +20,6 @@ class Look < Command
|
|
19
20
|
end
|
20
21
|
|
21
22
|
def self.childrens
|
22
|
-
[Init, Add, Update, SetRepository]
|
23
|
+
[Init, Add, Update, Show, SetRepository]
|
23
24
|
end
|
24
25
|
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'command'
|
2
|
+
require 'commands/look'
|
3
|
+
|
4
|
+
require 'lookfile'
|
5
|
+
|
6
|
+
# Command 'lookfile show' implementation
|
7
|
+
class Show < Command
|
8
|
+
def self.options_messages
|
9
|
+
%( show \t\t $ lookfile show
|
10
|
+
\t\t - Show all files that are on lookfile
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.command_name
|
15
|
+
'show'
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.parent
|
19
|
+
Look
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.run(*)
|
23
|
+
puts Lookfile.show
|
24
|
+
end
|
25
|
+
end
|
data/lib/lookfile/version.rb
CHANGED
data/lib/lookfile.rb
CHANGED
@@ -29,6 +29,13 @@ module Lookfile
|
|
29
29
|
[added_files, error_files]
|
30
30
|
end
|
31
31
|
|
32
|
+
def show(base_dir = BASE_DIR)
|
33
|
+
lookfile_dir = load_lookfile_dir(base_dir)
|
34
|
+
files_regex = %r{^#{lookfile_dir}(?!\/.git)(.+)$}
|
35
|
+
files_path = `find #{lookfile_dir} -type f`.scan(files_regex).flatten
|
36
|
+
show_files('Files on lookfile:', files_path)
|
37
|
+
end
|
38
|
+
|
32
39
|
def set_repository(repository_ssh_name, base_dir = BASE_DIR)
|
33
40
|
Git.set_remote(repository_ssh_name, base_dir)
|
34
41
|
Git.rebase(base_dir)
|
data/lookfile.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.description = 'Version files usage on day-to-day can be cansative ' \
|
14
14
|
'and exaustive, mainly because that files are on ' \
|
15
15
|
"diferent folders, and group there it's a hard work " \
|
16
|
-
'therefore, the people does not can version that ' \
|
16
|
+
',therefore, the people does not can version that ' \
|
17
17
|
"file. With this gem it's can change, because this " \
|
18
18
|
'gem can group all files that you need in a ' \
|
19
19
|
'repository, and version all these files with a ' \
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lookfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luciano Prestes Cavalcanti
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
description: Version files usage on day-to-day can be cansative and exaustive, mainly
|
56
|
-
because that files are on diferent folders, and group there it's a hard work therefore,
|
56
|
+
because that files are on diferent folders, and group there it's a hard work ,therefore,
|
57
57
|
the people does not can version that file. With this gem it's can change, because
|
58
58
|
this gem can group all files that you need in a repository, and version all these
|
59
59
|
files with a single command.
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- lib/commands/init.rb
|
81
81
|
- lib/commands/look.rb
|
82
82
|
- lib/commands/set_repository.rb
|
83
|
+
- lib/commands/show.rb
|
83
84
|
- lib/commands/update.rb
|
84
85
|
- lib/git.rb
|
85
86
|
- lib/lookfile.rb
|