Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alecslupu committed Dec 2, 2023
1 parent e9764e7 commit a420062
Show file tree
Hide file tree
Showing 10 changed files with 642 additions and 32 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ruby RUBY_VERSION

gem "decidim", "~> 0.26.0"
gem "decidim-custom_proposal_states", path: "."
gem "decidim-elections", "~> 0.26.0"

gem "bootsnap"
gem "uglifier", "~> 4.1"
Expand Down
102 changes: 75 additions & 27 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ GEM
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
batch-loader (1.5.0)
bcrypt (3.1.19)
bcrypt (3.1.20)
better_html (1.0.16)
actionview (>= 4.0)
activesupport (>= 4.0)
Expand All @@ -107,7 +107,7 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
carrierwave (2.2.4)
carrierwave (2.2.5)
activemodel (>= 5.0.0)
activesupport (>= 5.0.0)
addressable (~> 2.6)
Expand Down Expand Up @@ -145,7 +145,7 @@ GEM
crass (1.0.6)
css_parser (1.16.0)
addressable
date (3.3.3)
date (3.3.4)
date_validator (0.9.0)
activemodel
activesupport
Expand Down Expand Up @@ -195,6 +195,12 @@ GEM
decidim-budgets (0.26.7)
decidim-comments (= 0.26.7)
decidim-core (= 0.26.7)
decidim-bulletin_board (0.22.3)
byebug (~> 11.0)
graphlient (~> 0.4.0)
jwt (~> 2.2.2)
rails (~> 6.0, >= 5.0.0)
wisper (~> 2.0.0)
decidim-comments (0.26.7)
decidim-core (= 0.26.7)
redcarpet (~> 3.5, >= 3.5.1)
Expand Down Expand Up @@ -281,6 +287,14 @@ GEM
w3c_rspec_validators (~> 0.3.0)
webmock (~> 3.6)
wisper-rspec (~> 1.0)
decidim-elections (0.26.7)
decidim-bulletin_board (= 0.22.3)
decidim-core (= 0.26.7)
decidim-forms (= 0.26.7)
decidim-proposals (= 0.26.7)
rack-attack (~> 6.0)
voting_schemes-dummy (= 0.22.3)
voting_schemes-electionguard (= 0.22.3)
decidim-forms (0.26.7)
decidim-core (= 0.26.7)
wicked_pdf (~> 2.1)
Expand Down Expand Up @@ -325,13 +339,13 @@ GEM
declarative-option (0.1.0)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
devise (4.9.2)
devise (4.9.3)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-i18n (1.11.0)
devise-i18n (1.12.0)
devise (>= 4.9.0)
devise_invitable (2.0.9)
actionmailer (>= 5.0)
Expand All @@ -342,7 +356,7 @@ GEM
nokogiri (>= 1.13.2, < 1.15.0)
rubyzip (~> 2.3.0)
docile (1.4.0)
doorkeeper (5.6.6)
doorkeeper (5.6.8)
railties (>= 5)
doorkeeper-i18n (4.0.1)
dumb_delegator (1.0.0)
Expand All @@ -358,20 +372,41 @@ GEM
erbse (0.1.4)
temple
erubi (1.12.0)
excon (0.103.0)
execjs (2.9.0)
excon (0.105.0)
execjs (2.9.1)
factory_bot (4.11.1)
activesupport (>= 3.0.0)
factory_bot_rails (4.11.1)
factory_bot (~> 4.11.1)
railties (>= 3.0.0)
faker (3.2.2)
i18n (>= 1.8.11, < 2)
faraday (2.7.10)
faraday-net_http (>= 2.0, < 3.1)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
ffi (1.15.5)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
ffi (1.16.3)
file_validators (2.3.0)
activemodel (>= 3.2)
mime-types (>= 1.0)
Expand All @@ -391,7 +426,14 @@ GEM
geocoder (1.7.5)
globalid (1.1.0)
activesupport (>= 5.0)
graphlient (0.4.0)
faraday (>= 1.0)
faraday_middleware
graphql-client
graphql (1.12.24)
graphql-client (0.18.0)
activesupport (>= 3.0)
graphql
hashdiff (1.0.1)
hashie (5.0.0)
highline (2.1.0)
Expand Down Expand Up @@ -419,7 +461,7 @@ GEM
invisible_captcha (0.13.0)
rails (>= 3.2.0)
json (2.7.0)
jwt (2.7.1)
jwt (2.2.3)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand Down Expand Up @@ -466,7 +508,7 @@ GEM
method_source (1.0.0)
mime-types (3.5.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0808)
mime-types-data (3.2023.1003)
mini_magick (4.12.0)
mini_mime (1.1.5)
minitest (5.20.0)
Expand All @@ -477,17 +519,18 @@ GEM
chef-utils
msgpack (1.7.2)
multi_xml (0.6.0)
multipart-post (2.3.0)
mustache (1.1.1)
net-imap (0.3.7)
net-imap (0.4.7)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.1)
net-protocol (0.2.2)
timeout
net-smtp (0.3.3)
net-smtp (0.4.0)
net-protocol
nio4r (2.5.9)
nio4r (2.7.0)
nokogiri (1.14.5-x86_64-linux)
racc (~> 1.4)
oauth (1.1.0)
Expand Down Expand Up @@ -546,10 +589,10 @@ GEM
actionmailer (>= 3)
net-smtp
premailer (~> 1.7, >= 1.7.9)
public_suffix (5.0.3)
public_suffix (5.0.4)
puma (5.6.7)
nio4r (~> 2.0)
racc (1.7.1)
racc (1.7.3)
rack (2.2.8)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
Expand Down Expand Up @@ -596,7 +639,7 @@ GEM
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rainbow (3.1.1)
rake (13.0.6)
rake (13.1.0)
ransack (2.4.2)
activerecord (>= 5.2.4)
activesupport (>= 5.2.4)
Expand All @@ -615,7 +658,7 @@ GEM
regexp_parser (2.8.2)
request_store (1.5.1)
rack (>= 1.4)
responders (3.1.0)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.6)
Expand Down Expand Up @@ -674,7 +717,7 @@ GEM
rubocop-rspec (1.43.2)
rubocop (~> 0.87)
ruby-progressbar (1.13.0)
ruby-vips (2.1.4)
ruby-vips (2.2.0)
ffi (~> 1.12)
ruby2_keywords (0.0.5)
rubyXL (3.4.25)
Expand Down Expand Up @@ -713,13 +756,13 @@ GEM
ssrf_filter (1.1.2)
system_test_html_screenshots (0.2.0)
actionpack (>= 5.2, < 6.1.a)
temple (0.10.2)
temple (0.10.3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.2.2)
thor (1.3.0)
thread_safe (0.3.6)
tilt (2.3.0)
timeout (0.4.0)
timeout (0.4.1)
tomlrb (2.0.3)
tzinfo (1.2.11)
thread_safe (~> 0.1)
Expand All @@ -736,6 +779,10 @@ GEM
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
voting_schemes-dummy (0.22.3)
rails (>= 5.0.0)
voting_schemes-electionguard (0.22.3)
rails (>= 5.0.0)
w3c_rspec_validators (0.3.0)
rails
rspec
Expand Down Expand Up @@ -770,7 +817,7 @@ GEM
wkhtmltopdf-binary (0.12.6.6)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.6.11)
zeitwerk (2.6.12)

