active_fedora-registered_attributes 0.0.11 → 0.1.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +113 -0
- data/Changelog.md +3 -0
- data/active_fedora-registered_attributes.gemspec +1 -1
- data/lib/active_fedora/registered_attributes/attribute.rb +2 -2
- data/lib/active_fedora/registered_attributes/version.rb +1 -1
- data/spec/active_fedora/registered_attributes/attribute_spec.rb +3 -4
- metadata +10 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39fd41d2d9a1e02425935d9a80efd48a89998811
|
4
|
+
data.tar.gz: 4b2a655a5ee7958d9ab3c1b459b1db399197fd6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32bb47650c883eb375a07270639116d10ff5f91e749bc620bbbf8b42757ef340e998bc8e787f7e89e7a7fee43fe2ac30e7b28e16e2eeb983fddff88d779ecd17
|
7
|
+
data.tar.gz: 526177b9fd9cb8b43fadf5990c2d86bd5db9122edb05bf17e16ca767df8b6db5d6d251b7a705f1d31483e7e9d99659dc78f25be244d1807b97b69c4450dc49fc
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
# How to Contribute
|
2
|
+
|
3
|
+
We want your help to make Project Hydra great.
|
4
|
+
There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
|
5
|
+
|
6
|
+
## Hydra Project Intellectual Property Licensing and Ownership
|
7
|
+
|
8
|
+
All code contributors must have an Individual Contributor License Agreement (iCLA) on file with the Hydra Project Steering Group.
|
9
|
+
If the contributor works for an institution, the institution must have a Corporate Contributor License Agreement (cCLA) on file.
|
10
|
+
|
11
|
+
https://wiki.duraspace.org/display/hydra/Hydra+Project+Intellectual+Property+Licensing+and+Ownership
|
12
|
+
|
13
|
+
You should also add yourself to the `CONTRIBUTORS.md` file in the root of the project.
|
14
|
+
|
15
|
+
## Contribution Tasks
|
16
|
+
|
17
|
+
* Reporting Issues
|
18
|
+
* Making Changes
|
19
|
+
* Submitting Changes
|
20
|
+
* Merging Changes
|
21
|
+
|
22
|
+
### Reporting Issues
|
23
|
+
|
24
|
+
* Make sure you have a [GitHub account](https://github.com/signup/free)
|
25
|
+
* Submit a [Github issue](./issues) by:
|
26
|
+
* Clearly describing the issue
|
27
|
+
* Provide a descriptive summary
|
28
|
+
* Explain the expected behavior
|
29
|
+
* Explain the actual behavior
|
30
|
+
* Provide steps to reproduce the actual behavior
|
31
|
+
|
32
|
+
### Making Changes
|
33
|
+
|
34
|
+
* Fork the repository on GitHub
|
35
|
+
* Create a topic branch from where you want to base your work.
|
36
|
+
* This is usually the master branch.
|
37
|
+
* To quickly create a topic branch based on master; `git branch fix/master/my_contribution master`
|
38
|
+
* Then checkout the new branch with `git checkout fix/master/my_contribution`.
|
39
|
+
* Please avoid working directly on the `master` branch.
|
40
|
+
* You may find the [hub suite of commands](https://github.com/defunkt/hub) helpful
|
41
|
+
* Make commits of logical units.
|
42
|
+
* Your commit should include a high level description of your work in HISTORY.textile
|
43
|
+
* Check for unnecessary whitespace with `git diff --check` before committing.
|
44
|
+
* Make sure your commit messages are [well formed](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
45
|
+
* If you created an issue, you can close it by including "Closes #issue" in your commit message. See [Github's blog post for more details](https://github.com/blog/1386-closing-issues-via-commit-messages)
|
46
|
+
|
47
|
+
```
|
48
|
+
Present tense short summary (50 characters or less)
|
49
|
+
|
50
|
+
More detailed description, if necessary. It should be wrapped to 72
|
51
|
+
characters. Try to be as descriptive as you can, even if you think that
|
52
|
+
the commit content is obvious, it may not be obvious to others. You
|
53
|
+
should add such description also if it's already present in bug tracker,
|
54
|
+
it should not be necessary to visit a webpage to check the history.
|
55
|
+
|
56
|
+
Include Closes #<issue-number> when relavent.
|
57
|
+
|
58
|
+
Description can have multiple paragraphs and you can use code examples
|
59
|
+
inside, just indent it with 4 spaces:
|
60
|
+
|
61
|
+
class PostsController
|
62
|
+
def index
|
63
|
+
respond_with Post.limit(10)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
You can also add bullet points:
|
68
|
+
|
69
|
+
- you can use dashes or asterisks
|
70
|
+
|
71
|
+
- also, try to indent next line of a point for readability, if it's too
|
72
|
+
long to fit in 72 characters
|
73
|
+
```
|
74
|
+
|
75
|
+
* Make sure you have added the necessary tests for your changes.
|
76
|
+
* Run _all_ the tests to assure nothing else was accidentally broken.
|
77
|
+
* When you are ready to submit a pull request
|
78
|
+
|
79
|
+
### Submitting Changes
|
80
|
+
|
81
|
+
[Detailed Walkthrough of One Pull Request per Commit](http://ndlib.github.io/practices/one-commit-per-pull-request/)
|
82
|
+
|
83
|
+
* Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub.
|
84
|
+
* Make sure your branch is up to date with its parent branch (i.e. master)
|
85
|
+
* `git checkout master`
|
86
|
+
* `git pull --rebase`
|
87
|
+
* `git checkout <your-branch>`
|
88
|
+
* `git rebase master`
|
89
|
+
* It is likely a good idea to run your tests again.
|
90
|
+
* Squash the commits for your branch into one commit
|
91
|
+
* `git rebase --interactive HEAD~<number-of-commits>` ([See Github help](https://help.github.com/articles/interactive-rebase))
|
92
|
+
* To determine the number of commits on your branch: `git log master..<your-branch> --oneline | wc -l`
|
93
|
+
* Squashing your branch's changes into one commit is "good form" and helps the person merging your request to see everything that is going on.
|
94
|
+
* Push your changes to a topic branch in your fork of the repository.
|
95
|
+
* Submit a pull request from your fork to the project.
|
96
|
+
|
97
|
+
### Merging Changes
|
98
|
+
|
99
|
+
* It is considered "poor from" to merge your own request.
|
100
|
+
* Please take the time to review the changes and get a sense of what is being changed. Things to consider:
|
101
|
+
* Does the commit message explain what is going on?
|
102
|
+
* Does the code changes have tests? _Not all changes need new tests, some changes are refactorings_
|
103
|
+
* Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
|
104
|
+
* Did the Travis tests complete successfully?
|
105
|
+
* If you are uncertain, bring other contributors into the conversation by creating a comment that includes their @username.
|
106
|
+
* If you like the pull request, but want others to chime in, create a +1 comment and tag a user.
|
107
|
+
|
108
|
+
# Additional Resources
|
109
|
+
|
110
|
+
* [General GitHub documentation](http://help.github.com/)
|
111
|
+
* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
|
112
|
+
* [Pro Git](http://git-scm.com/book) is both a free and excellent book about Git.
|
113
|
+
* [A Git Config for Contributing](http://ndlib.github.io/practices/my-typical-per-project-git-config/)
|
data/Changelog.md
ADDED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "active-fedora", ">= 6.
|
21
|
+
spec.add_dependency "active-fedora", ">= 6.6.0.rc2"
|
22
22
|
spec.add_dependency "active_attr", "~> 0.8.2"
|
23
23
|
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.3"
|
@@ -133,11 +133,11 @@ module ActiveFedora
|
|
133
133
|
|
134
134
|
def options_for_delegation
|
135
135
|
if datastream.is_a?(Hash)
|
136
|
-
datastream.merge(
|
136
|
+
datastream.merge(multiple: multiple?)
|
137
137
|
else
|
138
138
|
{
|
139
139
|
to: datastream,
|
140
|
-
|
140
|
+
multiple: multiple?
|
141
141
|
}
|
142
142
|
end
|
143
143
|
end
|
@@ -60,7 +60,7 @@ describe ActiveFedora::RegisteredAttributes::Attribute do
|
|
60
60
|
subject.with_delegation_options {|name,opts|
|
61
61
|
@yielded = true
|
62
62
|
expect(name).to eq(field_name)
|
63
|
-
expect(opts).to eq(to: datastream,
|
63
|
+
expect(opts).to eq(to: datastream, multiple: true)
|
64
64
|
}
|
65
65
|
expect(@yielded).to eq(true)
|
66
66
|
end
|
@@ -70,7 +70,7 @@ describe ActiveFedora::RegisteredAttributes::Attribute do
|
|
70
70
|
let(:options) {
|
71
71
|
{
|
72
72
|
multiple: true,
|
73
|
-
datastream: {to: datastream, at: at_value,
|
73
|
+
datastream: {to: datastream, at: at_value, multiple: false }
|
74
74
|
}
|
75
75
|
}
|
76
76
|
it 'yields name and options' do
|
@@ -78,7 +78,7 @@ describe ActiveFedora::RegisteredAttributes::Attribute do
|
|
78
78
|
subject.with_delegation_options {|name,opts|
|
79
79
|
@yielded = true
|
80
80
|
expect(name).to eq(field_name)
|
81
|
-
expect(opts).to eq(to: datastream,
|
81
|
+
expect(opts).to eq(to: datastream, multiple: options.fetch(:multiple), at: at_value)
|
82
82
|
}
|
83
83
|
expect(@yielded).to eq(true)
|
84
84
|
end
|
@@ -149,7 +149,6 @@ describe ActiveFedora::RegisteredAttributes::Attribute do
|
|
149
149
|
let(:options) { {datastream: nil, skip_accessor: true} }
|
150
150
|
it 'does not yield accession options_for_input' do
|
151
151
|
@yielded = false
|
152
|
-
puts subject.send(:options)
|
153
152
|
subject.with_accession_options {|name,opts|
|
154
153
|
@yielded = true
|
155
154
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_fedora-registered_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-fedora
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.6.0.rc2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 6.6.0.rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: active_attr
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,6 +90,8 @@ files:
|
|
90
90
|
- .gitignore
|
91
91
|
- .rspec
|
92
92
|
- .travis.yml
|
93
|
+
- CONTRIBUTING.md
|
94
|
+
- Changelog.md
|
93
95
|
- Gemfile
|
94
96
|
- Guardfile
|
95
97
|
- LICENSE.txt
|
@@ -120,12 +122,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
122
|
version: '0'
|
121
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
124
|
requirements:
|
123
|
-
- - '
|
125
|
+
- - '>'
|
124
126
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
127
|
+
version: 1.3.1
|
126
128
|
requirements: []
|
127
129
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.0.
|
130
|
+
rubygems_version: 2.0.5
|
129
131
|
signing_key:
|
130
132
|
specification_version: 4
|
131
133
|
summary: An ActiveFedora extension for registring attributes
|
@@ -135,3 +137,4 @@ test_files:
|
|
135
137
|
- spec/active_fedora/registered_attributes_spec.rb
|
136
138
|
- spec/spec_helper.rb
|
137
139
|
- spec/support/book.rb
|
140
|
+
has_rdoc:
|