sbag 2.2.1 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sbag/version.rb +1 -1
- data/lib/sbag.rb +21 -27
- 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: 4b6329b12fe18fe7c208c982db3699088f15f1b3
|
4
|
+
data.tar.gz: 86035e499085d05feba35bb4bf9ae777a3e52506
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3218683cef308593a2edf73a89b55151e19929fbf9ca788b6b85b312d848440a741158e889296a683603a12d8e810ff2be961d1386b0a6ca1ca2ec5c026954b
|
7
|
+
data.tar.gz: b18571e2f57e614c5008d15fe3f5dc299fff2f05157d6a9388df1a139b0bde7e04b36f4832c0ba9a67d24655b5374c70e2190fb1e69d7fa1971de344b14d819d
|
data/lib/sbag/version.rb
CHANGED
data/lib/sbag.rb
CHANGED
@@ -8,8 +8,8 @@ module Sbag
|
|
8
8
|
|
9
9
|
class C < Thor
|
10
10
|
#New File Command =====================================>>>
|
11
|
-
desc "newfile", "Create a new file"
|
12
|
-
method_option :newfile, :aliases => "-c" , :desc => "Use newfile command to create new file.
|
11
|
+
desc "newfile", "Create a new file. Usage: console newfile [file_name].[file_extension]"
|
12
|
+
method_option :newfile, :aliases => "-c" , :desc => "Use newfile command to create new file."
|
13
13
|
|
14
14
|
def newfile(file)
|
15
15
|
new_file = File.new("#{file}","w+")
|
@@ -18,8 +18,8 @@ method_option :newfile, :aliases => "-c" , :desc => "Use newfile command to crea
|
|
18
18
|
#========================END===============================#
|
19
19
|
|
20
20
|
#Delete File Command =====================================>>>
|
21
|
-
desc "delfile", "Delete the existing file"
|
22
|
-
method_option :delfile, :aliases => "-d", :desc => "Use delfile command to delete existing file.
|
21
|
+
desc "delfile", "Delete the existing file. Usage: console delfile [file_name].[file_extension]"
|
22
|
+
method_option :delfile, :aliases => "-d", :desc => "Use delfile command to delete existing file."
|
23
23
|
|
24
24
|
def delfile(file)
|
25
25
|
File.delete("#{file}")
|
@@ -28,8 +28,8 @@ method_option :delfile, :aliases => "-d", :desc => "Use delfile command to delet
|
|
28
28
|
#========================END===============================#
|
29
29
|
|
30
30
|
#Time Display Command =====================================>>>
|
31
|
-
desc "time" , "Display current time"
|
32
|
-
method_option :time, :aliases => "-t", :desc => "Use time command to display the current time"
|
31
|
+
desc "time" , "Display current time. Usage: console time"
|
32
|
+
method_option :time, :aliases => "-t", :desc => "Use time command to display the current time."
|
33
33
|
|
34
34
|
def time
|
35
35
|
time = Time.now
|
@@ -38,8 +38,8 @@ method_option :time, :aliases => "-t", :desc => "Use time command to display the
|
|
38
38
|
#========================END===============================#
|
39
39
|
|
40
40
|
#Current Location Command =====================================>>>
|
41
|
-
desc "locate", "Current directory or folder path"
|
42
|
-
method_option :locate, :aliases => "-loc", :desc => "Use locate command to find the current directory or folder path"
|
41
|
+
desc "locate", "Current directory or folder path. Usage: console locate"
|
42
|
+
method_option :locate, :aliases => "-loc", :desc => "Use locate command to find the current directory or folder path."
|
43
43
|
|
44
44
|
def locate
|
45
45
|
location = Dir.pwd
|
@@ -48,8 +48,8 @@ method_option :locate, :aliases => "-loc", :desc => "Use locate command to find
|
|
48
48
|
#========================END===============================#
|
49
49
|
|
50
50
|
#Make new Directory Command =====================================>>>
|
51
|
-
desc "newdir", "Create a new directory or folder"
|
52
|
-
method_option :newdir, :aliases => "-nd", :desc => "Use newdir command to create a new directory or folder in the current path"
|
51
|
+
desc "newdir", "Create a new directory or folder. Usage: console newdir [dir_name]"
|
52
|
+
method_option :newdir, :aliases => "-nd", :desc => "Use newdir command to create a new directory or folder in the current path."
|
53
53
|
|
54
54
|
def newdir(new_dir)
|
55
55
|
Dir.mkdir("#{new_dir}")
|
@@ -59,18 +59,18 @@ method_option :newdir, :aliases => "-nd", :desc => "Use newdir command to create
|
|
59
59
|
#========================END===============================#
|
60
60
|
|
61
61
|
#Directory Listing Command =====================================>>>
|
62
|
-
desc "
|
63
|
-
method_option :
|
62
|
+
desc "list", "Files and directory Listing Command. Usage: console list"
|
63
|
+
method_option :list, :aliases => "-list", :desc => "Use entries command to list all the files and directories in current path."
|
64
64
|
|
65
|
-
def
|
65
|
+
def list
|
66
66
|
location = Dir.pwd
|
67
67
|
puts "#{location}".green
|
68
68
|
end
|
69
69
|
#========================END===============================#
|
70
70
|
|
71
71
|
#Delete Directory Command =====================================>>>
|
72
|
-
desc "deldir", "Delete directory or folder Command"
|
73
|
-
method_option :deldir, :aliases => "-ddir", :desc => "Use deldir command to delete the folder and directory in current path"
|
72
|
+
desc "deldir", "Delete directory or folder Command. Usage: console deldir [dir_name]"
|
73
|
+
method_option :deldir, :aliases => "-ddir", :desc => "Use deldir command to delete the folder and directory in current path."
|
74
74
|
|
75
75
|
def deldir(del_dir)
|
76
76
|
Dir.delete("#{del_dir}")
|
@@ -79,9 +79,9 @@ method_option :deldir, :aliases => "-ddir", :desc => "Use deldir command to dele
|
|
79
79
|
#========================END===============================#
|
80
80
|
|
81
81
|
# start command Starts===================================>>>
|
82
|
-
desc "start" ,"Initialize empty Kit depository in the current project folder"
|
82
|
+
desc "start" ,"Initialize empty Kit depository in the current project folder. Usage: console start"
|
83
83
|
|
84
|
-
method_option :start, :aliases => "-start" , :desc => "Use kit init command to make a directory of content in Kit depository.
|
84
|
+
method_option :start, :aliases => "-start" , :desc => "Use kit init command to make a directory of content in Kit depository."
|
85
85
|
|
86
86
|
def start(new_depository = 'kit')
|
87
87
|
|
@@ -101,9 +101,9 @@ method_option :start, :aliases => "-start" , :desc => "Use kit init command to m
|
|
101
101
|
# init command Ends===================================>>>
|
102
102
|
|
103
103
|
# clone command Starts=================================>>>
|
104
|
-
desc "clone", "Copy the project on which you want to work"
|
104
|
+
desc "clone", "Copy the project on which you want to work. Usage: console clone [url]"
|
105
105
|
|
106
|
-
method_option :clone , :alises => "-clone" , :desc => "Use the kit clone
|
106
|
+
method_option :clone , :alises => "-clone" , :desc => "Use the kit clone command with URL of the project you want to copy."
|
107
107
|
|
108
108
|
def clone(url)
|
109
109
|
|
@@ -117,25 +117,18 @@ method_option :clone , :alises => "-clone" , :desc => "Use the kit clone [URL] c
|
|
117
117
|
|
118
118
|
result, error = MDownloader.download(url, path, options) do |report|
|
119
119
|
puts "Progress:#{report[:percent]}% Cloning:#{report[:min]} #{url} #{report[:sec]}"
|
120
|
-
|
121
120
|
end
|
122
|
-
|
123
121
|
if result
|
124
|
-
|
125
122
|
puts 'Cloning Finished!'
|
126
|
-
|
127
123
|
else
|
128
|
-
|
129
124
|
puts 'Error in cloning #{url}'
|
130
125
|
puts error
|
131
|
-
|
132
126
|
end
|
133
|
-
|
134
127
|
end
|
135
128
|
# clone command Ends=====================================>>>
|
136
129
|
|
137
130
|
# add command Starts=====================================>>>
|
138
|
-
desc "add" ,"Add file contents to your project before you can make them. Usage : add [version number]
|
131
|
+
desc "add" ,"Add file contents to your project before you can make them. Usage : add [version number]"
|
139
132
|
|
140
133
|
method_option :add , :alises => "-add", :desc => "Use the kit add command to intially add the file to your current project, but even if the file is already tracked"
|
141
134
|
|
@@ -185,6 +178,7 @@ method_option :add , :alises => "-add", :desc => "Use the kit add command to int
|
|
185
178
|
end
|
186
179
|
end
|
187
180
|
# add command Ends=======================================>>>
|
181
|
+
|
188
182
|
# status command Starts====================================>>>>
|
189
183
|
desc "status" , "Status checking command. Usage status [version_no] [file_name]"
|
190
184
|
method_option :status, :aliases => "-status", :desc => "Use this command to compare the two files"
|