angus 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTQ5Yzg0NjIyMTE1Y2MyMTA3MjkwM2VlMTFkOTNkMGY0NDIyYmYwNw==
5
- data.tar.gz: !binary |-
6
- NzEzOTg0NzJjZGY5NjA3ZmVkNTg1MGFhNTExZDU0Yzk5OTQ3OTlhNw==
2
+ SHA1:
3
+ metadata.gz: 9ec22d0198b93b02dd669decf5ab03331e0e67f7
4
+ data.tar.gz: 0748f742514dacf291dd17eb737a4199da304f65
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- OGJkNzEyZWYzMWNhM2U1OGE5NmNiM2U3MDc4NGQ2Yzc2ZTY2OWI3MmZlN2Nm
10
- ZmZjNjUyZjNlMDY3YTkwZTg5ODNiMjZjMjQ5YmI1NjE0ZTk2M2E3MmQzN2Jj
11
- ZGFjZTAwMGFhN2U1OTM4NjQ5ZjA4OWQ3NDQzYmZmNGUzNDZiMTc=
12
- data.tar.gz: !binary |-
13
- MjVjMTQ5ZmRmYWE2NzMzYTJkNzAwYzc2MmQ3N2RhNjE2ODU4MzliMTYzYjcx
14
- ODM5Njk0YmJhNDkyY2ZlYTgxZTE3ZTg1ZmY2YTc3ODQyMjM4OWU1Yjc4MmZl
15
- YzQ1M2E0MmM1NTkwMzM1N2RiZDA3YWQ2Mzg5ZjlmZDM2MzdhY2I=
6
+ metadata.gz: 77f1c4577ae945ffa4ab354ea544fb584c9a750c906d6d7cde65982327a41e56a493f6633bc9cf120ccda96b3759a841b951c71aaebc234ab74096854390e2d9
7
+ data.tar.gz: ebb04e1b8e6e1ca7b09a81383c5a4a7f36d432eb10c8c18e433b81cf0655f9c302436a856908e38794697af895f9d81bca86850210e68bd489e6d65143ef1521
data/lib/angus/base.rb CHANGED
@@ -32,6 +32,7 @@ module Angus
32
32
  attr_reader :definitions
33
33
 
34
34
  attr_accessor :default_doc_language
35
+ attr_accessor :validate_params
35
36
 
36
37
  def initialize
37
38
  super
@@ -43,6 +44,7 @@ module Angus
43
44
  @definitions = nil
44
45
  @logger = Logger.new(STDOUT)
45
46
  @default_doc_language = DEFAULT_DOC_LANGUAGE
47
+ @validate_params = :return_error
46
48
 
47
49
  configure!
48
50
 
@@ -127,9 +129,20 @@ module Angus
127
129
  response = Response.new
128
130
 
129
131
  resource = resource_definition.resource_class.new(request, params, operation)
130
- resource.run_validations!
131
132
 
132
- op_response = resource.send(operation.code_name)
133
+ if validate_params == :return_error
134
+ resource.run_validations!
135
+ end
136
+
137
+ resource.run_before_filters
138
+
139
+ begin
140
+ op_response = resource.send(operation.code_name)
141
+ rescue Exception
142
+ resource.run_after_filters(response)
143
+ raise
144
+ end
145
+
133
146
  op_response = {} unless op_response.is_a?(Hash)
134
147
 
135
148
  messages = op_response.delete(:messages)
@@ -138,6 +151,8 @@ module Angus
138
151
 
139
152
  response.write(op_response)
140
153
 
154
+ resource.run_after_filters(response)
155
+
141
156
  response
142
157
  end
143
158
  end
@@ -3,7 +3,12 @@ require 'yaml'
3
3
  module Angus
4
4
  class BaseResource
5
5
 
6
- attr_reader :request, :params
6
+ def self.inherited(subclass)
7
+ self._before_filers.each { |before_filer| subclass._before_filers << before_filer }
8
+ self._after_filers.each { |after_filer| subclass._after_filers << after_filer }
9
+ end
10
+
11
+ attr_reader :request, :params, :operation
7
12
 
8
13
  def initialize(request, params, operation)
9
14
  @request = request
@@ -15,5 +20,77 @@ module Angus
15
20
  ParamsValidator.new(@operation).valid?(@params)
16
21
  end
17
22
 
