Skip to content

Commit

Permalink
Merge pull request #27 from Ether-CLI/develop
Browse files Browse the repository at this point in the history
Fixed Package Data Fetch Hanging
  • Loading branch information
calebkleveter authored Jun 15, 2018
2 parents 4045282 + fb62b47 commit 64232f1
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 17 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [2018.06.15]

### Added
- `remove` and `version set` commands are case-insensitive.

### Fixed
- Some problem where the package data fetch would hang.

## [2018.05.25]

### Added
Expand Down
24 changes: 12 additions & 12 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,35 @@
"repositoryURL": "https://github.com/vapor/core.git",
"state": {
"branch": null,
"revision": "a909eccc41941faac6fb9e511cdb9a5cb30a05de",
"version": "3.1.7"
"revision": "e5582911ed940289212a36321e15ec561d947dbe",
"version": "3.3.0"
}
},
{
"package": "Crypto",
"repositoryURL": "https://github.com/vapor/crypto.git",
"state": {
"branch": null,
"revision": "1b8c2ba5a42f1adf2aa812204678d8b16466fa59",
"version": "3.1.2"
"revision": "4b85405430df1892ee3aa1554bdb477e96cf46ad",
"version": "3.2.0"
}
},
{
"package": "DatabaseKit",
"repositoryURL": "https://github.com/vapor/database-kit.git",
"state": {
"branch": null,
"revision": "0db303439e5ef8b6df50a2b6c4029edddee90cb0",
"version": "1.0.1"
"revision": "4ac3e7437f9b95ce32b4d970bafa590bb3579647",
"version": "1.1.0"
}
},
{
"package": "HTTP",
"repositoryURL": "https://github.com/vapor/http.git",
"state": {
"branch": null,
"revision": "5e766f72d81ef5fe8805d704efdffd17e4906134",
"version": "3.0.6"
"revision": "8123ea00e9858b369cd168d0303d33e7d3804d19",
"version": "3.0.7"
}
},
{
Expand Down Expand Up @@ -87,8 +87,8 @@
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "80363d9d8c1c572d228350ea87132bfa49c8ca03",
"version": "1.7.1"
"revision": "695afc5205aaa49fca092b94b479ff71c43d9d3c",
"version": "1.8.0"
}
},
{
Expand Down Expand Up @@ -150,8 +150,8 @@
"repositoryURL": "https://github.com/vapor/vapor.git",
"state": {
"branch": null,
"revision": "39b4d3fa36e58c6f7415c9da6c65a703bec34cea",
"version": "3.0.3"
"revision": "09faa90db7ca49d7f75d5f8e385abce93bc7afb3",
"version": "3.0.4"
}
},
{
Expand Down
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# Ether

[![Mentioned in Awesome Vapor](https://awesome.re/mentioned-badge.svg)](https://github.com/Cellane/awesome-vapor)
![Built with Swift 4.2](https://img.shields.io/badge/swift-4.2-orange.svg)


## What is it?

Expand Down Expand Up @@ -134,15 +136,36 @@ Example output:

Updating Ether [Done]

### Template
### Template Create

Saves the current state of the project as a template that can be used later when creating a new project.

ether template <name>
ether template create <name>

Example output:

Saving Template [Done]

### Template Remove

Saves the current state of the project as a template that can be used later when creating a new project.

ether template remove <name>

Example output:

Deleting Template [Done]

### Template List

Saves the current state of the project as a template that can be used later when creating a new project.

ether template list

Example output:

- Vapor
- CLI

### New

Expand Down
2 changes: 1 addition & 1 deletion Sources/Ether/Remove.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public final class Remove: Command {
let name = try context.argument("name")
let pinCount = try Manifest.current.resolved().object.pins.count

guard let pin = try Manifest.current.resolved().object.pins.filter({ $0.package == name }).first else {
guard let pin = try Manifest.current.resolved().object.pins.filter({ $0.package.lowercased() == name.lowercased() }).first else {
throw EtherError(identifier: "pinNotFound", reason: "No package was found with the name '\(name)'")
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/Ether/Update.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public final class Update: Command {
let updating = context.console.loadingBar(title: "Updating Ether")
_ = updating.start(on: context.container)

_ = try Process.execute("bash", ["-c", "curl https://raw.githubusercontent.com/calebkleveter/Ether/master/install.sh | bash"])
_ = try Process.execute("bash", ["-c", "curl https://raw.githubusercontent.com/Ether-CLI/Ether/master/install.sh | bash"])

updating.succeed()
self.printEtherArt(with: context.console)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Ether/Version/VersionSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public final class VersionSet: Command {
let version = try context.argument("version")
let versionLitteral = try self.version(from: context.options, with: version)

guard let url = try Manifest.current.resolved().object.pins.filter({ $0.package == package }).first?.repositoryURL else {
guard let url = try Manifest.current.resolved().object.pins.filter({ $0.package.lowercased() == package.lowercased() }).first?.repositoryURL else {
throw EtherError(identifier: "pinNotFound", reason: "No pin entry found for package name '\(package)'")
}
guard let dependency = try Manifest.current.dependency(withURL: url) else {
Expand Down

0 comments on commit 64232f1

Please sign in to comment.