README.md in api_pi-0.2.2 vs README.md in api_pi-0.2.3
- old
+ new
@@ -6,28 +6,24 @@
## Install
Api P.I. requires ruby 2.0.0+
-Clone this repository to your machine:
+Install the gem:
- $ git clone git@github.ubermind.com:bewoodall/api_pi.git && cd api_pi
-
-Build and Install the gem:
-
- $ gem build api_pi.gemspec && gem install api_pi-VERSION.gem
+ $ gem install api_pi
## Usage
### GETting Data
To get a response from a particular service, you need to make an HTTP GET
request to a URL.
get "http://url-to-test.com/object.json" do...end
-The `get` method takes a URL string and then is fed a block to build tests.
+The `get` method takes a URL string and is then fed a block to build tests.
Once you GET your URL, you are ready to create test blocks.
### Setting Headers
@@ -184,9 +180,28 @@
`stripped?` will test is there is whitespace before or after a string:
"works".stripped? => true
" spaces ".stripped? => false
+
+## Inspecting
+
+To inspect your json:
+
+ # ruby inspect_myjson.rb
+
+which would give you output similar to:
+
+ Requesting JSON from http://apipi.apiary.io/tests and testing
+ - headers
+ - body results.string
+ - results.int
+ - results
+ - results.array
+
+ 5 tests, 5 succeeded, 0 failed
+
+Passing tests yield a response code of 0, and failed tests yield 1.
## Testing
Api-PI is testing using Ruby's MiniTest framework. To run tests: