decidim-dev 0.27.5 → 0.27.6

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: 97a5308fe5acbd383f506e3b3ab5fe6a9101f162547ec3f3bc9d1b89e92e8083
4
- data.tar.gz: a834814950d0ecb210cbcaa47e7643324ec688c8ba2a87d69d1aa3832228b53b
3
+ metadata.gz: 535b92eaf44d4a33ff05bffc29424bfe990425f7774df0d2254de9e1d0e6f75f
4
+ data.tar.gz: bfd2bf4c7f805c29de0214f7ef76cc078e42d5c7ad1dba36d2db7257e49cffad
5
5
  SHA512:
6
- metadata.gz: 9eeba596be6522a72d056d3a4339fe2cb75b5f945d3136bdc0c5ae536e830bdc8fee747453562b75845892b9f6d99bdf2430a1c0cccfd94d45bce6f5e0081d3b
7
- data.tar.gz: 921b38d3e4cd49b1c2e5ea9af6e1fb6a269a9440c37b086cb058e90e1525883499bc25cbab1da149e58ee32851baf0ef6cd3773ebb417572309b7a61cc119c3a
6
+ metadata.gz: cbae73519fe76e4f06747455a7236b74a5ed36fc3277b0f43db412f86376ab6eb6ce88eaa9dd80a86514f7137de71bed282c98af423f33769e6e5d5e61c2e0dd
7
+ data.tar.gz: 1e2ad1c8b10bc31eb99fa8657d30b1a99d544e83ccbfb5150996a559194788267b352d144e3a3f61c5dc7432d85a63cb38e6b8959198a242f6b7104465d08cd0
@@ -0,0 +1 @@
1
+ he:
@@ -20,8 +20,8 @@ hu:
20
20
  bar: Oszlop
21
21
  foo: foo
22
22
  step:
23
- endorsements_blocked: Jóváhagyások letiltva
24
- endorsements_enabled: Jóváhagyások engedélyezve
23
+ endorsements_blocked: Támogatások letiltva
24
+ endorsements_enabled: Támogatások engedélyezve
25
25
  test_options:
26
26
  bar: Oszlop
27
27
  foo: foo
@@ -15,6 +15,12 @@ pl:
15
15
  dummy:
16
16
  settings:
17
17
  global:
18
+ guided: Kierowane wprowadzanie danych
19
+ guided_help: Tekst pomocy
20
+ guided_readonly: Zablokowane pole wprowadzania danych
21
+ guided_rich: Kierowane i rozbudowane wprowadzanie danych
22
+ guided_rich_help_html: Tekst HTML <strong>pomocy</strong>
23
+ guided_rich_readonly_html: Treść HTML <strong>pomocy</strong> dla wyłączonego wprowadzania
18
24
  readonly_attribute: Atrybut tylko do odczytu
19
25
  test: Test A
20
26
  test_choices:
@@ -23,6 +29,7 @@ pl:
23
29
  c: Opcja C
24
30
  test_options:
25
31
  bar: Bar
32
+ baz: Baz
26
33
  foo: Foo
27
34
  step:
28
35
  endorsements_blocked: Możliwość rekomendacji zablokowana
@@ -30,6 +37,7 @@ pl:
30
37
  readonly_step_attribute: Atrybut kroku tylko do odczytu
31
38
  test_options:
32
39
  bar: Bar
40
+ baz: Baz
33
41
  foo: Foo
34
42
  dummy:
35
43
  admin:
@@ -29,6 +29,7 @@ pt-BR:
29
29
  c: Escolha C
30
30
  test_options:
31
31
  bar: Bar
32
+ baz: Baz
32
33
  foo: Foo
33
34
  step:
34
35
  endorsements_blocked: Endossos bloqueados
@@ -36,6 +37,7 @@ pt-BR:
36
37
  readonly_step_attribute: Atributo passo somente leitura
37
38
  test_options:
38
39
  bar: Bar
40
+ baz: Baz
39
41
  foo: Foo
40
42
  dummy:
