Skip to content

Commit

Permalink
Merge pull request #148 from jrgriffiniii/hotfix-4.0.0rc1-doc
Browse files Browse the repository at this point in the history
Updating the README for Samvera Community branding and an update guide
  • Loading branch information
Thomas Johnson authored Mar 21, 2018
2 parents c264bb8 + 57fd70a commit 80370a6
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 20 deletions.
36 changes: 23 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
# How to Contribute

We want your help to make Project Hydra great.
There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
We want your help to make Samvera great. There are a few guidelines
that we need contributors to follow so that we can have a chance of
keeping on top of things.

## Code of Conduct

The Hydra community is dedicated to providing a welcoming and positive experience for all its
members, whether they are at a formal gathering, in a social setting, or taking part in activities
online. Please see our [Code of Conduct](https://wiki.duraspace.org/display/hydra/Code+of+Conduct)
for more information.
The Samvera Community is dedicated to providing a welcoming and positive
experience for all its members, whether they are at a formal gathering, in
a social setting, or taking part in activities online. Please see our
[Code of Conduct](CODE_OF_CONDUCT.md) for more information.

## Hydra Project Intellectual Property Licensing and Ownership
## Samvera Community Intellectual Property Licensing and Ownership

All code contributors must have an Individual Contributor License Agreement (iCLA) on file with the Hydra Project Steering Group.
If the contributor works for an institution, the institution must have a Corporate Contributor License Agreement (cCLA) on file.
All code contributors must have an Individual Contributor License Agreement
(iCLA) on file with the Samvera Steering Group. If the contributor works for
an institution, the institution must have a Corporate Contributor License
Agreement (cCLA) on file.

https://wiki.duraspace.org/display/hydra/Hydra+Project+Intellectual+Property+Licensing+and+Ownership
https://wiki.duraspace.org/display/samvera/Samvera+Community+Intellectual+Property+Licensing+and+Ownership

You should also add yourself to the `CONTRIBUTORS.md` file in the root of the project.

Expand Down Expand Up @@ -48,7 +51,7 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
* Please avoid working directly on the `master` branch.
* You may find the [hub suite of commands](https://github.com/defunkt/hub) helpful
* Make sure you have added sufficient tests and documentation for your changes.
* Test functionality with RSpec; est features / UI with Capybara.
* Test functionality with RSpec; Test features / UI with Capybara.
* Run _all_ the tests to assure nothing else was accidentally broken.

### Documenting Code
Expand All @@ -61,7 +64,7 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
* This work greatly increases the usability of the code base and supports the on-ramping of new committers.
* We will all be understanding of one another's time constraints in this area.
* YARD examples:
* [Hydra::Works::RemoveGenericFile](https://github.com/projecthydra-labs/hydra-works/blob/master/lib/hydra/works/services/generic_work/remove_generic_file.rb)
* [Hydra::Works::UploadFileToFileSet](https://github.com/samvera/hydra-works/blob/master/lib/hydra/works/services/upload_file_to_file_set.rb)
* [ActiveTriples::LocalName::Minter](https://github.com/ActiveTriples/active_triples-local_name/blob/master/lib/active_triples/local_name/minter.rb)
* [Getting started with YARD](http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md)

Expand Down Expand Up @@ -103,8 +106,14 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
long to fit in 72 characters
```

* Make sure you have added the necessary tests for your changes.
* Run _all_ the tests to assure nothing else was accidentally broken.
* When you are ready to submit a pull request

### Submitting Changes

[Detailed Walkthrough of One Pull Request per Commit](http://ndlib.github.io/practices/one-commit-per-pull-request/)

* Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub.
* Make sure your branch is up to date with its parent branch (i.e. master)
* `git checkout master`
Expand Down Expand Up @@ -144,10 +153,11 @@ First, the person contributing the code is putting themselves out there. Be mind
This is your chance for a mentoring moment of another developer. Take time to give an honest and thorough review of what has changed. Things to consider:

* Does the commit message explain what is going on?
* Does the code changes have tests? _Not all changes need new tests, some changes are refactors_
* Does the code changes have tests? _Not all changes need new tests, some changes are refactorings_
* Do new or changed methods, modules, and classes have documentation?
* Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
* Does the description of the new/changed specs match your understanding of what the spec is doing?
* Did the Travis tests complete successfully?

If you are uncertain, bring other contributors into the conversation by assigning them as a reviewer.

Expand Down
57 changes: 56 additions & 1 deletion History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,61 @@
# History of hydra-editor releases

## 4.0.0.rc1
* 2018-03-21: Updates HydraEditor::Form.model_attributes. [dchandekstark]
* 2018-03-21: Replace `Hydra::Presenter#to_model` delegation with `self` [no-reply]

## 3.4.0.beta
* 2018-03-05: Change FactoryGirl dependency to FactoryBot [no-reply]
* 2018-03-05: Restrict `simple_form` to `<= 3.5.0` [no-reply]

## 3.3.2
* 2017-05-23: Backport Idempotent DOM manipulation [jcoyne]
* 2017-05-23: Testing on supported version of rails. Fixes #135 [jcoyne]
* 2017-05-23: Make DOM manipulations idempotent. [jcoyne]
* 2017-05-09: Update travis build matrix [cbeer]

## 3.3.1
* 2017-05-04: Use ActiveModel::Naming to find partials [jcoyne]
* 2017-05-04: Remove unused method [jcoyne]

## 3.2.1
* 2017-05-01: Don't repeat the inputTypeClass value [jcoyne]

## 3.2.0
* 2017-04-13: Use almond 0.1.0 [jcoyne]
* 2017-04-10: Allow setting a custom field_metadata_service [jcoyne]
* 2016-12-08: Use first label to avoid smushing nested labels in more complex fields [hackmastera]
* 2016-09-19: Test for adding input or textarea child fields [awead]
* 2016-09-19: Use class selector for specifying a field's children [awead]

## 3.1.2
* 2016-09-20: Clean Gemfile [jcoyne]

## 3.1.1
* 2016-09-13: Update `engine_cart` and `ActiveTriples` [jcoyne]
* 2016-08-24: Optimize form field partial lookups [cbeer]

## 3.1.0
* 2016-08-08: Uses the `rdf-vocab` Gem for predicates [jcoyne]
* 2016-08-08: Silence Devise deprecation in test configuration [atz]
* 2016-08-08: Introduce support for Rails 5 releases [jcoyne]

## 3.0.0.beta1
* 2016-06-23: Delegate `model_name` to the `model` attribute [jcoyne]
* 2016-06-23: Converts `FieldManager` to ECMAScript 6 [jcoyne]
* 2016-05-19: Improve usability and a11y for multi-valued fields [jcoyne]
* 2016-04-28: Permit the HTML partials to be configurable [jcoyne]
* 2016-04-28: Replace the `simple_form` bootstrap config. [jcoyne]
* 2016-04-28: Update the development dependencies [jcoyne]

## 2.0.0

* 2016-04-07: Updates the usage of `property` method [jcoyne]
* 2016-04-07: Adds delegate method `#new_record` [jcoyne]
* 2016-03-28: Updates solr_wrapper and fcrepo_wrapper [atz]
* 2016-03-28: Updates Rubocop [atz]
* 2016-03-24: Promotion from samvera-labs Organization

## 1.2.0
* 2016-01-18: Support Blacklight 6 [Justin Coyne]

Expand Down Expand Up @@ -34,4 +90,3 @@

### 0.1.1
* Correctly account for modifications made by initialize_fields when processing form data. Fixes #14.

48 changes: 42 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HydraEditor [![Gem Version](https://badge.fury.io/rb/hydra-editor.png)](http://badge.fury.io/rb/hydra-editor) [![Build Status](https://travis-ci.org/projecthydra/hydra-editor.png)](https://travis-ci.org/projecthydra/hydra-editor)
# HydraEditor [![Gem Version](https://badge.fury.io/rb/hydra-editor.png)](http://badge.fury.io/rb/hydra-editor) [![Build Status](https://travis-ci.org/samvera/hydra-editor.png)](https://travis-ci.org/samvera/hydra-editor)

To use add to your gemfile:

Expand Down Expand Up @@ -75,9 +75,45 @@ Add the stylesheets by adding this line to your app/assets/stylesheets/applicati

(Note: The Javascript includes require Blacklight and must be put after that.)

## Updating to 4.0.0

* [SimpleForm](https://github.com/plataformatec/simple_form) is supported from release 3.2.0 onwards
* `#to_model` now returns `self` (previously it was the value of `@model`):
```ruby
class MyForm
include HydraEditor::Form
self.model_class = MyModel
self.terms = [:title, :creator]
# [...]
end
# [...]
some_work = MyModel.new(title: ['Black holes: The Reith Lectures.'], creator: 'S.W. Hawking')
some_form = MyForm.new(some_work)
# [...]
some_form.to_model
# => #<MyForm:0x00007fd5b2fd1468 @attributes={"id"=>nil, "title"=>["Black holes: The Reith Lectures."], "creator"=>"S.W. Hawking"}, @model=#<MyModel id: nil, title: ["Black holes: The Reith Lectures."], creator: "S.W. Hawking">>
```
* When a form field for a single value is empty, it now returns a `nil` value (as opposed to an empty `String`):
```ruby
class MyForm
include HydraEditor::Form
self.model_class = MyModel
self.terms = [:title, :creator]
# [...]
end

# [...]
values = MyForm.model_attributes(
title: ['On the distribution of values of angles determined by coplanar points.'],
creator: ''
)
values['creator']
# => nil
```

## Other customizations

By default hydra-editor provides a RecordsController with :new, :create, :edit, and :update actions implemented in the included RecordsControllerBehavior module, and a RecordsHelper module with methods implemented in RecordsHelperBehavior. If you are mounting the engine and using its routes, you can override the controller behaviors by creating your own RecordsController:
By default `hydra-editor` provides a RecordsController with :new, :create, :edit, and :update actions implemented in the included RecordsControllerBehavior module, and a RecordsHelper module with methods implemented in RecordsHelperBehavior. If you are mounting the engine and using its routes, you can override the controller behaviors by creating your own RecordsController:

```ruby
class RecordsController < ApplicationController
Expand All @@ -89,8 +125,8 @@ end

If you are not mounting the engine or using its default routes, you can include RecordsControllerBehavior in your own controller and add the appropriate routes to your app's config/routes.rb.

# Project Hydra
This software has been developed by and is brought to you by the Hydra community. Learn more at the
[Project Hydra website](http://projecthydra.org)
# Samvera
This software has been developed by and is brought to you by the Samvera community. Learn more at the
[Samvera website](https://samvera.org/)

![Project Hydra Logo](https://github.com/uvalib/libra-oa/blob/a6564a9e5c13b7873dc883367f5e307bf715d6cf/public/images/powered_by_hydra.png?raw=true)
![Samvera Logo](https://wiki.duraspace.org/download/thumbnails/87459292/samvera-fall-font2-200w.png?version=1&modificationDate=1498550535816&api=v2)

0 comments on commit 80370a6

Please sign in to comment.