resync 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/resync.gemspec CHANGED
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
 
@@ -15,7 +16,7 @@ Gem::Specification.new do |spec|
15
16
  spec.license = 'MIT'
16
17
 
17
18
  origin = `git config --get remote.origin.url`.chomp
18
- origin_uri = origin.start_with?('http') ? URI(origin) : URI(origin.sub('git@github.com:', 'https://github.com/'))
19
+ origin_uri = origin.start_with?('http') ? URI(origin) : URI(origin.gsub(%r{git@([^:]+)(.com|.org)[^\/]+}, 'http://\1\2'))
19
20
  spec.homepage = URI::HTTP.build(host: origin_uri.host, path: origin_uri.path.chomp('.git')).to_s
20
21
 
21
22
  spec.files = `git ls-files -z`.split("\x0")
@@ -23,15 +24,15 @@ Gem::Specification.new do |spec|
23
24
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
24
25
  spec.require_paths = ['lib']
25
26
 
26
- spec.add_dependency 'mime-types', '~> 2.5'
27
+ spec.add_dependency 'mime-types', '~> 3.0'
27
28
  spec.add_dependency 'typesafe_enum', '~> 0.1', '>= 0.1.5'
28
29
  spec.add_dependency 'xml-mapping', '~> 0.10'
29
- spec.add_dependency 'xml-mapping_extensions', '~> 0.3', '>= 0.3.5'
30
+ spec.add_dependency 'xml-mapping_extensions', '~> 0.4', '>= 0.4.8'
30
31
 
31
32
  spec.add_development_dependency 'equivalent-xml', '~> 0.6.0'
32
- spec.add_development_dependency 'rake', '~> 10.4'
33
+ spec.add_development_dependency 'rake', '>= 10.4'
33
34
  spec.add_development_dependency 'rspec', '~> 3.2'
34
- spec.add_development_dependency 'rubocop', '~> 0.36'
35
+ spec.add_development_dependency 'rubocop', '~> 0.47'
35
36
  spec.add_development_dependency 'simplecov', '~> 0.9.2'
36
37
  spec.add_development_dependency 'simplecov-console', '~> 0.2.0'
37
38
  spec.add_development_dependency 'yard', '~> 0.8'
data/spec/.rubocop.yml CHANGED
@@ -5,3 +5,9 @@ Metrics/MethodLength:
5
5
 
6
6
  Metrics/ModuleLength:
7
7
  Enabled: false
8
+
9
+ Metrics/BlockLength:
10
+ Enabled: false
11
+
12
+ Style/MultilineTernaryOperator:
13
+ Enabled: false
@@ -260,7 +260,7 @@ module Resync
260
260
  urls = urlset.resources
261
261
  expect(urls.size).to eq(4)
262
262
 
263
- expected_capabilities = %w(resourcelist resourcedump changelist changedump)
263
+ expected_capabilities = %w[resourcelist resourcedump changelist changedump]
264
264
  (0..3).each do |i|
265
265
  url = urls[i]
266
266
  capability = expected_capabilities[i]
@@ -464,8 +464,8 @@ module Resync
464
464
  urls = urlset.resources
465
465
  expect(urls.size).to eq(4)
466
466
 
467
- expected_filenames = %w(res1 res2 res3 res2)
468
- expected_extensions = %w(html pdf tiff pdf)
467
+ expected_filenames = %w[res1 res2 res3 res2]
468
+ expected_extensions = %w[html pdf tiff pdf]
469
469
  expected_lastmods = [Time.utc(2013, 1, 3, 11), Time.utc(2013, 1, 3, 13), Time.utc(2013, 1, 3, 18), Time.utc(2013, 1, 3, 21)]
470
470
 
471
471
  expected_changes = [Types::Change::CREATED, Types::Change::UPDATED, Types::Change::DELETED, Types::Change::UPDATED]
@@ -529,8 +529,8 @@ module Resync
529
529
  urls = urlset.resources
530
530
  expect(urls.size).to eq(4)
531
531
 
