decidim-dev 0.6.8 → 0.7.0

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: '088663068354b543568ef533cb5e717b617ea501'
4
- data.tar.gz: 537c6e104b873a376fbf1048f7cf6582fc919b2b
3
+ metadata.gz: 589e2d9ba327ce3a9251b3b5e8e1a24f76c00f15
4
+ data.tar.gz: 204078584e3c2cd34ae445a3e12968800476f118
5
5
  SHA512:
6
- metadata.gz: 5b72f1635135d8b79184019a510b183063568d5b230ba7ee9c11dc3bc7d38ba1138423e3405547c42b722760d92fa39e20ef9828120653461f794463a53525c2
7
- data.tar.gz: 597e2d31615dd73f0cc353cc863671c868d2d2cc8e7cb473abf77a483f2b9ceb5da8e9d9e7b79ead6db2be636bd362e2cc657142b11f58772d3d655570f9a17c
6
+ metadata.gz: 1cdbae0464475b3a92cc34c5148b019bb3beadbd2c3956d15abdddf911595d8519bd192ca322bac713055ee6239efa792fd96570320a0a68d7f53faf9d08c883
7
+ data.tar.gz: 64d04c05e2e07966034a232cd06a95079161d4445d78e7ff41c0e5c0eaa43596d4cff12635edbb57581cd0154c18e0d93ff3ada12fb5bf4d506eba22a1d86b65
@@ -6,4 +6,4 @@ fr:
6
6
  dummies: Nuls
7
7
  resource_links:
8
8
  test_link:
9
- dummy_resource_dummy: Mannequin apparenté
9
+ dummy_resource_dummy: Référence factice concernée
@@ -0,0 +1,9 @@
1
+ ru:
2
+ decidim:
3
+ dummy:
4
+ admin:
5
+ exports:
6
+ dummies: Нерабочие псевдо-части
7
+ resource_links:
8
+ test_link:
9
+ dummy_resource_dummy: Связанный нерабочий псевдо-ресурс
@@ -29,7 +29,7 @@ shared_examples "with promoted participatory processes" do
29
29
  :promoted,
30
30
  organization: organization
31
31
  )
32
- last.active_step.update_attribute(:end_date, nil)
32
+ last.active_step.update_attributes!(end_date: nil)
33
33
 
34
34
  first = create(
35
35
  :participatory_process,
@@ -39,7 +39,7 @@ shared_examples "with promoted participatory processes" do
39
39
  organization: organization,
40
40
  end_date: Time.current.advance(days: 10)
41
41
  )
42
- first.active_step.update_attribute(:end_date, Time.current.advance(days: 2))
42
+ first.active_step.update_attributes!(end_date: Time.current.advance(days: 2))
43
43
 
44
44
  second = create(
45
45
  :participatory_process,
@@ -49,7 +49,7 @@ shared_examples "with promoted participatory processes" do
49
49
  organization: organization,
50
50
  end_date: Time.current.advance(days: 8)
51
51
  )
52
- second.active_step.update_attribute(:end_date, Time.current.advance(days: 4))
52
+ second.active_step.update_attributes!(end_date: Time.current.advance(days: 4))
53
53
 
54
54
  expect(controller.helpers.promoted_participatory_processes)
55
55
  .to match_array([first, second, last])
@@ -1,8 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "decidim/dev/dummy_authorization_handler"
4
3
  RSpec.configure do |config|
5
- config.before(:each) do
6
- Decidim.config.authorization_handlers = [Decidim::DummyAuthorizationHandler]
4
+ config.around(:example, without_authorizations: true) do |example|
5
+ begin
6
+ previous_handlers = Decidim.authorization_handlers
7
+ Decidim.authorization_handlers = []
8
+
9
+ example.run
10
+ ensure
11
+ Decidim.authorization_handlers = previous_handlers
12
+ end
7
13
  end
8
14
  end
