Skip to content

Commit

Permalink
client,cmd/snap: s/add/install/:-(
Browse files Browse the repository at this point in the history
  • Loading branch information
chipaca committed Feb 29, 2016
1 parent 7e47fc7 commit a7d29f3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions client/snap_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"strings"
)

// AddSnap adds the snap with the given name, returning the UUID of the
// InstallSnap adds the snap with the given name, returning the UUID of the
// background operation upon success.
func (client *Client) AddSnap(name string) (string, error) {
func (client *Client) InstallSnap(name string) (string, error) {
path := fmt.Sprintf("/2.0/snaps/%s", name)
body := strings.NewReader(`{"action":"install"}`)

Expand Down
2 changes: 1 addition & 1 deletion client/snap_op_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var ops = []struct {
op func(*client.Client, string) (string, error)
action string
}{
{(*client.Client).AddSnap, "install"},
{(*client.Client).InstallSnap, "install"},
{(*client.Client).RemoveSnap, "remove"},
{(*client.Client).RefreshSnap, "update"},
{(*client.Client).PurgeSnap, "purge"},
Expand Down
8 changes: 4 additions & 4 deletions cmd/snap/cmd_snap_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func wait(client *client.Client, uuid string) error {
}

var (
shortAddHelp = i18n.G("Add a snap to the system")
shortInstallHelp = i18n.G("Install a snap to the system")
shortRemoveHelp = i18n.G("Remove a snap from the system")
shortPurgeHelp = i18n.G("Purge a snap's data from the system")
shortRefreshHelp = i18n.G("Refresh a snap in the system")
Expand All @@ -51,8 +51,8 @@ var (
shortDeactivateHelp = i18n.G("Deactivate an installed active snap")
)

var longAddHelp = i18n.G(`
The add command installs and activates the named snap in the system.
var longInstallHelp = i18n.G(`
The install command installs and activates the named snap in the system.
`)

var longRemoveHelp = i18n.G(`
Expand Down Expand Up @@ -100,7 +100,7 @@ func init() {
long string
op func(*client.Client, string) (string, error)
}{
{"add", shortAddHelp, longAddHelp, (*client.Client).AddSnap},
{"install", shortInstallHelp, longInstallHelp, (*client.Client).InstallSnap},
{"remove", shortRemoveHelp, longRemoveHelp, (*client.Client).RemoveSnap},
{"purge", shortPurgeHelp, longPurgeHelp, (*client.Client).PurgeSnap},
{"refresh", shortRefreshHelp, longRefreshHelp, (*client.Client).RefreshSnap},
Expand Down
4 changes: 2 additions & 2 deletions cmd/snap/cmd_snap_op_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
snap "github.com/ubuntu-core/snappy/cmd/snap"
)

func (s *SnapSuite) TestAdd(c *check.C) {
func (s *SnapSuite) TestInstall(c *check.C) {
n := 0
s.RedirectClientToTestServer(func(w http.ResponseWriter, r *http.Request) {
switch n {
Expand All @@ -54,7 +54,7 @@ func (s *SnapSuite) TestAdd(c *check.C) {

n++
})
rest, err := snap.Parser().ParseArgs([]string{"add", "foo.bar"})
rest, err := snap.Parser().ParseArgs([]string{"install", "foo.bar"})
c.Assert(err, check.IsNil)
c.Assert(rest, check.DeepEquals, []string{})
c.Check(s.Stdout(), check.Equals, "")
Expand Down
16 changes: 8 additions & 8 deletions po/snappy.pot
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr "Project-Id-Version: snappy\n"
"Report-Msgid-Bugs-To: snappy-devel@lists.ubuntu.com\n"
"POT-Creation-Date: 2016-02-24 13:31+0100\n"
"POT-Creation-Date: 2016-02-29 13:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -65,9 +65,6 @@ msgstr ""
msgid "Activate a snap that is installed but inactive"
msgstr ""

msgid "Add a snap to the system"
msgstr ""

msgid "Adds a plug to the system"
msgstr ""

Expand Down Expand Up @@ -179,6 +176,9 @@ msgstr ""
msgid "Install a snap package"
msgstr ""

msgid "Install a snap to the system"
msgstr ""

msgid "Install snaps even if the signature can not be verified."
msgstr ""

Expand Down Expand Up @@ -436,10 +436,6 @@ msgid "\n"
"Snaps that are not active don't have their apps available for use.\n"
msgstr ""

msgid "\n"
"The add command installs and activates the named snap in the system.\n"
msgstr ""

msgid "\n"
"The add-plug command adds a new plug to the system.\n"
"\n"
Expand Down Expand Up @@ -510,6 +506,10 @@ msgid "\n"
"The find command queries the store for available packages.\n"
msgstr ""

msgid "\n"
"The install command installs and activates the named snap in the system.\n"
msgstr ""

msgid "\n"
"The interfaces command lists interfaces available in the system.\n"
"\n"
Expand Down

0 comments on commit a7d29f3

Please sign in to comment.