23
+ def run_before_filters
24
+ self.class._before_filers.each { |before_filer| run_filter(before_filer) }
25
+ end
26
+
27
+ def run_after_filters(response = nil)
28
+ self.class._after_filers.each { |after_filer| run_filter(after_filer, response) }
29
+ end
30
+
31
+ def self.before(method_names = [], options = {}, &block)
32
+ self._before_filers.concat(validate_and_build_filters(method_names, options, block))
33
+ end
34
+
35
+ def self.after(method_names = [], options = {}, &block)
36
+ self._after_filers.concat(validate_and_build_filters(method_names, options, block))
37
+ end
38
+
39
+ def self._before_filers
40
+ @_before_filers ||= []
41
+ end
42
+
43
+ def self._after_filers
44
+ @_after_filers ||= []
45
+ end
46
+
47
+ def self.validate_and_build_filters(method_names, options, block)
48
+ if method_names.is_a?(Hash) && options.empty?
49
+ options = method_names
50
+ method_names = []
51
+ else
52
+ method_names = Array(method_names)
53
+ end
54
+
55
+ if (method_names.any? && block) || (method_names.empty? && !block)
56
+ raise 'InvalidFilterDefinition'
57
+ end
58
+
59
+ if method_names.any?
60
+ method_names.inject([]) do |filters, method_name|
61
+ filters << { :filter => method_name, :options => options }
62
+ end
63
+ else
64
+ [{ :filter => Proc.new { |resource| block.call(resource) }, :options => options }]
65
+ end
66
+ end
67
+ private_class_method :validate_and_build_filters
68
+
69
+ private
70
+
71
+ def run_filter(filer_definition, *args)
72
+ return unless run_filter?(self.operation, filer_definition[:options])
73
+
74
+ if filer_definition[:filter].is_a?(Symbol)
75
+ send(filer_definition[:filter], *args)
76
+ else
77
+ if args.any?
78
+ filer_definition[:filter].call([self, *args])
79
+ else
80
+ filer_definition[:filter].call(self)
81
+ end
82
+ end
83
+ end
84
+
85
+ def run_filter?(operation, filer_options)
86
+ if filer_options[:only]
87
+ Array(filer_options[:only]).include?(operation.code_name.to_sym)
88
+ elsif filer_options[:except]
89
+ !Array(filer_options[:except]).include?(operation.code_name.to_sym)
90
+ else
91
+ true
92
+ end
93
+ end
94
+
18
95
  end
19
96
  end
@@ -5,6 +5,6 @@ require 'bundler'
5
5
  Bundler.setup
6
6
 
7
7
  require 'angus'
8
- require 'services/<%= app_name %>'
8
+ require 'services/<%= underscore(app_name) %>'
9
9
 
10
10
  run <%= classify(name) %>.new
@@ -64,7 +64,7 @@ module Angus
64
64
  end
65
65
 
66
66
  def build_proxy_client(url)
67
- Angus::Remote::ProxyClient.new(url)
67
+ Angus::Remote::ProxyClient.new(url, 60)
68
68
  end
69
69
 
70
70
  def proxy_clients
@@ -12,7 +12,13 @@ require_relative 'examples/describe_errors'
12
12
  # @param operation the operation being specified, ex: GET /profiles
13
13
  # @param service the Service (rack app) that exposes the operation
14
14
  def describe_operation(operation, service_class, &block)
15
- service = service_class.new
15
+ service = if service_class.is_a?(Angus::Base)
16
+ service_class
17
+ else
18
+ warn "Calling describe_operation with a service class is deprecated use an instance instead."
19
+ service_class.new
20
+ end
21
+
16
22
 
17
23
  describe(operation) do
18
24
  include Rack::Test::Methods
data/lib/angus/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Angus
2
- VERSION = '0.0.9'
3
- end
2
+ VERSION = '0.0.11'
3
+ end
@@ -1,8 +1,8 @@
1
1
  require_relative '../exceptions/user_errors'
2
2
  require_relative '../models/user'
3
3
 
4
-
5
4
  class Users < Angus::BaseResource
5
+
6
6
  USERS = [{ :id => 1, :name => 'ac/dc', 'last_login' => DateTime.now, :birth_date => Date.today,
7
7
  :gender => :male, :roles => [1, 2, 3] },
8
8
  User.new(2, 'madonna', DateTime.now, Date.today, :female)]
@@ -34,4 +34,5 @@ class Users < Angus::BaseResource
34
34
  { :messages => [:UserDeletedSuccessfully] }
