Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anw 1473 jruby letsencrypt rebase #2621

Merged
merged 3 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gem 'childprocess', '~> 3.0', '< 4.0'
gem 'i18n', '0.9.1'
gem 'jdbc-derby', '10.12.1.1'
gem 'jdbc-mysql', '>=8.0', group: :development
gem 'jruby-jars', '= 9.2.12.0'
gem 'jruby-jars', '= 9.2.20.1'
gem 'json', '2.3.0'
gem 'json-schema', '1.0.10'
gem 'net-ldap', '~> 0.16.0'
Expand Down
4 changes: 2 additions & 2 deletions backend/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GEM
concurrent-ruby (~> 1.0)
jdbc-derby (10.12.1.1)
jdbc-mysql (8.0.17)
jruby-jars (9.2.12.0)
jruby-jars (9.2.20.1)
jruby-rack (1.1.21)
json (2.3.0-java)
json-schema (1.0.10)
Expand Down Expand Up @@ -163,7 +163,7 @@ DEPENDENCIES
i18n (= 0.9.1)
jdbc-derby (= 10.12.1.1)
jdbc-mysql (>= 8.0)
jruby-jars (= 9.2.12.0)
jruby-jars (= 9.2.20.1)
json (= 2.3.0)
json-schema (= 1.0.10)
ladle (= 0.2.0)
Expand Down
2 changes: 1 addition & 1 deletion backend/app/model/mixins/dynamic_enums.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def uses_enums(*definitions)


define_method(:values) do
values = super
values = super()
values = values.clone

definitions.each do |definition|
Expand Down
2 changes: 1 addition & 1 deletion backend/app/model/top_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def self.sequel_to_jsonmodel(objs, opts = {})
"cannot be previous if Location is not temporary")
end

super
super()
end

end
Expand Down
6 changes: 3 additions & 3 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<!-- This section contains configuration used by the build tasks -->

<!-- Don't forget to change any jruby versions in any Gemfiles! -->
<property name="jruby_url" value="https://repo1.maven.org/maven2/org/jruby/jruby-complete/9.2.12.0/jruby-complete-9.2.12.0.jar" />
<property name="jruby_file" value="jruby-complete-9.2.12.0.jar" />
<property name="jruby_url" value="https://repo1.maven.org/maven2/org/jruby/jruby-complete/9.2.20.1/jruby-complete-9.2.20.1.jar" />
<property name="jruby_file" value="jruby-complete-9.2.20.1.jar" />
<!-- This needs to match version installed by bundler 2.x: `./build/run bootstrap` -->
<!-- Then find version at: build/gems/jruby/$version -->
<property name="jruby_build_version" value="2.5.0" />
Expand Down Expand Up @@ -466,7 +466,7 @@
<env key="APPCONFIG_DATA_DIRECTORY" value="${aspace.data_directory.test}" />
<env key="APPCONFIG_DB_URL" value="${env.ASPACE_TEST_DB_URL}" />
<env key="APPCONFIG_SOLR_URL" value="${env.ASPACE_TEST_SOLR_URL}" />
<arg line="../build/${jruby_build_bin_path}/rspec -b --format d ${pattern-arg} ${tag-arg} ${order-arg} ${example-arg} ${spec-arg} ${extra-spec-paths}" />
<arg line="../build/gems/bin/bundler exec rspec -b --format d ${pattern-arg} ${tag-arg} ${order-arg} ${example-arg} ${spec-arg} ${extra-spec-paths}" />
</java>
</target>

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/file.jruby-rack-build.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<div id="content"><div id='filecontents'><h1 id="upgrading-rack-for-archivesspace">Upgrading Rack for ArchivesSpace</h1>

<ul>
<li>Install local JRuby (match aspace version, currently: 9.2.12.0) and switch to it.</li>
<li>Install local JRuby (match aspace version, currently: 9.2.20.1) and switch to it.</li>
<li>Install Maven.</li>
<li>Download jruby-rack.</li>
</ul>
Expand Down
4 changes: 3 additions & 1 deletion frontend/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gem 'json', '2.3.0'
gem 'json-schema', '1.0.10'

gem 'atomic', '= 1.0.1'
gem 'jruby-jars', '= 9.2.12.0'
gem 'jruby-jars', '= 9.2.20.1'

group :test do
gem 'axe-core-rspec'
Expand All @@ -49,6 +49,8 @@ group :test do
gem 'capybara', '3.15.1'
# need access to ActiveSupport for helpers
gem 'activesupport', '5.2.5'
# if the indexer requires it, our test suite requires it
gem 'fog-aws', '2.0.0', require: false
end

