alchemy-json_api 0.4.0 → 0.5.0

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: ea47ab9f8a57a02051be3608bc9e9522278c4141df1faa904a58f523b288e0f5
4
- data.tar.gz: 26f82508a2ec37ec8545b3d2bb3d7430285b58a8187659f140a945057dbfc329
3
+ metadata.gz: 75009d101abaf01259e6cedae35acc22f02168d0714e6a3eda87e280361d3b91
4
+ data.tar.gz: f40dd94a84033d62409e3c4fffd261ec03ed1193017f8b6baf90bb2d2aec9ae8
5
5
  SHA512:
6
- metadata.gz: b48a6480ca4015eed8e7d4bc0a391e573bde8ed56a56c9024c8fbe2b54aa52f0de198c9975fc828ee5e50dd9ff21aa8b1f595fe0c914111c2ac073e95a722c7f
7
- data.tar.gz: e4c64ff707b456b459d3301f8d45118682f58b0e992ea6bda62d9db5b5edee3a66becc3feb0a6bdaf8136f76baeda73b20da367101f11615b6b67df724354b4e
6
+ metadata.gz: 9b326f105a93d6752282112615888ee3e86bf72c5486a3ad77547fb9dae664bcbf3325ee902b04d192b96dacc5bd60935ed37bc827874f72bc2522a48a890e0f
7
+ data.tar.gz: 55149b58ba90ef71688029b1f13ca2789ae00ae5b230989e670ae05a41c2b58df17ce2210429dbef3393f6304c663730f20bf9fc69440a90871c06dabe39a425
data/Rakefile CHANGED
@@ -26,3 +26,11 @@ task :test_setup do
26
26
  exit($?.exitstatus) unless $?.success?
27
27
  end
28
28
  end
29
+
30
+ require "github_changelog_generator/task"
31
+ require "alchemy/json_api/version"
32
+ GitHubChangelogGenerator::RakeTask.new(:changelog) do |config|
33
+ config.user = "AlchemyCMS"
34
+ config.project = "alchemy-json_api"
35
+ config.future_release = "v#{Alchemy::JsonApi::VERSION}"
36
+ end
@@ -4,7 +4,9 @@ module Alchemy
4
4
  class BaseController < ::ApplicationController
5
5
  include Alchemy::ControllerActions
6
6
  include JSONAPI::Fetching
7
- include JSONAPI::Errors
7
+ if Rails.env.production?
8
+ include JSONAPI::Errors
9
+ end
8
10
  include JSONAPI::Filtering
9
11
  include JSONAPI::Pagination
10
12
  end
@@ -4,11 +4,12 @@ module Alchemy
4
4
  class ElementSerializer
5
5
  include FastJsonapi::ObjectSerializer
6
6
  attributes(
7
+ :name,
8
+ :fixed,
7
9
  :position,
8
10
  :created_at,
9
11
  :updated_at,
10
12
  )
11
- attribute :element_type, &:name
12
13
  belongs_to :parent_element, record_type: :element, serializer: self
13
14
 
14
15
  belongs_to :page
@@ -18,6 +18,7 @@ module Alchemy
18
18
  belongs_to :language
19
19
 
20
20
  has_many :elements
21
+ has_many :fixed_elements, record_type: :element, serializer: ElementSerializer
21
22
 
22
23
  has_many :all_elements, record_type: :element, serializer: ElementSerializer do |page|
23
24
  page.all_elements.select { |e| e.public? && !e.trashed? }
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Alchemy
3
3
  module JsonApi
4
- VERSION = "0.4.0"
4
+ VERSION = "0.5.0"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-json_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Meyerhoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-28 00:00:00.000000000 Z
11
+ date: 2020-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: github_changelog_generator
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: jsonapi-rspec
71
85
  requirement: !ruby/object:Gem::Requirement