35
35
  end
36
36
  end
37
+
37
38
  end
@@ -0,0 +1,15 @@
1
+ UserNotFound:
2
+ status_code: 404
3
+ level: error
4
+ description: User not found
5
+
6
+ UserCreatedSuccessfully:
7
+ status_code: 200
8
+ level: Info
9
+ description: The User has been created successfully.
10
+ text: The User has been created successfully.
11
+
12
+ UserDeletedSuccessfully:
13
+ status_code: 200
14
+ level: Info
15
+ description: The User has been deleted successfully.
@@ -0,0 +1,9 @@
1
+ user:
2
+ - field: id
3
+ description: User identifier
4
+ required: true
5
+ type: integer
6
+ - field: name
7
+ description: User name
8
+ required: true
9
+ type: string
@@ -0,0 +1,3 @@
1
+ service: 'Filters'
2
+ code_name: 'filters'
3
+ version: '0.1'
@@ -0,0 +1,58 @@
1
+ get_user:
2
+ name: Obtener Informacion de un Usuario
3
+ description: >
4
+ Devuelve informacion del usuario, como por ejemplo e-mail y fecha de nacimiento.
5
+
6
+ path: /users/:user_id
7
+ method: get
8
+ uri:
9
+ - element: user_id
10
+ description: Identificador del usuario
11
+
12
+ response:
13
+ - element: profile
14
+ description: Perfil del usuario
15
+ required: true
16
+ type: user
17
+
18
+ messages:
19
+ - key: UserNotFound
20
+
21
+ get_users:
22
+ name: Obtener Lista de usuarios
23
+ description: >
24
+ Devuelve lista de usarios.
25
+
26
+ path: /users
27
+ method: get
28
+
29
+ response:
30
+ - element: users
31
+ description: Perfil del usuario
32
+ required: true
33
+ elements_type: user
34
+
35
+ create_user:
36
+ name: Create a new user
37
+ description: >
38
+ Creates and returns a new user.
39
+
40
+ path: /users
41
+ method: post
42
+
43
+ messages:
44
+ - key: UserCreatedSuccessfully
45
+
46
+ delete_user:
47
+ name: Delete user
48
+ description: >
49
+ Deletes a user.
50
+
51
+ path: /users/:id
52
+ method: delete
53
+ uri:
54
+ - element: id
55
+ description: User identifier.
56
+
57
+ messages:
58
+ - key: UserDeletedSuccessfully
@@ -0,0 +1,9 @@
1
+ class UserNotFound < StandardError
2
+ def initialize(id)
3
+ @id = id
4
+ end
5
+
6
+ def message
7
+ "User with id=#@id not found"
8
+ end
9
+ end
@@ -0,0 +1 @@
1
+ User = Struct.new(:id, :name, :last_login, :birth_date, :gender, :roles)
@@ -0,0 +1,54 @@
1
+ require_relative '../exceptions/user_errors'
2
+ require_relative '../models/user'
3
+
4
+ class Users < Angus::BaseResource
5
+
6
+ before :before_filter_method, :exclude => [:get_user]
7
+ before { |resource| resource; resource.before_filter_block }
8
+
9
+ after :after_filter_method, :only => [:get_users, :get_user]
10
+ after { |resource, response| resource.after_filter_block }
11
+
12
+ USERS = [User.new(2, 'madonna', DateTime.now, Date.today, :female)]
13
+
14
+ def get_user
15
+ user = if params[:user_id] == '3'
16
+ { :id => 3 }
17
+ else
18
+ USERS.find { |user| user[:id] == params[:user_id].to_i }
19
+ end
20
+
21
+ raise UserNotFound.new(params[:user_id]) unless user
22
+
23
+ { :profile => user }
24
+ end
25
+
26
+ def get_users
27
+ { :users => USERS }
28
+ end
29
+
30
+ def create_user
31
+ { :messages => [:UserCreatedSuccessfully] }
32
+ end
33
+
34
+ def delete_user
35
+ if params[:id] == '2'
36
+ { :messages => [:UserAlreadyDeleted] }
37
+ else
38
+ { :messages => [:UserDeletedSuccessfully] }
39
+ end
40
+ end
41
+
42
+ def before_filter_method; end
43
+
44
+ def before_filter_block; end
45
+
46
+ def after_filter_method(response); end
47
+
48
+ def after_filter_block; end
49
+
50
+ def exclude_filter_method; end
51
+
52
+ def only_filter_method; end
53
+
54
+ end
@@ -0,0 +1,13 @@
1
+ require 'angus'
2
+
3
+ module Spec
4
+ module Functional
5
+
6
+ class Filters < Angus::Base
7
+ def configure
8
+ register :users
9
+ end
10
+ end
11
+
12
+ end
13
+ end
@@ -0,0 +1,75 @@
1
+ require 'spec_helper'
2
+ require 'rack/test'
3
+ require 'functional/filters/services/filters'
4
+
5
+ require 'functional/filters/resources/users'
6
+
7
+ working_dir = "#{File.dirname(__FILE__ )}/filters"
8
+
9
+ describe Spec::Functional::Filters, { :work_dir => working_dir } do
10
+ include Rack::Test::Methods
11
+
12
+ subject(:app) { Rack::Lint.new(Spec::Functional::Filters.new) }
13
+
14
+ context 'when a before filter method is set' do
15
+ it 'invokes the given method' do
16
+ Users.any_instance.should_receive(:before_filter_method)
17
+
18
+ get '/filters/api/0.1/users'
19
+ end
20
+
21
+ context 'when the filter is excluded for the action' do
22
+ it 'does not invoke the given method' do
23
+ Users.any_instance.should_not_receive(:before_filter_method)
24
+
25
+ get '/filters/api/0.1/users/1'
26
+ end
27
+ end
28
+
29
+ context 'when the filter only applies for the some actions' do
30
+ it 'does not invoke the given method for the excluded actions' do
31
+ Users.any_instance.should_not_receive(:after_filter_method)
32
+
33
+ post '/filters/api/0.1/users'
34
+ end
35
+
36
+ it 'invokes the given method for the included actions' do
37
+ Users.any_instance.should_receive(:after_filter_method)
38
+
39
+ get '/filters/api/0.1/users'
40
+ end
41
+ end
42
+ end
43
+
44
+ context 'when a before filter block is set' do
45
+ it 'executes the given block' do
46
+ Users.any_instance.should_receive(:before_filter_block)
47
+
48
+ get '/filters/api/0.1/users'
49
+ end
50
+ end
51
+
52
+ context 'when a after filter method is set' do
53
+ it 'invokes the given method' do
54
+ Users.any_instance.should_receive(:after_filter_method)
55
+
56
+ get '/filters/api/0.1/users'
57
+ end
58
+ end
59
+
60
+ context 'when a after filter block is set' do
61
+ it 'executes the given block' do
62
+ Users.any_instance.should_receive(:after_filter_block)
63
+
64
+ get '/filters/api/0.1/users'
65
+ end
66
+ end
67
+
68
+ context 'when the operation fails' do
69
+ it 'invokes the the after filter anyway' do
70
+ Users.any_instance.should_receive(:after_filter_method)
71
+
72
+ get '/filters/api/0.1/users/1'
73
+ end
74
+ end
75
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: angus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Ifran
@@ -15,172 +15,172 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2014-03-21 00:00:00.000000000 Z
18
+ date: 2014-07-17 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: thor
22
22
  requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  type: :runtime
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: angus-sdoc
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.0'
41
- - - ! '>='
41
+ - - ">="
42
42
  - !ruby/object:Gem::Version
