decidim-sortitions 0.28.0 → 0.28.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: 8e6e67f03a182f5fb70ee117309a2fd2410acd70c4fca467f4c2898502b70fc7
4
- data.tar.gz: ad7331af5e82870080a8696e99831e54ff472bf882a49f79f42706dc039c1054
3
+ metadata.gz: fd815f4f38a9664a11e52034d95a06d51930d6106ab3a0739524d0f64899ac18
4
+ data.tar.gz: b1c9ce8439a1719bea155358462b0fe32d11096042e77fb12d2c2f031b0fea77
5
5
  SHA512:
6
- metadata.gz: c5554084c134e82ec1b9ce18f764d0e9599629519619cecd9e5c8b8634275b665c7f1464f24ad62f5610a81dd6866ed2bbac316aef9d03e0358fbe39b9de12b5
7
- data.tar.gz: aa3e427f386178a513f760108e228fe9dc3a4b069fec4cb247de71822203decf13bc09c43f5def616634af18939492e9bd6ececb04650c821519bc7ea48bf683
6
+ metadata.gz: dcc87180bf91e695fe2c3daedd9ea13fd21d09ce76c46bba2096671aaacafa765acc1a3b39a0c8e1d9db3ebf8d35ce4273644ed1820f1d1117a9371760038027
7
+ data.tar.gz: 036303efd4d97f850d08e06f7f4f26828b562f531fd384e0bc7d9068bad19c76cecf86b50cc007b76686e2e497129b9b0fc58b6337f0a3fbca6bfcd9ef6d84a5
@@ -1,9 +1,9 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
 
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t(".title") %>
6
- </h2>
6
+ </h1>
7
7
  </div>
8
8
 
9
9
  <div class="item__edit item__edit-1col">
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(translated_attribute(sortition.title)) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t ".title" %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
  <div class="item__edit item__edit-1col">
8
8
  <div class="item__edit-form">
@@ -1,13 +1,13 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="card">
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= t(".title") %>
6
6
  <% if allowed_to? :create, :sortition %>
7
7
  <%= link_to t("actions.new_sortition", scope: "decidim.sortitions.admin"), new_sortition_path, class: "button button__sm button__secondary" %>
8
8
  <% end %>
9
9
  <%= render partial: "decidim/admin/components/resource_action" %>
10
- </h2>
10
+ </h1>
11
11
  </div>
12
12
  <div class="table-scroll">
13
13
  <table class="table-list">
@@ -1,8 +1,8 @@
1
1
  <% add_decidim_page_title(t(".title")) %>
2
2
  <div class="item_show__header">
3
- <h2 class="item_show__header-title">
3
+ <h1 class="item_show__header-title">
4
4
  <%= t ".title" %>
5
- </h2>
5
+ </h1>
6
6
  </div>
7
7
  <div class="item__edit item__edit-1col">
8
8
  <div class="item__edit-form">
@@ -1,9 +1,9 @@
1
1
  <% add_decidim_page_title(translated_attribute(sortition.title)) %>
2
2
  <div class="card" id="sortition">
3
3
  <div class="item_show__header">
4
- <h2 class="item_show__header-title">
4
+ <h1 class="item_show__header-title">
5
5
  <%= decidim_html_escape(translated_attribute(sortition.title)) %>
6
- </h2>
6
+ </h1>
7
7
  </div>
8
8
  <div class="table-scroll">
9
9
  <table class="table-list sortition">
@@ -31,7 +31,7 @@ ca:
31
31
  sortitions:
32
32
  sortition_created:
33
33
  email_intro: El sorteig "%{resource_title}" s'ha afegit a "%{participatory_space_title}" que segueixes.
34
- email_outro: Has rebut aquesta notificació perquè estàs seguint "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior.
34
+ email_outro: Has rebut aquesta notificació perquè estàs seguint l'espai "%{participatory_space_title}". Pots deixar de seguir-lo des de l'enllaç anterior.
35
35
  email_subject: Nou sorteig afegit a %{participatory_space_title}
36
36
  notification_title: El sorteig <a href="%{resource_path}">%{resource_title}</a> s'ha afegit a %{participatory_space_title}
37
37
  sortitions:
@@ -96,7 +96,7 @@ de:
96
96
  all: Alle
97
97
  cancelled: Abgebrochen
98
98
  category: Kategorie
99
- state: Zustand
99
+ state: Status
100
100
  index:
101
101
  empty: Es gibt noch keine Sortierungen.
102
102
  linked_sortitions:
@@ -0,0 +1 @@
1
+ he:
@@ -11,7 +11,7 @@ pt-BR:
11
11
  title: Título
12
12
  witnesses: Testemunhas
13
13
  models:
14
- decidim/sortitions/create_sortition_event: Sorteio
14
+ decidim/sortitions/create_sortition_event: Classificação
15
15
  activerecord:
16
16
  models:
17
17
  decidim/sortitions/sortition:
@@ -20,6 +20,8 @@ pt-BR:
20
20
  decidim:
21
21
  components:
22
22
  sortitions:
