croods 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +28 -0
- data/Rakefile +19 -0
- data/lib/croods.rb +58 -0
- data/lib/croods/action.rb +17 -0
- data/lib/croods/api.rb +26 -0
- data/lib/croods/api/initial_schema.json +52 -0
- data/lib/croods/attribute.rb +15 -0
- data/lib/croods/controller.rb +28 -0
- data/lib/croods/controller/actions.rb +71 -0
- data/lib/croods/controller/already_taken.rb +27 -0
- data/lib/croods/controller/authentication.rb +22 -0
- data/lib/croods/controller/authorization.rb +31 -0
- data/lib/croods/controller/collection.rb +15 -0
- data/lib/croods/controller/member.rb +45 -0
- data/lib/croods/controller/model.rb +17 -0
- data/lib/croods/controller/multi_tenancy.rb +54 -0
- data/lib/croods/controller/not_found.rb +22 -0
- data/lib/croods/controller/record_invalid.rb +22 -0
- data/lib/croods/controller/resource.rb +30 -0
- data/lib/croods/middleware.rb +44 -0
- data/lib/croods/middleware/base.rb +20 -0
- data/lib/croods/middleware/request_validation.rb +10 -0
- data/lib/croods/middleware/response_validation.rb +10 -0
- data/lib/croods/model.rb +41 -0
- data/lib/croods/policy.rb +118 -0
- data/lib/croods/policy/scope.rb +131 -0
- data/lib/croods/railtie.rb +6 -0
- data/lib/croods/resource.rb +39 -0
- data/lib/croods/resource/actions.rb +51 -0
- data/lib/croods/resource/attributes.rb +53 -0
- data/lib/croods/resource/attributes/base.rb +30 -0
- data/lib/croods/resource/attributes/request.rb +29 -0
- data/lib/croods/resource/attributes/response.rb +13 -0
- data/lib/croods/resource/authentication.rb +46 -0
- data/lib/croods/resource/authorization.rb +47 -0
- data/lib/croods/resource/controller.rb +50 -0
- data/lib/croods/resource/filters.rb +32 -0
- data/lib/croods/resource/identifier.rb +13 -0
- data/lib/croods/resource/json_schema.rb +32 -0
- data/lib/croods/resource/json_schema/definition.rb +34 -0
- data/lib/croods/resource/json_schema/definitions.rb +31 -0
- data/lib/croods/resource/json_schema/initial_schema.json +8 -0
- data/lib/croods/resource/json_schema/links.rb +40 -0
- data/lib/croods/resource/json_schema/links/collection.rb +70 -0
- data/lib/croods/resource/json_schema/links/create.rb +41 -0
- data/lib/croods/resource/json_schema/links/destroy.rb +40 -0
- data/lib/croods/resource/json_schema/links/index.rb +17 -0
- data/lib/croods/resource/json_schema/links/member.rb +40 -0
- data/lib/croods/resource/json_schema/links/show.rb +40 -0
- data/lib/croods/resource/json_schema/links/update.rb +40 -0
- data/lib/croods/resource/json_schema/properties.rb +32 -0
- data/lib/croods/resource/json_schema/required.rb +34 -0
- data/lib/croods/resource/model.rb +35 -0
- data/lib/croods/resource/names.rb +23 -0
- data/lib/croods/resource/paths.rb +16 -0
- data/lib/croods/resource/policy.rb +51 -0
- data/lib/croods/resource/services.rb +18 -0
- data/lib/croods/resource/sorting.rb +13 -0
- data/lib/croods/routes.rb +46 -0
- data/lib/croods/service.rb +28 -0
- data/lib/croods/version.rb +5 -0
- data/lib/tasks/croods_tasks.rake +4 -0
- metadata +316 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module JsonSchema
|
6
|
+
module Links
|
7
|
+
module Show
|
8
|
+
class << self
|
9
|
+
def link(resource)
|
10
|
+
{
|
11
|
+
href: resource.member_path,
|
12
|
+
method: 'GET',
|
13
|
+
rel: 'self',
|
14
|
+
schema: schema,
|
15
|
+
targetSchema: target_schema(resource)
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
def schema
|
20
|
+
{
|
21
|
+
strictProperties: true,
|
22
|
+
properties: {},
|
23
|
+
type: ['object']
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def target_schema(resource)
|
28
|
+
{
|
29
|
+
anyOf: [
|
30
|
+
resource.ref,
|
31
|
+
{ '$ref': '#/definitions/error' }
|
32
|
+
]
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module JsonSchema
|
6
|
+
module Links
|
7
|
+
module Update
|
8
|
+
class << self
|
9
|
+
def link(resource)
|
10
|
+
{
|
11
|
+
href: resource.member_path,
|
12
|
+
method: 'PUT',
|
13
|
+
rel: 'self',
|
14
|
+
schema: schema(resource),
|
15
|
+
targetSchema: target_schema(resource)
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
def schema(resource)
|
20
|
+
{
|
21
|
+
additionalProperties: false,
|
22
|
+
properties: Properties.schema(resource, request: true),
|
23
|
+
type: ['object']
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def target_schema(resource)
|
28
|
+
{
|
29
|
+
anyOf: [
|
30
|
+
resource.ref,
|
31
|
+
{ '$ref': '#/definitions/error' }
|
32
|
+
]
|
33
|
+
}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module JsonSchema
|
6
|
+
module Properties
|
7
|
+
class << self
|
8
|
+
def schema(resource, request: false)
|
9
|
+
attributes = {}
|
10
|
+
|
11
|
+
properties = resource.response_attributes
|
12
|
+
properties = resource.request_attributes if request
|
13
|
+
|
14
|
+
properties.each_value do |attribute|
|
15
|
+
next if ignore?(request, attribute)
|
16
|
+
|
17
|
+
attributes[attribute.name] = resource.ref(attribute.name)
|
18
|
+
end
|
19
|
+
|
20
|
+
attributes
|
21
|
+
end
|
22
|
+
|
23
|
+
def ignore?(request, attribute)
|
24
|
+
return unless request
|
25
|
+
|
26
|
+
%w[id created_at updated_at].include?(attribute.name)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module JsonSchema
|
6
|
+
module Required
|
7
|
+
class << self
|
8
|
+
def schema(resource, request: false)
|
9
|
+
required = []
|
10
|
+
|
11
|
+
properties = resource.response_attributes
|
12
|
+
properties = resource.request_attributes if request
|
13
|
+
|
14
|
+
properties.each_value do |attribute|
|
15
|
+
next if ignore?(request, attribute)
|
16
|
+
|
17
|
+
required << attribute.name unless attribute.null
|
18
|
+
end
|
19
|
+
|
20
|
+
required
|
21
|
+
end
|
22
|
+
|
23
|
+
def ignore?(request, attribute)
|
24
|
+
return unless request
|
25
|
+
|
26
|
+
return true if attribute.default || attribute.default_function
|
27
|
+
|
28
|
+
%w[created_at updated_at].include?(attribute.name)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module Model
|
6
|
+
def extend_model(&block)
|
7
|
+
return unless block
|
8
|
+
|
9
|
+
model_blocks << block
|
10
|
+
end
|
11
|
+
|
12
|
+
def model_blocks
|
13
|
+
@model_blocks ||= []
|
14
|
+
end
|
15
|
+
|
16
|
+
def model
|
17
|
+
model_name.constantize
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_model!
|
21
|
+
Object.const_set(model_name, Class.new(Croods::Model))
|
22
|
+
|
23
|
+
model_blocks.each do |block|
|
24
|
+
model.instance_eval(&block)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def table_exists?
|
29
|
+
ActiveRecord::Base.connection.table_exists? route_name
|
30
|
+
rescue ActiveRecord::NoDatabaseError
|
31
|
+
false
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module Names
|
6
|
+
def namespace
|
7
|
+
to_s.split('::').first
|
8
|
+
end
|
9
|
+
|
10
|
+
def route_name
|
11
|
+
namespace.underscore
|
12
|
+
end
|
13
|
+
|
14
|
+
def model_name
|
15
|
+
namespace.singularize
|
16
|
+
end
|
17
|
+
|
18
|
+
def resource_name
|
19
|
+
model_name.underscore
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module Paths
|
6
|
+
def collection_path
|
7
|
+
"/#{route_name}"
|
8
|
+
end
|
9
|
+
|
10
|
+
def member_path
|
11
|
+
"/#{route_name}/{(%23%2Fdefinitions" \
|
12
|
+
"%2F#{resource_name}%2Fdefinitions%2Fid)}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module Policy
|
6
|
+
def extend_policy(&block)
|
7
|
+
return unless block
|
8
|
+
|
9
|
+
policy_blocks << block
|
10
|
+
end
|
11
|
+
|
12
|
+
def policy_blocks
|
13
|
+
@policy_blocks ||= []
|
14
|
+
end
|
15
|
+
|
16
|
+
def policy
|
17
|
+
policy_name.constantize
|
18
|
+
end
|
19
|
+
|
20
|
+
def policy_scope(action)
|
21
|
+
policy_scope_name(action).constantize
|
22
|
+
end
|
23
|
+
|
24
|
+
def policy_name
|
25
|
+
"#{model_name}Policy"
|
26
|
+
end
|
27
|
+
|
28
|
+
def policy_scope_name(action)
|
29
|
+
"#{model_name}#{action.to_s.titleize}Scope"
|
30
|
+
end
|
31
|
+
|
32
|
+
def create_policy!
|
33
|
+
Object.const_set(policy_name, Class.new(Croods::Policy))
|
34
|
+
policy_blocks.each { |block| policy.instance_eval(&block) }
|
35
|
+
create_policy_actions!
|
36
|
+
end
|
37
|
+
|
38
|
+
def create_policy_actions!
|
39
|
+
(actions + additional_actions).each do |action|
|
40
|
+
policy.define_method("#{action.name}?") { authorize_action(action) }
|
41
|
+
|
42
|
+
Object.const_set(
|
43
|
+
policy_scope_name(action.name), Class.new(Croods::Policy::Scope)
|
44
|
+
)
|
45
|
+
|
46
|
+
policy_scope(action.name).define_method(:action) { action }
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
module Resource
|
5
|
+
module Services
|
6
|
+
def use_service(service, on: nil)
|
7
|
+
name = on || service.to_s.split('::').last.downcase
|
8
|
+
actions.find { |action| action.name == name.to_sym }.service = service
|
9
|
+
end
|
10
|
+
|
11
|
+
def use_services(*services)
|
12
|
+
services.each do |service|
|
13
|
+
use_service(service)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module ActionDispatch
|
4
|
+
module Routing
|
5
|
+
class Mapper
|
6
|
+
def mount_croods
|
7
|
+
create_application_controller!
|
8
|
+
|
9
|
+
Croods.resources.each do |resource|
|
10
|
+
resource.create_model!
|
11
|
+
resource.create_policy!
|
12
|
+
resource.create_controller!
|
13
|
+
create_resource_routes!(resource)
|
14
|
+
end
|
15
|
+
|
16
|
+
Croods.json_schema = Croods::Api.json_schema
|
17
|
+
end
|
18
|
+
|
19
|
+
def create_resource_routes!(resource)
|
20
|
+
resources(
|
21
|
+
resource.route_name,
|
22
|
+
param: resource.identifier,
|
23
|
+
only: resource.actions.map(&:name)
|
24
|
+
) do
|
25
|
+
resource.additional_actions.each do |action|
|
26
|
+
public_send(action.method, action.name, on: action.on)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def create_application_controller!
|
32
|
+
Croods::Controller.instance_eval do
|
33
|
+
include DeviseTokenAuth::Concerns::SetUserByToken
|
34
|
+
end
|
35
|
+
|
36
|
+
Object.const_set(
|
37
|
+
'ApplicationController', Class.new(Croods::Controller)
|
38
|
+
)
|
39
|
+
|
40
|
+
Croods.application_controller_blocks.each do |block|
|
41
|
+
ApplicationController.instance_eval(&block)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Croods
|
4
|
+
class Service
|
5
|
+
attr_accessor :member_or_collection, :params, :current_user
|
6
|
+
|
7
|
+
def self.about(name = nil)
|
8
|
+
return @about unless name
|
9
|
+
|
10
|
+
@about = name
|
11
|
+
attr_accessor name
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.execute(member_or_collection, params, current_user)
|
15
|
+
new(member_or_collection, params, current_user).execute
|
16
|
+
end
|
17
|
+
|
18
|
+
def initialize(member_or_collection, params, current_user)
|
19
|
+
if self.class.about
|
20
|
+
public_send("#{self.class.about}=", member_or_collection)
|
21
|
+
end
|
22
|
+
|
23
|
+
self.member_or_collection = member_or_collection
|
24
|
+
self.params = params
|
25
|
+
self.current_user = current_user
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,316 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: croods
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Weinmann
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-04-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: committee
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.3.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.3.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: devise_token_auth
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.1.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pundit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.1.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.1.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 5.2.4.2
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 5.2.4.2
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: schema_associations
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.2.7
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.2.7
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: schema_auto_foreign_keys
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.1.3
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.1.3
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: schema_validations
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.3.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.3.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: gem-release
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: pg
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rack-cors
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 1.1.1
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 1.1.1
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rspec-rails
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 4.0.0.rc1
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 4.0.0.rc1
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rubocop
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - '='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.80.1
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - '='
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 0.80.1
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rubocop-rspec
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - '='
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 1.38.1
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - '='
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 1.38.1
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: simplecov
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 0.17.0
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 0.17.0
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: timecop
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - '='
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: 0.9.1
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - '='
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: 0.9.1
|
223
|
+
description: A framework for creating CRUDs in Rails APIs
|
224
|
+
email:
|
225
|
+
- danielweinmann@gmail.com
|
226
|
+
executables: []
|
227
|
+
extensions: []
|
228
|
+
extra_rdoc_files: []
|
229
|
+
files:
|
230
|
+
- MIT-LICENSE
|
231
|
+
- README.md
|
232
|
+
- Rakefile
|
233
|
+
- lib/croods.rb
|
234
|
+
- lib/croods/action.rb
|
235
|
+
- lib/croods/api.rb
|
236
|
+
- lib/croods/api/initial_schema.json
|
237
|
+
- lib/croods/attribute.rb
|
238
|
+
- lib/croods/controller.rb
|
239
|
+
- lib/croods/controller/actions.rb
|
240
|
+
- lib/croods/controller/already_taken.rb
|
241
|
+
- lib/croods/controller/authentication.rb
|
242
|
+
- lib/croods/controller/authorization.rb
|
243
|
+
- lib/croods/controller/collection.rb
|
244
|
+
- lib/croods/controller/member.rb
|
245
|
+
- lib/croods/controller/model.rb
|
246
|
+
- lib/croods/controller/multi_tenancy.rb
|
247
|
+
- lib/croods/controller/not_found.rb
|
248
|
+
- lib/croods/controller/record_invalid.rb
|
249
|
+
- lib/croods/controller/resource.rb
|
250
|
+
- lib/croods/middleware.rb
|
251
|
+
- lib/croods/middleware/base.rb
|
252
|
+
- lib/croods/middleware/request_validation.rb
|
253
|
+
- lib/croods/middleware/response_validation.rb
|
254
|
+
- lib/croods/model.rb
|
255
|
+
- lib/croods/policy.rb
|
256
|
+
- lib/croods/policy/scope.rb
|
257
|
+
- lib/croods/railtie.rb
|
258
|
+
- lib/croods/resource.rb
|
259
|
+
- lib/croods/resource/actions.rb
|
260
|
+
- lib/croods/resource/attributes.rb
|
261
|
+
- lib/croods/resource/attributes/base.rb
|
262
|
+
- lib/croods/resource/attributes/request.rb
|
263
|
+
- lib/croods/resource/attributes/response.rb
|
264
|
+
- lib/croods/resource/authentication.rb
|
265
|
+
- lib/croods/resource/authorization.rb
|
266
|
+
- lib/croods/resource/controller.rb
|
267
|
+
- lib/croods/resource/filters.rb
|
268
|
+
- lib/croods/resource/identifier.rb
|
269
|
+
- lib/croods/resource/json_schema.rb
|
270
|
+
- lib/croods/resource/json_schema/definition.rb
|
271
|
+
- lib/croods/resource/json_schema/definitions.rb
|
272
|
+
- lib/croods/resource/json_schema/initial_schema.json
|
273
|
+
- lib/croods/resource/json_schema/links.rb
|
274
|
+
- lib/croods/resource/json_schema/links/collection.rb
|
275
|
+
- lib/croods/resource/json_schema/links/create.rb
|
276
|
+
- lib/croods/resource/json_schema/links/destroy.rb
|
277
|
+
- lib/croods/resource/json_schema/links/index.rb
|
278
|
+
- lib/croods/resource/json_schema/links/member.rb
|
279
|
+
- lib/croods/resource/json_schema/links/show.rb
|
280
|
+
- lib/croods/resource/json_schema/links/update.rb
|
281
|
+
- lib/croods/resource/json_schema/properties.rb
|
282
|
+
- lib/croods/resource/json_schema/required.rb
|
283
|
+
- lib/croods/resource/model.rb
|
284
|
+
- lib/croods/resource/names.rb
|
285
|
+
- lib/croods/resource/paths.rb
|
286
|
+
- lib/croods/resource/policy.rb
|
287
|
+
- lib/croods/resource/services.rb
|
288
|
+
- lib/croods/resource/sorting.rb
|
289
|
+
- lib/croods/routes.rb
|
290
|
+
- lib/croods/service.rb
|
291
|
+
- lib/croods/version.rb
|
292
|
+
- lib/tasks/croods_tasks.rake
|
293
|
+
homepage: https://github.com/SeasonedSoftware/croods-rails
|
294
|
+
licenses:
|
295
|
+
- MIT
|
296
|
+
metadata: {}
|
297
|
+
post_install_message:
|
298
|
+
rdoc_options: []
|
299
|
+
require_paths:
|
300
|
+
- lib
|
301
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
302
|
+
requirements:
|
303
|
+
- - ">="
|
304
|
+
- !ruby/object:Gem::Version
|
305
|
+
version: '0'
|
306
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
307
|
+
requirements:
|
308
|
+
- - ">="
|
309
|
+
- !ruby/object:Gem::Version
|
310
|
+
version: '0'
|
311
|
+
requirements: []
|
312
|
+
rubygems_version: 3.0.3
|
313
|
+
signing_key:
|
314
|
+
specification_version: 4
|
315
|
+
summary: A framework for creating CRUDs in Rails APIs
|
316
|
+
test_files: []
|