decidim-budgets 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -0
  3. data/app/commands/decidim/budgets/add_line_item.rb +1 -0
  4. data/app/commands/decidim/budgets/admin/create_project.rb +1 -0
  5. data/app/commands/decidim/budgets/admin/update_project.rb +1 -0
  6. data/app/commands/decidim/budgets/cancel_order.rb +1 -0
  7. data/app/commands/decidim/budgets/checkout.rb +1 -0
  8. data/app/commands/decidim/budgets/remove_line_item.rb +1 -0
  9. data/app/controllers/decidim/budgets/admin/application_controller.rb +1 -0
  10. data/app/controllers/decidim/budgets/admin/attachments_controller.rb +1 -0
  11. data/app/controllers/decidim/budgets/admin/projects_controller.rb +1 -0
  12. data/app/forms/decidim/budgets/admin/project_form.rb +1 -0
  13. data/app/helpers/decidim/budgets/application_helper.rb +1 -0
  14. data/app/helpers/decidim/budgets/projects_helper.rb +1 -0
  15. data/app/models/decidim/budgets/application_record.rb +1 -0
  16. data/app/models/decidim/budgets/line_item.rb +3 -2
  17. data/app/models/decidim/budgets/order.rb +4 -3
  18. data/app/models/decidim/budgets/project.rb +2 -1
  19. data/app/queries/decidim/budgets/filtered_projects.rb +1 -0
  20. data/app/services/decidim/budgets/project_search.rb +1 -0
  21. data/config/i18n-tasks.yml +4 -1
  22. data/config/locales/eu.yml +4 -0
  23. data/lib/decidim/budgets/admin.rb +1 -0
  24. data/lib/decidim/budgets/admin_engine.rb +1 -0
  25. data/lib/decidim/budgets/{list_engine.rb → engine.rb} +2 -1
  26. data/lib/decidim/budgets/feature.rb +1 -1
  27. data/lib/decidim/budgets/test/factories.rb +1 -0
  28. data/lib/decidim/budgets.rb +2 -1
  29. metadata +14 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0f033511d1ba6f2eb85e4b074b5af9ee81bcd74
4
- data.tar.gz: 84ed6e3719e5ff1364499207cbb2c28d56b98dc5
3
+ metadata.gz: a7766da6e89e17216f16e9e047f574d40cad89d7
4
+ data.tar.gz: 3c5ff65d104acc8497d606a3509a167bfb50db74
5
5
  SHA512:
6
- metadata.gz: 898d3323eb23ce2430028cb625fd2614fcb71108781eed2be8aa3fd6a1ac8c55cb21a8669531cf404f61b31dc0887e0bf20c3ed4b983f4a4e8069f65dbe4966d
7
- data.tar.gz: 447f8697dbc481639f222a25648a7c66737dde8ca55ca8902c6aa23f93888cb0d03a9ad7d1b21dbdd049efb78c8da15e0b8ab6f3a567605b070ea010ba0c07f3
6
+ metadata.gz: '09db086aeced3510495a2315772a461d49b56b90afff8bc25dc0f6f782910adf649269b9329ebeffa5bc50f90b7fab8c09bf39e2e6e13e8f58c2df6356781bed'
7
+ data.tar.gz: 40500928db556a0869d9b275b4b62f6195f81e9852e4caaf5f1b51caf6be6ad390a73e4f4e5529be9d66e5a7f6ac07b33a9bce6dc4f14082c4f8b5273a6a03b1
data/Rakefile CHANGED
@@ -1,2 +1,3 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "decidim/dev/common_rake"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # A command with all the business to add new line items to orders
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  module Admin
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  module Admin
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # A command with all the business to cancel an order.
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # A command with all the business to checkout.
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # A command with all the business to add remove line items from orders
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  module Admin
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  module Admin
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  module Admin
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  module Admin
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # Custom helpers, scoped to the budgets engine.
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # A helper to render order and budgets actions
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # Abstract class from which all models in this engine inherit.
@@ -1,11 +1,12 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # The data store for a LineItem in the Decidim::Budgets component. It describes an
5
6
  # association between an order and a project.
