om 3.1.1 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 47b327a1e5c5c97aaced259dfada9e0272a7e011
4
- data.tar.gz: 43198216111873a28f12a414d420bccf3f1453f6
2
+ SHA256:
3
+ metadata.gz: 5e35bb0e071114f2af407331f40d41433c1fc1d94c3ddcad10a44e9f2261d068
4
+ data.tar.gz: 46bd8fa47d67c35ec6c535e66d42a288a6abc1ef1ba71a62bfa9536aaca94e50
5
5
  SHA512:
6
- metadata.gz: 509267f8bedd654a287e8c97dbd55076f6c21beb31e6af88b0910a5b33c505e2e1efff7f36ae5b831731e58fe4d9723c9e6e56da568bdc12e56f7321bb87fab5
7
- data.tar.gz: 717a6650a821571adac1077be22ef1e56d4c56d74821601c3372f48caa29ce2217a1c2d47fdb9c2be2356f3c09cd3225db80037f9a36065f057f4a1ec3aa1b12
6
+ metadata.gz: f62a9a01aba29b15bd19ef6ed3b6784ce2c86fddce5ae589ff77ef7ae921cee5bb3fa11b9745189a11832d46cb89ec148c441133acfb5abbd8f11cc3da065f64
7
+ data.tar.gz: b7911b910411e415872b14fa27150872388a887ccf80c57159257fc9d0a6ad45dab1f0235d0145dc54c82e343957cc05153671648c5de52703c430f49c82322f
@@ -0,0 +1,60 @@
1
+ ---
2
+ version: 2.1
3
+ orbs:
4
+ samvera: samvera/circleci-orb@0
5
+ jobs:
6
+ test:
7
+ parameters:
8
+ ruby_version:
9
+ type: string
10
+ bundler_version:
11
+ type: string
12
+ default: 1.17.3
13
+ rails_version:
14
+ type: string
15
+ executor:
16
+ name: 'samvera/ruby'
17
+ ruby_version: << parameters.ruby_version >>
18
+ environment:
19
+ COVERAGE: true
20
+ RAILS_VERSION: << parameters.rails_version >>
21
+ NOKOGIRI_USE_SYSTEM_LIBRARIES: true
22
+ steps:
23
+ - samvera/cached_checkout
24
+ - samvera/bundle_for_gem:
25
+ ruby_version: << parameters.ruby_version >>
26
+ bundler_version: << parameters.bundler_version >>
27
+ project: om
28
+ - samvera/parallel_rspec
29
+ workflows:
30
+ version: 2
31
+ ci:
32
+ jobs:
33
+ - test:
34
+ name: ruby2-6_rails6-0
35
+ ruby_version: 2.6.3
36
+ rails_version: 6.0.0.rc2
37
+ - test:
38
+ name: ruby2-6_rails5-2
39
+ ruby_version: 2.6.3
40
+ rails_version: 5.2.3
41
+ - test:
42
+ name: ruby2-5_rails5-2
43
+ ruby_version: 2.5.5
44
+ rails_version: 5.2.3
45
+ - test:
46
+ name: ruby2-4_rails5-2
47
+ ruby_version: 2.4.6
48
+ rails_version: 5.2.3
49
+ - test:
50
+ name: ruby2-6_rails5-1
51
+ ruby_version: 2.6.3
52
+ rails_version: 5.1.7
53
+ - test:
54
+ name: ruby2-5_rails5-1
55
+ ruby_version: 2.5.5
56
+ rails_version: 5.1.7
57
+ - test:
58
+ name: ruby2-4_rails5-1
59
+ ruby_version: 2.4.6
60
+ rails_version: 5.1.7
@@ -0,0 +1 @@
1
+ service_name: travis-ci
@@ -0,0 +1,36 @@
1
+ The Samvera community is dedicated to providing a welcoming and
2
+ positive experience for all its members, whether they are at a formal
3
+ gathering, in a social setting, or taking part in activities online.
4
+ The Samvera community welcomes participation from people all over the
5
+ world and these members bring with them a wide variety of
6
+ professional, personal and social backgrounds; whatever these may be,
7
+ we treat colleagues with dignity and respect.
8
+
9
+ Community members communicate primarily in English, though for many of
10
+ them this is not their native language. We therefore strive to express
11
+ ourselves simply and clearly remembering that unnecessary use of
12
+ jargon and slang will be a barrier to understanding for many of our
13
+ colleagues. We are sensitive to the fact that the international
14
+ nature of the community means that we span many different social norms
15
+ around language and behaviour and we strive to conduct ourselves,
16
+ online and in person, in ways that are unlikely to cause offence.
17
+
18
+ Samvera conversations are often information-rich and intended to
19
+ generate discussion and debate. We discuss ideas from a standpoint of
20
+ mutual respect and reasoned argument.
21
+
22
+ Community members work together to promote a respectful and safe
23
+ community. In the event that someone’s conduct is causing offence or
24
+ distress, Samvera has a detailed
25
+ [Anti-Harassment Policy and Protocol](https://wiki.duraspace.org/display/samvera/Anti-Harassment+Policy)
26
+ which can be applied to address the problem. The first step in dealing
27
+ with any serious misconduct is to contact a local meeting organizer,
28
+ the
29
+ [Samvera community helpers](https://wiki.duraspace.org/display/samvera/Samvera+Community+Helpers)
30
+ ([email](mailto:helpers@samvera.org)), a community member you
31
+ trust, or the
32
+ [Samvera Steering Group](https://wiki.duraspace.org/display/samvera/Samvera+Steering+Group+membership)
33
+ immediately; at Samvera events, these people can be identified by
34
+ distinctive name badges. The
35
+ [Policy and Protocol](https://wiki.duraspace.org/display/samvera/Anti-Harassment+Policy)
36
+ should be consulted for fuller details.
@@ -1,14 +1,24 @@
1
1
  # How to Contribute
2
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.
3
+ We want your help to make the Samvera community great. There are a few guidelines
4
+ that we need contributors to follow so that we can have a chance of
5
+ keeping on top of things.
5
6
 
6
- ## Hydra Project Intellectual Property Licensing and Ownership
7
+ ## Code of Conduct
7
8
 
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.
9
+ The Samvera Community is dedicated to providing a welcoming and positive
10
+ experience for all its members, whether they are at a formal gathering, in
11
+ a social setting, or taking part in activities online. Please see our
12
+ [Code of Conduct](CODE_OF_CONDUCT.md) for more information.
10
13
 
11
- https://wiki.duraspace.org/display/hydra/Hydra+Project+Intellectual+Property+Licensing+and+Ownership
14
+ ## Samvera Community Intellectual Property Licensing and Ownership
15
+
16
+ All code contributors must have an Individual Contributor License Agreement
17
+ (iCLA) on file with the Samvera Steering Group. If the contributor works for
18
+ an institution, the institution must have a Corporate Contributor License
19
+ Agreement (cCLA) on file.
20
+
21
+ https://wiki.duraspace.org/display/samvera/Samvera+Community+Intellectual+Property+Licensing+and+Ownership
12
22
 
13
23
  You should also add yourself to the `CONTRIBUTORS.md` file in the root of the project.
14
24
 
@@ -16,13 +26,15 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
16
26
 
17
27
  * Reporting Issues
18
28
  * Making Changes
29
+ * Documenting Code
30
+ * Committing Changes
19
31
  * Submitting Changes
20
- * Merging Changes
32
+ * Reviewing and Merging Changes
21
33
 
22
34
  ### Reporting Issues
23
35
 
24
36
  * Make sure you have a [GitHub account](https://github.com/signup/free)
25
- * Submit a [Github issue](./issues) by:
37
+ * Submit a [Github issue](https://github.com/samvera/om/issues) by:
26
38
  * Clearly describing the issue
27
39
  * Provide a descriptive summary
28
40
  * Explain the expected behavior
@@ -38,8 +50,24 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
38
50
  * Then checkout the new branch with `git checkout fix/master/my_contribution`.
39
51
  * Please avoid working directly on the `master` branch.
40
52
  * You may find the [hub suite of commands](https://github.com/defunkt/hub) helpful
53
+ * Make sure you have added sufficient tests and documentation for your changes.
54
+ * Test functionality with RSpec; Test features / UI with Capybara.
55
+ * Run _all_ the tests to assure nothing else was accidentally broken.
56
+
57
+ ### Documenting Code
58
+
59
+ * All new public methods, modules, and classes should include inline documentation in [YARD](http://yardoc.org/).
60
+ * Documentation should seek to answer the question "why does this code exist?"
61
+ * Document private / protected methods as desired.
62
+ * If you are working in a file with no prior documentation, do try to document as you gain understanding of the code.
63
+ * If you don't know exactly what a bit of code does, it is extra likely that it needs to be documented. Take a stab at it and ask for feedback in your pull request. You can use the 'blame' button on GitHub to identify the original developer of the code and @mention them in your comment.
64
+ * This work greatly increases the usability of the code base and supports the on-ramping of new committers.
65
+ * We will all be understanding of one another's time constraints in this area.
66
+ * [Getting started with YARD](http://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md)
67
+
68
+ ### Committing changes
69
+
41
70
  * Make commits of logical units.
42
- * Your commit should include a high level description of your work in HISTORY.md
43
71
  * Check for unnecessary whitespace with `git diff --check` before committing.
44
72
  * Make sure your commit messages are [well formed](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
45
73
  * 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)
@@ -60,7 +88,9 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
60
88
 
61
89
  class PostsController
62
90
  def index
63
- respond_with Post.limit(10)
91
+ respond_to do |wants|
92
+ wants.html { render 'index' }
93
+ end
64
94
  end
65
95
  end
66
96
 
@@ -78,36 +108,54 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
78
108
 
79
109
  ### Submitting Changes
80
110
 
81
- [Detailed Walkthrough of One Pull Request per Commit](http://ndlib.github.io/practices/one-commit-per-pull-request/)
82
-
83
111
  * Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub.
84
112
  * Make sure your branch is up to date with its parent branch (i.e. master)
85
113
  * `git checkout master`
86
114
  * `git pull --rebase`
87
115
  * `git checkout <your-branch>`
88
116
  * `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`
117
+ * It is a good idea to run your tests again.
118
+ * If you've made more than one commit take a moment to consider whether squashing commits together would help improve their logical grouping.
119
+ * [Detailed Walkthrough of One Pull Request per Commit](http://ndlib.github.io/practices/one-commit-per-pull-request/)
120
+ * `git rebase --interactive master` ([See Github help](https://help.github.com/articles/interactive-rebase))
93
121
  * 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
122
  * Push your changes to a topic branch in your fork of the repository.
95
123
  * Submit a pull request from your fork to the project.
96
124
 
97
- ### Merging Changes
125
+ ### Reviewing and Merging Changes
126
+
127
+ We adopted [Github's Pull Request Review](https://help.github.com/articles/about-pull-request-reviews/) for our repositories.
128
+ Common checks that may occur in our repositories:
129
+
130
+ 1. Travis CI - where our automated tests are running
131
+ 2. Approval Required - Github enforces at least one person approve a pull request. Also, all reviewers that have chimed in must approve.
132
+
133
+ If one or more of the required checks failed (or are incomplete), the code should not be merged (and the UI will not allow it). If all of the checks have passed, then anyone on the project (including the pull request submitter) may merge the code.
134
+
135
+ *Example: Carolyn submits a pull request, Justin reviews the pull request and approves. However, Justin is still waiting on other checks (Travis CI is usually the culprit), so he does not merge the pull request. Eventually, all of the checks pass. At this point, Carolyn or anyone else may merge the pull request.*
136
+
137
+ #### Things to Consider When Reviewing
138
+
139
+ First, the person contributing the code is putting themselves out there. Be mindful of what you say in a review.
140
+
141
+ * Ask clarifying questions
142
+ * State your understanding and expectations
143
+ * Provide example code or alternate solutions, and explain why
144
+
145
+ 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:
98
146
 
99
- * It is considered "poor form" 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
147
  * Does the commit message explain what is going on?
102
148
  * Does the code changes have tests? _Not all changes need new tests, some changes are refactorings_
149
+ * Do new or changed methods, modules, and classes have documentation?
103
150
  * Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
151
+ * Does the description of the new/changed specs match your understanding of what the spec is doing?
104
152
  * 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.
153
+
154
+ If you are uncertain, bring other contributors into the conversation by assigning them as a reviewer.
107
155
 
108
156
  # Additional Resources
109
157
 
110
158
  * [General GitHub documentation](http://help.github.com/)
111
- * [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
159
+ * [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/)
112
160
  * [Pro Git](http://git-scm.com/book) is both a free and excellent book about Git.
113
161
  * [A Git Config for Contributing](http://ndlib.github.io/practices/my-typical-per-project-git-config/)
data/Gemfile CHANGED
@@ -7,3 +7,11 @@ group :development, :test do
7
7
  gem 'simplecov', :platform => :mri_19
8
8
  gem 'simplecov-rcov', :platform => :mri_19
9
9
  end
10
+
11
+ if ENV['RAILS_VERSION']
12
+ if ENV['RAILS_VERSION'] == 'edge'
13
+ gem 'rails', github: 'rails/rails'
14
+ else
15
+ gem 'rails', ENV['RAILS_VERSION']
16
+ end
17
+ end
data/History.md CHANGED
@@ -1,3 +1,14 @@
1
+ ### 3.2.0 (14 August 2019)
2
+ - 2019-08-14: Ensures that Rails 6.x releases are supported [@jcoyne]
3
+ - 2019-08-02: Corrected the syntax for the CircleCI configuration [@botimer]
4
+ - 2019-05-28: Updated CircleCI to test against Rails release 5.1.7 and Ruby releases 2.6.3, 2.5.5, and 2.4.6 [@jrgriffiniii]
5
+ - 2019-05-08: Deprecated Travis CI for CircleCI for continuous integration testing [@jrgriffiniii]
6
+ - 2018-09-19: Updated documentation for compliance with the Core Component Maintenance Working Group templates [@jrgriffiniii]
7
+ - 2018-09-19: Integrated Coveralls [@jrgriffiniii]
8
+ - 2016-10-27: Removed Travis CI notifications to IRC [@mjgiarlo]
9
+ - 2015-05-26: Converted documentation to Markdown [@atz]
10
+ - 2015-04-21: Convert specs to RSpec 2.99.2 syntax with Transpec [@atz]
11
+ - 2015-03-10: Changed RSpec assertions from .should() to the newer, preferred expect().to() [@nodanaonlyzuul]
1
12
  - 2014-09-11: Use HTTPS URLs for RubyGems [Michael Slone]
2
13
 
3
14
  ### 3.1.0 (17 Jul 2014)
data/LICENSE CHANGED
@@ -1,15 +1,11 @@
1
- ##########################################################################
2
- # Copyright (c) 2009 Matt Zumwalt
3
- # Additional copyright may be held by others, as reflected in the commit log
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
1
+ Copyright 2009 Matt Zumwalt
2
+ Additional copyright may be held by others, as reflected in the commit history.
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+ http://www.apache.org/licenses/LICENSE-2.0
7
+ Unless required by applicable law or agreed to in writing, software
8
+ distributed under the License is distributed on an "AS IS" BASIS,
9
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ See the License for the specific language governing permissions and
11
+ limitations under the License.
data/README.md CHANGED
@@ -1,34 +1,41 @@
1
- [![Build Status](https://travis-ci.org/projecthydra/om.png?branch=master)](https://travis-ci.org/projecthydra/om)
2
- [![Gem Version](https://badge.fury.io/rb/om.png)](http://badge.fury.io/rb/om)
3
-
4
1
  # om (Opinionated Metadata)
5
2
 
3
+ [![Version](https://badge.fury.io/rb/om.png)](http://badge.fury.io/rb/om)
4
+ [![CircleCI](https://circleci.com/gh/samvera/om.svg?style=svg)](https://circleci.com/gh/samvera/om)
5
+ [![Coverage Status](https://coveralls.io/repos/github/samvera/om/badge.svg?branch=master)](https://coveralls.io/github/samvera/om?branch=master)
6
+
7
+ Jump In: [![Slack Status](http://slack.samvera.org/badge.svg)](http://slack.samvera.org/)
8
+
9
+ # What is om?
10
+
6
11
  A library to help you tame sprawling XML schemas like MODS.
7
12
 
8
13
  OM allows you to define a "terminology" to ease translation between XML and ruby objects – you can query the xml for Nodes or node values without ever writing a line of XPath.
9
14
 
10
15
  OM "terms" are ruby symbols you define (in the terminology) that map specific XML content into ruby object attributes.
11
16
 
17
+ ## Product Owner & Maintenance
18
+ **om** is a Core Component of the Samvera community. The documentation for
19
+ what this means can be found
20
+ [here](http://samvera.github.io/core_components.html#requirements-for-a-core-component).
21
+ ### Product Owner
22
+ [Jon Cameron](https://github.com/joncameron)
23
+
12
24
  ## Tutorials & Reference
13
25
 
14
- * [Tame Your XML with OM](https://github.com/projecthydra/om/wiki/Tame-your-XML-with-OM)
15
- * [Common OM Patterns](https://github.com/projecthydra/om/blob/master/COMMON_OM_PATTERNS.md)
26
+ * [Tame Your XML with OM](https://github.com/samvera/om/wiki/Tame-your-XML-with-OM)
27
+ * [Common OM Patterns](https://github.com/samvera/om/blob/master/COMMON_OM_PATTERNS.md)
16
28
 
17
29
  ### Solrizing Documents
18
30
 
19
31
  The solrizer gem provides support for indexing XML documents into Solr based on OM Terminologies.
20
- That process is documented in the [solrizer README](https://github.com/projecthydra/solrizer)
21
-
22
- ## OM in the Wild
23
-
24
- We have a page on the Hydra wiki with a list of OM Terminologies in active use:
25
- [OM Terminologies in the Wild](https://wiki.duraspace.org/display/hydra/OM+Terminologies+in+the+Wild)
32
+ That process is documented in the [solrizer README](https://github.com/samvera/solrizer)
26
33
 
27
34
  ## Acknowledgments
28
35
 
29
36
  ### Creator
30
37
 
31
- Matt Zumwalt ([MediaShelf](http://yourmediashelf.com))
38
+ Matt Zumwalt (MediaShelf)
32
39
 
33
40
  ### Thanks To
34
41
 
@@ -0,0 +1,5 @@
1
+ If you would like to report an issue, first search [the list of issues](https://github.com/samvera/om/issues/) to see if someone else has already reported it, and then feel free to [create a new issue](https://github.com/samvera/om/issues/new).
2
+
3
+ If you have questions or need help, please email [the Samvera community tech list](https://groups.google.com/forum/#!forum/samvera-tech) or stop by the #dev channel in [the Samvera community Slack team](https://wiki.duraspace.org/pages/viewpage.action?pageId=87460391#Getintouch!-Slack).
4
+
5
+ You can learn more about the various Samvera communication channels on the [Get in touch!](https://wiki.duraspace.org/pages/viewpage.action?pageId=87460391) wiki page.
@@ -1,3 +1,3 @@
1
1
  module Om
2
- VERSION = "3.1.1"
2
+ VERSION = "3.2.0"
3
3
  end
@@ -59,7 +59,7 @@ module OM::XML::Document
59
59
  self.terminology_builder.extend_terminology(&block)
60
60
  rebuild_terminology!
61
61
  end
62
-
62
+
63
63
  # (Explicitly) inherit terminology from upstream classes
64
64
  def use_terminology klass
65
65
  self.terminology_builder = klass.terminology_builder.dup
@@ -84,9 +84,17 @@ module OM::XML::Document
84
84
 
85
85
  attr_accessor :ox_namespaces
86
86
 
87
+ # This ensures that the stored XML is deleted
88
+ # @see ActiveModel::Dirty#attribute_will_change!
89
+ # @see ActiveModel::Dirty#attribute_will_change!
87
90
  def ng_xml_will_change!
88
91
  # throw away older version.
89
- changed_attributes['ng_xml'] = nil
92
+ # This clears both @attributes_changed_by_setter and @mutations_from_database
93
+ clear_attribute_changes [:ng_xml]
94
+ # This clears the cached changes
95
+ @cached_changed_attributes[:ng_xml] = nil if defined? @cached_changed_attributes
96
+
97
+ attribute_will_change!(:ng_xml)
90
98
  end
91
99
 
92
100
  def ng_xml_changed?
@@ -97,12 +105,12 @@ module OM::XML::Document
97
105
  if matches = /([^=]+)=$/.match(method_name.to_s)
98
106
  name = matches[1].to_sym
99
107
  end
100
-
108
+
101
109
  name ||= method_name
102
-
110
+
103
111
  begin
104
112
  term = self.class.terminology.retrieve_term(name)
105
-
113
+
106
114
  if /=$/.match(method_name.to_s)
107
115
  node = OM::XML::DynamicNode.new(name, nil, self, term)
108
116
  return node.val=args
@@ -1,28 +1,30 @@
1
+
1
2
  desc "Task to execute builds on a Hudson Continuous Integration Server."
2
3
  task :hudson do
3
4
  Rake::Task["om:doc"].invoke
4
5
  Rake::Task["coverage"].invoke
5
6
  end
6
7
 
7
-
8
8
  desc "Execute specs with coverage"
9
- task :coverage do
9
+ task :coverage do
10
10
  # Put spec opts in a file named .rspec in root
11
11
  ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"
12
12
  ENV['COVERAGE'] = 'true' unless ruby_engine == 'jruby'
13
-
14
-
15
13
  Rake::Task['om:rspec'].invoke
16
14
  end
17
15
 
18
- namespace :om do
16
+ namespace :om do
17
+ begin
18
+ require 'rspec/core/rake_task'
19
19
 
20
- require 'rspec/core/rake_task'
21
- RSpec::Core::RakeTask.new(:rspec) do |spec|
22
- if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.8/
23
- spec.rcov = true
24
- spec.rcov_opts = %w{-I../../app -I../../lib --exclude spec\/*,gems\/*,ruby\/* --aggregate coverage.data}
20
+ RSpec::Core::RakeTask.new(:rspec) do |spec|
21
+ if ENV['COVERAGE'] and RUBY_VERSION =~ /^1.8/
22
+ spec.rcov = true
23
+ spec.rcov_opts = %w{-I../../app -I../../lib --exclude spec\/*,gems\/*,ruby\/* --aggregate coverage.data}
24
+ end
25
25
  end
26
+ rescue LoadError => load_error
27
+ abort "Failed to load RSpec: #{load_error}"
26
28
  end
27
29
 
28
30
  # Use yard to build docs
@@ -34,7 +36,6 @@ namespace :om do
34
36
 
35
37
  YARD::Rake::YardocTask.new(:doc) do |yt|
36
38
  readme_filename = 'README.md'
37
- #yt.options = ['--private', '--protected', '--output-dir', doc_destination, '--readme', readme_filename]
38
39
  end
39
40
  rescue LoadError
40
41
  desc "Generate YARD Documentation"
@@ -42,9 +43,4 @@ namespace :om do
42
43
  abort "Please install the YARD gem to generate rdoc."
43
44
  end
44
45
  end
45
-
46
-
47
-
48
-
49
46
  end
50
-