rao-api-service_controller 0.0.48.pre → 0.0.49.pre

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
  SHA256:
3
- metadata.gz: 70f80adb410c0f1ff29509fadc89fd7640d6f9a15937323d05f7a206e48cb571
4
- data.tar.gz: 2242989059f5d778706693a17547ca947af4777457c4940d73063413dddd1dab
3
+ metadata.gz: dba22374e65f0d504f90d8c00f1a6b10e065024a57aac0eede0cfab7b9354b2b
4
+ data.tar.gz: f93b0b0875da387fd5446892b9e928d5ba2582865cd8658136ebfece16c960be
5
5
  SHA512:
6
- metadata.gz: 615752dd389283d25fe4016fd6d9c2b0c7d0d0ef67aa216c186ba89bf1c3916cd9d9638966d7f61cf1186028b47e6dbe45329fba8993f9df8160b64320fa558a
7
- data.tar.gz: b63cec9d9e53b52ab65a142d98157c55abb061a48e943581122069dbfe17f48128d7680e29ce779d95adf9e266745b76f6fa978ed94c072ff1dba2d887edece6
6
+ metadata.gz: 18084c7c110be3f1558f2a3e92bfd562642c11f05a5013d051dea619aad04ca11fc5815e7868004c14e985865846be34990eb84af74779997a0cc1638267ef22
7
+ data.tar.gz: d59d9c4d41afcdc0a0d4a3aa76580154055853bf0e92c85a9644e3bcba7e6cfe1bfec8a83aa37c4745272265e1328b0bcfbaebb21b4639cf4059143a66899cca
data/README.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # Rao::Api:ServiceController
2
+
2
3
  Short description and motivation.
3
4
 
4
5
  ## Usage
6
+
5
7
  How to use my plugin.
6
8
 
7
9
  ## Installation
10
+
8
11
  Add this line to your application's Gemfile:
9
12
 
10
13
  ```ruby
@@ -12,11 +15,13 @@ gem 'rao-api-service_controller'
12
15
  ```
13
16
 
14
17
  And then execute:
18
+
15
19
  ```bash
16
20
  $ bundle
17
21
  ```
18
22
 
19
23
  Or install it yourself as:
24
+
20
25
  ```bash
21
26
  $ gem install rao-api-service_controller
22
27
  ```
@@ -27,8 +32,30 @@ Generate the initializer:
27
32
  $ rails g rao:api:service_controller:install
28
33
  ```
29
34
 
35
+ ## Customizing the initialization of the service
36
+
37
+ The service is initialized in the initialize_service_for_create method before
38
+ it is called/performed.
39
+
40
+ If you want to do things with the service before it gets called you can override
41
+ this method in you controller:
42
+
43
+ # app/controller/import_services_controller.rb
44
+ class ImportServicesController < ApplicationServicesController
45
+ #...
46
+
47
+ private
48
+
49
+ def initialize_service_for_create
50
+ super
51
+ @service.current_user_id = session['current_user_id']
52
+ end
53
+ end
54
+
30
55
  ## Contributing
56
+
31
57
  Contribution directions go here.
32
58
 
33
59
  ## License
60
+
34
61
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -58,8 +58,9 @@ module Rao
58
58
  #
59
59
  # Example:
60
60
  # # app/controller/import_services_controller.rb
61
- # class ImportServices < ApplicationServicesController
61
+ # class ImportServicesController < ApplicationServicesController
62
62
  # #...
63
+ #
63
64
  # private
64
65
  #
65
66
  # def initialize_service_for_create
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-api-service_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.48.pre
4
+ version: 0.0.49.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-21 00:00:00.000000000 Z
11
+ date: 2023-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: 1.3.1
140
140
  requirements: []
141
- rubygems_version: 3.2.24
141
+ rubygems_version: 3.4.11
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: API Services Controller for Ruby on Rails.