alchemy-json_api 4.0.1 → 4.1.0
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/Rakefile +0 -8
- data/app/serializers/alchemy/json_api/page_serializer.rb +11 -3
- data/lib/alchemy/json_api/version.rb +1 -1
- metadata +4 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4fe3fa80939a3a4c71021615dddb7273520a46124bf85871620508a3e7c81cf0
|
|
4
|
+
data.tar.gz: ae76e2fd0da24bd8b74f2587f2245389ed363761a78c87081cc4a035b4848e67
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67f21661ac2da1a6b42401c0929f2b22f4af66649aadb92bf472a8c75cf62b35e8019a3e9d2e401fae9739540f028cc0e995f13df5f113e97bfc95a9367bc958
|
|
7
|
+
data.tar.gz: c0e176260a39170246bf401307a06cb61042851e1523c95d9e71315c4979896591e481a750fae90adf1d177e5160508d9532269b8dcd1edd8710770164716d3f
|
data/Rakefile
CHANGED
|
@@ -30,11 +30,3 @@ task :test_setup do
|
|
|
30
30
|
exit($?.exitstatus) unless $?.success?
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
|
-
|
|
34
|
-
require "github_changelog_generator/task"
|
|
35
|
-
require "alchemy/json_api/version"
|
|
36
|
-
GitHubChangelogGenerator::RakeTask.new(:changelog) do |config|
|
|
37
|
-
config.user = "AlchemyCMS"
|
|
38
|
-
config.project = "alchemy-json_api"
|
|
39
|
-
config.future_release = "v#{Alchemy::JsonApi::VERSION}"
|
|
40
|
-
end
|
|
@@ -10,10 +10,7 @@ module Alchemy
|
|
|
10
10
|
:urlname,
|
|
11
11
|
:url_path,
|
|
12
12
|
:page_layout,
|
|
13
|
-
:title,
|
|
14
13
|
:language_code,
|
|
15
|
-
:meta_keywords,
|
|
16
|
-
:meta_description,
|
|
17
14
|
:created_at,
|
|
18
15
|
:updated_at,
|
|
19
16
|
:restricted
|
|
@@ -25,6 +22,17 @@ module Alchemy
|
|
|
25
22
|
page.legacy_urls.map(&:urlname)
|
|
26
23
|
end
|
|
27
24
|
|
|
25
|
+
%i[title meta_keywords meta_description].each do |attr_name|
|
|
26
|
+
attribute attr_name do |page|
|
|
27
|
+
case page.page_version_type
|
|
28
|
+
when :public_version
|
|
29
|
+
page.public_version&.send(attr_name)
|
|
30
|
+
else
|
|
31
|
+
page.draft_version.send(attr_name)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
28
36
|
belongs_to :language, record_type: :language, serializer: ::Alchemy::JsonApi::LanguageSerializer
|
|
29
37
|
|
|
30
38
|
has_many :ancestors, record_type: :page, serializer: self do |page|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alchemy-json_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0
|
|
4
|
+
version: 4.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Martin Meyerhoff
|
|
@@ -16,7 +16,7 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 8.
|
|
19
|
+
version: 8.1.0.a
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
22
|
version: '9'
|
|
@@ -26,7 +26,7 @@ dependencies:
|
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 8.
|
|
29
|
+
version: 8.1.0.a
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
32
|
version: '9'
|
|
@@ -64,20 +64,6 @@ dependencies:
|
|
|
64
64
|
- - ">="
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
66
|
version: '0'
|
|
67
|
-
- !ruby/object:Gem::Dependency
|
|
68
|
-
name: github_changelog_generator
|
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
|
70
|
-
requirements:
|
|
71
|
-
- - ">="
|
|
72
|
-
- !ruby/object:Gem::Version
|
|
73
|
-
version: '0'
|
|
74
|
-
type: :development
|
|
75
|
-
prerelease: false
|
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
77
|
-
requirements:
|
|
78
|
-
- - ">="
|
|
79
|
-
- !ruby/object:Gem::Version
|
|
80
|
-
version: '0'
|
|
81
67
|
- !ruby/object:Gem::Dependency
|
|
82
68
|
name: jsonapi-rspec
|
|
83
69
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -181,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
181
167
|
- !ruby/object:Gem::Version
|
|
182
168
|
version: '0'
|
|
183
169
|
requirements: []
|
|
184
|
-
rubygems_version: 4.0.
|
|
170
|
+
rubygems_version: 4.0.3
|
|
185
171
|
specification_version: 4
|
|
186
172
|
summary: A JSONAPI compliant API for AlchemyCMS
|
|
187
173
|
test_files: []
|