23
+ actions:
24
+ comment: Comentário
23
25
  name: Sorteios
24
26
  settings:
25
27
  global:
@@ -37,6 +39,7 @@ pt-BR:
37
39
  actions:
38
40
  destroy: Cancelar a classificação
39
41
  edit: Editar
42
+ new_sortition: Novo Sorteio
40
43
  show: Detalhes da classificação
41
44
  models:
42
45
  sortition:
@@ -57,6 +60,10 @@ pt-BR:
57
60
  title: Cancelamento da classificação
58
61
  create:
59
62
  error: Ocorreu um erro ao criar uma nova classificação.
63
+ success: Sorteio criado com sucesso.
64
+ destroy:
65
+ error: Não é possível cancelar o sorteio.
66
+ success: Sorteio cancelado com sucesso.
60
67
  edit:
61
68
  title: Atualizar as informações sobre a classificação
62
69
  update: Atualizar
@@ -73,6 +80,7 @@ pt-BR:
73
80
  selected_proposals: Propostas selecionadas para sorteio
74
81
  update:
75
82
  error: Houve um erro ao atualizar a classificação.
83
+ success: Sorteio atualizado com sucesso.
76
84
  admin_log:
77
85
  sortition:
78
86
  create: "%{user_name} criou a classificação %{resource_name} em %{space_name}"
@@ -89,6 +97,8 @@ pt-BR:
89
97
  cancelled: Cancelado
90
98
  category: Categoria
91
99
  state: Estado
100
+ index:
101
+ empty: Ainda não há sorteios ainda.
92
102
  linked_sortitions:
93
103
  selected_proposals: Propostas selecionadas
94
104
  orders:
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path("lib", __dir__)
4
+
5
+ require "decidim/sortitions/version"
6
+
7
+ Gem::Specification.new do |s|
8
+ s.version = Decidim::Sortitions.version
9
+ s.authors = ["Juan Salvador Perez Garcia"]
10
+ s.email = ["jsperezg@gmail.com"]
11
+ s.license = "AGPL-3.0"
12
+ s.homepage = "https://decidim.org"
13
+ s.metadata = {
14
+ "bug_tracker_uri" => "https://github.com/decidim/decidim/issues",
15
+ "documentation_uri" => "https://docs.decidim.org/",
16
+ "funding_uri" => "https://opencollective.com/decidim",
17
+ "homepage_uri" => "https://decidim.org",
18
+ "source_code_uri" => "https://github.com/decidim/decidim"
19
+ }
20
+ s.required_ruby_version = "~> 3.1.0"
21
+
22
+ s.name = "decidim-sortitions"
23
+ s.summary = "Decidim sortitions module"
24
+ s.description = "This module makes possible to select amont a set of proposal by sortition"
25
+
26
+ s.files = Dir.chdir(__dir__) do
27
+ `git ls-files -z`.split("\x0").select do |f|
28
+ (File.expand_path(f) == __FILE__) ||
29
+ f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
30
+ end
31
+ end
32
+
33
+ s.add_dependency "decidim-admin", Decidim::Sortitions.version
34
+ s.add_dependency "decidim-comments", Decidim::Sortitions.version
35
+ s.add_dependency "decidim-core", Decidim::Sortitions.version
36
+ s.add_dependency "decidim-proposals", Decidim::Sortitions.version
37
+
38
+ s.add_development_dependency "decidim-dev", Decidim::Sortitions.version
39
+ end
@@ -7,16 +7,22 @@ require "decidim/participatory_processes/test/factories"
7
7
 
8
8
  FactoryBot.define do
9
9
  factory :sortition_component, parent: :component do
10
- name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :sortitions).i18n_name }
10
+ transient do
11
+ skip_injection { false }
12
+ end
13
+ name { generate_component_name(participatory_space.organization.available_locales, :sortitions, skip_injection:) }
11
14
  manifest_name { :sortitions }
12
- participatory_space { create(:participatory_process, :with_steps, organization:) }
15
+ participatory_space { create(:participatory_process, :with_steps, organization:, skip_injection:) }
13
16
  end
14
17
 
15
18
  factory :sortition, class: "Decidim::Sortitions::Sortition" do
16
- component { create(:sortition_component) }
17
- decidim_proposals_component { create(:proposal_component, organization: component.organization) }
19
+ transient do
20
+ skip_injection { false }
21
+ end
22
+ component { create(:sortition_component, skip_injection:) }
23
+ decidim_proposals_component { create(:proposal_component, organization: component.organization, skip_injection:) }
18
24
 
19
- title { generate_localized_title }
25
+ title { generate_localized_title(:sortition_title, skip_injection:) }
20
26
  author do
21
27
  create(:user, :admin, organization: component.organization) if component
22
28
  end
@@ -24,15 +30,15 @@ FactoryBot.define do
24
30
  dice { Faker::Number.between(from: 1, to: 6).to_i }
25
31
  target_items { Faker::Number.between(from: 1, to: 5).to_i }
26
32
  request_timestamp { Time.now.utc }