group :development, :test do
Expand Down
23 changes: 21 additions & 2 deletions frontend/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,45 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dumb_delegator (0.8.1)
erubi (1.10.0)
excon (0.90.0)
execjs (2.8.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)
ffi (1.15.4-java)
fog-aws (2.0.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (1.45.0)
builder
excon (~> 0.58)
formatador (~> 0.2)
fog-json (1.2.0)
fog-core
multi_json (~> 1.10)
fog-xml (0.1.4)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
formatador (0.3.0)
globalid (0.5.2)
activesupport (>= 5.0)
http-cookie (1.0.4)
domain_name (~> 0.5)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
ipaddress (0.8.3)
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
jruby-jars (9.2.12.0)
jruby-jars (9.2.20.1)
json (2.3.0-java)
json-schema (1.0.10)
less (2.6.0)
Expand Down Expand Up @@ -316,10 +334,11 @@ DEPENDENCIES
coffee-script-source
dumb_delegator (~> 0.8)
factory_bot_rails (~> 4.11, >= 4.11.1)
fog-aws (= 2.0.0)
i18n (= 0.9.1)
jquery-rails
jquery-ui-rails
jruby-jars (= 9.2.12.0)
jruby-jars (= 9.2.20.1)
json (= 2.3.0)
json-schema (= 1.0.10)
less-rails-bootstrap
Expand Down
98 changes: 21 additions & 77 deletions frontend/spec/features/tree_toolbar_import_help_link_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,121 +4,65 @@
$help_link_id = '#load_via_spreadsheet_help_icon'

describe 'Tree toolbar import help link', js: true do
before(:all) do
@repo = create(:repo, repo_code: "tree_toolbar_test_#{Time.now.to_i}")
set_repo(@repo)
@resource = create(:resource)
parent = create(:json_archival_object,
:resource => {'ref' => @resource.uri},
:title => "Parent")
create(:json_archival_object,
:resource => {'ref' => @resource.uri},
:parent => {'ref' => parent.uri},
:title => "Child 1")

$index.run_index_round
end

before(:each) do
visit '/'
page.has_xpath? '//input[@id="login"]'
within "form.login" do
fill_in "username", with: "admin"
fill_in "password", with: "admin"
click_button "Sign In"
end
login_admin
select_repository(@repo)
edit_resource(@resource)
end

page.has_no_xpath? '//input[@id="login"]'
after(:each) do
#Capybara.current_session.instance_variable_set(:@touched, false)
end

it 'should be visible on edit resource page load' do
click_link 'Browse'
click_link 'Resources'
find("#tabledSearchResults .btn-primary", match: :first).click

expect(page).to have_css($help_link_id, visible: true)
end

it 'should display a tooltip above when hovered on edit resource page' do
click_link 'Browse'
click_link 'Resources'
find("#tabledSearchResults .btn-primary", match: :first).click

page.should have_no_css("#$help_link_id[aria-describedby*='tooltip']")
page.find($help_link_id).hover
page.should have_css("#$help_link_id[aria-describedby*='tooltip'][data-placement='top']")
end

it 'should be hidden when resource tree is in reorder mode' do
click_link 'Browse'
click_link 'Resources'
find("#tabledSearchResults .btn-primary", match: :first).click

click_on 'Enable Reorder Mode'
expect(page).to have_css($help_link_id, visible: :hidden)
end

it 'should be visible on edit archival object page load' do
@resource = create(:json_resource)
@parent = create(:json_archival_object,
:resource => {'ref' => @resource.uri},
:title => "Parent")
@child1 = create(:json_archival_object,
:resource => {'ref' => @resource.uri},
:parent => {'ref' => @parent.uri},
:title => "Child 1")

$index.run_index_round

click_link 'Browse'
click_link 'Resources'
within('table#tabledSearchResults > tbody > tr:nth-of-type(2)') do
find(".btn-primary").click
end

within("#tree-container .table-row-group") do
find("a.record-title").click
end

expect(page).to have_css($help_link_id, visible: true)
end

it 'should display a tooltip above when hovered on edit archival object page' do
@resource = create(:json_resource)
@parent = create(:json_archival_object,
:resource => {'ref' => @resource.uri},
:title => "Parent")
@child1 = create(:json_archival_object,
:resource => {'ref' => @resource.uri},
:parent => {'ref' => @parent.uri},
:title => "Child 1")

$index.run_index_round

click_link 'Browse'
click_link 'Resources'
within('table#tabledSearchResults > tbody > tr:nth-of-type(2)') do
find(".btn-primary").click
end

within("#tree-container .table-row-group") do
find("a.record-title").click
end

page.should have_no_css("#$help_link_id[aria-describedby*='tooltip']")
page.find($help_link_id).hover
page.should have_css("#$help_link_id[aria-describedby*='tooltip'][data-placement='top']")
end

it 'should be hidden when archival object tree is in reorder mode' do
@resource = create(:json_resource)
@parent = create(:json_archival_object,
:resource => {'ref' => @resource.uri},
:title => "Parent")
@child1 = create(:json_archival_object,
:resource => {'ref' => @resource.uri},
:parent => {'ref' => @parent.uri},
:title => "Child 1")

$index.run_index_round

click_link 'Browse'
click_link 'Resources'
within('table#tabledSearchResults > tbody > tr:nth-of-type(2)') do
find(".btn-primary").click
end

within("#tree-container .table-row-group") do
find("a.record-title").click
end

click_on 'Enable Reorder Mode'
expect(page).to have_css($help_link_id, visible: :hidden)
end

end