@@ -25,11 +25,12 @@ capybara_options = {
25
25
  extensions: [
26
26
  File.join(__dir__, "phantomjs_polyfills", "promise.js"),
27
27
  File.join(__dir__, "phantomjs_polyfills", "phantomjs-shim.js"),
28
- File.join(__dir__, "phantomjs_polyfills", "phantomjs-getOwnPropertyNames.js")
28
+ File.join(__dir__, "phantomjs_polyfills", "phantomjs-getOwnPropertyNames.js"),
29
+ File.join(__dir__, "phantomjs_polyfills", "weakmap-polyfill.js")
29
30
  ],
30
31
  js_errors: true,
31
32
  url_whitelist: ["http://*.lvh.me", "localhost", "127.0.0.1"],
32
- timeout: 1.minute
33
+ timeout: 2.minutes
33
34
  }
34
35
 
35
36
  Capybara.register_driver :poltergeist do |app|
@@ -1,35 +1,32 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # extracted from https://github.com/goodwill/capybara-select2
3
+ # Adapted from https://github.com/goodwill/capybara-select2
4
4
 
5
5
  module Capybara
6
6
  module Select2
7
- def select2(value, options = {})
8
- raise "Must pass a hash containing 'from' or 'xpath' or 'css'" unless options.is_a?(Hash) && [:from, :xpath, :css].any? { |k| options.has_key? k }
7
+ def select2(value, xpath:, search:)
8
+ expect(page).to have_xpath(xpath)
9
+ select2_container = find(:xpath, xpath)
9
10
 
10
- if options.has_key? :xpath
11
- select2_container = find(:xpath, options[:xpath])
12
- elsif options.has_key? :css
13
- select2_container = find(:css, options[:css])
14
- else
15
- select_name = options[:from]
16
- select2_container = find("label", text: select_name).find(:xpath, "..").find(".select2-container")
17
- end
18
-
19
- # Open select2 field
11
+ expect(select2_container).to have_selector(".select2-selection")
20
12
  select2_container.find(".select2-selection").click
21
13
 
22
- if options.has_key? :search
23
- find(:xpath, "//body").find(".select2-search input.select2-search__field").set(value)
14
+ if search
15
+ body = find(:xpath, "//body")
16
+ expect(body).to have_selector(".select2-search input.select2-search__field")
17
+ body.find(".select2-search input.select2-search__field").set(value)
18
+
24
19
  page.execute_script(%|$("input.select2-search__field:visible").keyup();|)
25
20
  drop_container = ".select2-results"
26
21
  else
27
22
  drop_container = ".select2-dropdown"
28
23
  end
29
24
 
30
- [value].flatten.each do |val|
31
- find(:xpath, "//body").find("#{drop_container} li.select2-results__option", text: val).click
32
- end
25
+ expect(page).to have_no_content("Searching...")
26
+
27
+ body = find(:xpath, "//body")
28
+ expect(body).to have_selector("#{drop_container} li.select2-results__option", text: value)
29
+ body.find("#{drop_container} li.select2-results__option", text: value).click
33
30
  end
34
31
  end
35
32
  end
@@ -27,20 +27,26 @@ module Decidim
27
27
  include Decidim::Events::NotificationEvent
28
28
  end
29
29
 
30
- class DummyResource < ActiveRecord::Base
31
- include HasFeature
32
- include Resourceable
33
- include Reportable
34
- include Authorable
35
- include HasCategory
36
- include HasScope
37
- include Decidim::Comments::Commentable
38
- include Followable
39
-
40
- feature_manifest_name "dummy"
41
-
42
- def reported_content_url
43
- ResourceLocatorPresenter.new(self).url
30
+ module DummyResources
31
+ class ApplicationRecord < ActiveRecord::Base
32
+ self.abstract_class = true
33
+ end
34
+
35
+ class DummyResource < ApplicationRecord
36
+ include HasFeature
37
+ include Resourceable
38
+ include Reportable
39
+ include Authorable
40
+ include HasCategory
41
+ include HasScope
42
+ include Decidim::Comments::Commentable
43
+ include Followable
44
+
45
+ feature_manifest_name "dummy"
46
+
47
+ def reported_content_url
48
+ ResourceLocatorPresenter.new(self).url
49
+ end
44
50
  end
45
51
  end
46
52
 
@@ -49,7 +55,7 @@ module Decidim
49
55
  skip_authorization_check
50
56
 
51
57
  def show
