decidim-pages 0.4.2 → 0.4.3

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
  SHA1:
3
- metadata.gz: 48ef201f088e59abee7343e78d982042ef0fcde1
4
- data.tar.gz: '0188f2b504f24d75904f56f6270f54b4cdaf2d09'
3
+ metadata.gz: 96b0c4b3942fd8cd122dee202d176f1796902972
4
+ data.tar.gz: 7b5d55ff4d6520bbe72d9b2519547334a11ff41d
5
5
  SHA512:
6
- metadata.gz: 60b90f49bdeca76782647417c26446884968171f766c4020f487337a32faed6f46214e6379a2f6ae7bc45948cf67188af1865a3470c3f89e2e79f1e465230f8a
7
- data.tar.gz: f60e4af2448296685e0e1da3ed4d058b2bd44c0801c256f6e035e05713c5f073dce714f4c1ef599533a614819b2523a575a153e0a0bffa2ba5c4911a47caaf47
6
+ metadata.gz: 33c22da7024e712eb94cc5ff3300f573b04c526db3ce2d228d16e898a106ff40d5428f204b063ac8a8a61e92c4f4c75831d4fba96efc35258705946cd3b08ea3
7
+ data.tar.gz: c4c79d5629d2e70ba057c39a920c4da9c20de056f2804607e1feacf034193fc7fc2df831fa276df86957e2b9b3962d68f3b8c4189791394693fd149a64179267
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "decidim/features/namer"
3
+ require "decidim/features/namer"
4
4
 
5
5
  Decidim.register_feature(:pages) do |feature|
6
6
  feature.engine = Decidim::Pages::Engine
@@ -25,6 +25,13 @@ Decidim.register_feature(:pages) do |feature|
25
25
  end
26
26
  end
27
27
 
28
+ feature.register_stat :pages_count do |features, start_at, end_at|
29
+ pages = Decidim::Pages::Page.where(feature: features)
30
+ pages = pages.where("created_at >= ?", start_at) if start_at.present?
31
+ pages = pages.where("created_at <= ?", end_at) if end_at.present?
32
+ pages.count
33
+ end
34
+
28
35
  feature.register_stat :comments_count, tag: :comments do |features, start_at, end_at|
29
36
  pages = Decidim::Pages::Page.where(feature: features)
30
37
  pages = pages.where("created_at >= ?", start_at) if start_at.present?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.4.2
21
+ version: 0.4.3
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 0.4.2
28
+ version: 0.4.3
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: decidim-comments
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.4.2
35
+ version: 0.4.3
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - '='
41
41
  - !ruby/object:Gem::Version
42
- version: 0.4.2
42
+ version: 0.4.3
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rectify
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -60,14 +60,14 @@ dependencies:
60
60
  requirements:
61
61
  - - '='
62
62
  - !ruby/object:Gem::Version
63
- version: 0.4.2
63
+ version: 0.4.3
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - '='
69
69
  - !ruby/object:Gem::Version
70
- version: 0.4.2
70
+ version: 0.4.3
71
71
  description: A pages component for decidim's participatory processes.
72
72
  email:
73
73
  - josepjaume@gmail.com
@@ -112,7 +112,6 @@ files:
112
112
  - lib/decidim/pages/admin_engine.rb
113
113
  - lib/decidim/pages/engine.rb
114
114
  - lib/decidim/pages/feature.rb
115
- - lib/tasks/decidim/pages_tasks.rake
116
115
  homepage: https://github.com/decidim/decidim
117
116
  licenses:
118
117
  - AGPLv3
@@ -1 +0,0 @@
1
- # frozen_string_literal: true