rails-dsl 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -39
- data/VERSION +1 -1
- data/rails-dsl.gemspec +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb475814640be0c5130ad6cb9702b8693c01d18b
|
4
|
+
data.tar.gz: a673939081f26b3d5b5c55b04890f763c9806db3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ea44a64484abf85e3e7245dd376f39c69fae5499905f344e4456caaeec4e4deb43af020b1959202e9c243d3870ccf74c8f16350a6dddcb9dd55777bfc81dec2
|
7
|
+
data.tar.gz: ec9a57c0059fbe47f2803ae5f9386bc650e0c11c4aa72d27151a120b4d451510a0ee6b76569806b728edcc1551eda6bbc68c194eeb09de3b5970b661b0f75b56
|
data/README.md
CHANGED
@@ -20,18 +20,6 @@ if you call rails with 'kill' / 'k' command from now on, it will kill the applic
|
|
20
20
|
* mount a controller public methods as routes.
|
21
21
|
* the method name will be the path
|
22
22
|
|
23
|
-
you can use the following options (name: [aliases])
|
24
|
-
(the you can specify method(s) rest call type)
|
25
|
-
|
26
|
-
* scope: [:s,:namespace,:path]
|
27
|
-
* resource: [:r,:class]
|
28
|
-
* defaults: [:d,:default]
|
29
|
-
* get: [:read]
|
30
|
-
* post: [:create]
|
31
|
-
* put: [:update]
|
32
|
-
* delete: [:delete]
|
33
|
-
|
34
|
-
|
35
23
|
```ruby
|
36
24
|
|
37
25
|
#> controller
|
@@ -45,33 +33,23 @@ you can use the following options (name: [aliases])
|
|
45
33
|
|
46
34
|
#> routes.rb
|
47
35
|
|
48
|
-
|
49
|
-
|
50
|
-
mount_controller PagesController
|
51
|
-
#> or
|
52
|
-
mount_controller :pages
|
53
|
-
|
36
|
+
RailsApp::Application.routes.draw do
|
37
|
+
mount_by class: :pages || PageController
|
54
38
|
end
|
55
39
|
|
56
|
-
#> mount not private methods from PagesController
|
57
40
|
|
58
41
|
```
|
59
42
|
|
60
43
|
##### As API behavor
|
61
44
|
|
62
|
-
in this mount options
|
63
|
-
|
64
|
-
* the methods return value will be sent back parsed object to the requester
|
65
|
-
* you dont have to set up render options
|
66
|
-
|
67
45
|
* arguments will be parsed into route :params so the othere side can cache based on url
|
68
|
-
* the method
|
46
|
+
* the method actually receive the passed parameter so you can use like in the example
|
69
47
|
|
70
|
-
* by extend the method name you can set the methods REST method by the followind endings:
|
71
|
-
* _get
|
72
|
-
* _post
|
73
|
-
* _put
|
74
|
-
* _delete
|
48
|
+
* by extend the method name you can set the methods REST method by the followind endings or beginnings:
|
49
|
+
* _get || get_
|
50
|
+
* _post || post_
|
51
|
+
* _put || put_
|
52
|
+
* _delete || delete_
|
75
53
|
|
76
54
|
```ruby
|
77
55
|
|
@@ -97,18 +75,13 @@ in this mount options
|
|
97
75
|
end
|
98
76
|
|
99
77
|
#> routes.rb
|
100
|
-
|
101
|
-
HeartShoot::Application.routes.draw do
|
78
|
+
RailsApp::Application.routes.draw do
|
102
79
|
|
103
80
|
# you can still use the Class name too
|
104
|
-
|
105
|
-
|
106
|
-
# or as alias
|
107
|
-
mount_rendered_controllers :pages
|
81
|
+
mount_by class: :pages
|
108
82
|
|
109
|
-
#
|
110
|
-
|
111
|
-
mount_rendered_controllers :pages, defaults: { format: :xml }
|
83
|
+
# defaults can be passed
|
84
|
+
mount_by class: :pages, defaults: { format: :xml }
|
112
85
|
|
113
86
|
end
|
114
87
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
data/rails-dsl.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Luzsi
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 3.0.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rb-readline
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.4.2
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.4.2
|
83
69
|
description: " Provide Rails with some extra tools, please read README.md on git "
|
84
70
|
email:
|
85
71
|
- adamluzsi@gmail.com
|