52
- @commentable = DummyResource.find(params[:id])
58
+ @commentable = DummyResources::DummyResource.find(params[:id])
53
59
  render inline: %{
54
60
  <%= csrf_meta_tags %>
55
61
  <%= display_flash_messages %>
@@ -94,7 +100,7 @@ Decidim.register_feature(:dummy) do |feature|
94
100
 
95
101
  feature.register_resource do |resource|
96
102
  resource.name = :dummy
97
- resource.model_class_name = "Decidim::DummyResource"
103
+ resource.model_class_name = "Decidim::DummyResources::DummyResource"
98
104
  resource.template = "decidim/dummy_resource/linked_dummys"
99
105
  end
100
106
 
@@ -0,0 +1,144 @@
1
+ /*!
2
+ * weakmap-polyfill v2.0.0 - ECMAScript6 WeakMap polyfill
3
+ * https://github.com/polygonplanet/weakmap-polyfill
4
+ * Copyright (c) 2015-2016 polygon planet <polygon.planet.aqua@gmail.com>
5
+ * @license MIT
6
+ */
7
+
8
+ (function(self) {
9
+ 'use strict';
10
+
11
+ if (self.WeakMap) {
12
+ return;
13
+ }
14
+
15
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
16
+ var defineProperty = function(object, name, value) {
17
+ if (Object.defineProperty) {
18
+ Object.defineProperty(object, name, {
19
+ configurable: true,
20
+ writable: true,
21
+ value: value
22
+ });
23
+ } else {
24
+ object[name] = value;
25
+ }
26
+ };
27
+
28
+ self.WeakMap = (function() {
29
+
30
+ // ECMA-262 23.3 WeakMap Objects
31
+ function WeakMap() {
32
+ if (this === void 0) {
33
+ throw new TypeError("Constructor WeakMap requires 'new'");
34
+ }
35
+
36
+ defineProperty(this, '_id', genId('_WeakMap'));
37
+
38
+ // ECMA-262 23.3.1.1 WeakMap([iterable])
39
+ if (arguments.length > 0) {
40
+ // Currently, WeakMap `iterable` argument is not supported
41
+ throw new TypeError('WeakMap iterable is not supported');
42
+ }
43
+ }
44
+
45
+ // ECMA-262 23.3.3.2 WeakMap.prototype.delete(key)
46
+ defineProperty(WeakMap.prototype, 'delete', function(key) {
47
+ checkInstance(this, 'delete');
48
+
49
+ if (!isObject(key)) {
50
+ return false;
51
+ }
52
+
53
+ var entry = key[this._id];
54
+ if (entry && entry[0] === key) {
55
+ delete key[this._id];
56
+ return true;
57
+ }
58
+
59
+ return false;
60
+ });
61
+
62
+ // ECMA-262 23.3.3.3 WeakMap.prototype.get(key)
63
+ defineProperty(WeakMap.prototype, 'get', function(key) {
64
+ checkInstance(this, 'get');
65
+
66
+ if (!isObject(key)) {
67
+ return void 0;
68
+ }
69
+
70
+ var entry = key[this._id];
71
+ if (entry && entry[0] === key) {
72
+ return entry[1];
73
+ }
74
+
75
+ return void 0;
76
+ });
77
+
78
+ // ECMA-262 23.3.3.4 WeakMap.prototype.has(key)
79
+ defineProperty(WeakMap.prototype, 'has', function(key) {
80
+ checkInstance(this, 'has');
81
+
82
+ if (!isObject(key)) {
83
+ return false;
84
+ }
85
+
86
+ var entry = key[this._id];
87
+ if (entry && entry[0] === key) {
88
+ return true;
89
+ }
90
+
91
+ return false;
92
+ });
93
+
94
+ // ECMA-262 23.3.3.5 WeakMap.prototype.set(key, value)
95
+ defineProperty(WeakMap.prototype, 'set', function(key, value) {
96
+ checkInstance(this, 'set');
97
+
98
+ if (!isObject(key)) {
99
+ throw new TypeError('Invalid value used as weak map key');
100
+ }
101
+
102
+ var entry = key[this._id];
103
+ if (entry && entry[0] === key) {
104
+ entry[1] = value;
105
+ return this;
106
+ }
107
+
108
+ defineProperty(key, this._id, [key, value]);
109
+ return this;
110
+ });
111
+
112
+
113
+ function checkInstance(x, methodName) {
114
+ if (!isObject(x) || !hasOwnProperty.call(x, '_id')) {
115
+ throw new TypeError(
116
+ methodName + ' method called on incompatible receiver ' +
117
+ typeof x
118
+ );
119
+ }
120
+ }
121
+
122
+ function genId(prefix) {
123
+ return prefix + '_' + rand() + '.' + rand();
124
+ }
125
+
126
+ function rand() {
127
+ return Math.random().toString().substring(2);
128
+ }
129
+
130
+
131
+ defineProperty(WeakMap, '_polyfill', true);
132
+ return WeakMap;
133
+ })();
134
+
135
+
136
+ function isObject(x) {
137
+ return Object(x) === x;
138
+ }
139
+
140
+ })(
141
+ typeof self !== 'undefined' ? self :
142
+ typeof window !== 'undefined' ? window :
143
+ typeof global !== 'undefined' ? global : this
144
+ );
@@ -2,11 +2,6 @@
2
2
 
3
3
  ENV["RAILS_ENV"] ||= "test"
4
4
 
5
- require "rails"
6
- require "active_support/core_ext/string"
7
- require "decidim/core"
8
- require "decidim/core/test"
9
-
10
5
  require "rails-controller-testing"
11
6
  require "rspec/rails"
12
7
  require "factory_girl_rails"
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Decidim
4
+ # This holds the decidim-dev version.
5
+ module Dev
6
+ def self.version
7
+ "0.7.0"
8
+ end
9
+ end
10
+ end
@@ -14,8 +14,8 @@ module Decidim
14
14
  # all the flags passed to the `AppGenerator` class, which is the one that
15
15
  # actually generates the Rails app.
16
16
  #
17
- # Remember that, for how generators work, actions are executed based on the
18
- # definition order of the public methods.
17
+ # Remember that, because of how generators work, actions are executed based
18
+ # on the definition order of the public methods.
19
19
  class DummyGenerator < Rails::Generators::Base
20
20
  desc "Generate dummy app for testing purposes"
21
21
 
@@ -42,7 +42,8 @@ module Decidim
42
42
  "../..",
43
43
  "--app_const_base=DummyApplication",
44
44
  "--recreate_db",
45
- "--skip_gemfile=#{options[:skip_gemfile]}"
45
+ "--skip_gemfile=#{options[:skip_gemfile]}",
46
+ "--demo"
46
47
  ]
