cli-framework 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cli +2 -43
- 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: 3a40fe777fc3aa2fd48d6455036cc52d975e9b33
|
4
|
+
data.tar.gz: 8dadac809108e04b8e584c3dd4d5b07689d793c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 507e2dee17e44497ac64352b517ee20e36abdafcb6394bdedba8bf44076eb50fe8151e4eae6773ccaa9dea75ab388828cd3f64ef54c3d053e4c7db50f10987b2
|
7
|
+
data.tar.gz: b7e1d9d9c68778959e724bcb9a609b22bfbc7123e2919ffef396a31b92746390fb1840243a532ddea8f559f5acae7cfa4ef75aa6c50febd5234b8c17e4ebbec2
|
data/bin/cli
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
module CommandLineConfig
|
5
5
|
Name ||= "cli"
|
6
6
|
GemName ||= "cli-framework"
|
7
|
-
Version ||= "0.0.
|
7
|
+
Version ||= "0.0.3"
|
8
8
|
Color ||= 'yellow'
|
9
9
|
Else ||= "help"
|
10
10
|
BeforeInit ||= ['check.rb'] #execute scripts before initilatizing the cli
|
@@ -1008,53 +1008,12 @@ class NewAction < CommandLine::Action
|
|
1008
1008
|
end
|
1009
1009
|
|
1010
1010
|
|
1011
|
-
class ServerAction < CommandLine::Action
|
1012
|
-
register description: "launch a server localy with power :)",
|
1013
|
-
params: ["port"],
|
1014
|
-
options: [['-d -deploy','deploy'], ['-i','international']]
|
1015
|
-
|
1016
|
-
|
1017
|
-
def action inputs, arguments, options, namespaces
|
1018
|
-
Input.ask question: "what is your name ?",
|
1019
|
-
dialogue: "[?] Serverless: ",
|
1020
|
-
default: 'john'
|
1021
|
-
|
1022
|
-
Input.ask question: "what is your name ?",
|
1023
|
-
dialogue: "[?] Serverless: ",
|
1024
|
-
type: 'password', # can be confirm / password or just nothing
|
1025
|
-
default: 'john'
|
1026
|
-
|
1027
|
-
Input.ask question: "what is your name ?",
|
1028
|
-
dialogue: "[?] Serverless: ",
|
1029
|
-
type: 'confirm', # YyTt FfNn
|
1030
|
-
default: 'Y/N'
|
1031
|
-
|
1032
|
-
Choice.ask question: 'select from below:', default: 0,
|
1033
|
-
dialogue: "[?] Serverless: ",
|
1034
|
-
multiple: true,
|
1035
|
-
choices: [
|
1036
|
-
{ name: 'choice one', description: " # not a good choice :p",as: 'jehe'},
|
1037
|
-
{ name: 'choice two'},
|
1038
|
-
{ name: 'choice one', description: " # not a good choice :p"},
|
1039
|
-
{ name: 'choice two'},
|
1040
|
-
{ name: 'choice one', description: " # not a good choice :p"},
|
1041
|
-
{ name: 'choice two'},
|
1042
|
-
{ name: 'choice one', description: " # not a good choice :p"},
|
1043
|
-
{ name: 'choice two'}
|
1044
|
-
]
|
1045
|
-
end
|
1046
|
-
end
|
1047
|
-
|
1048
1011
|
class VersionAction < CommandLine::Action
|
1049
1012
|
register description: "return the version on the cli"
|
1050
1013
|
|
1051
1014
|
|
1052
1015
|
def action inputs, arguments, options, namespaces
|
1053
|
-
|
1054
|
-
print arguments, "\n"
|
1055
|
-
print options, "\n"
|
1056
|
-
print namespaces, "\n"
|
1057
|
-
puts CommandLineConfig::Version
|
1016
|
+
puts "#{CommandLineConfig::GemName} - #{CommandLineConfig::Version}"
|
1058
1017
|
end
|
1059
1018
|
end
|
1060
1019
|
|