Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix examples #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Examples/AskExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ print("\nYour age is \(age)\n")
// Ask with validation
let name = ask("Who are you?") { settings in
settings.addInvalidCase("Snuffles is not allowed") { value in
value.containsString("Snuffles")
value.contains("Snuffles")
}
}
print("\nYour are \(name)\n")
Expand Down
2 changes: 1 addition & 1 deletion Examples/ChooseExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ let choice3 = choose("Whats your favorite programming language? ", type: String.
//choice value will be set to BAD
settings.addChoice("Java") { "BAD" }

settings.index = .Letters
settings.index = .letters
settings.indexSuffix = " ----> "
}
print("Your choice is \(choice3)")
6 changes: 3 additions & 3 deletions Examples/EnvAndArgs.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Swiftline

// print(Env.get("PWD")!)
print("All Environment Variables")
print(Env.keys.joinWithSeparator("\n"))
print(Env.keys.joined(separator: "\n"))

print("\nPrinting value of PWD")
print(Env.get("PWD")!)
Expand All @@ -14,6 +14,6 @@ print("\nPrint all Arguments")
print(Args.all)

print("\nPrint parsed Arguments")
print(Args.parsed.flags["target"]!)
print(Args.parsed.flags["framework"]!)
print(Args.parsed.flags["target"] as Any)
print(Args.parsed.flags["framework"] as Any)
print(Args.parsed.parameters)
6 changes: 3 additions & 3 deletions Examples/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
platform :osx, '10.10'
plugin 'cocoapods-rome'

pod 'Swiftline', :path => '../Swiftline.podspec'
pod 'Quick', '~> 0.8.0'
pod 'Nimble', '~> 3.0.0'
target 'Examples' do
pod 'Swiftline', :path => '../Swiftline.podspec'
end