47
48
  end
48
49
 
@@ -79,10 +80,6 @@ module Decidim
79
80
  def remove_directory_if_exists(path)
80
81
  remove_dir(path) if File.directory?(path)
81
82
  end
82
-
83
- def dir_name
84
- dummy_app_path.split("/").last
85
- end
86
83
  end
87
84
  end
88
85
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.7.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-10-17 00:00:00.000000000 Z
13
+ date: 2017-10-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: decidim
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.6.8
21
+ version: 0.7.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.6.8
28
+ version: 0.7.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: factory_girl_rails
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -46,70 +46,70 @@ dependencies:
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: 1.6.0
49
+ version: '1.6'
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: 1.6.0
56
+ version: '1.6'
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: capybara
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: 2.15.0
63
+ version: '2.15'
64
64
  type: :runtime
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: 2.15.0
70
+ version: '2.15'
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: capybara-screenshot
73
73
  requirement: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: 1.0.14
77
+ version: '1.0'
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - "~>"
83
83
  - !ruby/object:Gem::Version
84
- version: 1.0.14
84
+ version: '1.0'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: rspec-rails
87
87
  requirement: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: 3.6.1
91
+ version: '3.6'
92
92
  type: :runtime
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: 3.6.1
98
+ version: '3.6'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: rspec-repeat
101
101
  requirement: !ruby/object:Gem::Requirement
102
102
  requirements:
103
103
  - - "~>"
104
104
  - !ruby/object:Gem::Version
105
- version: 1.0.2
105
+ version: '1.0'
106
106
  type: :runtime
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: 1.0.2
112
+ version: '1.0'
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: byebug
115
115
  requirement: !ruby/object:Gem::Requirement
@@ -144,28 +144,14 @@ dependencies:
144
144
  requirements:
145
145
  - - "~>"
146
146
  - !ruby/object:Gem::Version
147
- version: 3.1.0
147
+ version: '3.1'
148
148
  type: :runtime
149
149
  prerelease: false
150
150
  version_requirements: !ruby/object:Gem::Requirement