43
43
  version: 0.0.5
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - ~>
48
+ - - "~>"
49
49
  - !ruby/object:Gem::Version
50
50
  version: '0.0'
51
- - - ! '>='
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
53
  version: 0.0.5
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: angus-router
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ~>
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0.0'
61
- - - ! '>='
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
63
  version: 0.0.3
64
64
  type: :runtime
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - ~>
68
+ - - "~>"
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0.0'
71
- - - ! '>='
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: 0.0.3
74
74
  - !ruby/object:Gem::Dependency
75
75
  name: rake
76
76
  requirement: !ruby/object:Gem::Requirement
77
77
  requirements:
78
- - - ! '>='
78
+ - - ">="
79
79
  - !ruby/object:Gem::Version
80
80
  version: '0'
81
81
  type: :development
82
82
  prerelease: false
83
83
  version_requirements: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ! '>='
85
+ - - ">="
86
86
  - !ruby/object:Gem::Version
87
87
  version: '0'
88
88
  - !ruby/object:Gem::Dependency
89
89
  name: rspec
90
90
  requirement: !ruby/object:Gem::Requirement
91
91
  requirements:
92
- - - ~>
92
+ - - "~>"
93
93
  - !ruby/object:Gem::Version
94
94
  version: '2.12'
95
95
  type: :development
