rails-api-controller-generator 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ebaaceef6e058e61aed9084c0e5cf9411b974c9f6e92cb46535adbd7e33e8b5
|
4
|
+
data.tar.gz: a10879b9e5d26f758a7e51a646892d7e9e6727c44159fc53f84a69e7636e6613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc9f7a69b6c18e898156ee0dc0e5b04f845305bae70bff32f8fdb44b8ace7ce931d4bf75da6bbc2cc0d7a333175bfa72278ccd39a48d68b1fca70abf1aedf057
|
7
|
+
data.tar.gz: accdbec97018311227902a6385d0400a297a445cf64d9f41a6b720a9a52aa037bc685d06a4d07e8a0b42c06373591669ce36160476498597660333edf4176031
|
data/README.md
CHANGED
@@ -10,7 +10,9 @@ This generator is highly opinionated. It creates files that fit the way I manage
|
|
10
10
|
Add this line to your application's Gemfile:
|
11
11
|
|
12
12
|
```ruby
|
13
|
-
|
13
|
+
group :development do
|
14
|
+
gem 'rails-api-controller-generator'
|
15
|
+
end
|
14
16
|
```
|
15
17
|
|
16
18
|
And then execute:
|
@@ -6,7 +6,7 @@ class ApiControllerGenerator < Rails::Generators::NamedBase
|
|
6
6
|
template "controller.rb", "app/controllers/api/v1/#{plural_name}_controller.rb"
|
7
7
|
actions.each do |action|
|
8
8
|
@action = action
|
9
|
-
template "schema.rb", "app/schemas/#{plural_name}_#{action}_schema.rb"
|
9
|
+
template "schema.rb", "app/schemas/#{plural_name}/#{plural_name}_#{action}_schema.rb"
|
10
10
|
template "use_case.rb", "app/use_cases/#{plural_name}/#{action}.rb"
|
11
11
|
end
|
12
12
|
template "presenter.rb", "app/presenters/#{singular_name}_presenter.rb"
|
@@ -5,14 +5,14 @@ require "rails/api/controller/generator/version"
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "rails-api-controller-generator"
|
8
|
-
spec.version = "0.1.
|
8
|
+
spec.version = "0.1.1"
|
9
9
|
spec.authors = ["thmyrk"]
|
10
10
|
spec.email = ["przemyslaw.piotrowski@atteo.com"]
|
11
11
|
|
12
12
|
spec.summary = "Proper rails generator for controller in REST API using RSpec and use_case pattern"
|
13
13
|
spec.description = "Generates: controller file with actions specified in arguments, schema file for param validation written using dry-validation"\
|
14
|
-
"gem, use case class for handling logic of the request, presenter class for serialization of objects, request rspec specs for"\
|
15
|
-
"proper testing"
|
14
|
+
" gem, use case class for handling logic of the request, presenter class for serialization of objects, request rspec specs for"\
|
15
|
+
" proper testing"
|
16
16
|
spec.homepage = "https://github.com/thmyrk/rails-api-controller-generator"
|
17
17
|
spec.license = "MIT"
|
18
18
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-api-controller-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thmyrk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,9 +53,9 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
description: 'Generates: controller file with actions specified in arguments, schema
|
56
|
-
file for param validation written using dry-
|
56
|
+
file for param validation written using dry-validation gem, use case class for handling
|
57
57
|
logic of the request, presenter class for serialization of objects, request rspec
|
58
|
-
specs
|
58
|
+
specs for proper testing'
|
59
59
|
email:
|
60
60
|
- przemyslaw.piotrowski@atteo.com
|
61
61
|
executables: []
|