151
151
  requirements:
152
152
  - - "~>"
153
153
  - !ruby/object:Gem::Version
154
- version: 3.1.0
155
- - !ruby/object:Gem::Dependency
156
- name: launchy
157
- requirement: !ruby/object:Gem::Requirement
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- version: '0'
162
- type: :runtime
163
- prerelease: false
164
- version_requirements: !ruby/object:Gem::Requirement
165
- requirements:
166
- - - ">="
167
- - !ruby/object:Gem::Version
168
- version: '0'
154
+ version: '3.1'
169
155
  - !ruby/object:Gem::Dependency
170
156
  name: i18n-tasks
171
157
  requirement: !ruby/object:Gem::Requirement
@@ -180,48 +166,34 @@ dependencies:
180
166
  - - '='
181
167
  - !ruby/object:Gem::Version
182
168
  version: 0.9.18
183
- - !ruby/object:Gem::Dependency
184
- name: faker
185
- requirement: !ruby/object:Gem::Requirement
186
- requirements:
187
- - - "~>"
188
- - !ruby/object:Gem::Version
189
- version: 1.8.4
190
- type: :runtime
191
- prerelease: false
192
- version_requirements: !ruby/object:Gem::Requirement
193
- requirements:
194
- - - "~>"
195
- - !ruby/object:Gem::Version
196
- version: 1.8.4
197
169
  - !ruby/object:Gem::Dependency
198
170
  name: poltergeist
199
171
  requirement: !ruby/object:Gem::Requirement
200
172
  requirements:
201
173
  - - "~>"
202
174
  - !ruby/object:Gem::Version
203
- version: 1.16.0
175
+ version: '1.16'
204
176
  type: :runtime
205
177
  prerelease: false
206
178
  version_requirements: !ruby/object:Gem::Requirement
207
179
  requirements:
208
180
  - - "~>"
209
181
  - !ruby/object:Gem::Version
210
- version: 1.16.0
182
+ version: '1.16'
211
183
  - !ruby/object:Gem::Dependency
212
184
  name: rails-controller-testing
213
185
  requirement: !ruby/object:Gem::Requirement
214
186
  requirements:
215
187
  - - "~>"
216
188
  - !ruby/object:Gem::Version
217
- version: 1.0.1
189
+ version: '1.0'
218
190
  type: :runtime
219
191
  prerelease: false
220
192
  version_requirements: !ruby/object:Gem::Requirement
221
193
  requirements:
222
194
  - - "~>"
223
195
  - !ruby/object:Gem::Version
224
- version: 1.0.1
196
+ version: '1.0'
225
197
  - !ruby/object:Gem::Dependency
226
198
  name: simplecov
227
199
  requirement: !ruby/object:Gem::Requirement
@@ -256,14 +228,14 @@ dependencies:
256
228
  requirements:
257
229
  - - "~>"
258
230
  - !ruby/object:Gem::Version
259
- version: 0.49.1
231
+ version: 0.50.0
260
232
  type: :runtime
261
233
  prerelease: false
262
234
  version_requirements: !ruby/object:Gem::Requirement
263
235
  requirements:
264
236
  - - "~>"
265
237
  - !ruby/object:Gem::Version
266
- version: 0.49.1
238
+ version: 0.50.0
267
239
  - !ruby/object:Gem::Dependency
268
240
  name: db-query-matchers
269
241
  requirement: !ruby/object:Gem::Requirement
@@ -298,14 +270,42 @@ dependencies:
298
270
  requirements:
299
271
  - - "~>"
300
272
  - !ruby/object:Gem::Version
301
- version: 3.0.1
273
+ version: '3.0'
274
+ type: :runtime
275
+ prerelease: false
276
+ version_requirements: !ruby/object:Gem::Requirement
277
+ requirements:
278
+ - - "~>"
279
+ - !ruby/object:Gem::Version
280
+ version: '3.0'
281
+ - !ruby/object:Gem::Dependency
282
+ name: puma
283
+ requirement: !ruby/object:Gem::Requirement
284
+ requirements:
285
+ - - "~>"
286
+ - !ruby/object:Gem::Version
287
+ version: '3.10'
288
+ type: :runtime
289
+ prerelease: false
290
+ version_requirements: !ruby/object:Gem::Requirement
291
+ requirements:
292
+ - - "~>"
293
+ - !ruby/object:Gem::Version
294
+ version: '3.10'
295
+ - !ruby/object:Gem::Dependency
296
+ name: nokogiri
297
+ requirement: !ruby/object:Gem::Requirement
298
+ requirements:
299
+ - - "~>"
300
+ - !ruby/object:Gem::Version
301
+ version: '1.8'
302
302
  type: :runtime