41
43
  admin:
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path("lib", __dir__)
4
+
5
+ # Maintain your gem's version:
6
+ require "decidim/dev/version"
7
+
8
+ # Describe your gem and declare its dependencies:
9
+ Gem::Specification.new do |s|
10
+ s.version = Decidim::Dev.version
11
+ s.authors = ["Josep Jaume Rey Peroy", "Marc Riera Casals", "Oriol Gual Oliva"]
12
+ s.email = ["josepjaume@gmail.com", "mrc2407@gmail.com", "oriolgual@gmail.com"]
13
+ s.license = "AGPL-3.0"
14
+ s.homepage = "https://github.com/decidim/decidim"
15
+ s.required_ruby_version = "~> 3.0.0"
16
+
17
+ s.name = "decidim-dev"
18
+ s.summary = "Decidim dev tools"
19
+ s.description = "Utilities and tools we need to develop Decidim"
20
+
21
+ s.files = Dir.chdir(__dir__) do
22
+ `git ls-files -z`.split("\x0").select do |f|
23
+ (File.expand_path(f) == __FILE__) ||
24
+ f.start_with?(*%w(app/ config/ db/ lib/ Rakefile README.md))
25
+ end
26
+ end
27
+
28
+ s.add_dependency "capybara", "~> 3.24"
29
+ s.add_dependency "decidim", Decidim::Dev.version
30
+ s.add_dependency "factory_bot_rails", "~> 4.8"
31
+
32
+ s.add_dependency "axe-core-rspec", "~> 4.1.0"
33
+ s.add_dependency "byebug", "~> 11.0"
34
+ s.add_dependency "db-query-matchers", "~> 0.10.0"
35
+ s.add_dependency "erb_lint", "~> 0.0.35"
36
+ s.add_dependency "i18n-tasks", "~> 0.9.18"
37
+ s.add_dependency "mdl", "~> 0.5"
38
+ s.add_dependency "nokogiri", "~> 1.13"
39
+ s.add_dependency "parallel_tests", "~> 3.7"
40
+ s.add_dependency "puma", "~> 5.0"
41
+ s.add_dependency "rails-controller-testing", "~> 1.0"
42
+ s.add_dependency "rspec-cells", "~> 0.3.7"
43
+ s.add_dependency "rspec-html-matchers", "~> 0.9.1"
44
+ s.add_dependency "rspec_junit_formatter", "~> 0.3.0"
45
+ s.add_dependency "rspec-rails", "~> 4.0"
46
+ s.add_dependency "rspec-retry", "~> 0.6.2"
47
+ s.add_dependency "rubocop", "~> 1.28.0"
48
+ s.add_dependency "rubocop-rails", "~> 2.14"
49
+ s.add_dependency "rubocop-rspec", "~> 2.10"
50
+ s.add_dependency "selenium-webdriver", "~> 4.1.0"
51
+ s.add_dependency "simplecov", "~> 0.21.0"
52
+ s.add_dependency "simplecov-cobertura", "~> 2.1.0"
53
+ s.add_dependency "w3c_rspec_validators", "~> 0.3.0"
54
+ s.add_dependency "webmock", "~> 3.6"
55
+ s.add_dependency "wisper-rspec", "~> 1.0"
56
+ end
@@ -2,7 +2,11 @@
2
2
 
3
3
  FactoryBot.define do
4
4
  factory :dummy_component, parent: :component do
5
- name { Decidim::Components::Namer.new(participatory_space.organization.available_locales, :surveys).i18n_name }
5
+ transient do
6
+ skip_injection { false }
7
+ end
8
+
9
+ name { generate_component_name(participatory_space.organization.available_locales, :dummy, skip_injection: skip_injection) }
6
10
  manifest_name { :dummy }
7
11
  end
8
12
  end
@@ -32,6 +32,8 @@ Capybara.register_driver :headless_chrome do |app|
32
32
  options = ::Selenium::WebDriver::Chrome::Options.new
33
33
  options.args << "--headless"
34
34
  options.args << "--no-sandbox"
35
+ # Do not limit browser resources
36
+ options.args << "--disable-dev-shm-usage"
35
37
  options.args << if ENV["BIG_SCREEN_SIZE"].present?
36
38
  "--window-size=1920,3000"
37
39
  else
@@ -49,6 +51,7 @@ end
49
51
  port = rand(5000..6999)
50
52
  begin
51
53
  Socket.tcp("127.0.0.1", port, connect_timeout: 5).close