532
- expected_filenames = %w(res7 res9 res5 res7)
533
- expected_extensions = %w(html pdf tiff html)
532
+ expected_filenames = %w[res7 res9 res5 res7]
533
+ expected_extensions = %w[html pdf tiff html]
534
534
  expected_lastmods = [
535
535
  Time.utc(2013, 1, 2, 12),
536
536
  Time.utc(2013, 1, 2, 13),
@@ -611,8 +611,8 @@ module Resync
611
611
  urls = urlset.resources
612
612
  expect(urls.size).to eq(4)
613
613
 
614
- expected_filenames = %w(res7 res9 res5 res7)
615
- expected_extensions = %w(html pdf tiff html)
614
+ expected_filenames = %w[res7 res9 res5 res7]
615
+ expected_extensions = %w[html pdf tiff html]
616
616
  expected_lastmods = [
617
617
  Time.utc(2013, 1, 2, 12),
618
618
  Time.utc(2013, 1, 2, 13),
@@ -15,7 +15,7 @@ RSpec::Matchers.define :be_xml do |expected|
15
15
  when REXML::Element
16
16
  to_nokogiri(xml.to_s)
17
17
  else
18
- fail "be_xml() expected XML, got #{xml.class}"
18
+ raise "be_xml() expected XML, got #{xml.class}"
19
19
  end
20
20
  end
21
21
 
@@ -28,7 +28,7 @@ RSpec::Matchers.define :be_xml do |expected|
28
28
  end
29
29
 
30
30
  match do |actual|
31
- expected_xml = to_nokogiri(expected) || fail("expected value #{expected} does not appear to be XML")
31
+ expected_xml = to_nokogiri(expected) || raise("expected value #{expected} does not appear to be XML")
32
32
  actual_xml = to_nokogiri(actual)
33
33
 
34
34
  EquivalentXml.equivalent?(expected_xml, actual_xml, element_order: false, normalize_whitespace: true)
@@ -54,7 +54,7 @@ RSpec::Matchers.define :be_time do |expected|
54
54
 
55
55
  match do |actual|
56
56
  return actual.nil? unless expected
57
- fail "Expected value #{expected} is not a Time" unless expected.is_a?(Time)
57
+ raise "Expected value #{expected} is not a Time" unless expected.is_a?(Time)
58
58
  actual.is_a?(Time) && (to_string(expected) == to_string(actual))
59
59
  end
60
60
 
@@ -108,7 +108,7 @@ module Resync
108
108
  resources = list.resources
109
109
  expect(resources.size).to eq(4)
110
110
 
111
- expected_capabilities = %w(resourcelist resourcedump changelist changedump)
111
+ expected_capabilities = %w[resourcelist resourcedump changelist changedump]
112
112
  (0..3).each do |i|
113
113
  resource = resources[i]
114
114
  capability = expected_capabilities[i]
@@ -24,8 +24,8 @@ module Resync
24
24
  urls = urlset.resources
25
25
  expect(urls.size).to eq(4)
26
26
 
27
- expected_filenames = %w(res7 res9 res5 res7)
28
- expected_extensions = %w(html pdf tiff html)
27
+ expected_filenames = %w[res7 res9 res5 res7]
28
+ expected_extensions = %w[html pdf tiff html]
29
29
  expected_lastmods = [
30
30
  Time.utc(2013, 1, 2, 12),
31
31
  Time.utc(2013, 1, 2, 13),
@@ -64,7 +64,7 @@ module Resync
64
64
  capability: capability
65
65
  )
66
66
  augmented = new_instance(metadata: md)
67
- [:at_time, :from_time, :until_time, :completed_time].each do |t|
67
+ %i[at_time from_time until_time completed_time].each do |t|
68
68
  expect(augmented.send(t)).to be_time(md.send(t))
69
69
  end
70
70
  end
@@ -124,7 +124,7 @@ module Resync
124
124
  end
125
125
 
126
126
  describe '#resources_in' do
127
- [:at_time, :completed_time, :from_time, :until_time, :modified_time].each do |reader|
127
+ %i[at_time completed_time from_time until_time modified_time].each do |reader|
128
128
  it "allows filtering by #{reader}" do
129
129
  before_time = Time.utc(1969, 1, 1)
130
130
  start_time = Time.utc(1970, 1, 1)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Moles
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-28 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mime-types
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.5'
19
+ version: '3.0'
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: '2.5'
26
+ version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: typesafe_enum
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -64,20 +64,20 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.3'
67
+ version: '0.4'
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 0.3.5
70
+ version: 0.4.8
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
75
  - - "~>"
76
76
  - !ruby/object:Gem::Version
77
- version: '0.3'
77
+ version: '0.4'
78
78
  - - ">="
79
79
  - !ruby/object:Gem::Version
80
- version: 0.3.5
80
+ version: 0.4.8
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: equivalent-xml
83
83
  requirement: !ruby/object:Gem::Requirement
@@ -96,14 +96,14 @@ dependencies:
96
96
  name: rake
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - "~>"
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: '10.4'
102
102
  type: :development
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - "~>"
106
+ - - ">="
107
107
  - !ruby/object:Gem::Version
108
108
  version: '10.4'
109
109
  - !ruby/object:Gem::Dependency
@@ -126,14 +126,14 @@ dependencies:
126
126
  requirements:
127
127
  - - "~>"
128
128
  - !ruby/object:Gem::Version
129
- version: '0.36'
129
+ version: '0.47'
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
134
  - - "~>"
135
135
  - !ruby/object:Gem::Version
136
- version: '0.36'
136
+ version: '0.47'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: simplecov
139
139
  requirement: !ruby/object:Gem::Requirement
@@ -223,6 +223,8 @@ files:
223
223
  - lib/resync/version.rb
224
224
  - lib/resync/xml.rb
225
225
  - lib/resync/xml_parser.rb
226
+ - notes/resourcesync-1.0.9.html
227
+ - notes/resourcesync-1.0.html
226
228
  - resync.gemspec
227
229
  - spec/.rubocop.yml
228
230
  - spec/acceptance/xml_parser_spec.rb
@@ -290,7 +292,7 @@ files:
290
292
  - spec/unit/resync/source_description_spec.rb
291
293
  - spec/unit/resync/xml/xml_spec.rb
292
294
  - spec/unit/resync/xml_parser_spec.rb
293
- homepage: http://github.com/CDLUC3/resync
295
+ homepage: http://github.com/resync
294
296
  licenses:
295
297
  - MIT
296
298
  metadata: {}
@@ -310,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
312
  version: '0'
311
313
  requirements: []
312
314
  rubyforge_project:
313
- rubygems_version: 2.4.6
315
+ rubygems_version: 2.6.8
314
316
  signing_key:
315
317
  specification_version: 4
316
318
  summary: Utility library for ResourceSync
@@ -381,4 +383,3 @@ test_files:
381
383
  - spec/unit/resync/source_description_spec.rb
382
384
  - spec/unit/resync/xml/xml_spec.rb
383
385
  - spec/unit/resync/xml_parser_spec.rb
384
- has_rdoc: