Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton committed Jan 28, 2020
1 parent 89320ee commit f595edd
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func main() {
## Proxy
By default, Ferret does not use any proxies. Partially, due to inability to force Chrome/Chromium (or any other Chrome Devtools Protocol compatible browser) to use a prticular proxy. It should be done during a browser launch.
By default, Ferret does not use any proxies. Partially, due to inability to force Chrome/Chromium (or any other Chrome Devtools Protocol compatible browser) to use a particular proxy. It should be done during a browser launch.
But you can pass an address of a proxy server you want to use for static pages.
Expand Down
2 changes: 1 addition & 1 deletion pkg/compiler/compiler_collect_into_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func TestCollectInto(t *testing.T) {
So(string(out), ShouldEqual, `[{"gender":"f","values":[{"active":true},{"active":true}]},{"gender":"m","values":[{"active":true},{"active":true},{"active":false}]}]`)
})

Convey("Should create custom projection grouped by miltiple keys", t, func() {
Convey("Should create custom projection grouped by multiple keys", t, func() {
c := compiler.New()

prog, err := c.Compile(`
Expand Down
2 changes: 1 addition & 1 deletion pkg/compiler/compiler_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func TestForFilter(t *testing.T) {
So(string(out), ShouldEqual, `[5,6,5]`)
})

Convey("Should call funcions", t, func() {
Convey("Should call functions", t, func() {
c := compiler.New()
counterA := 0
counterB := 0
Expand Down
50 changes: 25 additions & 25 deletions pkg/stdlib/datetime/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,37 @@ import (
)

var (
isFloat = values.NewBoolean(true)
beginingEpoch = values.NewDateTime(time.Time{})
isFloat = values.NewBoolean(true)
beginningEpoch = values.NewDateTime(time.Time{})
)

func TestDiff(t *testing.T) {
tcs := []*testCase{
&testCase{
Name: "when less then 3 arguments",
Expected: values.NewInt(1),
Args: []core.Value{beginingEpoch},
Args: []core.Value{beginningEpoch},
ShouldErr: true,
},
&testCase{
Name: "when more then 4 arguments",
Expected: values.NewInt(1),
Args: []core.Value{beginingEpoch, beginingEpoch, beginingEpoch, beginingEpoch, beginingEpoch},
Args: []core.Value{beginningEpoch, beginningEpoch, beginningEpoch, beginningEpoch, beginningEpoch},
ShouldErr: true,
},
&testCase{
Name: "when wrong type argument",
Expected: values.NewInt(1),
Args: []core.Value{beginingEpoch, beginingEpoch, beginingEpoch},
Args: []core.Value{beginningEpoch, beginningEpoch, beginningEpoch},
ShouldErr: true,
},
&testCase{
Name: "when the difference is 1 year and 1 month (int)",
Expected: values.NewInt(1),
Args: []core.Value{
beginingEpoch,
beginningEpoch,
values.NewDateTime(
beginingEpoch.AddDate(1, 1, 0),
beginningEpoch.AddDate(1, 1, 0),
),
values.NewString("y"),
},
Expand All @@ -50,9 +50,9 @@ func TestDiff(t *testing.T) {
Name: "when the difference is 1 year and 1 month (float)",
Expected: values.NewFloat(1.084931506849315),
Args: []core.Value{
beginingEpoch,
beginningEpoch,
values.NewDateTime(
beginingEpoch.AddDate(1, 1, 0),
beginningEpoch.AddDate(1, 1, 0),
),
values.NewString("year"),
isFloat,
Expand All @@ -62,9 +62,9 @@ func TestDiff(t *testing.T) {
Name: "when date1 after date2 (int)",
Expected: values.NewInt(2),
Args: []core.Value{
beginingEpoch,
beginningEpoch,
values.NewDateTime(
beginingEpoch.Add(-time.Hour * 48),
beginningEpoch.Add(-time.Hour * 48),
),
values.NewString("d"),
},
Expand All @@ -73,9 +73,9 @@ func TestDiff(t *testing.T) {
Name: "when date1 after date2 (float)",
Expected: values.NewFloat(2),
Args: []core.Value{
beginingEpoch,
beginningEpoch,
values.NewDateTime(
beginingEpoch.Add(-time.Hour * 48),
beginningEpoch.Add(-time.Hour * 48),
),
values.NewString("d"),
isFloat,
Expand All @@ -85,17 +85,17 @@ func TestDiff(t *testing.T) {
Name: "when dates are equal (int)",
Expected: values.NewInt(0),
Args: []core.Value{
beginingEpoch,
beginingEpoch,
beginningEpoch,
beginningEpoch,
values.NewString("i"),
},
},
&testCase{
Name: "when dates are equal (float)",
Expected: values.NewFloat(0),
Args: []core.Value{
beginingEpoch,
beginingEpoch,
beginningEpoch,
beginningEpoch,
values.NewString("y"),
isFloat,
},
Expand All @@ -115,9 +115,9 @@ func TestDiff(t *testing.T) {
Name: "When difference is 1 " + unit + " (int)",
Expected: values.NewInt(1),
Args: []core.Value{
beginingEpoch,
beginningEpoch,
values.NewDateTime(
beginingEpoch.AddDate(dates[0], dates[1], dates[2]),
beginningEpoch.AddDate(dates[0], dates[1], dates[2]),
),
values.NewString(unit),
},
Expand All @@ -126,9 +126,9 @@ func TestDiff(t *testing.T) {
Name: "When difference is 1 " + unit + " (float)",
Expected: values.NewFloat(1),
Args: []core.Value{
beginingEpoch,
beginningEpoch,
values.NewDateTime(
beginingEpoch.AddDate(dates[0], dates[1], dates[2]),
beginningEpoch.AddDate(dates[0], dates[1], dates[2]),
),
values.NewString(unit),
isFloat,
Expand All @@ -150,9 +150,9 @@ func TestDiff(t *testing.T) {
Name: "When difference is 1 " + unit + " (int)",
Expected: values.NewInt(1),
Args: []core.Value{
beginingEpoch,
beginningEpoch,
values.NewDateTime(
beginingEpoch.Add(durn),
beginningEpoch.Add(durn),
),
values.NewString(unit),
},
Expand All @@ -161,9 +161,9 @@ func TestDiff(t *testing.T) {
Name: "When difference is 1 " + unit + " (int)",
Expected: values.NewFloat(1),
Args: []core.Value{
beginingEpoch,
beginningEpoch,
values.NewDateTime(
beginingEpoch.Add(durn),
beginningEpoch.Add(durn),
),
values.NewString(unit),
isFloat,
Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/datetime/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/pkg/errors"
)

// Unit specifies an unit of time (Millsecond, Second...).
// Unit specifies an unit of time (Millisecond, Second...).
type Unit int

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/math/percentile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
. "github.com/smartystreets/goconvey/convey"
)

func TestPrecentile(t *testing.T) {
func TestPercentile(t *testing.T) {
Convey("Should return nth percentile value", t, func() {
out, err := math.Percentile(
context.Background(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/math/variance.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func variance(input *values.Array, sample values.Int) values.Float {

// When getting the mean of the squared differences
// "sample" will allow us to know if it's a sample
// or population and wether to subtract by one or not
// or population and whether to subtract by one or not
l := values.Float(input.Length() - (1 * sample))

return variance / l
Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/objects/keep_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func TestKeepKeys(t *testing.T) {
Convey("When not enought arguments)", t, func() {
Convey("When not enough arguments)", t, func() {
// there is no object
obj, err := objects.KeepKeys(context.Background())

Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/objects/keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestKeys(t *testing.T) {
So(int(keysArray.Length()), ShouldEqual, 0)
})

Convey("When not enought arguments", t, func() {
Convey("When not enough arguments", t, func() {
_, err := objects.Keys(context.Background())

So(err, ShouldBeError)
Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/objects/merge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

func TestMerge(t *testing.T) {
Convey("When not enought arguments", t, func() {
Convey("When not enough arguments", t, func() {
obj, err := objects.Merge(context.Background())

So(err, ShouldBeError)
Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/objects/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func Zip(_ context.Context, args ...core.Value) (core.Value, error) {
keys.ForEach(func(key core.Value, idx int) bool {
k = key.(values.String)

// this is necessary to impelement ArangoDB's behavior.
// this is necessary to implement ArangoDB's behavior.
// in ArangoDB the first value in values is
// associated with each key. Ex.:
// -- query --
Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/strings/fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func format(template string, args []core.Value) (string, error) {

if betweenBrackets == "" {
if argsCount <= lastArgIdx {
err = errors.Errorf("not enought arguments")
err = errors.Errorf("not enough arguments")
return ""
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/strings/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func RegexSplit(_ context.Context, args ...core.Value) (core.Value, error) {
return res, nil
}

// RegexTest test wether the regexp has at least one match in the given text.
// RegexTest test whether the regexp has at least one match in the given text.
// @param text (String) - The string to split.
// @param regex (String) - A regular expression to use for splitting the text.
// @param caseInsensitive (Boolean) - If set to true, the matching will be case-insensitive. The default is false.
Expand Down
2 changes: 1 addition & 1 deletion pkg/stdlib/strings/split.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

// Split splits the given string value into a list of strings, using the separator.
// @params text (String) - The string to split.
// @params separator (String) - The sperator.
// @params separator (String) - The separator.
// @params limit (Int) - Limit the number of split values in the result. If no limit is given, the number of splits returned is not bounded.
// @returns strings (Array<String>) - Array of strings.
func Split(_ context.Context, args ...core.Value) (core.Value, error) {
Expand Down

0 comments on commit f595edd

Please sign in to comment.