spina-admin-journal 0.4.0 → 0.4.1

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: 9558f4aae0173062e342e21d8bc44566933b1d2f60968a1466eb7612bc28250c
4
- data.tar.gz: 067acad98f36c578ecb367bb8a7179deebb4d0aaad61ebdf82baefb6887f8668
3
+ metadata.gz: 40f92e9ff8032770be4faf4bd6c32eaffde2c9bbaca6189f361c876e50ae9975
4
+ data.tar.gz: ce515e0d66666f5568664285290ec48d5595334603355bdf6d44161c4ab1024f
5
5
  SHA512:
6
- metadata.gz: f67811ae559061d1cdf6120a043f8c3a926c4744950c6db727cd97a3650e03bc4f6bb041e3d527d555e6eb13f7910d38793cb9682997154c1675ed73c858b3f2
7
- data.tar.gz: 5a60f2a5637a28a7f7ee5ffe6a7413db3deee3a27160ab839479736d677afa00b88cd1ae052827fd613e459e742858d1ba6356eb6c5d814f1d720820ca547842
6
+ metadata.gz: 8fb91af1b4b6bf4755a469b4a968ae00a5a180563b35b35ee7129119fb735f592803de12bf75583d0f2c9a3afa914c3c2131f8a43299fc98bff22d19eed839b8
7
+ data.tar.gz: 474f142ef4e0948f22643959c93420d947821030bf16acd05017ee2bbc1bdf14d5fe740cc9ec9326ef52d69c99f9332e9032e65cb7b14b0074c14a46672d0a1a
@@ -42,21 +42,21 @@ module Spina
42
42
  has_many :affiliations, through: :authorships
43
43
 
44
44
  # @!attribute [rw] status
45
- # @return [Integer] th currnt status of the article
46
- enum status: { published: 0, draft: 1 }
45
+ # @return [Integer] the current status of the article
46
+ enum status: { published: 0, draft: 1, meta: 2 }
47
47
 
48
48
  validates :number, presence: true, uniqueness: { scope: :issue_id }
49
49
  validates :title, presence: true
50
50
  validates :url, 'spina/admin/journal/uri': true
51
51
  validates :status, presence: true
52
52
 
53
- scope :visible, -> { where(status: :published) }
53
+ scope :visible, -> { where(status: %i[published meta]) }
54
54
  scope :sorted_asc, -> { includes(:issue).order('spina_admin_journal_issues.number ASC', number: :asc) }
55
55
  scope :sorted_desc, -> { includes(:issue).order('spina_admin_journal_issues.number DESC', number: :desc) }
56
56
 
57
57
  # Returns true if the article should be visible to end users (i.e. is not a draft).
58
58
  def visible?
59
- published?
59
+ published? || meta?
60
60
  end
61
61
  end
62
62
  end
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Admin
5
5
  module Journal
6
- VERSION = '0.4.0'
6
+ VERSION = '0.4.1'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina-admin-journal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis Van Steene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-21 00:00:00.000000000 Z
11
+ date: 2021-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babel-transpiler