hydra-batch-edit 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a068e7ba2ffe23aa8d8516d5b5adccd30e853af0
4
- data.tar.gz: ebe41d7cd935281d49186340d33afdcba1b3d4ee
3
+ metadata.gz: 17f70ff6bd5f560f5902817c5598135db737d835
4
+ data.tar.gz: 8c30144e646cc1a88fe30683e7c424ccf2ca734d
5
5
  SHA512:
6
- metadata.gz: dcefca2cc633cb24ff0396ccf87ab321d610b58678199daece1c558031b8318f09aca8c6858154e56a8a29734a2f44df34e0b8e9b25d9abc1c7111fc19cb0817
7
- data.tar.gz: 3a3ca327a18c49273a8b70a842b88600cdde2ca2be100e39a332fdba474d5fd07af2b76630d19844ca10fcc0eb404274ac653caf197e37de408ef49c38415a0e
6
+ metadata.gz: d8589151d6549d05a8c5f7316a39152d352c1d8455913a4567bd7de0e9fd43c363c698d9767c66949efc6881f641ba5d9efb4dffc3c4a07693c305ee6b1d6e8d
7
+ data.tar.gz: cf7a5c941a39f8daf06e362d272d4f990b0fa7abb407d52994dd341d94e5f25d33262757ee565f51517098e5b7d5514deb726a832e56727117a20f09d1052023
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ rvm:
2
+ - 2.0.0
3
+
4
+ gemfile:
5
+ - gemfiles/rails3.gemfile
6
+ - gemfiles/rails4.gemfile
7
+
8
+ notifications:
9
+ irc: "irc.freenode.org#projecthydra"
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,111 @@
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
+ * Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub.
82
+ * Make sure your branch is up to date with its parent branch (i.e. master)
83
+ * `git checkout master`
84
+ * `git pull --rebase`
85
+ * `git checkout <your-branch>`
86
+ * `git rebase master`
87
+ * It is likely a good idea to run your tests again.
88
+ * Squash the commits for your branch into one commit
89
+ * `git rebase --interactive HEAD~<number-of-commits>` ([See Github help](https://help.github.com/articles/interactive-rebase))
90
+ * To determine the number of commits on your branch: `git log master..<your-branch> --oneline | wc -l`
91
+ * 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.
92
+ * Push your changes to a topic branch in your fork of the repository.
93
+ * Submit a pull request from your fork to the project.
94
+
95
+ ### Merging Changes
96
+
97
+ * It is considered "poor from" to merge your own request.
98
+ * Please take the time to review the changes and get a sense of what is being changed. Things to consider:
99
+ * Does the commit message explain what is going on?
100
+ * Does the code changes have tests? _Not all changes need new tests, some changes are refactorings_
101
+ * Does the commit contain more than it should? Are two separate concerns being addressed in one commit?
102
+ * Did the Travis tests complete successfully?
103
+ * If you are uncertain, bring other contributors into the conversation by creating a comment that includes their @username.
104
+ * If you like the pull request, but want others to chime in, create a +1 comment and tag a user.
105
+
106
+ # Additional Resources
107
+
108
+ * [General GitHub documentation](http://help.github.com/)
109
+ * [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
110
+ * [Pro Git](http://git-scm.com/book) is both a free and excellent book about Git.
111
+ * [A Git Config for Contributing](http://ndlib.github.io/practices/my-typical-per-project-git-config/)
data/History.md ADDED
@@ -0,0 +1,3 @@
1
+ # 1.0.2 (2013-07-22)
2
+
3
+ * Routes should work the same in rails 3.2 and rails 4.0
data/README.textile CHANGED
@@ -1,5 +1,7 @@
1
1
  h1. hydra-batch-edit
2
2
 
3
+ !https://travis-ci.org/projecthydra/hydra-batch-edit.png!:https://travis-ci.org/projecthydra/hydra-batch-edit !https://badge.fury.io/rb/hydra-batch-edit.png!:http://badge.fury.io/rb/hydra-batch-edit
4
+
3
5
  Batch Editing Functionality for Hydra Heads
4
6
 
5
7
  *This is Alpha Software!* While working on a specific Hydra Head with specific content & use cases, we added batch editing functionality. We wrote the code as a separate gem so that others can use this as a starting point, but _you will have to modify the code_ to get this to work. If other Hydra partners start using the gem, it will become more immediately useful & configurable out of the box. At that point, someone will delete this message.
@@ -65,7 +67,7 @@ h2. Customizing
65
67
 
66
68
  h3. What you will need to do
67
69
 
68
- You will *definitely* need to override the edit form.
70
+ You will *definitely* need to override the edit form. `app/views/batch_edits/edit.html.erb`
69
71
  You will probably need to override BatchEditController#update
70
72
  You might need to override BatchEditController#edit
71
73
 
@@ -93,7 +95,7 @@ Example app/controllers/batch_updates_controller.rb
93
95
 
94
96
  h3. Override Edit View
95
97
 
96
- Example app/views/batch_edit/edit.html.erb
98
+ Example app/views/batch_edits/edit.html.erb
97
99
 
98
100
  <pre>
99
101
  <%= form_for MyModel.new, :url=>batch_edit_path, :method=>:put do |f| %>
data/Rakefile CHANGED
@@ -23,8 +23,10 @@ task :generate do
23
23
  unless File.exists?('spec/internal/Rakefile')
24
24
  puts "Generating rails app"
25
25
  `rails new spec/internal`
26
- puts "Copying gemfile"
27
- `cp spec/support/Gemfile spec/internal`
26
+ puts "Updating gemfile"
27
+ `echo "gem 'hydra-batch-edit', :path=>'../../../hydra-batch-edit'
28
+ gem 'rspec-rails'
29
+ " >> spec/internal/Gemfile`
28
30
  puts "Copying generator"
29
31
  `cp -r spec/support/lib/generators spec/internal/lib`
30
32
 
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Please see hydra-batch-edit.gemspec for dependency information.
4
+ gemspec :path=>"../"
5
+
6
+ gem 'rails', "~> 3.2"
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Please see hydra-batch-edit.gemspec for dependency information.
4
+ gemspec :path=>"../"
5
+
6
+ gem 'rails', '~> 4.0.0'
@@ -15,7 +15,7 @@ module Hydra
15
15
  delete :destroy
16
16
  end
17
17
  collection do
18
- match 'destroy' => 'batch_edits#destroy_collection', :via=>:delete
18
+ get :index
19
19
  get :edit
20
20
  put :update
21
21
  delete :clear
@@ -24,6 +24,7 @@ module Hydra
24
24
  end
25
25
  end
26
26
  match 'batch_edits/:id' => 'batch_edits#add', :via=>:put
27
+ match 'batch_edits' => 'batch_edits#destroy_collection', :via=>:delete
27
28
  end
28
29
  end
29
30
 
@@ -1,5 +1,5 @@
1
1
  module Hydra
2
2
  module BatchEdit
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
@@ -3,6 +3,7 @@ require 'spec_helper'
3
3
  describe "Routes for batch_update" do
4
4
  it "should route index" do
5
5
  { :get => '/batch_edits' }.should route_to( :controller => "batch_edits", :action => "index")
6
+ batch_edits_path.should == '/batch_edits'
6
7
  end
7
8
  it "should route edit" do
8
9
  { :get => edit_batch_edits_path }.should route_to( :controller => "batch_edits", :action => "edit")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-batch-edit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-10 00:00:00.000000000 Z
12
+ date: 2013-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: blacklight
@@ -89,7 +89,10 @@ extensions: []
89
89
  extra_rdoc_files: []
90
90
  files:
91
91
  - .gitignore
92
+ - .travis.yml
93
+ - CONTRIBUTING.md
92
94
  - Gemfile
95
+ - History.md
93
96
  - LICENSE
94
97
  - README.textile
95
98
  - Rakefile
@@ -103,7 +106,8 @@ files:
103
106
  - app/views/batch_edits/_tools.html.erb
104
107
  - app/views/batch_edits/edit.html.erb
105
108
  - app/views/batch_edits/index.html.erb
106
- - config/routes.rb
109
+ - gemfiles/rails3.gemfile
110
+ - gemfiles/rails4.gemfile
107
111
  - hydra-batch-edit.gemspec
108
112
  - lib/hydra-batch-edit.rb
109
113
  - lib/hydra/batch_edit.rb
@@ -161,3 +165,4 @@ test_files:
161
165
  - spec/support/db/migrate/20111101221803_create_searches.rb
162
166
  - spec/support/lib/generators/test_app_generator.rb
163
167
  - spec/support/lib/tasks/rspec.rake
168
+ has_rdoc:
data/config/routes.rb DELETED
@@ -1,15 +0,0 @@
1
- Hydra::BatchEdit::Engine.routes.draw do
2
- ###NOTE this isn't used
3
-
4
- match 'batch_edits/:id' => 'batch_edits#add', :via=>:put
5
- resources :batch_edits, :only=>[:index] do
6
- member do
7
- delete :destroy
8
- end
9
- collection do
10
- get :edit
11
- put :update
12
- delete :clear
13
- end
14
- end
15
- end