96
96
  prerelease: false
97
97
  version_requirements: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - ~>
99
+ - - "~>"
100
100
  - !ruby/object:Gem::Version
101
101
  version: '2.12'
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: faker
104
104
  requirement: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - ! '>='
106
+ - - ">="
107
107
  - !ruby/object:Gem::Version
108
108
  version: '0'
109
109
  type: :development
110
110
  prerelease: false
111
111
  version_requirements: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ! '>='
113
+ - - ">="
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  - !ruby/object:Gem::Dependency
117
117
  name: simplecov
118
118
  requirement: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - ~>
120
+ - - "~>"
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0.7'
123
123
  type: :development
124
124
  prerelease: false
125
125
  version_requirements: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - ~>
127
+ - - "~>"
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0.7'
130
130
  - !ruby/object:Gem::Dependency
131
131
  name: rack-test
132
132
  requirement: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - ~>
134
+ - - "~>"
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0.6'
137
137
  type: :development
138
138
  prerelease: false
139
139
  version_requirements: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ~>
141
+ - - "~>"
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0.6'
144
144
  - !ruby/object:Gem::Dependency
145
145
  name: simplecov-rcov
146
146
  requirement: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - ~>
148
+ - - "~>"
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0.2'
151
151
  type: :development
152
152
  prerelease: false
153
153
  version_requirements: !ruby/object:Gem::Requirement
154
154
  requirements:
155
- - - ~>
155
+ - - "~>"
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0.2'
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: simplecov-rcov-text
160
160
  requirement: !ruby/object:Gem::Requirement
161
161
  requirements:
162
- - - ~>
162
+ - - "~>"
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0.0'
165
165
  type: :development
166
166
  prerelease: false
167
167
  version_requirements: !ruby/object:Gem::Requirement
168
168
  requirements:
169
- - - ~>
169
+ - - "~>"
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0.0'
172
172
  - !ruby/object:Gem::Dependency
173
173
  name: ci_reporter
174
174
  requirement: !ruby/object:Gem::Requirement
175
175
  requirements:
176
- - - ! '>='
176
+ - - ">="
177
177
  - !ruby/object:Gem::Version
178
178
  version: '0'
179
179
  type: :development
180
180
  prerelease: false
181
181
  version_requirements: !ruby/object:Gem::Requirement
182
182
  requirements:
183
- - - ! '>='
183
+ - - ">="
184
184
  - !ruby/object:Gem::Version
185
185
  version: '0'
186
186
  description: Angus is a simple and powerful framework to build REST APIs using Ruby.
@@ -264,6 +264,15 @@ files:
264
264
  - spec/functional/empty_resource/resources/users.rb
265
265
  - spec/functional/empty_resource/services/empty_resource.rb
266
266
  - spec/functional/empty_resource_spec.rb
267
+ - spec/functional/filters/definitions/messages.yml
268
+ - spec/functional/filters/definitions/representations.yml
269
+ - spec/functional/filters/definitions/service.yml
270
+ - spec/functional/filters/definitions/users/operations.yml
271
+ - spec/functional/filters/exceptions/user_errors.rb
272
+ - spec/functional/filters/models/user.rb
273
+ - spec/functional/filters/resources/users.rb
274
+ - spec/functional/filters/services/filters.rb
275
+ - spec/functional/filters_spec.rb
267
276
  - spec/functional/no_resources/definitions/messages.yml
268
277
  - spec/functional/no_resources/definitions/representations.yml
269
278
  - spec/functional/no_resources/definitions/service.yml
@@ -291,12 +300,12 @@ require_paths:
291
300
  - lib
292
301
  required_ruby_version: !ruby/object:Gem::Requirement
293
302
  requirements:
294
- - - ! '>='
303
+ - - ">="
295
304
  - !ruby/object:Gem::Version
296
305
  version: '0'
297
306
  required_rubygems_version: !ruby/object:Gem::Requirement
298
307
  requirements:
299
- - - ! '>='
308
+ - - ">="
300
309
  - !ruby/object:Gem::Version
301
310
  version: '0'
302
311
  requirements: []
@@ -306,39 +315,48 @@ signing_key:
306
315
  specification_version: 4
