workarea-blog 3.4.7 → 3.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +13 -0
- data/Rakefile +4 -4
- data/app/view_models/workarea/storefront/blog_view_model.rb +1 -1
- data/lib/workarea/blog/version.rb +1 -1
- data/test/view_models/workarea/storefront/blog_view_model_test.rb +23 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e87f8cf05f4855dc05e2a61e1df898971902d7408e691db8c5d70a25e4194fc
|
4
|
+
data.tar.gz: 5fa1624cd20946a0a29c968d6861a457dead106368c55cc438dafba48629a961
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bfd69d488b23f9616d981b78c100513c49110cedfd6232924d44295c4b4f4e88d01924a7409f607f30f3bab8105c3e1ba8e2686db556b8c1350c252ac9a45f3
|
7
|
+
data.tar.gz: b7125a6748b4ed90bf72f32150e0b64fe298b37d692e961a93594a103a49dd060a6e2d339ce5d83a2eec0e77b0694ab7f8b760701a356008fd2221a19c7918d5
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
Workarea Blog 3.4.8 (2019-10-01)
|
2
|
+
--------------------------------------------------------------------------------
|
3
|
+
|
4
|
+
* Fix Blog Entries Total Count
|
5
|
+
|
6
|
+
The `#total` method on `Storefront::BlogEntryViewModel` was not
|
7
|
+
returning the actual total amount of entries if they exceeded 25, due to
|
8
|
+
Kaminari's default pagination. Use `scoped_entries.total_count` here to
|
9
|
+
avoid the problem.
|
10
|
+
Tom Scott
|
11
|
+
|
12
|
+
|
13
|
+
|
1
14
|
Workarea Blog 3.4.7 (2019-08-21)
|
2
15
|
--------------------------------------------------------------------------------
|
3
16
|
|
data/Rakefile
CHANGED
@@ -27,10 +27,10 @@ desc "Release version #{Workarea::Blog::VERSION} of the gem"
|
|
27
27
|
task :release do
|
28
28
|
host = "https://#{ENV['BUNDLE_GEMS__WEBLINC__COM']}@gems.weblinc.com"
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
Rake::Task['workarea:changelog'].execute
|
31
|
+
system 'git add CHANGELOG.md'
|
32
|
+
system 'git commit -m "Update CHANGELOG"'
|
33
|
+
system 'git push origin HEAD'
|
34
34
|
|
35
35
|
system "git tag -a v#{Workarea::Blog::VERSION} -m 'Tagging #{Workarea::Blog::VERSION}'"
|
36
36
|
system 'git push --tags'
|
@@ -143,6 +143,29 @@ module Workarea
|
|
143
143
|
refute newly_published.empty?
|
144
144
|
end
|
145
145
|
end
|
146
|
+
|
147
|
+
def test_total
|
148
|
+
release = create_release(publish_at: 1.hour.from_now, published_at: nil)
|
149
|
+
26.times do
|
150
|
+
@blog.entries.create!(name: 'Test', author: 'BC', active: true)
|
151
|
+
@blog.entries.create!(name: 'Unpublished', author: 'BC', active: false)
|
152
|
+
end
|
153
|
+
release.as_current do
|
154
|
+
@blog.entries.where(name: 'Unpublished').each do |entry|
|
155
|
+
entry.update!(active: true)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
view_model = Workarea::Storefront::BlogViewModel.new(@blog)
|
160
|
+
|
161
|
+
assert_equal(26, view_model.total)
|
162
|
+
|
163
|
+
release.as_current do
|
164
|
+
view_model = Workarea::Storefront::BlogViewModel.new(@blog.reload)
|
165
|
+
|
166
|
+
assert_equal(52, view_model.total)
|
167
|
+
end
|
168
|
+
end
|
146
169
|
end
|
147
170
|
end
|
148
171
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workarea-blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bcrouse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workarea
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
- !ruby/object:Gem::Version
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
|
-
rubygems_version: 3.0.
|
270
|
+
rubygems_version: 3.0.6
|
271
271
|
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: Blog plugin for Workarea.
|