restpack_service 0.0.24 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ee3576ab8c7a89d812a3113e13ba3285ad7dc91
4
- data.tar.gz: 966f6a8924fab3a441a8ff80781a2349d593de68
3
+ metadata.gz: 5cae3506613678747ca826c368f676f7fe7549c5
4
+ data.tar.gz: 3595cbd36abb065e75f8199733751560e1230d0a
5
5
  SHA512:
6
- metadata.gz: cd57a1bd4814e1bcb232986ac7bc8005a5bcd6debbfbb6cb62092d73b56239d9a328eb980a78cffa01d3170b76080082c061336fd2d538968ec61ea400913372
7
- data.tar.gz: de0fd9477008c9f565202840f35b9ec3c9f3405d7e75c49c9e65e4dcf67652497af07efac6222845f4d40261393c213a18402257d286a2b1d91fe3e67c30cffb
6
+ metadata.gz: 7294742050f34547fe9750654fde209c278081da30c720b4f95a4f6ca2a18b71a838ec387fc2dffad5bc635639d6d4c64c860b225f609feda928967666413511
7
+ data.tar.gz: c9e86a9f622fbb6aa02a79a36b3e061ace8162c6494691a0742e7497bf5efe3c8182bdb157bd2a168f26d82d79bb778d5e020bfb8eda168df95cb724ba256ca7
@@ -4,4 +4,4 @@ require "yajl"
4
4
  require "restpack_service/version"
5
5
  require "restpack_service/error"
6
6
  require "restpack_service/response"
7
- require "restpack_service/service"
7
+ require "restpack_service/command"
@@ -1,5 +1,5 @@
1
- module RestPack
2
- class Service < Mutations::Command
1
+ module RestPack::Service
2
+ class Command < Mutations::Command
3
3
  attr_accessor :response
4
4
 
5
5
  def run
@@ -1,4 +1,4 @@
1
- module RestPack
1
+ module RestPack::Service
2
2
  class Error
3
3
  attr_accessor :key, :message
4
4
 
@@ -1,4 +1,4 @@
1
- module RestPack
1
+ module RestPack::Service
2
2
  class Response
3
3
  attr_accessor :result, :errors, :status
4
4
 
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Service
3
- VERSION = "0.0.24"
3
+ VERSION = "0.0.25"
4
4
  end
5
5
  end
data/spec/error_spec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe RestPack::Error do
3
+ describe RestPack::Service::Error do
4
4
  pending "Write some specs"
5
5
  end
@@ -1,11 +1,11 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe RestPack::Response do
3
+ describe RestPack::Service::Response do
4
4
  pending "Write some specs"
5
5
 
6
6
  describe "#from_rest" do
7
7
  it "parses a successful response" do
8
- response = RestPack::Response.from_rest(
8
+ response = RestPack::Service::Response.from_rest(
9
9
  double(code: 200, body: '{ "key": "value" }')
10
10
  )
11
11
 
@@ -16,7 +16,7 @@ describe RestPack::Response do
16
16
  end
17
17
 
18
18
  it "extracts errors from response body" do
19
- response = RestPack::Response.from_rest(
19
+ response = RestPack::Service::Response.from_rest(
20
20
  double(code: 200, body: '{ "key": "value", "errors": {
21
21
  "name": ["error 1", "error 2"]
22
22
  } }')
@@ -29,18 +29,18 @@ describe RestPack::Response do
29
29
 
30
30
  end
31
31
 
32
- describe RestPack::Response::Status do
32
+ describe RestPack::Service::Response::Status do
33
33
  describe "#from_code" do
34
34
  context "valid status" do
35
35
  it "maps a code to a status" do
36
- RestPack::Response::Status.from_code(200).should == :ok
36
+ RestPack::Service::Response::Status.from_code(200).should == :ok
37
37
  end
38
38
  end
39
39
 
40
40
  context "invalid status" do
41
41
  it "raises an exception" do
42
42
  expect {
43
- RestPack::Response::Status.from_code(999)
43
+ RestPack::Service::Response::Status.from_code(999)
44
44
  }.to raise_exception("Invalid Status Code: 999")
45
45
  end
46
46
  end
data/spec/service_spec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe RestPack::Service do
3
+ describe RestPack::Service::Command do
4
4
  pending "Write some specs"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.24
4
+ version: 0.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gavin Joyce
@@ -122,9 +122,9 @@ files:
122
122
  - README.md
123
123
  - Rakefile
124
124
  - lib/restpack_service.rb
125
+ - lib/restpack_service/command.rb
125
126
  - lib/restpack_service/error.rb
126
127
  - lib/restpack_service/response.rb
127
- - lib/restpack_service/service.rb
128
128
  - lib/restpack_service/version.rb
129
129
  - restpack_service.gemspec
130
130
  - spec/error_spec.rb