27
- witnesses { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
28
- additional_info { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
29
- selected_proposals { create_list(:proposal, target_items, component: decidim_proposals_component).pluck(:id) }
33
+ witnesses { generate_localized_description(:sortition_witnesses, skip_injection:) }
34
+ additional_info { generate_localized_description(:sortition_additional_info, skip_injection:) }
35
+ selected_proposals { create_list(:proposal, target_items, component: decidim_proposals_component, skip_injection:).pluck(:id) }
30
36
  candidate_proposals { selected_proposals }
31
37
 
32
38
  trait :cancelled do
33
39
  cancelled_on { Time.now.utc }
34
- cancel_reason { Decidim::Faker::Localized.wrapped("<p>", "</p>") { generate_localized_title } }
35
- cancelled_by_user { create(:user, :admin, organization: component.organization) if component }
40
+ cancel_reason { generate_localized_description(:sortition_cancel_reason, skip_injection:) }
41
+ cancelled_by_user { create(:user, :admin, organization: component.organization, skip_injection:) if component }
36
42
  end
37
43
  end
38
44
  end
@@ -3,7 +3,7 @@
3
3
  module Decidim
4
4
  module Sortitions
5
5
  def self.version
6
- "0.28.0"
6
+ "0.28.1"
7
7
  end
8
8
  end
9
9
  end
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-sortitions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.28.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Salvador Perez Garcia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-20 00:00:00.000000000 Z
11
+ date: 2024-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-admin
@@ -16,70 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.28.0
19
+ version: 0.28.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.28.0
26
+ version: 0.28.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: decidim-comments
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.28.0
33
+ version: 0.28.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.28.0
40
+ version: 0.28.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: decidim-core
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 0.28.0
47
+ version: 0.28.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 0.28.0
54
+ version: 0.28.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: decidim-proposals
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.28.0
61
+ version: 0.28.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.28.0
68
+ version: 0.28.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: decidim-dev
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 0.28.0
75
+ version: 0.28.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 0.28.0
82
+ version: 0.28.1
83
83
  description: This module makes possible to select amont a set of proposal by sortition
84
84
  email:
85
85
  - jsperezg@gmail.com
@@ -138,7 +138,6 @@ files:
138
138
  - app/views/decidim/sortitions/sortitions/index.js.erb
139
139
  - app/views/decidim/sortitions/sortitions/show.html.erb
140
140
  - config/assets.rb
141
- - config/environment.rb
142
141
  - config/locales/am-ET.yml
143
142
  - config/locales/ar-SA.yml
144
143
  - config/locales/ar.yml
@@ -171,6 +170,7 @@ files:
171
170
  - config/locales/ga-IE.yml
172
171
  - config/locales/gl.yml
173
172
  - config/locales/gn-PY.yml
173
+ - config/locales/he-IL.yml
174
174
  - config/locales/hr-HR.yml
175
175
  - config/locales/hr.yml
176
176
  - config/locales/hu.yml
@@ -234,6 +234,7 @@ files:
234
234
  - db/migrate/20181017110803_make_sortitions_authors_polymorphic.rb
235
235
  - db/migrate/20200320105926_index_foreign_keys_in_decidim_sortitions_sortitions.rb
236
236
  - db/migrate/20200827154036_add_commentable_counter_cache_to_sortitions.rb
237
+ - decidim-sortitions.gemspec
237
238
  - lib/decidim/api/sortition_type.rb
238
239
  - lib/decidim/api/sortitions_type.rb
239
240
  - lib/decidim/sortitions.rb
@@ -245,6 +246,7 @@ files:
245
246
  - lib/decidim/sortitions/seeds.rb
246
247
  - lib/decidim/sortitions/test/factories.rb
247
248
  - lib/decidim/sortitions/version.rb
249
+ - lib/tasks/decidim/.keep
248
250
  homepage: https://decidim.org
249
251
  licenses:
250
252
  - AGPL-3.0
@@ -254,23 +256,23 @@ metadata:
254
256
  funding_uri: https://opencollective.com/decidim
255
257
  homepage_uri: https://decidim.org
256
258
  source_code_uri: https://github.com/decidim/decidim
257
- post_install_message:
259
+ post_install_message:
258
260
  rdoc_options: []
259
261
  require_paths:
260
262
  - lib
261
263
  required_ruby_version: !ruby/object:Gem::Requirement
262
264
  requirements:
263
- - - ">="
265
+ - - "~>"
264
266
  - !ruby/object:Gem::Version
265
- version: '3.1'
267
+ version: 3.1.0
266
268
  required_rubygems_version: !ruby/object:Gem::Requirement
267
269
  requirements:
268
270
  - - ">="
269
271
  - !ruby/object:Gem::Version
270
272
  version: '0'
271
273
  requirements: []
272
- rubygems_version: 3.4.22
273
- signing_key:
274
+ rubygems_version: 3.5.9
275
+ signing_key:
274
276
  specification_version: 4
275
277
  summary: Decidim sortitions module
276
278
  test_files: []
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Empty line for playing nice with tpope/vim-rails