307
316
  summary: A web services summary
308
317
  test_files:
309
- - spec/angus/middleware/exception_handler_spec.rb
318
+ - spec/support/matchers/have_in_message_matcher.rb
319
+ - spec/support/matchers/have_error_response_matcher.rb
320
+ - spec/support/matchers/have_success_response_matcher.rb
321
+ - spec/spec_helper.rb
310
322
  - spec/angus/request_handler_spec.rb
323
+ - spec/angus/middleware/exception_handler_spec.rb
311
324
  - spec/angus/rspec/examples/describe_errors_spec.rb
312
- - spec/functional/basic/definitions/messages.yml
313
- - spec/functional/basic/definitions/representations.yml
314
- - spec/functional/basic/definitions/service.yml
315
- - spec/functional/basic/definitions/users/operations.yml
325
+ - spec/functional/filters/exceptions/user_errors.rb
326
+ - spec/functional/filters/models/user.rb
327
+ - spec/functional/filters/resources/users.rb
328
+ - spec/functional/filters/services/filters.rb
329
+ - spec/functional/filters/definitions/representations.yml
330
+ - spec/functional/filters/definitions/users/operations.yml
331
+ - spec/functional/filters/definitions/messages.yml
332
+ - spec/functional/filters/definitions/service.yml
333
+ - spec/functional/no_resources_spec.rb
334
+ - spec/functional/empty_resource_spec.rb
316
335
  - spec/functional/basic/exceptions/user_errors.rb
317
336
  - spec/functional/basic/models/user.rb
318
337
  - spec/functional/basic/resources/users.rb
319
338
  - spec/functional/basic/services/basic.rb
320
- - spec/functional/basic_spec.rb
321
- - spec/functional/empty_resource/definitions/messages.yml
322
- - spec/functional/empty_resource/definitions/representations.yml
323
- - spec/functional/empty_resource/definitions/service.yml
324
- - spec/functional/empty_resource/definitions/users/operations.yml
339
+ - spec/functional/basic/definitions/representations.yml
340
+ - spec/functional/basic/definitions/users/operations.yml
341
+ - spec/functional/basic/definitions/messages.yml
342
+ - spec/functional/basic/definitions/service.yml
343
+ - spec/functional/filters_spec.rb
325
344
  - spec/functional/empty_resource/resources/users.rb
326
345
  - spec/functional/empty_resource/services/empty_resource.rb
327
- - spec/functional/empty_resource_spec.rb
328
- - spec/functional/no_resources/definitions/messages.yml
329
- - spec/functional/no_resources/definitions/representations.yml
330
- - spec/functional/no_resources/definitions/service.yml
331
- - spec/functional/no_resources/services/no_resources.rb
332
- - spec/functional/no_resources_spec.rb
333
- - spec/functional/type_validation/definitions/admins/operations.yml
334
- - spec/functional/type_validation/definitions/messages.yml
335
- - spec/functional/type_validation/definitions/representations.yml
336
- - spec/functional/type_validation/definitions/service.yml
346
+ - spec/functional/empty_resource/definitions/representations.yml
347
+ - spec/functional/empty_resource/definitions/users/operations.yml
348
+ - spec/functional/empty_resource/definitions/messages.yml
349
+ - spec/functional/empty_resource/definitions/service.yml
337
350
  - spec/functional/type_validation/models/admin.rb
338
351
  - spec/functional/type_validation/resources/admins.rb
339
352
  - spec/functional/type_validation/services/type_validation.rb
353
+ - spec/functional/type_validation/definitions/admins/operations.yml
354
+ - spec/functional/type_validation/definitions/representations.yml
355
+ - spec/functional/type_validation/definitions/messages.yml
356
+ - spec/functional/type_validation/definitions/service.yml
357
+ - spec/functional/basic_spec.rb
340
358
  - spec/functional/type_validation_spec.rb
341
- - spec/spec_helper.rb
342
- - spec/support/matchers/have_error_response_matcher.rb
343
- - spec/support/matchers/have_in_message_matcher.rb
344
- - spec/support/matchers/have_success_response_matcher.rb
359
+ - spec/functional/no_resources/services/no_resources.rb
360
+ - spec/functional/no_resources/definitions/representations.yml
361
+ - spec/functional/no_resources/definitions/messages.yml
362
+ - spec/functional/no_resources/definitions/service.yml