Commit Graph

50 Commits

Author SHA1 Message Date
kenjones
c5f80a105d Feature: Add append to array
Adds the ability to append a value to an array instead of having to
know the index of the values within the array.

Resolves: #17
2017-09-23 20:21:16 -04:00
Kenny Jones
dda9b1f087 Merge pull request #37 from kenjones-cisco/bugfix/read-yaml-array
Bugfix: Read yaml array
2017-09-23 14:04:33 -04:00
Kenny Jones
683de28c64 Merge pull request #34 from kenjones-cisco/feature/add-version
Feature: Adds support for --version
2017-09-23 14:04:18 -04:00
kenjones
51fa1a87b7 Bugfix: Read yaml array
Parsing an array into MapSlice results in `[{nil, nil}]`.
Parse into `[]map[interface{}]interface{}` allows for the processing of
top level arrays in the document.

Resolves: #23
2017-09-23 13:53:04 -04:00
kenjones
499974c27e Bugfix: Write empty array value
When the value is `[]` set the value to empty array instead of `'[]'`.

Resolves: #21
2017-09-23 09:36:17 -04:00
kenjones
72bd88cfa5 Feature: Adds support for --version
Resolves: #24
2017-09-23 01:08:39 -04:00
kenjones
6980be3800 Feature: Adds merge command
Adds merge command for merging multiple yaml files together.

Resolves: #31
2017-09-23 14:45:59 +10:00
kenjones
cf2f23d747 Bugfix: Resolve failing acceptance test 2017-09-22 23:58:50 -04:00
kenjones
53b2c64747 Task: Increase test coverage, includes refactor
Adds test cases to increase test coverage.
Refactors code to enable adding tests by reducing the number of
locations where `os.Exit()` is called from.
2017-09-22 23:01:46 -04:00
kenjones
86639acf70 Task: Simplify development
The base directory has all shell scripts in scripts/
and all example/test files in examples/.
A Makefile provides all the commands with helpful information.
If a developer simply types `make` then vendor is properly updated,
the code is formatted, linted, tested, built, acceptance test run,
and installed.

Linting errors resolved.
Ignored test case (`TestParsePath`) updated to work as expected.
2017-09-23 08:37:34 +10:00
Mike Farah
1ed8e7017e Can create arrays 2017-08-08 17:04:30 +10:00
Mike Farah
5514d2300b Can update arrays 2017-08-08 16:55:57 +10:00
Mike Farah
5bb0934710 Handle arrays and strings when reading 2017-08-08 16:42:11 +10:00
Mike Farah
cdd78af4bc Fixed bug #11: Inability to set field to empty string 2017-06-06 10:19:32 +10:00
Mike Farah
b2a0964de2 switched from godeps to govendor, now supports new 'vendor' folder 2017-05-03 09:19:55 +10:00
Mike Farah
ec25886528 Removed redundant code, updated doc w.r.t reading json files 2017-04-19 15:45:45 +10:00
Mike Farah
c2000a446b Fixed writeCommands to maintain the same execution as was read in 2017-04-18 15:55:43 +10:00
Mike Farah
82f1230db8 Added "new" command for creating new yaml 2017-04-12 21:10:00 +10:00
Mike Farah
a3190f1504 Refactor write to allow new entries 2017-04-12 20:25:13 +10:00
Mike Farah
44ee869e47 Maintain order 2017-02-27 09:09:29 +11:00
Mike Farah
6b566fd983 Refactored code 2015-10-13 21:42:36 +11:00
Mike Farah
c955815aab Added json input functionality 2015-10-11 17:06:52 +11:00
Mike Farah
3720bf8211 Added json output functionality 2015-10-11 10:00:22 +11:00
Mike Farah
98751cf607 Using godeps 2015-10-10 12:57:11 +11:00
Mike Farah
2ec3b59da2 Added more help info about using write with an update script 2015-10-09 21:30:15 +11:00
Mike Farah
56c923228d Fixed bug when using write command
Added more tests to avoid bugs ;)
2015-10-09 21:24:42 +11:00
mfarah
15f51d4bf0 Can update a yaml file from an instruction yaml file 2015-10-08 10:31:31 +11:00
mfarah
955ecc2547 Removed usage of log 2015-10-06 16:39:19 +11:00
mfarah
1d5fbd5ad0 Use cobra for cli for nicer cli-ness 2015-10-06 16:17:28 +11:00
mfarah
8409be1cdf Removed debug printLn 2015-10-05 16:02:07 +11:00
mfarah
c03c4813d4 Can read from STDIN 2015-10-05 15:48:34 +11:00
Mike Farah
6823d43325 Added ability to update yaml files inplace 2015-10-03 18:28:30 +10:00
Mike Farah
3a90629822 Remove trim flag as its not properly supported by the cli package 2015-10-03 17:48:54 +10:00
Mike Farah
8aa69fc9ba Handles quoted values when writing 2015-10-03 17:25:13 +10:00
Mike Farah
c4af37ed68 Custom path parsing 2015-10-03 17:04:12 +10:00
Mike Farah
01845ea923 Split code 2015-10-02 09:05:13 +10:00
Mike Farah
58bdb3ed21 Checking forceString parameter now less strict 2015-10-02 08:50:08 +10:00
mfarah
c1b803364a Now attempts to parse the write value type 2015-10-01 10:50:15 +10:00
Mike Farah
364c1a8af3 Can update yam to stdout 2015-09-29 16:29:32 +10:00
Mike Farah
2a0290aeac updated help 2015-09-29 11:05:28 +10:00
Mike Farah
eeb16443d4 Can update simple properties (to stdout) 2015-09-29 10:56:28 +10:00
Mike Farah
eebd319246 Nicely formats output 2015-09-29 10:56:12 +10:00
mfarah
0c5188acb5 Added prechecking script, fixed lint errors 2015-09-28 13:17:51 +10:00
mfarah
9869a41122 gofmt'ed 2015-09-28 13:17:51 +10:00
Mike Farah
1234215037 Can handle arrays 2015-09-28 13:17:50 +10:00
Mike Farah
6a35a5f382 Simplified code 2015-09-27 13:29:12 +10:00
Mike Farah
b1c670e121 First cut - can recursively read yaml! 2015-09-27 13:11:10 +10:00
Mike Farah
da31cbe672 Added cli niceness 2015-09-27 09:38:44 +10:00
Mike Farah
c4bc70955e Reads from file 2015-09-27 08:20:42 +10:00
Mike Farah
c00f686a74 init 2015-09-27 08:15:49 +10:00