PLATFORMS
x86_64-linux
Expand All @@ -780,6 +827,7 @@ DEPENDENCIES
decidim (~> 0.26.0)
decidim-custom_proposal_states!
decidim-dev (~> 0.26.0)
decidim-elections (~> 0.26.0)
faker
letter_opener_web (~> 1.3)
listen (~> 3.1)
Expand Down
62 changes: 62 additions & 0 deletions bin/bundle
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require "rubygems"

m = Module.new do
extend self

def invoked_as_script?
File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
end

def cli_arg_version
return unless invoked_as_script? # don't want to hijack other binstubs
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`

bundler_version = nil
update_index = nil
ARGV.each_with_index do |a, i|
bundler_version = a if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/

bundler_version = Regexp.last_match(1) || ">= 0.a"
update_index = i
end
bundler_version
end

def gemfile
File.expand_path("../Gemfile", __dir__)
end

def lockfile
"#{gemfile}.lock"
end

def lockfile_version
return unless File.file?(lockfile)

lockfile_contents = File.read(lockfile)

regexp = /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/

regexp.match(lockfile_contents)[1]
end

def bundler_version
@bundler_version ||= cli_arg_version || lockfile_version
end

def load_bundler!
activate_bundler(bundler_version)
end

def activate_bundler(bundler_version)
gem "bundler", bundler_version
end
end

m.load_bundler!

load Gem.bin_path("bundler", "bundle") if m.invoked_as_script?
5 changes: 5 additions & 0 deletions decidim-custom_proposal_states.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,9 @@ Gem::Specification.new do |s|

s.add_dependency "decidim-core", "~> 0.26.0"
s.add_dependency "decidim-proposals", "~> 0.26.0"
s.add_development_dependency "decidim-accountability", "~> 0.26.0"
s.add_development_dependency "decidim-budgets", "~> 0.26.0"
s.add_development_dependency "decidim-dev", "~> 0.26.0"
s.add_development_dependency "decidim-elections", "~> 0.26.0"
s.add_development_dependency "decidim-sortitions", "~> 0.26.0"
end
1 change: 1 addition & 0 deletions gemfiles/decidim_0.26.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ruby RUBY_VERSION

gem "decidim", "~> 0.26.0"
gem "decidim-custom_proposal_states", path: ".."
gem "decidim-elections", "~> 0.26.0"

gem "bootsnap"
gem "uglifier", "~> 4.1"
Expand Down
1 change: 1 addition & 0 deletions gemfiles/decidim_0.27.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ruby RUBY_VERSION

gem "decidim", "~> 0.26.0"
gem "decidim-custom_proposal_states", path: ".."
gem "decidim-elections", "~> 0.26.0"

gem "bootsnap"
gem "uglifier", "~> 4.1"
Expand Down
Loading

0 comments on commit a420062

Please sign in to comment.