hydra 6.1.0.rc3 → 6.1.0.rc4

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
2
  SHA1:
3
- metadata.gz: 5ebe40da26618ae76336b3eee248de76a4f610cb
4
- data.tar.gz: 2f64c9a93039a992381743eddfb8d9fd0ffebefc
3
+ metadata.gz: 5e5c903a478c63818af764e7bc07e8cf42beec10
4
+ data.tar.gz: d00f0bc467652e936e0c3bd7343318acc19a7fc7
5
5
  SHA512:
6
- metadata.gz: 94dbe91298888aef904f4587fbe3528f0771160aa93356340efb926fbb5ea86a3b61654a34e13237236c1b04498ce54bb0ed95dc429b2cbd55f094f5833747ed
7
- data.tar.gz: 0153224b2110048ec7a02b35fbfa0542465bc1c385c63b56e92571a0b167c356cd2cd9c70e7728d8779fbcd75e6c55e83e6e2991f6efe6038d5d3f9b070300c3
6
+ metadata.gz: 0f448be1c4c32b1a7a7f2f32897e953e666a484ee1f2556d3b47ba6c2499566f2ff6037b131ac1ee2a66e05d7d1138afdb45846154d783d2dca66daa4ad6f690
7
+ data.tar.gz: dda9793a37bbfec906a2492c8f4dfae8bba712ce2993529f09ee447336c11d4a618bf6d5f0d88a9e0fe47319f224f46a112c4d8469c28040c8a927bd1325cf6f
data/RELEASE-POLICY.md CHANGED
@@ -1,10 +1,24 @@
1
- Potential Triggers for hydra Framework Major Releases
2
-
3
- * rails - Major release definite, minor release possible
4
- * ruby - Major release definite, minor release possible
5
- * hydra-core - Major release
6
- * blacklight - Major release
7
- * active-fedora - Major release, though informed by subgems (i.e Solrizer, OM, etc)
8
- * Solr - Solr schema and Solr version
9
- * Fedora - Fedora version
10
- * major new functionality
1
+ # Updating Hydra gem procedure
2
+
3
+ ## Deprecations
4
+
5
+ ### Indicating Deprecations
6
+
7
+ Each of the ProjectHydra gems in hydra.gemspec make use of the [`deprecation`
8
+ gem](https://github.com/cbeer/deprecation). Below is our preferred method for
9
+ indicating deprecation:
10
+
11
+ class Foo
12
+ def bar
13
+ Deprecation.warn(Foo, 'Foo#bar is deprecated. Please use Baz', caller)
14
+
15
+ end
16
+ end
17
+
18
+ By adhearing to the above deprecation semantic we are able to report
19
+ deprecations when the Hydra gem is updated.
20
+
21
+ ### Reporting Deprecations on Hydra upgrades
22
+
23
+ The `./script/query-for-deprecation.rb` is a tool to help report what methods
24
+ have had a change in deprecation status.
data/hydra.gemspec CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |gem|
25
25
 
26
26
  gem.add_dependency 'hydra-head', '6.4.0.rc2'
27
27
  gem.add_dependency 'jettywrapper', '~> 1.4.1'
28
- gem.add_dependency 'active-fedora', '6.6.0.rc1'
28
+ gem.add_dependency 'active-fedora', '6.6.0.rc2'
29
29
  gem.add_dependency 'rails', '>= 3.2.13', '< 5.0'
30
30
  gem.add_dependency 'om', '~> 3.0.1'
31
31
  gem.add_dependency 'solrizer', '~> 3.1.0'
data/lib/hydra/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hydra
2
- VERSION = "6.1.0.rc3"
2
+ VERSION = "6.1.0.rc4"
3
3
  end
@@ -6,37 +6,103 @@
6
6
  # Then we should provide a list of files with a change in Deprecation
7
7
  # And provide some means for a huamn to review those changes
8
8
  require 'open3'
9
+ require 'fileutils'
9
10
  include Open3
10
11
 
11
- spec = Gem::Specification.load(File.expand_path('../../hydra.gemspec', __FILE__))
12
- spec.runtime_dependencies.each do |dep|
13
- name = dep.name
14
- version = dep.requirement.requirements.flatten.compact.detect { |r| r.is_a?(Gem::Version) }
15
- repository_directory = File.expand_path("../../../#{name}", __FILE__)
16
-
17
- command = "cd #{repository_directory} && git log -G'extend Deprecation' v#{version}.. --stat | grep -e '| [0-9]' | cut -f 1,2 -d ' '"
18
- stdin, stdout, stderr, wait_thr = popen3(command)
19
- begin
20
- out = stdout.read
21
- err = stderr.read
22
- exit_status = wait_thr.value
23
- raise "Unable to execute command \"#{command}\"\n#{err}" unless exit_status.success?
24
- ensure
25
- stdin.close
26
- stdout.close
27
- stderr.close
12
+ PREVIOUS_HYDRA_VERSION = 'v6.0.0'
13
+ NEXT_HYDRA_VERSION = 'v6.1.0.rc1'
14
+ DIFF_SUFFIX = 'diff'
15
+ TEMP_DIRECTORY = File.expand_path("../../tmp/", __FILE__)
16
+
17
+
18
+ class GemChange
19
+ attr_reader :name, :previous_version, :next_version
20
+ def initialize(name, previous_version, next_version)
21
+ @name, @previous_version, @next_version = name, previous_version, next_version
22
+ end
23
+
24
+ def filenames
25
+ @filenames ||= begin
26
+ # Assuming that you have all of your git project hydra repos in the same parent directory
27
+ repository_directory = File.expand_path("../../../#{name}", __FILE__)
28
+ command = "cd #{repository_directory} && git log -G'Deprecation.warn' v#{previous_version}..v#{next_version} --stat | grep -e '| [0-9]' | cut -f 1,2 -d ' '"
29
+ stdin, stdout, stderr, wait_thr = popen3(command)
30
+ begin
31
+ out = stdout.read
32
+ err = stderr.read
33
+ exit_status = wait_thr.value
34
+ raise "Unable to execute command \"#{command}\"\n#{err}" unless exit_status.success?
35
+ ensure
36
+ stdin.close
37
+ stdout.close
38
+ stderr.close
39
+ end
40
+ if out.strip != ""
41
+ filenames = out.split("\n").collect(&:strip).uniq
42
+ filenames.each do |filename|
43
+ flat_filename = name + '-' + filename.gsub("/", '-')
44
+ `cd #{repository_directory} && git diff v#{previous_version}..v#{next_version} #{filename} > #{File.join(TEMP_DIRECTORY, flat_filename)}.#{DIFF_SUFFIX}`
45
+ end
46
+ filenames
47
+ else
48
+ []
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ class Changes < Array
55
+ attr_reader :previous_version, :next_version
56
+ def initialize(previous_version, next_version)
57
+ @previous_version, @next_version = previous_version, next_version
28
58
  end
29
- if out.strip != ""
30
- filenames = out.split("\n").collect(&:strip).uniq
31
- banner = "*" * 80 << "\n"
32
- puts banner
33
- puts "Files for #{name} v#{version}"
34
- puts "\t" << filenames.join("\n\t")
35
- puts banner
36
- puts "See tmp/ dir for diff output"
37
- filenames.each do |filename|
38
- flat_filename = filename.gsub("/", '-')
39
- `cd #{repository_directory} && git diff v#{version}.. #{filename} > #{File.expand_path("../../tmp/#{flat_filename}", __FILE__)}.patch`
59
+ def print
60
+ $stdout.puts "Deprecation changes for Hydra #{previous_version}..#{next_version}"
61
+ each do |change|
62
+ $stdout.puts "\tFiles for #{change.name} v#{change.previous_version}..v#{change.next_version}"
63
+ $stdout.puts "\t\t" << change.filenames.join("\n\t\t")
64
+ $stdout.puts "\n"
65
+ end
66
+ if any?
67
+ $stdout.puts "See tmp/ dir for diff output and review"
40
68
  end
41
69
  end
42
70
  end
71
+
72
+ changes = Changes.new(PREVIOUS_HYDRA_VERSION, NEXT_HYDRA_VERSION)
73
+
74
+ previous_gemspec = File.new(File.expand_path("../../hydra-#{changes.previous_version}.gemspec", __FILE__), 'w+')
75
+ next_gemspec = File.new(File.expand_path("../../hydra-#{changes.next_version}.gemspec", __FILE__), 'w+')
76
+
77
+ begin
78
+
79
+ system("rm #{File.join(TEMP_DIRECTORY, "*.#{DIFF_SUFFIX}")}")
80
+
81
+ File.open(previous_gemspec.path, 'w+') do |f|
82
+ f.write `git show #{changes.previous_version}:hydra.gemspec`
83
+ end
84
+
85
+ File.open(next_gemspec.path, 'w+') do |f|
86
+ f.write `git show #{changes.next_version}:hydra.gemspec`
87
+ end
88
+
89
+ next_spec = Gem::Specification.load(next_gemspec.path)
90
+
91
+ previous_spec = Gem::Specification.load(previous_gemspec.path)
92
+ previous_spec.runtime_dependencies.each do |previous_dep|
93
+ # Skipping rails as we don't want to manage those deprecation dependencies
94
+ next if previous_dep.name == 'rails'
95
+ next_dep = next_spec.runtime_dependencies.detect { |d| d.name == previous_dep.name }
96
+ gem_name = previous_dep.name
97
+
98
+ previous_version = previous_dep.requirement.requirements.flatten.compact.detect { |r| r.is_a?(Gem::Version) }
99
+ next_version = next_dep.requirement.requirements.flatten.compact.detect { |r| r.is_a?(Gem::Version) }
100
+
101
+ changes << GemChange.new(gem_name, previous_version, next_version)
102
+ end
103
+ ensure
104
+ File.unlink(previous_gemspec.path) if File.exist?(previous_gemspec.path)
105
+ File.unlink(next_gemspec.path) if File.exist?(next_gemspec.path)
106
+ end
107
+
108
+ changes.print
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0.rc3
4
+ version: 6.1.0.rc4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Friesen
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 6.6.0.rc1
48
+ version: 6.6.0.rc2
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 6.6.0.rc1
55
+ version: 6.6.0.rc2
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rails
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -233,8 +233,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  version: 1.3.1
234
234
  requirements: []
235
235
  rubyforge_project:
236
- rubygems_version: 2.0.3
236
+ rubygems_version: 2.0.5
237
237
  signing_key:
238
238
  specification_version: 4
239
239
  summary: Project Hydra Stack Dependencies
240
240
  test_files: []
241
+ has_rdoc: