- Install stud
$ brew install https://raw.github.com/paulnicholson/homebrew/master/Library/Formula/stud.rb
- Download and install the powssl script
$ curl https://gist.github.com/mbklein/8829826/raw/3ea59efe8c7e9013c265313045a9fdda5c653963/powssl > ~/bin/powssl
$ chmod +x ~/bin/powssl
- Run powssl to create development certificate and configure stud.
$ powssl
This file contains 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
#!/usr/bin/env ruby | |
# Requirements: | |
# * ruby 1.8.7 or later | |
# * rubygems 1.3.7 or later | |
# * The mail gem (install with `gem install mail`) | |
# To configure, put this script somewhere and replace the delivery directive | |
# in the email user's .qmail file with the following: | |
# |
This file contains 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
>> doc = Nokogiri::XML('<mods xmlns="http://www.loc.gov/mods/v3"/>') | |
=> #<Nokogiri::XML::Document:0xb5c name="document" children=[#<Nokogiri::XML::Element:0xb5a name="mods" namespace=#<Nokogiri::XML::Namespace:0xb58 href="http://www.loc.gov/mods/v3">>]> | |
>> name = doc.create_element('name','type'=>'personal') | |
=> #<Nokogiri::XML::Element:0xb60 name="name" attributes=[#<Nokogiri::XML::Attr:0xb5e name="type" value="personal">]> | |
>> puts name.to_xml | |
<name type="personal"/> | |
=> nil | |
>> doc.root.add_child name | |
=> #<Nokogiri::XML::Element:0xb60 name="name" namespace=#<Nokogiri::XML::Namespace:0xb58 href="http://www.loc.gov/mods/v3"> attributes=[#<Nokogiri::XML::Attr:0xb5e name="type" value="personal">]> | |
>> name['type'] |
This file contains 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
Failures: | |
1) Loading from solr should be able to get indexed properties without loading from fedora | |
Failure/Error: expect(RdfTest.connection_for_pid('1')).to receive(:datastream_dissemination).never | |
NoMethodError: | |
undefined method `receive' for #<RSpec::Core::ExampleGroup::Nested_28:0x6f9519ab> | |
# ./spec/integration/load_from_solr_spec.rb:51:in `(root)' | |
2) ActiveFedora::SolrService reify solr results.reify_solr_result should use .load_instance_from_solr when called with :load_from_solr option | |
Failure/Error: ActiveFedora::SolrService.should_not receive(:query) |
This file contains 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
>> class A | |
>> def method_missing(sym,*args,&block) | |
>> puts '%s(%s)' % [sym.to_s, args.inspect] | |
>> end | |
>> end | |
=> nil | |
>> xml = A.new | |
=> #<A:0x007fe158a4b280> | |
>> eval('xml.work-title("test")') | |
work([]) |
This file contains 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
>> class Test | |
>> define_method :'work-title' do | |
?> puts "YOU CALLED #work-title!!!" | |
>> end | |
>> end | |
=> #<Proc:0x007f9c82956200@(irb):266 (lambda)> | |
>> t = Test.new | |
=> #<Test:0x007f9c8295d4d8> | |
>> t.work-title | |
NoMethodError: undefined method `work' for #<Test:0x007f9c8295d4d8> |
This file contains 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
[5] pry(main)> require File.join(Rails.root,'db/migrate/20140306225510_r2_content_to_r3') | |
=> true | |
[6] pry(main)> R2ContentToR3.new.up | |
-- R2->R3 | |
(0.1ms) SELECT COUNT(*) FROM `role_maps` | |
(0.1ms) SELECT COUNT(*) FROM `role_maps` | |
(0.1ms) SELECT COUNT(*) FROM `role_maps` | |
(0.1ms) SELECT COUNT(*) FROM `role_maps` | |
(0.2ms) SELECT COUNT(*) FROM `role_maps` | |
(0.1ms) SELECT COUNT(*) FROM `role_maps` |
This file contains 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 link_for(path) | |
file = box_client { |c| c.file(path) } | |
# ... other code ... | |
end | |
def box_client | |
session = RubyBox::Session.new({ | |
client_id: config[:client_id], | |
client_secret: config[:client_secret], | |
access_token: @token |
This file contains 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
[root@avalon-box vagrant]# yum list | grep tomcat | |
tomcat.noarch 7.0.33-3.el6 @epel | |
tomcat-el-2.2-api.noarch 7.0.33-3.el6 @epel | |
tomcat-jsp-2.2-api.noarch 7.0.33-3.el6 @epel | |
tomcat-lib.noarch 7.0.33-3.el6 @epel | |
tomcat-servlet-3.0-api.noarch 7.0.33-3.el6 @epel | |
apache-tomcat-apis.noarch 0.1-1.el6 base | |
glite-security-trustmanager-tomcat6.noarch | |
jakarta-commons-collections-tomcat5.noarch | |
jakarta-commons-dbcp-tomcat5.noarch 1.2.1-13.8.el6 base |
This file contains 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
gem 'handle-system' | |
gem 'noid' |
OlderNewer