makit 0.0.36 → 0.0.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/makit/directory.rb +2 -2
- data/lib/makit/dotnet.rb +1 -1
- data/lib/makit/indexer.rb +14 -14
- data/lib/makit/v1/makit.v1_pb.rb +33 -34
- data/lib/makit/version.rb +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: 302737c6fffa07aa87668fc9a01ec04d49623b95d16642fd48b5c7318c2e41c3
|
4
|
+
data.tar.gz: '01280acfdf6509404427b7847280a7759070fc604996f55aa3161c3b1c4705f3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c3d87b426715f7ff3adfb22674f9478b6249fe8bed2b5e76568bd790bee2cf3345381d7620dcd940cf4e3198905f2ed6b79a1dd0b400e7bde6710cfd10051b8
|
7
|
+
data.tar.gz: a8fa4bdb2442681e26fdbe3dc595db7e1f956f23c542a2b19f8581fb866d0db6b243acaf4b5bbf1275968a01eeaddfbaa47afaa79b61047b51f9a51706a0a0dd
|
data/lib/makit/directory.rb
CHANGED
@@ -165,8 +165,8 @@ module Makit
|
|
165
165
|
newest_file
|
166
166
|
end
|
167
167
|
|
168
|
-
def self.copy(src_dir, dst_dir)
|
169
|
-
FileUtils.cp_r(src_dir, dst_dir)
|
168
|
+
def self.copy(src_dir, dst_dir, verbose = false)
|
169
|
+
FileUtils.cp_r(src_dir, dst_dir, verbose: verbose)
|
170
170
|
end
|
171
171
|
|
172
172
|
def self.generate_manifest(dir)
|
data/lib/makit/dotnet.rb
CHANGED
@@ -8,7 +8,7 @@ module Makit
|
|
8
8
|
`dotnet --version`
|
9
9
|
end
|
10
10
|
|
11
|
-
def self.new_project(template, name, output,args = "")
|
11
|
+
def self.new_project(template, name, output, args = "")
|
12
12
|
if Dir.exist? output
|
13
13
|
#puts " #{output}".colorize(:green) + " exists.".colorize(:grey)
|
14
14
|
#puts "Directory #{output} already exists".colorize(:yellow)
|
data/lib/makit/indexer.rb
CHANGED
@@ -9,7 +9,7 @@ module Makit
|
|
9
9
|
attr_accessor :protoc_json_serializer
|
10
10
|
|
11
11
|
def initialize
|
12
|
-
@keywords_index=Hash.new
|
12
|
+
@keywords_index = Hash.new
|
13
13
|
@protoc_json_serializer = Makit::Serializer::new(Makit::Proto3Formats::JSON)
|
14
14
|
end
|
15
15
|
|
@@ -19,7 +19,7 @@ module Makit
|
|
19
19
|
hash = JSON.parse(item.to_json)
|
20
20
|
hash.each do |key, value|
|
21
21
|
value = value.to_s.downcase
|
22
|
-
if(value.length >= 3 && !keywords.include?(value))
|
22
|
+
if (value.length >= 3 && !keywords.include?(value))
|
23
23
|
keywords << value
|
24
24
|
end
|
25
25
|
end
|
@@ -34,23 +34,23 @@ module Makit
|
|
34
34
|
def search(query)
|
35
35
|
keys = []
|
36
36
|
# todo, remove terms less that length of 3
|
37
|
-
terms = query.downcase.split(
|
38
|
-
keywords_index.each do |key,value
|
39
|
-
if(get_match_count(terms,value) == terms.length)
|
40
|
-
|
37
|
+
terms = query.downcase.split(" ").reject { |term| term.length < 3 }
|
38
|
+
keywords_index.each do |key, value| #{|kvp|
|
39
|
+
if (get_match_count(terms, value) == terms.length)
|
40
|
+
keys << key
|
41
41
|
end
|
42
42
|
end
|
43
43
|
keys
|
44
44
|
end
|
45
45
|
|
46
|
-
def get_match_count(terms,keywords)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
46
|
+
def get_match_count(terms, keywords)
|
47
|
+
match_count = 0
|
48
|
+
terms.each { |term|
|
49
|
+
if (keywords.include?(term))
|
50
|
+
match_count += 1
|
51
|
+
end
|
52
|
+
}
|
53
|
+
return match_count
|
54
54
|
end
|
55
55
|
end # class Indexer
|
56
56
|
end # module Makit
|
data/lib/makit/v1/makit.v1_pb.rb
CHANGED
@@ -1,34 +1,33 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
-
# source: lib/makit/v1/makit.v1.proto
|
4
|
-
|
5
|
-
require
|
6
|
-
|
7
|
-
require
|
8
|
-
require
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
pool
|
14
|
-
|
15
|
-
|
16
|
-
module
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# source: lib/makit/v1/makit.v1.proto
|
4
|
+
|
5
|
+
require "google/protobuf"
|
6
|
+
|
7
|
+
require "google/protobuf/timestamp_pb"
|
8
|
+
require "google/protobuf/duration_pb"
|
9
|
+
|
10
|
+
descriptor_data = "\n\x1blib/makit/v1/makit.v1.proto\x12\x08makit.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"\x92\x02\n\rDotNetProject\x12\x10\n\x08template\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06output\x18\x03 \x01(\t\x12\x10\n\x08packages\x18\x04 \x03(\t\x12\x12\n\nreferences\x18\x05 \x03(\t\x12\n\n\x02os\x18\x06 \x01(\t\x12\x10\n\x08\x63ommands\x18\x07 \x03(\t\x12-\n\nbuild_args\x18\x08 \x03(\x0b\x32\x19.makit.v1.DotNetBuildArgs\x12\x31\n\x0cpublish_args\x18\t \x03(\x0b\x32\x1b.makit.v1.DotNetPublishArgs\x12+\n\ttest_args\x18\n \x03(\x0b\x32\x18.makit.v1.DotNetTestArgs\"8\n\x0f\x44otNetBuildArgs\x12\x15\n\rconfiguration\x18\x01 \x01(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\":\n\x11\x44otNetPublishArgs\x12\x15\n\rconfiguration\x18\x01 \x01(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\"7\n\x0e\x44otNetTestArgs\x12\x15\n\rconfiguration\x18\x01 \x01(\t\x12\x0e\n\x06output\x18\x02 \x01(\t\"\xa8\x01\n\x07Project\x12\x16\n\x0egit_remote_url\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tartifacts\x18\x03 \x03(\t\x12\x32\n\x10\x63ommand_requests\x18\x04 \x03(\x0b\x32\x18.makit.v1.CommandRequest\x12\x30\n\x0f\x64otnet_projects\x18\x05 \x03(\x0b\x32\x17.makit.v1.DotNetProject\"\xa5\x01\n\x0e\x43ommandRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\targuments\x18\x02 \x03(\t\x12+\n\x07timeout\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x11\n\tdirectory\x18\x04 \x01(\t\x12\x0c\n\x04task\x18\x05 \x01(\t\x12\r\n\x05input\x18\x06 \x01(\x0c\x12\x15\n\rexit_on_error\x18\x07 \x01(\x08\"\x91\x02\n\x07\x43ommand\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\targuments\x18\x03 \x03(\t\x12\x11\n\texit_code\x18\x04 \x01(\x05\x12\r\n\x05input\x18\x05 \x01(\x0c\x12\x0e\n\x06output\x18\x06 \x01(\x0c\x12\r\n\x05\x65rror\x18\x07 \x01(\x0c\x12.\n\nstarted_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12+\n\x08\x64uration\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x0c\n\x04user\x18\n \x01(\t\x12\x0e\n\x06\x64\x65vice\x18\x0b \x01(\t\x12\n\n\x02os\x18\x0c \x01(\t\x12\x11\n\tdirectory\x18\r \x01(\t\"I\n\rConfiguration\x12\x0c\n\x04name\x18\x01 \x01(\t\x12*\n\x08\x63ommands\x18\x02 \x03(\x0b\x32\x18.makit.v1.CommandRequest\"3\n\rGitRepository\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x15\n\rrelative_path\x18\x02 \x01(\t\"h\n\x0bGitLogEntry\x12\x0e\n\x06\x63ommit\x18\x01 \x01(\t\x12\x0e\n\x06\x61uthor\x18\x02 \x01(\t\x12(\n\x04\x64\x61te\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0f\n\x07message\x18\x04 \x01(\t\"\xc8\x01\n\nMakeResult\x12\x12\n\nrepository\x18\x01 \x01(\t\x12\x0e\n\x06\x63ommit\x18\x02 \x01(\t\x12\x0e\n\x06\x62ranch\x18\x03 \x01(\t\x12\x0b\n\x03tag\x18\x04 \x01(\t\x12\x0e\n\x06\x64\x65vice\x18\x05 \x01(\t\x12\x1a\n\x12runtime_identifier\x18\x06 \x01(\t\x12#\n\x08\x63ommands\x18\x07 \x03(\x0b\x32\x11.makit.v1.Command\x12\x14\n\x0cinitial_size\x18\x08 \x01(\x05\x12\x12\n\nfinal_size\x18\t \x01(\x05\"?\n\rDotNetNewArgs\x12\x10\n\x08template\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06output\x18\x03 \x01(\t\"^\n\rManifestEntry\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x31\n\rlast_modified\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0c\n\x04size\x18\x03 \x01(\x03**\n\x08Language\x12\x08\n\x04RUBY\x10\x00\x12\n\n\x06\x43SHARP\x10\x01\x12\x08\n\x04RUST\x10\x02*,\n\x0bPackageType\x12\x07\n\x03GEM\x10\x00\x12\t\n\x05NUGET\x10\x01\x12\t\n\x05\x43RATE\x10\x03\x32H\n\x0e\x43ommandService\x12\x36\n\x07\x45xecute\x12\x18.makit.v1.CommandRequest\x1a\x11.makit.v1.Commandb\x06proto3"
|
11
|
+
|
12
|
+
pool = Google::Protobuf::DescriptorPool.generated_pool
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
14
|
+
|
15
|
+
module Makit
|
16
|
+
module V1
|
17
|
+
DotNetProject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetProject").msgclass
|
18
|
+
DotNetBuildArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetBuildArgs").msgclass
|
19
|
+
DotNetPublishArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetPublishArgs").msgclass
|
20
|
+
DotNetTestArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetTestArgs").msgclass
|
21
|
+
Project = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.Project").msgclass
|
22
|
+
CommandRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.CommandRequest").msgclass
|
23
|
+
Command = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.Command").msgclass
|
24
|
+
Configuration = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.Configuration").msgclass
|
25
|
+
GitRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.GitRepository").msgclass
|
26
|
+
GitLogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.GitLogEntry").msgclass
|
27
|
+
MakeResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.MakeResult").msgclass
|
28
|
+
DotNetNewArgs = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.DotNetNewArgs").msgclass
|
29
|
+
ManifestEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.ManifestEntry").msgclass
|
30
|
+
Language = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.Language").enummodule
|
31
|
+
PackageType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("makit.v1.PackageType").enummodule
|
32
|
+
end
|
33
|
+
end
|
data/lib/makit/version.rb
CHANGED