6
7
  class LineItem < Budgets::ApplicationRecord
7
- belongs_to :order, class_name: Decidim::Budgets::Order, foreign_key: "decidim_order_id"
8
- belongs_to :project, class_name: Decidim::Budgets::Project, foreign_key: "decidim_project_id"
8
+ belongs_to :order, class_name: "Decidim::Budgets::Order", foreign_key: "decidim_order_id"
9
+ belongs_to :project, class_name: "Decidim::Budgets::Project", foreign_key: "decidim_project_id"
9
10
 
10
11
  validates :order, presence: true, uniqueness: { scope: :project }
11
12
  validates :project, presence: true
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # The data store for a Order in the Decidim::Budgets component. It is unique for each
@@ -8,10 +9,10 @@ module Decidim
8
9
 
9
10
  feature_manifest_name "budgets"
10
11
 
11
- belongs_to :user, class_name: Decidim::User, foreign_key: "decidim_user_id"
12
+ belongs_to :user, class_name: "Decidim::User", foreign_key: "decidim_user_id"
12
13
 
13
- has_many :projects, through: :line_items, class_name: Decidim::Budgets::Project, foreign_key: "decidim_project_id"
14
- has_many :line_items, class_name: Decidim::Budgets::LineItem, foreign_key: "decidim_order_id", dependent: :destroy
14
+ has_many :projects, through: :line_items, class_name: "Decidim::Budgets::Project", foreign_key: "decidim_project_id"
15
+ has_many :line_items, class_name: "Decidim::Budgets::LineItem", foreign_key: "decidim_order_id", dependent: :destroy
15
16
 
16
17
  validates :user, presence: true, uniqueness: { scope: :feature }
17
18
  validate :user_belongs_to_organization
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # The data store for a Project in the Decidim::Budgets component. It stores a
@@ -13,7 +14,7 @@ module Decidim
13
14
  include Decidim::Comments::Commentable
14
15
 
15
16
  feature_manifest_name "budgets"
16
- has_many :line_items, class_name: Decidim::Budgets::LineItem, foreign_key: "decidim_project_id", dependent: :destroy
17
+ has_many :line_items, class_name: "Decidim::Budgets::LineItem", foreign_key: "decidim_project_id", dependent: :destroy
17
18
  has_many :orders, through: :line_items, foreign_key: "decidim_project_id", class_name: "Decidim::Budgets::Order"
18
19
 
19
20
  # Public: Overrides the `commentable?` Commentable concern method.
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # A class used to find projects filtered by features and a date range
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # This class handles search and filtering of projects. Needs a
@@ -1,8 +1,11 @@
1
1
  base_locale: en
2
- locales: [en]
2
+
3
3
  ignore_unused:
4
4
  - "decidim.features.budgets.name"
5
5
  - "decidim.features.budgets.settings.*"
6
6
  - "decidim.features.budgets.actions.*"
7
7
  - "activemodel.attributes.project.*"
8
8
  - "decidim.resource_links.*"
9
+
10
+ search:
11
+ strict: false
@@ -15,6 +15,7 @@ eu:
15
15
  confirm_destroy: Ziur zaude proiektu hau ezabatu nahi duzula?
16
16
  destroy: Garbitu
17
17
  edit: Editatu
18
+ new: Berria
18
19
  preview: Aurreikusi
19
20
  title: Ekintzak
20
21
  admin:
@@ -29,11 +30,13 @@ eu:
29
30
  success: Proiektu ongi ezabatu da
30
31
  edit:
31
32
  title: Editatu proiektua
33
+ update: Eguneratu
32
34
  index:
33
35
  finished_orders: Emandako botoak
34
36
  pending_orders: Emateke dauden botoak
35
37
  title: Proiektuak
36
38
  new:
39
+ create: Sortu
37
40
  title: Emaitza berria
38
41
  update:
39
42
  invalid: Arazo bat izan da proiektu hau eguneratzean
@@ -109,6 +112,7 @@ eu:
109
112
  vote_threshold_percent: Aurrekontuaren gutxieneko ehunekoa
