This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_source 'https://rubygems.org' | |
gem 'bootsnap', '>= 1.4.4', require: false | |
gem 'jbuilder', '~> 2.7' | |
gem 'puma', '~> 5.0' | |
gem 'rails', '~> 6.1.4', '>= 6.1.4.4' | |
gem 'sass-rails' | |
gem 'turbolinks', '~> 5' | |
gem 'webpacker', '~> 5.0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @abstract Representation of a bowling frame. It can be any number of "throws" but a frame is complete if it is either | |
# open, a strike, or spare. Open frames occur when the player does not knock down all the pins within two throws. Closed | |
# frames mean all the pins were knocked down either with a strike or spare. | |
class Frame | |
attr_accessor :throws | |
def initialize | |
@throws = [] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> {}.fetch("i-dont-exist") # Raises error for a required key | |
KeyError: key not found: "i-dont-exist" | |
from (pry):2:in `fetch' | |
> {}.fetch("with-a-default", "default-value") # Provide a default value as the second argument | |
=> "default-value" | |
> {}.fetch("something-special") { puts "do something special here" } # Yields to a block for custom stuff | |
do something special here | |
=> nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bundle exec rspec spec/cho/work/submissions/multiple_fields_spec.rb | |
/Users/agw13/.asdf/installs/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/valkyrie-1.4.0/lib/valkyrie/types.rb:110: warning: already initialized constant #<Module:0x00007fcd350fabe0>::Int | |
/Users/agw13/.asdf/installs/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/dry-types-0.12.3/lib/dry/types.rb:119: warning: previous definition of Int was here | |
/Users/agw13/.asdf/installs/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/shoulda-matchers-3.1.2/lib/shoulda/matchers/active_model/validate_inclusion_of_matcher.rb:273: warning: BigDecimal.new is deprecated; use BigDecimal() method instead. | |
Capybara starting Puma... | |
* Version 3.12.0 , codename: Llamas in Pajamas | |
* Min threads: 0, max threads: 4 | |
* Listening on tcp://127.0.0.1:60976 | |
2019-05-13 14:12:23 DEBUG Webdrivers Looking for Site: https://chromedriver.storage.googleapis.com | |
2019-05-13 14:12:23 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current: | |
> Schema::MetadataField.all.first.attributes | |
=> {:id=>#<Valkyrie::ID:0x007f86fc140250 @id="06de9786-ff39-401b-92f0-bf64bbaabeff">, | |
[...] | |
:default_value=>nil, | |
} | |
With RC4: | |
> Schema::MetadataField.all.first.attributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FormFields (ff) is a js webpack that will key off of some CSS class selectors and add functionality for adding and removing | |
fields. I want to use the same CSS classes that Boottrap is using for fomatting, but not have to rely on them explicity. | |
So I prefaced each one I was using with ff-, ex: ff-input-group and ff-form-control. The others that are not based off of | |
Boostrap are ff-multiple, ff-remove, and ff-add, to keep the namespacing consistent. | |
Is this a BEM-approved method of naming? Alternatives might be formFields-, form_fields-, form-fields--, or other combinations. | |
<div class="form-group form-multiple-ff subject"> | |
<label for="archival_collection_subject">Subject</label> | |
<div class="input-group input-ff"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scholarsphere: | |
<div class="form-group"> | |
<label>Title</label> | |
<ul> | |
<li> | |
<input/> | |
<span>Remove me</span> | |
</li> | |
</ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
have_header: checking for clamav.h... -------------------- no | |
"clang -o conftest -I/Users/agw13/.asdf/installs/ruby/2.4.1/include/ruby-2.4.0/x86_64-darwin18 -I/Users/agw13/.asdf/installs/ruby/2.4.1/include/ruby-2.4.0/ruby/backward -I/Users/agw13/.asdf/installs/ruby/2.4.1/include/ruby-2.4.0 -I. -I/Users/agw13/.asdf/installs/ruby/2.4.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -pipe conftest.c -L. -L/Users/agw13/.asdf/installs/ruby/2.4.1/lib -L. -L/Users/agw13/.asdf/installs/ruby/2.4.1/lib -fstack-protector -L/usr/local/lib -lruby-static -framework CoreFoundation -lpthread -lgmp -ldl -lobjc " | |
checked program was: | |
/* begin */ | |
1: #include "ruby.h" | |
2: | |
3: int main(int argc, char **argv) | |
4: { | |
5: return 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are the updated clamav files that are causing things to break on QA: | |
{ssjobs1qa-new:root}~ :rpm -qa | grep clam | |
clamav-lib-0.101.0-1.el7.x86_64 | |
clamd-0.101.0-1.el7.x86_64 | |
clamav-0.101.0-1.el7.x86_64 | |
clamav-update-0.101.0-1.el7.x86_64 | |
clamav-data-0.101.0-1.el7.noarch | |
clamav-devel-0.101.0-1.el7.x86_64 | |
clamav-filesystem-0.101.0-1.el7.noarch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def save_xml_file(id) | |
av = ArchivalVideo.find(id) | |
av.summary = av.abstract if av.summary == [""] | |
xml = av.to_pbcore_xml | |
license = Array.wrap(av.license).first | |
if license.present? | |
prs = Nokogiri::XML::Node.new("pbcoreRightsSummary", xml) | |
xml.at("/xmlns:pbcoreDescriptionDocument").add_child(prs) | |
rs = Nokogiri::XML::Node.new("rightsSummary", xml) | |
rs.content = license |
NewerOlder