hydramata-core 0.1.0
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 +7 -0
- data/.gitignore +15 -0
- data/.hound.yml +818 -0
- data/.rspec +2 -0
- data/.travis.yml +20 -0
- data/CONTRIBUTING.md +220 -0
- data/Gemfile +34 -0
- data/Guardfile +36 -0
- data/LICENSE +15 -0
- data/README.md +13 -0
- data/Rakefile +40 -0
- data/bin/rails +12 -0
- data/fs +3 -0
- data/gemfiles/rails4.1.gemfile +12 -0
- data/gemfiles/rails4.gemfile +13 -0
- data/hydramata-core.gemspec +35 -0
- data/lib/hydramata-core.rb +1 -0
- data/lib/hydramata/configuration.rb +17 -0
- data/lib/hydramata/core.rb +42 -0
- data/lib/hydramata/core/named_callbacks.rb +24 -0
- data/lib/hydramata/core/railtie.rb +14 -0
- data/lib/hydramata/core/runner.rb +58 -0
- data/lib/hydramata/core/translator.rb +72 -0
- data/lib/hydramata/core/version.rb +5 -0
- data/lib/hydramata/exceptions.rb +4 -0
- data/lib/hydramata/services.rb +21 -0
- data/lib/hydramata_core.rb +2 -0
- data/lib/tasks/hydramata_mecha_tasks.rake +4 -0
- data/run_each_spec_in_isolation +11 -0
- data/script/analyzer.rb +124 -0
- data/script/fast_specs +22 -0
- data/spec/README.md +10 -0
- data/spec/features/translation_services_spec.rb +35 -0
- data/spec/fixtures/core.translations.yml +8 -0
- data/spec/lib/hydramata-translations_spec.rb +7 -0
- data/spec/lib/hydramata/configuration_spec.rb +38 -0
- data/spec/lib/hydramata/core/named_callbacks_spec.rb +30 -0
- data/spec/lib/hydramata/core/runner_spec.rb +45 -0
- data/spec/lib/hydramata/core/translator_spec.rb +94 -0
- data/spec/lib/hydramata/services_spec.rb +27 -0
- data/spec/spec_fast_helper.rb +33 -0
- metadata +164 -0
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- "2.0.0"
|
4
|
+
- "2.1.1"
|
5
|
+
- "2.1.2"
|
6
|
+
|
7
|
+
gemfile:
|
8
|
+
- gemfiles/rails4.gemfile
|
9
|
+
- gemfiles/rails4.1.gemfile
|
10
|
+
|
11
|
+
env:
|
12
|
+
global:
|
13
|
+
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
14
|
+
|
15
|
+
script: 'COVERAGE=true rake spec:travis'
|
16
|
+
|
17
|
+
bundler_args: --without headless debug
|
18
|
+
|
19
|
+
before_install:
|
20
|
+
- gem install bundler
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,220 @@
|
|
1
|
+
We want your help to make our project great.
|
2
|
+
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
|
+
|
4
|
+
* [The Hydra Way](#the-hydra-way)
|
5
|
+
* [Reporting Issues](#reporting-issues)
|
6
|
+
* [What is a well written issue?](#what-is-a-well-written-issue)
|
7
|
+
* [Making Changes](#making-changes)
|
8
|
+
* [Where to Engage for Help](#where-to-engage-for-help)
|
9
|
+
* [Submitting Changes](#submitting-changes)
|
10
|
+
* [Contributor License Agreement](#contributor-license-agreement)
|
11
|
+
* [Coding Guidelines](#coding-guidelines)
|
12
|
+
* [Writing Your Specs](#writing-your-specs)
|
13
|
+
* [Custom Rspec Matchers](#custom-rspec-matchers)
|
14
|
+
* [Writing Your Code](#writing-your-code)
|
15
|
+
* [Ruby File Structure](#ruby-file-structure)
|
16
|
+
* [Well Written Commit Messages](#well-written-commit-messages)
|
17
|
+
* [Reviewing Changes](#reviewing-changes)
|
18
|
+
* [Responsibilities of a Reviewer](#responsibilities-of-a-reviewer)
|
19
|
+
* [Responsibilities of the Submitter](#responsibilities-of-the-submitter)
|
20
|
+
* [Merging Changes](#merging-changes)
|
21
|
+
|
22
|
+
# The Hydra Way
|
23
|
+
|
24
|
+
We strive to…
|
25
|
+
|
26
|
+
* Provide a [harassment-free community experience](https://wiki.duraspace.org/display/hydra/Anti-Harassment+Policy)
|
27
|
+
* Adhere to our [Hierarchy of Promises](https://wiki.duraspace.org/display/hydra/Hydra+Stack+-+The+Hierarchy+of+Promises)
|
28
|
+
* Operate under [Lazy Consensus](http://rave.apache.org/docs/governance/lazyConsensus.html)
|
29
|
+
* Encourage community participation as guided by [our community principles](https://wiki.duraspace.org/display/hydra/Hydra+Community+Principles)
|
30
|
+
|
31
|
+
# Reporting Issues
|
32
|
+
|
33
|
+
Submit a [well written issue](#what-is-a-well-written-issue) to [Github's issue tracker](./issues).
|
34
|
+
This will require a [GitHub account](https://github.com/signup/free) *(its free)*.
|
35
|
+
|
36
|
+
## What is a well written issue?
|
37
|
+
|
38
|
+
* Provide a descriptive summary
|
39
|
+
* Reference the gem version in which you encountered the problem
|
40
|
+
* Explain the expected behavior
|
41
|
+
* Explain the actual behavior
|
42
|
+
* Provide steps to reproduce the actual behavior
|
43
|
+
|
44
|
+
# Submitting Changes
|
45
|
+
|
46
|
+
## Contributor License Agreement
|
47
|
+
|
48
|
+
**Note: You can submit a pull request before you've signed the Contributor License Agreement, but we won't merge your changes until we have your CLA on file.**
|
49
|
+
|
50
|
+
Before any [ProjectHydra project](https://github.com/projecthydra) can accept your contributions we must have a [Contributor License Agreement on file](https://wiki.duraspace.org/display/hydra/Hydra+Project+Intellectual+Property+Licensing+and+Ownership).
|
51
|
+
|
52
|
+
All code contributors must have an Individual Contributor License Agreement (iCLA) on file with the Hydra Project Steering Group.
|
53
|
+
If the contributor works for an institution, the institution must have a Corporate Contributor License Agreement (cCLA) on file.
|
54
|
+
|
55
|
+
[More on the Contributor License Agreements](https://wiki.duraspace.org/display/hydra/Hydra+Project+Intellectual+Property+Licensing+and+Ownership)
|
56
|
+
|
57
|
+
## Coding Guidelines
|
58
|
+
|
59
|
+
This project is using [HoundCI](https://houndci.com) to help support our agreed upon style guide.
|
60
|
+
The style guide is a work in progress, and is declared in the project's `./hound.yml` file.
|
61
|
+
|
62
|
+
Hound is a Github integration tool that essentially runs [rubocop](http://rubygems.org/gems/rubocop).
|
63
|
+
|
64
|
+
> Automatic Ruby code style checking tool. Aims to enforce the community-driven Ruby Style Guide.
|
65
|
+
|
66
|
+
If you want to run `rubocop` with our style guide, first `gem install rubocop` then inside the project:
|
67
|
+
|
68
|
+
```bash
|
69
|
+
$ rubocop ./path/to/file ./or/path/to/directory -c ./.hound.yml
|
70
|
+
```
|
71
|
+
**Can I break these guidelines?** Yes. But you may need to convince the person merging your changes.
|
72
|
+
|
73
|
+
### Writing Your Specs
|
74
|
+
|
75
|
+
Your code changes should include support tests.
|
76
|
+
|
77
|
+
Before you begin writing code, think about the test that will verify the code you plan to write.
|
78
|
+
A [well written story with Gherkin syntax](http://pivotallabs.com/well-formed-stories/) can help formulate the pre-conditions (Given), invocation (When), and post-conditions (Then).
|
79
|
+
|
80
|
+
*This is the first step of Test Driven Development, and something that we strongly encourage.*
|
81
|
+
|
82
|
+
Now write that test; It should be your guidepost for any changes you plan on making.
|
83
|
+
Ideally the test you just wrote will be executable code.
|
84
|
+
However, a well formed Gherkin-syntax story is a suitable proxy; Especially if you are uncomfortable with where to put the executable code.
|
85
|
+
|
86
|
+
*Think of your written test as a statement of intent.*
|
87
|
+
*The statement of intent can then be used when asking for help or clarity; Either from another developer or a stakeholder.*
|
88
|
+
*Someone helping you can then see both what you are trying to do and how you are doing it; And that helper may know of a "better" way to do it.*
|
89
|
+
|
90
|
+
#### Custom Rspec Matchers
|
91
|
+
|
92
|
+
We encourage the use of [custom rspec matchers](https://www.relishapp.com/rspec/rspec-expectations/v/2-3/docs/custom-matchers/define-matcher) as this helps our specs better convey what is going on.
|
93
|
+
|
94
|
+
To find the existing Rspec matchers in this project, you can run `rake yenta`.
|
95
|
+
Below is the sample output.
|
96
|
+
|
97
|
+
```shell
|
98
|
+
be /path/to/bundled/gem/rspec-expectations-2.14.4/lib/rspec/matchers.rb:221
|
99
|
+
be_a /path/to/bundled/gem/rspec-expectations-2.14.4/lib/rspec/matchers.rb:227
|
100
|
+
be_a_kind_of /path/to/bundled/gem/rspec-expectations-2.14.4/lib/rspec/matchers.rb:253
|
101
|
+
be_a_new /path/to/bundled/gem/rspec-rails-2.14.0/lib/rspec/rails/matchers/be_a_new.rb:73
|
102
|
+
be_an /path/to/bundled/gem/rspec-expectations-2.14.4/lib/rspec/matchers.rb:227
|
103
|
+
be_an_instance_of /path/to/bundled/gem/rspec-expectations-2.14.4/lib/rspec/matchers.rb:240
|
104
|
+
...
|
105
|
+
```
|
106
|
+
|
107
|
+
### Writing Your Code
|
108
|
+
|
109
|
+
We are going to do our best to follow [Sandi Metz' Rules for Developers](http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers)
|
110
|
+
|
111
|
+
> Here are the rules:
|
112
|
+
>
|
113
|
+
> * Classes can be no longer than one hundred lines of code.
|
114
|
+
> * Methods can be no longer than five lines of code.
|
115
|
+
> * Pass no more than four parameters into a method. Hash options are parameters.
|
116
|
+
> * Controllers can instantiate only one object. Therefore, views can only know about one instance variable and views should only send messages to that object (@object.collaborator.value is not allowed).
|
117
|
+
|
118
|
+
### Ruby File Structure
|
119
|
+
|
120
|
+
* Use soft-tabs with a two space indent.
|
121
|
+
* Never leave trailing whitespace (unless it is meaningful in the language)
|
122
|
+
* End each file with a blank newline.
|
123
|
+
* Please do your best to keep lines to 80 characters or fewer.
|
124
|
+
|
125
|
+
## Well Written Commit Messages
|
126
|
+
|
127
|
+
**TL;DR**
|
128
|
+
|
129
|
+
* First line is < 50 characters
|
130
|
+
* The message body explains what the code changes are about
|
131
|
+
* Reference any JIRA or Github issues on new lines.
|
132
|
+
|
133
|
+
### Terse Example
|
134
|
+
|
135
|
+
```
|
136
|
+
Removing Document title validation
|
137
|
+
|
138
|
+
We thought we wanted title validation but that was too complicated.
|
139
|
+
|
140
|
+
HYDRASIR-12 #close
|
141
|
+
```
|
142
|
+
|
143
|
+
### Verbose Example
|
144
|
+
|
145
|
+
```
|
146
|
+
Present tense short summary (50 characters or less)
|
147
|
+
|
148
|
+
More detailed description, if necessary. It should be wrapped to 72
|
149
|
+
characters. Try to be as descriptive as you can, even if you think that
|
150
|
+
the commit content is obvious, it may not be obvious to others. You
|
151
|
+
should add such description also if it's already present in bug tracker,
|
152
|
+
it should not be necessary to visit a webpage to check the history.
|
153
|
+
|
154
|
+
Description can have multiple paragraphs and you can use code examples
|
155
|
+
inside, just indent it with 4 spaces:
|
156
|
+
|
157
|
+
class PostsController
|
158
|
+
def index
|
159
|
+
respond_with Post.limit(10)
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
You can also add bullet points:
|
164
|
+
|
165
|
+
- you can use dashes or asterisks
|
166
|
+
|
167
|
+
- also, try to indent next line of a point for readability, if it's too
|
168
|
+
long to fit in 72 characters
|
169
|
+
```
|
170
|
+
|
171
|
+
> When appropriate, please squash your commits into logical units of work.
|
172
|
+
> This simplifies future cherry picks, and also keeps the git log clean.
|
173
|
+
|
174
|
+
### Hooks into other Subsystems
|
175
|
+
|
176
|
+
**[log skip]**: If your commit is not relevant to a change log, you can add `[log skip]` to your commit message.
|
177
|
+
Relevance is subjective, though extremely minor changes need not be part of the change log (i.e. spelling correction, decomposing a private method into multiple private methods, etc.)
|
178
|
+
|
179
|
+
**[ci skip]**: If your commit does not need to go through the Continuous Integration server, add `[ci skip]` to your commit message.
|
180
|
+
This is typically used for updates to the documentation and stylesheet changes.
|
181
|
+
|
182
|
+
# Reviewing Changes
|
183
|
+
|
184
|
+
The review process is a conversation between the submitter and the reviewer(s).
|
185
|
+
Please feel free to bring other people into the conversation as necessary.
|
186
|
+
|
187
|
+
As either the submitter or reviewer, feel free to assign the Pull Request to a repository contributor.
|
188
|
+
This is a way of indicating that you want that repository contributor to review the change.
|
189
|
+
|
190
|
+
When you do assign someone to the Pull Request, please make sure to add a comment stating why you assigned it to them.
|
191
|
+
|
192
|
+
## Responsibilities of a Reviewer
|
193
|
+
|
194
|
+
As a reviewer, it is important that the pull request:
|
195
|
+
|
196
|
+
* Has a [well written commit message](#well-written-commit-messages)
|
197
|
+
* Has [well written code](#coding-guidelines)
|
198
|
+
* The test suite successfully builds
|
199
|
+
* Any questions regarding the pull request are answered
|
200
|
+
* Adjucate if the Pull Request should be squashed into a smaller number of commits
|
201
|
+
|
202
|
+
## Responsibilities of the Submitter
|
203
|
+
|
204
|
+
**As the submitter**, you should be responsive to the review process: answering questions, making refinements, providing clarification, and rebasing your commits.
|
205
|
+
*If your changes are gridlocked please notify [@jeremyf](https://github.com/jeremyf) via a comment on the pull request.*
|
206
|
+
|
207
|
+
## Who Will be Doing the Review
|
208
|
+
|
209
|
+
Anyone is welcome to contribute to the review process.
|
210
|
+
At this stage in the development, [@jeremyf](https://github.com/jeremyf) is the only person that will merge pull requests.
|
211
|
+
|
212
|
+
# Merging Changes
|
213
|
+
|
214
|
+
*If a pull request has received at least one Thumbs Up, but has still not been merged, please notify [@jeremyf](https://github.com/jeremyf) via a comment on the pull request.*
|
215
|
+
|
216
|
+
**As the submitter,** you should not merge your own pull request. That is bad form.
|
217
|
+
|
218
|
+
**As the reviewer,** if you are comfortable merge the pull request. Otherwise feel free to assign the pull request to another contributor for final merging.
|
219
|
+
|
220
|
+
**As the merger,** once you have merged the pull request, go ahead and delete the pull request's topic branch. You are now on the hook for any breaking of the build.
|
data/Gemfile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
# Declare your gem's dependencies in hydramata-work.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
6
|
+
gemspec path: File.expand_path('..', __FILE__)
|
7
|
+
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
+
# your gem to rubygems.org.
|
12
|
+
|
13
|
+
# To use debugger
|
14
|
+
# gem 'debugger'
|
15
|
+
|
16
|
+
gem "rake"
|
17
|
+
gem 'coveralls', require: false
|
18
|
+
if ! ENV['TRAVIS']
|
19
|
+
gem 'simplecov', require: false
|
20
|
+
gem 'guard-rspec'
|
21
|
+
gem 'guard-bundler'
|
22
|
+
gem 'guard-rails'
|
23
|
+
gem 'rb-fsevent'
|
24
|
+
gem 'terminal-notifier-guard'
|
25
|
+
gem 'pry', '~> 0.9.7'
|
26
|
+
gem 'pry-nav'
|
27
|
+
gem 'byebug'
|
28
|
+
end
|
29
|
+
|
30
|
+
file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__))
|
31
|
+
if File.exists?(file)
|
32
|
+
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
33
|
+
instance_eval File.read(file)
|
34
|
+
end
|
data/Guardfile
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
guard :bundler do
|
5
|
+
watch('Gemfile')
|
6
|
+
watch(/^.+\.gemspec/)
|
7
|
+
end
|
8
|
+
|
9
|
+
guard 'rails', root: 'spec/internal', port: 3001 do
|
10
|
+
watch('Gemfile.lock')
|
11
|
+
watch(%r{^(config|lib)/.*})
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
guard :rspec do
|
16
|
+
watch(%r{^spec/.+_spec\.rb$})
|
17
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
18
|
+
watch(%r{^spec/(.+)_helper.rb$}) { |m| "spec" }
|
19
|
+
|
20
|
+
# Rails example
|
21
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
22
|
+
watch(%r{^app/(.*)(\.erb|\.haml|\.slim)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
|
23
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
24
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
25
|
+
watch('config/routes.rb') { "spec/routing" }
|
26
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
27
|
+
|
28
|
+
# Capybara features specs
|
29
|
+
# watch(%r{^app/views/(.+)/.*\.(erb|haml|slim)$}) { |m| "spec/features/#{m[1]}_spec.rb" }
|
30
|
+
|
31
|
+
# Turnip features and steps
|
32
|
+
# watch(%r{^spec/acceptance/(.+)\.feature$})
|
33
|
+
# watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
|
34
|
+
end
|
35
|
+
|
36
|
+
|
data/LICENSE
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
##########################################################################
|
2
|
+
# Copyright 2014 University of Notre Dame
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
|
data/README.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Hydramata::Core
|
2
|
+
|
3
|
+
[](http://badge.fury.io/rb/hydramata-core)
|
4
|
+
[](https://travis-ci.org/ndlib/hydramata-core)
|
5
|
+
[](https://codeclimate.com/github/ndlib/hydramata-core)
|
6
|
+
[](https://coveralls.io/r/ndlib/hydramata-core)
|
7
|
+
[](http://rubydoc.info/github/ndlib/hydramata-work/master/frames/)
|
8
|
+
[](./LICENSE)
|
9
|
+
|
10
|
+
## Resources
|
11
|
+
|
12
|
+
* [Contributing Guidelines](./CONTRIBUTING.md)
|
13
|
+
* [Test related README](./spec/README.md)
|
data/Rakefile
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
Bundler::GemHelper.install_tasks
|
8
|
+
|
9
|
+
begin
|
10
|
+
APP_RAKEFILE = File.expand_path('../spec/internal/Rakefile', __FILE__)
|
11
|
+
load 'rails/tasks/engine.rake'
|
12
|
+
rescue LoadError
|
13
|
+
puts "Unable to load all app tasks for #{APP_RAKEFILE}"
|
14
|
+
end
|
15
|
+
|
16
|
+
require 'rspec/core/rake_task'
|
17
|
+
|
18
|
+
namespace :spec do
|
19
|
+
RSpec::Core::RakeTask.new(:all) do
|
20
|
+
ENV['COVERAGE'] = 'true'
|
21
|
+
end
|
22
|
+
|
23
|
+
desc 'Run the Travis CI specs'
|
24
|
+
task :travis do
|
25
|
+
spec_helper = File.expand_path('../spec/spec_fast_helper.rb', __FILE__)
|
26
|
+
ENV['SPEC_OPTS'] = "--profile 20 --require #{spec_helper}"
|
27
|
+
Rake::Task['spec:all'].invoke
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
begin
|
32
|
+
Rake::Task['default'].clear
|
33
|
+
rescue RuntimeError
|
34
|
+
puts 'Unable to find :default rake task; No worries.'
|
35
|
+
end
|
36
|
+
|
37
|
+
Rake::Task['spec'].clear
|
38
|
+
|
39
|
+
task spec: 'spec:all'
|
40
|
+
task default: 'spec:travis'
|
data/bin/rails
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
|
3
|
+
|
4
|
+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
|
5
|
+
ENGINE_PATH = File.expand_path('../../lib/hydramata/core/engine', __FILE__)
|
6
|
+
|
7
|
+
# Set up gems listed in the Gemfile.
|
8
|
+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
9
|
+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
10
|
+
|
11
|
+
require 'rails/all'
|
12
|
+
require 'rails/engine/commands'
|
@@ -0,0 +1,12 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
file = File.expand_path("../../Gemfile", __FILE__)
|
4
|
+
|
5
|
+
if File.exists?(file)
|
6
|
+
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
7
|
+
instance_eval File.read(file)
|
8
|
+
end
|
9
|
+
gem 'sass', '~> 3.2.15'
|
10
|
+
gem 'sprockets', '~> 2.11.0'
|
11
|
+
|
12
|
+
gem 'rails', '4.1.0'
|
@@ -0,0 +1,13 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
file = File.expand_path("../../Gemfile", __FILE__)
|
4
|
+
|
5
|
+
if File.exists?(file)
|
6
|
+
puts "Loading #{file} ..." if $DEBUG # `ruby -d` or `bundle -v`
|
7
|
+
instance_eval File.read(file)
|
8
|
+
end
|
9
|
+
|
10
|
+
gem 'sass', '~> 3.2.15'
|
11
|
+
gem 'sprockets', '~> 2.11.0'
|
12
|
+
|
13
|
+
gem 'rails', '4.0.3'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
$LOAD_PATH.push File.expand_path('../lib', __FILE__)
|
2
|
+
|
3
|
+
# Maintain your gem's version:
|
4
|
+
require 'hydramata/core/version'
|
5
|
+
|
6
|
+
# Describe your gem and declare its dependencies:
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = 'hydramata-core'
|
9
|
+
s.version = Hydramata::Core::VERSION
|
10
|
+
s.authors = [
|
11
|
+
'Jeremy Friesen'
|
12
|
+
]
|
13
|
+
s.email = [
|
14
|
+
'jeremy.n.friesen@gmail.com'
|
15
|
+
]
|
16
|
+
s.homepage = 'https://github.com/ndlib/hydramata-core'
|
17
|
+
s.summary = ''
|
18
|
+
s.description = ''
|
19
|
+
s.required_ruby_version = '~> 2.0'
|
20
|
+
|
21
|
+
s.license = 'APACHE2'
|
22
|
+
|
23
|
+
s.files = `git ls-files -z`.split("\x0")
|
24
|
+
s.executables = s.files.grep(%r{^bin/}) do |f|
|
25
|
+
f == 'bin/rails' ? nil : File.basename(f)
|
26
|
+
end.compact
|
27
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
28
|
+
s.require_paths = ['lib']
|
29
|
+
|
30
|
+
s.add_development_dependency 'rspec', '~> 3.0'
|
31
|
+
s.add_development_dependency 'rspec-given', '~> 3.5'
|
32
|
+
s.add_development_dependency 'sqlite3', '~> 1.3'
|
33
|
+
s.add_development_dependency 'rubydora', '~> 1.7'
|
34
|
+
s.add_development_dependency 'database_cleaner', '~> 1.3'
|
35
|
+
end
|