303
303
  prerelease: false
304
304
  version_requirements: !ruby/object:Gem::Requirement
305
305
  requirements:
306
306
  - - "~>"
307
307
  - !ruby/object:Gem::Version
308
- version: 3.0.1
308
+ version: '1.8'
309
309
  description: Utilities and tools we need to develop Decidim
310
310
  email:
311
311
  - josepjaume@gmail.com
@@ -328,6 +328,7 @@ files:
328
328
  - config/locales/it.yml
329
329
  - config/locales/nl.yml
330
330
  - config/locales/pl.yml
331
+ - config/locales/ru.yml
331
332
  - config/locales/uk.yml
332
333
  - lib/decidim/dev.rb
333
334
  - lib/decidim/dev/assets/Exampledocument.pdf
@@ -338,7 +339,6 @@ files:
338
339
  - lib/decidim/dev/assets/icon.png
339
340
  - lib/decidim/dev/assets/malicious.jpg
340
341
  - lib/decidim/dev/common_rake.rb
341
- - lib/decidim/dev/dummy_authorization_handler.rb
342
342
  - lib/decidim/dev/railtie.rb
343
343
  - lib/decidim/dev/test/authorization_shared_examples.rb
344
344
  - lib/decidim/dev/test/base_spec_helper.rb
@@ -361,12 +361,14 @@ files:
361
361
  - lib/decidim/dev/test/rspec_support/phantomjs_polyfills/phantomjs-getOwnPropertyNames.js
362
362
  - lib/decidim/dev/test/rspec_support/phantomjs_polyfills/phantomjs-shim.js
363
363
  - lib/decidim/dev/test/rspec_support/phantomjs_polyfills/promise.js
364
+ - lib/decidim/dev/test/rspec_support/phantomjs_polyfills/weakmap-polyfill.js
364
365
  - lib/decidim/dev/test/rspec_support/route_helpers.rb
365
366
  - lib/decidim/dev/test/rspec_support/translation_helpers.rb
366
367
  - lib/decidim/dev/test/rspec_support/warden.rb
367
368
  - lib/decidim/dev/test/rspec_support/webmock.rb
368
369
  - lib/decidim/dev/test/rspec_support/wisper.rb
369
370
  - lib/decidim/dev/test/spec_helper.rb
371
+ - lib/decidim/dev/version.rb
370
372
  - lib/generators/decidim/dummy_generator.rb
371
373
  - lib/generators/decidim/templates/autoprefixer.yml
372
374
  - lib/generators/decidim/templates/autoprefixer_initializer.rb
@@ -375,7 +377,7 @@ files:
375
377
  - lib/tasks/test_app.rake
376
378
  homepage: https://github.com/decidim/decidim
377
379
  licenses:
378
- - AGPLv3
380
+ - AGPL-3.0
379
381
  metadata: {}
380
382
  post_install_message:
381
383
  rdoc_options: []
@@ -393,7 +395,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
393
395
  version: '0'
394
396
  requirements: []
395
397
  rubyforge_project:
396
- rubygems_version: 2.6.11
398
+ rubygems_version: 2.6.13
397
399
  signing_key:
398
400
  specification_version: 4
399
401
  summary: Decidim Dev tools
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Decidim
4
- # An example implementation of an AuthorizationHandler to be used in tests.
5
- class DummyAuthorizationHandler < AuthorizationHandler
6
- attribute :document_number, String
7
- attribute :postal_code, String
8
- attribute :birthday, Date
9
-
10
- validates :document_number, presence: true
11
- validate :valid_document_number
12
-
13
- def metadata
14
- super.merge(document_number: document_number)
15
- end
16
-
17
- def unique_id
18
- document_number
19
- end
20
-
21
- private
22
-
23
- def valid_document_number
24
- errors.add(:document_number, :invalid) unless document_number.to_s.end_with?("X")
25
- end
26
- end
27
- end