elpong-rails 0.2.0 → 0.2.1
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 +4 -4
- data/lib/elpong/rails/helper.rb +12 -4
- data/lib/elpong/rails/version.rb +1 -1
- metadata +17 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43f3907fb147b914356de01271a2112d2521bf4c
|
|
4
|
+
data.tar.gz: 886fb4b982d9cda420310d2d7c05584e379f4fec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7353798d0648e98a2f6556c334f7ee898dec26ff14e864e62bdd7be40f4ecff9919dac2c3d70f5475f7bcad5f3944e2aa381caaacce6f0a031cad580825110f7
|
|
7
|
+
data.tar.gz: a4c0fa6818cb851b5962d97460ac4b126762625b9862ccab526385e9183f2fd3bd8006de9e522252e2ebd1dd3a64254400138418448fbcc2575610fb5ccc4099
|
data/lib/elpong/rails/helper.rb
CHANGED
|
@@ -9,10 +9,14 @@ module Elpong
|
|
|
9
9
|
def elpong_collection(name, options = {})
|
|
10
10
|
scheme = get_scheme_from_name_or_scheme(options[:scheme])
|
|
11
11
|
# options[:locals] ||=
|
|
12
|
-
|
|
12
|
+
raise StandardError, 'No path or data' unless options[:path] || options[:data]
|
|
13
|
+
|
|
14
|
+
content =
|
|
15
|
+
options[:data] || h( render(formats: [:json], template: options[:path], locals: options[:locals] || {}) )
|
|
16
|
+
|
|
13
17
|
attributes = {
|
|
14
18
|
name: 'elpong-collection',
|
|
15
|
-
content:
|
|
19
|
+
content: content,
|
|
16
20
|
scheme: scheme.name,
|
|
17
21
|
collection: name
|
|
18
22
|
}
|
|
@@ -21,10 +25,14 @@ module Elpong
|
|
|
21
25
|
|
|
22
26
|
def elpong_element(singular_name, options = {})
|
|
23
27
|
scheme = get_scheme_from_name_or_scheme(options[:scheme])
|
|
24
|
-
|
|
28
|
+
raise StandardError, 'No path or data' unless options[:path] || options[:data]
|
|
29
|
+
|
|
30
|
+
content =
|
|
31
|
+
options[:data] || h( render(formats: [:json], template: options[:path], locals: options[:locals] || {}) )
|
|
32
|
+
|
|
25
33
|
attributes = {
|
|
26
34
|
name: 'elpong-element',
|
|
27
|
-
content:
|
|
35
|
+
content: content,
|
|
28
36
|
scheme: scheme.name,
|
|
29
37
|
collection: singular_name.pluralize
|
|
30
38
|
}
|
data/lib/elpong/rails/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elpong-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hans Otto Wirtz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-02-
|
|
11
|
+
date: 2017-02-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -44,6 +44,20 @@ dependencies:
|
|
|
44
44
|
- - ">="
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
46
|
version: 0.2.1
|
|
47
|
+
- !ruby/object:Gem::Dependency
|
|
48
|
+
name: rspec
|
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '3.5'
|
|
54
|
+
type: :development
|
|
55
|
+
prerelease: false
|
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
+
requirements:
|
|
58
|
+
- - "~>"
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
version: '3.5'
|
|
47
61
|
description:
|
|
48
62
|
email:
|
|
49
63
|
- hansottowirtz@gmail.com
|
|
@@ -79,9 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
79
93
|
version: '0'
|
|
80
94
|
requirements: []
|
|
81
95
|
rubyforge_project:
|
|
82
|
-
rubygems_version: 2.6.
|
|
96
|
+
rubygems_version: 2.6.8
|
|
83
97
|
signing_key:
|
|
84
98
|
specification_version: 4
|
|
85
99
|
summary: Elpong for Rails
|
|
86
100
|
test_files: []
|
|
87
|
-
has_rdoc:
|