54
+ warn "Port #{port} is already in use, trying another one."
52
55
  rescue Errno::ECONNREFUSED
53
56
  # When connection is refused, the port is available for use.
54
57
  Capybara.server_port = port
@@ -56,7 +59,6 @@ end
56
59
  end
57
60
  end
58
61
 
59
- # In order to work with PWA apps, Chrome can't be run in headless mode, and requires
60
62
  # setting up special prefs and flags
61
63
  Capybara.register_driver :pwa_chrome do |app|
62
64
  options = ::Selenium::WebDriver::Chrome::Options.new
@@ -88,6 +90,8 @@ Capybara.register_driver :iphone do |app|
88
90
  options = ::Selenium::WebDriver::Chrome::Options.new
89
91
  options.args << "--headless"
90
92
  options.args << "--no-sandbox"
93
+ # Do not limit browser resources
94
+ options.args << "--disable-dev-shm-usage"
91
95
  options.add_emulation(device_name: "iPhone 6")
92
96
 
93
97
  Capybara::Selenium::Driver.new(
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Note that RSpec also provides `uses_transaction` but it needs to be specific
4
+ # with the name of the method which can easily break and the concurrency tests
5
+ # will anyways pass when run with the transactional mode. We want the same
6
+ # database to be used without transactions during the tests so that we can test
7
+ # concurrency correctly.
8
+ RSpec.shared_context "with concurrency" do
9
+ self.use_transactional_tests = false
10
+
11
+ after do
12
+ # Because the transactional tests are disabled, we need to manually clear
13
+ # the tables after the test.
14
+ connection = ActiveRecord::Base.connection
15
+ connection.disable_referential_integrity do
16
+ connection.tables.each do |table_name|
17
+ next if connection.select_value("SELECT COUNT(*) FROM #{table_name}").zero?
18
+
19
+ connection.execute("TRUNCATE #{table_name} CASCADE")
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.configure do |config|
4
+ config.include Decidim::SanitizeHelper
5
+ end
@@ -25,7 +25,7 @@ module TranslationHelpers
25
25
  # field - the field that holds the translations
26
26
  # upcase - a boolean to indicate whether the string must be checked upcased or not.
27
27
  def have_i18n_content(field, upcase: false, strip_tags: false)
28
- have_content(i18n_content(field, upcase: upcase, strip_tags: strip_tags))
28
+ have_content(i18n_content(field, upcase: upcase, strip_tags: strip_tags).strip)
29
29
  end
30
30
 
31
31
  # Checks that the current page doesn't have some translated content. It strips
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec.configure do |config|
4
+ config.before(:all) do
5
+ raise "Rails.root directory does not exist" unless Rails.root.exist?
6
+ raise "package.json file does not exist" unless Rails.root.join("package.json").exist?
7
+ raise "Node modules directory does not exist" unless Rails.root.join("node_modules").exist?
8
+
9
+ Dir.chdir(Rails.root) { Webpacker.compile }
10
+ rescue Errno::ENOENT
11
+ node_modules_contents = `ls #{Rails.root.join("node_modules")}`
12
+
13
+ message = <<~ERROR
14
+ There was an error during the Webpacker compilation
15
+ #{"=" * 80}
16
+ Node version: #{`node -v`}
17
+ #{"=" * 80}
18
+ NPM version: #{`npm -v`}
19
+ #{"=" * 80}
20
+ Node modules packages: #{`npm list`}
21
+ #{"=" * 80}
22
+ Node modules contents: #{node_modules_contents}
23
+ #{"=" * 80}
24
+ ERROR
25
+
26
+ raise message
27
+ end
28
+ end
@@ -4,7 +4,7 @@ module Decidim
4
4
  # This holds the decidim-dev version.
5
5
  module Dev
6
6
  def self.version
7
- "0.27.5"
7
+ "0.27.6"
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.5
4
+ version: 0.27.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josep Jaume Rey Peroy
8
8
  - Marc Riera Casals
9
9
  - Oriol Gual Oliva
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-12-20 00:00:00.000000000 Z
13
+ date: 2024-04-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: capybara
@@ -32,14 +32,14 @@ dependencies:
32
32
  requirements:
33
33
  - - '='
34
34
  - !ruby/object:Gem::Version
35
- version: 0.27.5
35
+ version: 0.27.6
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.27.5
42
+ version: 0.27.6
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: factory_bot_rails
45
45
  requirement: !ruby/object:Gem::Requirement
@@ -419,7 +419,6 @@ files:
419
419
  - app/views/decidim/dummy_resources/dummy_resources/foo.html.erb
420
420
  - app/views/decidim/dummy_resources/dummy_resources/show.html.erb
421
421
  - config/assets.rb
422
- - config/environment.rb
423
422
  - config/locales/am-ET.yml
424
423
  - config/locales/ar-SA.yml
425
424
  - config/locales/ar.yml
@@ -452,6 +451,7 @@ files:
452
451
  - config/locales/ga-IE.yml
453
452
  - config/locales/gl.yml
454
453
  - config/locales/gn-PY.yml
454
+ - config/locales/he-IL.yml
455
455
  - config/locales/hr-HR.yml
456
456
  - config/locales/hr.yml
457
457
  - config/locales/hu.yml
@@ -499,6 +499,7 @@ files:
499
499
  - config/locales/vi.yml
500
500
  - config/locales/zh-CN.yml
501
501
  - config/locales/zh-TW.yml
502
+ - decidim-dev.gemspec
502
503
  - lib/decidim-dev.rb
503
504
  - lib/decidim/dev.rb
504
505
  - lib/decidim/dev/assets/5000x5000.png
@@ -573,10 +574,12 @@ files:
573
574
  - lib/decidim/dev/test/rspec_support/comments.rb
574
575
  - lib/decidim/dev/test/rspec_support/component.rb
575
576
  - lib/decidim/dev/test/rspec_support/component_context.rb
577
+ - lib/decidim/dev/test/rspec_support/concurrency.rb
576
578
  - lib/decidim/dev/test/rspec_support/confirmation_helpers.rb
577
579
  - lib/decidim/dev/test/rspec_support/content_processing.rb
578
580
  - lib/decidim/dev/test/rspec_support/controller_example_group.rb
579
581
  - lib/decidim/dev/test/rspec_support/data_consent.rb
582
+ - lib/decidim/dev/test/rspec_support/decidim_sanitization.rb
580
583
  - lib/decidim/dev/test/rspec_support/dynamic_attach.rb
581
584
  - lib/decidim/dev/test/rspec_support/factory_bot.rb
582
585
  - lib/decidim/dev/test/rspec_support/frontend.rb
@@ -598,6 +601,7 @@ files:
598
601
  - lib/decidim/dev/test/rspec_support/translation_helpers.rb
599
602
  - lib/decidim/dev/test/rspec_support/warden.rb
600
603
  - lib/decidim/dev/test/rspec_support/webmock.rb
604
+ - lib/decidim/dev/test/rspec_support/webpacker.rb
601
605
  - lib/decidim/dev/test/rspec_support/wicked_pdf_assets_mock.rb
602
606
  - lib/decidim/dev/test/rspec_support/wisper.rb
603
607
  - lib/decidim/dev/test/rspec_support/z_download_helper.rb
@@ -611,23 +615,23 @@ homepage: https://github.com/decidim/decidim
611
615
  licenses:
612
616
  - AGPL-3.0
613
617
  metadata: {}
614
- post_install_message:
618
+ post_install_message:
615
619
  rdoc_options: []
616
620
  require_paths:
617
621
  - lib
618
622
  required_ruby_version: !ruby/object:Gem::Requirement
619
623
  requirements:
620
- - - ">="
624
+ - - "~>"
621
625
  - !ruby/object:Gem::Version
622
- version: '3.0'
626
+ version: 3.0.0
623
627
  required_rubygems_version: !ruby/object:Gem::Requirement
624
628
  requirements:
625
629
  - - ">="
626
630
  - !ruby/object:Gem::Version
627
631
  version: '0'
628
632
  requirements: []
629
- rubygems_version: 3.4.22
630
- signing_key:
633
+ rubygems_version: 3.2.22
634
+ signing_key:
631
635
  specification_version: 4
632
636
  summary: Decidim dev tools
633
637
  test_files: []
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Empty line for playing nice with tpope/vim-rails