110
113
  step:
111
114
  comments_blocked: Iruzkinak blokeatuta
115
+ show_votes: Erakutsi botoak
112
116
  votes_enabled: Botoak gaituta
113
117
  orders:
114
118
  checkout:
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # This module contains all the domain logic associated to Decidim's Budgets
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Decidim
3
4
  module Budgets
4
5
  # This is the engine that runs on the public interface of `decidim-budgets`.
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "searchlight"
3
4
  require "kaminari"
4
5
 
@@ -7,7 +8,7 @@ module Decidim
7
8
  # This is the engine that runs on the public interface of `decidim-budgets`.
8
9
  # It mostly handles rendering the created projects associated to a participatory
9
10
  # process.
10
- class ListEngine < ::Rails::Engine
11
+ class Engine < ::Rails::Engine
11
12
  isolate_namespace Decidim::Budgets
12
13
 
13
14
  routes do
@@ -3,7 +3,7 @@
3
3
  require_dependency "decidim/features/namer"
4
4
 
5
5
  Decidim.register_feature(:budgets) do |feature|
6
- feature.engine = Decidim::Budgets::ListEngine
6
+ feature.engine = Decidim::Budgets::Engine
7
7
  feature.admin_engine = Decidim::Budgets::AdminEngine
8
8
  feature.icon = "decidim/budgets/icon.svg"
9
9
  feature.stylesheet = "decidim/budgets/budgets"
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "decidim/faker/localized"
3
4
  require "decidim/dev"
4
5
 
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require "decidim/budgets/admin"
3
- require "decidim/budgets/list_engine"
4
+ require "decidim/budgets/engine"
4
5
  require "decidim/budgets/admin_engine"
5
6
  require "decidim/budgets/feature"
6
7
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-budgets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-05-18 00:00:00.000000000 Z
13
+ date: 2017-06-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim-core
@@ -18,28 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.1.0
21
+ version: 0.2.0
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.1.0
28
+ version: 0.2.0
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.1.0
35
+ version: 0.2.0
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.1.0
42
+ version: 0.2.0
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: rectify
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -88,43 +88,43 @@ dependencies:
88
88
  requirements:
89
89
  - - '='
90
90
  - !ruby/object:Gem::Version
91
- version: 0.1.0
91
+ version: 0.2.0
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - '='
97
97
  - !ruby/object:Gem::Version
98
- version: 0.1.0
98
+ version: 0.2.0
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: decidim-proposals
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - '='
104
104
  - !ruby/object:Gem::Version
105
- version: 0.1.0
105
+ version: 0.2.0
106
106
  type: :development
107
107
  prerelease: false
108
108
  version_requirements: !ruby/object:Gem::Requirement
109
109
  requirements:
110
110
  - - '='
111
111
  - !ruby/object:Gem::Version
112
- version: 0.1.0
112
+ version: 0.2.0
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: decidim-admin
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - '='
118
118
  - !ruby/object:Gem::Version
119
- version: 0.1.0
119
+ version: 0.2.0
120
120
  type: :development
121
121
  prerelease: false
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  requirements:
124
124
  - - '='
125
125
  - !ruby/object:Gem::Version
126
- version: 0.1.0
127
- description: ''
126
+ version: 0.2.0
127
+ description: A budgets component for decidim's participatory processes.
128
128
  email:
129
129
  - josepjaume@gmail.com
130
130
  - mrc2407@gmail.com
@@ -205,8 +205,8 @@ files:
205
205
  - lib/decidim/budgets.rb
206
206
  - lib/decidim/budgets/admin.rb
207
207
  - lib/decidim/budgets/admin_engine.rb
208
+ - lib/decidim/budgets/engine.rb
208
209
  - lib/decidim/budgets/feature.rb
209
- - lib/decidim/budgets/list_engine.rb
210
210
  - lib/decidim/budgets/seeds/Exampledocument.pdf
211
211
  - lib/decidim/budgets/seeds/city.jpeg
212
212
  - lib/decidim/budgets/test/factories.rb