upframework 0.2.1 → 0.2.2

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: b5dc4e38225f1091ec9ededb3e0403156c9806a95e0b23c22c03169a030fda1b
4
- data.tar.gz: 68be508da24fb695aea2029b0ac78cf0dfb5408ee3d8c3997fb67caf921a7698
3
+ metadata.gz: d88db49c9f1f7137b98b936cf13792218150eb0cb61c6278ff11fee45f9c8c05
4
+ data.tar.gz: 5263d90be331e0459b6f3e735052758a539b2a9466987765041df221b8cb572a
5
5
  SHA512:
6
- metadata.gz: dc9e6fc1fa2df5b5f710a755bf5814e787d06f16c5792fcefaa8339940bdd73dc50eb72e25ca73ee7a2710085ce2472c65f15be4b89dcef13fdce09b61db6aae
7
- data.tar.gz: 43d03176e6695273b2216b214d5730f59de656b19dba481fd44e1eb2da78216397db2e9dfeeb032bcb07a729d0ffdd788420080cb0f8720d9de25132344a93c6
6
+ metadata.gz: 801d5101e0aadd229c9c698dc43dd9850d896fb244274a388d3bcb5df3596a2d83ce3a08ab0645eb4d154d487bdfa8629d63332d4cbf17245c8b1aa1b8eed439
7
+ data.tar.gz: f21de820db493c15daea315e7fff83439ec5c286da810b22860e6b981e45417c45ea08c201cccc53fb45ac319212c652f6ce77c02ee0bfa1601a58b0fa974d63
data/README.md CHANGED
@@ -1,8 +1,42 @@
1
1
  # Upframework
2
- Short description and motivation.
2
+ Add features on top of Rails, Especially for APIs. This was created to make structural code reusable to other projects (not solving the same problem all over again). And to make the main application less bloated and only contain domain specific code as much as possible.
3
3
 
4
- ## Usage
5
- How to use my plugin.
4
+ #### The following features are available.
5
+ - Creates (create, read, update, destroy) action methods for resources.
6
+ - Has render helpers for API or socket responses. ex. Converting models to its designated serializer.
7
+ - Converts snake case request params (from js standard) to underscore params (ruby standard)
8
+ - Searches layer under app/searches. Usually used for form searches.
9
+ - Services layer under app/services. For single responsibility domain-specific logic code.
10
+ - Exception notifier and API error response handler.
11
+
12
+ ## Basic Usage
13
+ ####Controllers
14
+ ```ruby
15
+ #app/controllers
16
+ class ProjectsController < Upframework::ResourcesController
17
+ end
18
+ ```
19
+
20
+ ####Searches
21
+ ```ruby
22
+ #app/searches
23
+ class ProjectSearch < Upframework::BaseSearch
24
+ end
25
+ ```
26
+
27
+ ####Services
28
+ ```ruby
29
+ #app/services
30
+ class Project::SubmitService < Upframework::BaseService
31
+ end
32
+ ```
33
+
34
+ ####Routes
35
+ app/services
36
+ ```ruby
37
+ #config/routes
38
+ mount Upframework::Engine => /path
39
+ ```
6
40
 
7
41
  ## Installation
8
42
  Add this line to your application's Gemfile:
@@ -20,4 +20,13 @@ class Upframework::BaseSearch < Upframework::BaseService
20
20
  def present_value?(field)
21
21
  instance_variable_get("@#{field}").present?
22
22
  end
23
+
24
+ module ExecuteWrapper
25
+ def execute
26
+ super
27
+ paginate_scope
28
+ end
29
+ end
30
+
31
+ include ExecuteWrapper
23
32
  end
@@ -1,3 +1,3 @@
1
1
  module Upframework
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upframework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jude_cali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-16 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails