summaryrefslogtreecommitdiff
path: root/spec/unit/util/instrumentation/data_spec.rb
AgeCommit message (Collapse)AuthorFilesLines
2014-02-06(maint) Change name from from_pson to from_data_hashErik Dalén1-1/+1
This is because these methods are also used for deserialization from other formats than PSON. The method for serializing a object is called to_data_hash, so makes sense to call this from_data_hash.
2014-01-14(PUP-1151) Consolidate JSON schema validationAndrew Parker1-0/+2
This adds a new matcher to the JSONMatchers to validate json against a given json-schema. All of the json schema validation now goes through this one matcher, which also handles skipping the checks on windows.
2012-09-26(Maint) Remove rspec from shebang lineJeff McCune1-1/+1
Without this patch Ruby 1.9 is still complaining loudly about trying to parse the spec files. The previous attempt to clean up this problem in edc3ddf works for Ruby 1.8 but not 1.9. I'd prefer to remove the shebang lines entirely, but doing so will cause encoding errors in Ruby 1.9. This patch strives for a happy middle ground of convincing Ruby it is actually working with Ruby while not confusing it to think it should exec() to rspec. This patch is the result of the following command run against the source tree: find spec -type f -print0 | \ xargs -0 perl -pl -i -e 's,^\#\!\s?/(.*)rspec,\#! /usr/bin/env ruby,'
2012-07-02(maint) Standardize on /usr/bin/env ruby -S rspecJeff McCune1-1/+1
Without this patch some spec files are using `ruby -S rspec` and others are using `rspec`. We should standardize on a single form of the interpreter used for spec files. `ruby -S rspec` is the best choice because it correctly informs editors such as Vim with Syntastic that the file is a Ruby file rather than an Rspec file.
2012-04-23(maint) Ensure every file has a trailing newlinesJeff McCune1-1/+1
Without this patch some files exist in the tree that don't have trailing newlines. This is annoying because perl -pli.bak -e will automatically add a newline to every file it modifies in place. The files that actually have modifications by the global search and replace need to be separated from the files that only have newlines added. This patch simply adds newlines to everything if they don't exist on the last line. Yes, the PNG's are perfectly fine with a trailing newline as well.
2011-12-21Add indirection (REST usable) to manipulate instrumentationBrice Figureau1-0/+44
This adds two REST API: * /instrumentation_listener(_search)/<instrumentation_name> GET /instrumentation_listener/<instrumentation_name> Gives details about a given instrumentation listener GET /instrumentation_listener_search/unused Lists all instrumentation listeners loaded in the system PUT /instrumentation_listener/name Allows to enable or disable a given instrumentation listener (supports only pson). The body should be {"name":"instrumentation_name","pattern":<pattern>,"enabled":true} DELETE /instrumentation_listener/<instrumentation_name> This fully unsubscribe a listener * /instrumentation_data/<instrumentation_name> Only GET is supported. This returns the accumulated data of the given instrumentation name if the listener supports data aggregation. This is the only way so far to get access to the instrumentation data. The data format is specific to the given listener. Note: actual default auth.conf doesn't allow to interact with these two indirections. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>