cli-framework 0.0.1 → 0.0.2
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/bin/cli +8 -5
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7634453ae2a96d38d3fcf28e7f4e369b1bda52bf
|
|
4
|
+
data.tar.gz: afe1baabb325058fc0ec8415b9bae256c577784f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 296eb9414931ce12709aef85d5717541a3802cfc725a7d56b1b0448ba19add5e1f4088dd87dcd8ecc0933319eaf6e52a2a309e8f3075902d6be14b30e1dd551c
|
|
7
|
+
data.tar.gz: f8fb2b5445915370f3511b154ac04145512b252453a9f7ac97195542caadfee66225acef4bf14b0b0f462b0fa66be2f08f12a763b25a10361b723f65456db647
|
data/bin/cli
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
#
|
|
4
4
|
module CommandLineConfig
|
|
5
5
|
Name ||= "cli"
|
|
6
|
-
|
|
6
|
+
GemName ||= "cli-framework"
|
|
7
|
+
Version ||= "0.0.2"
|
|
7
8
|
Color ||= 'yellow'
|
|
8
|
-
|
|
9
|
+
Else ||= "help"
|
|
9
10
|
BeforeInit ||= ['check.rb'] #execute scripts before initilatizing the cli
|
|
10
11
|
Special ||= [['-v','version'], ['-help','help']]
|
|
11
12
|
end
|
|
@@ -522,7 +523,7 @@ class CommandLineInterface
|
|
|
522
523
|
@name = CommandLineConfig::Name
|
|
523
524
|
@version = CommandLineConfig::Version
|
|
524
525
|
@color = CommandLineConfig::Color || "blue"
|
|
525
|
-
@otherwise = CommandLineConfig::
|
|
526
|
+
@otherwise = CommandLineConfig::Else || "help"
|
|
526
527
|
@commandInput = Inputs.new
|
|
527
528
|
@first_argument = Inputs.all[0].show if Inputs.all[0]
|
|
528
529
|
|
|
@@ -983,12 +984,14 @@ class NewAction < CommandLine::Action
|
|
|
983
984
|
# modify the configuration file so it matches the name
|
|
984
985
|
File.open("#{arguments['name']}/lib/configuration.rb", 'a') { |d| ;
|
|
985
986
|
d.truncate(0) # erase all the content of a file
|
|
986
|
-
d.print "
|
|
987
|
+
d.print "module CommandLineConfig", "\n"
|
|
987
988
|
d.print " Name ||= '#{arguments['name']}'","\n"
|
|
989
|
+
d.print " GemName ||= '#{arguments['name']}'","\n"
|
|
988
990
|
d.print " Color ||= 'blue'", "\n"
|
|
989
991
|
d.print " Version ||= '0.0.0'","\n"
|
|
990
|
-
d.print " Else ||= help","\n"
|
|
992
|
+
d.print " Else ||= 'help'","\n"
|
|
991
993
|
d.print " Special ||= [['-v','version'], ['-help','help']]","\n"
|
|
994
|
+
d.print " BeforeInit ||= ['check.rb'] ", "\n"
|
|
992
995
|
d.print "end"
|
|
993
996
|
}
|
|
994
997
|
# enter the folder and modify git
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cli-framework
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ilias Bhallil
|
|
@@ -33,7 +33,7 @@ extensions: []
|
|
|
33
33
|
extra_rdoc_files: []
|
|
34
34
|
files:
|
|
35
35
|
- bin/cli
|
|
36
|
-
homepage: http://
|
|
36
|
+
homepage: http://iliasbhal.github.com
|
|
37
37
|
licenses: []
|
|
38
38
|
metadata: {}
|
|
39
39
|
post_install_message:
|