valkyrie 2.1.0 → 2.1.1

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
  SHA256:
3
- metadata.gz: 67949cb5bed2cbcf96fa0919446f7e94288874371cca3f706fed156775b3c63f
4
- data.tar.gz: febfd165c53533252232090bd427fb5f970b85053a314ff991f15d851bda078a
3
+ metadata.gz: b1bbec50b7c38ae5d7237b14c02a79d642beeaf0c01c24584626ba2fc3c779b7
4
+ data.tar.gz: 700e8fddc49bde6d7e7d02a0f22e23c2fd4ee7d2a349f35bfd27e83fc16a7bcf
5
5
  SHA512:
6
- metadata.gz: ba0e9e518bb437c93c1e27a21c851af5eaea423cbc863b7f68b555017a98a663ead92ea51bfcb5edcf5975b013b95f2179a5805aca9f988e269ff0beef85686a
7
- data.tar.gz: ae2a939e6ab89a5e704a2a8234a7addc93d1f946a260aa9860d0beab87ef8eeb66d6d789a06e3fe40c2abd8d92f2ec25edd7f9889c4f23cdc8ea213cf29d1a4c
6
+ metadata.gz: e4b898b35816e9a16e53fa2e8ecfb0ec239693a9f5806b9f56e32a4c129aab298faaa25dbea40d0ff57d98995a80d613d351953042721a450480871646bdaa14
7
+ data.tar.gz: 1af95775fc3424cf09237045c2e26406ab0f4736a1ecfb4454f6628d329fd8743a9cad24179587e9212517c5839bd8eb28349e2cf668125efefc5485f72c1314
@@ -10,7 +10,7 @@ jobs:
10
10
  type: "string"
11
11
  ruby:
12
12
  description: "Ruby version"
13
- default: "2.6.3"
13
+ default: "2.6.5"
14
14
  type: "string"
15
15
  environment:
16
16
  BUNDLE_GEMFILE: << parameters.gemfile >>
@@ -69,19 +69,27 @@ workflows:
69
69
  jobs:
70
70
  - build:
71
71
  gemfile: "gemfiles/activerecord_6_0.gemfile"
72
- ruby: 2.6.3
72
+ ruby: 2.7.0
73
+ name: "Ruby2-7_Rails6-0"
74
+ - build:
75
+ gemfile: "gemfiles/activerecord_6_0.gemfile"
76
+ ruby: 2.6.5
73
77
  name: "Ruby2-6_Rails6-0"
74
78
  - build:
75
79
  gemfile: "gemfiles/activerecord_5_2.gemfile"
76
- ruby: 2.6.3
80
+ ruby: 2.7.0
81
+ name: "Ruby2-7_Rails5-2"
82
+ - build:
83
+ gemfile: "gemfiles/activerecord_5_2.gemfile"
84
+ ruby: 2.6.5
77
85
  name: "Ruby2-6_Rails5-2"
78
86
  - build:
79
87
  gemfile: "gemfiles/activerecord_5_2.gemfile"
80
- ruby: 2.5.5
88
+ ruby: 2.5.7
81
89
  name: "Ruby2-5_Rails5-2"
82
90
  - build:
83
91
  gemfile: "gemfiles/activerecord_5_2.gemfile"
84
- ruby: 2.4.6
92
+ ruby: 2.4.9
85
93
  name: "Ruby2-4_Rails5-2"
86
94
  nightly:
87
95
  triggers:
@@ -94,17 +102,25 @@ workflows:
94
102
  jobs:
95
103
  - build:
96
104
  gemfile: "gemfiles/activerecord_6_0.gemfile"
97
- ruby: 2.6.3
105
+ ruby: 2.7.0
106
+ name: "Ruby2-7_Rails6-0"
107
+ - build:
108
+ gemfile: "gemfiles/activerecord_6_0.gemfile"
109
+ ruby: 2.6.5
98
110
  name: "Ruby2-6_Rails6-0"
99
111
  - build:
100
112
  gemfile: "gemfiles/activerecord_5_2.gemfile"
101
- ruby: 2.6.3
113
+ ruby: 2.7.0
114
+ name: "Ruby2-7_Rails5-2"
115
+ - build:
116
+ gemfile: "gemfiles/activerecord_5_2.gemfile"
117
+ ruby: 2.6.5
102
118
  name: "Ruby2-6_Rails5-2"
103
119
  - build:
104
120
  gemfile: "gemfiles/activerecord_5_2.gemfile"
105
- ruby: 2.5.5
121
+ ruby: 2.5.7
106
122
  name: "Ruby2-5_Rails5-2"
107
123
  - build:
108
124
  gemfile: "gemfiles/activerecord_5_2.gemfile"
109
- ruby: 2.4.6
125
+ ruby: 2.4.9
110
126
  name: "Ruby2-4_Rails5-2"
@@ -1,3 +1,19 @@
1
+ # v2.1.1 2020-03-12
2
+
3
+ ## Changes since last release
4
+
5
+ * Add Ruby 2.7 support.
6
+ [tpendragon](https://github.com/tpendragon)
7
+ * Make ID & String equality symmetrical
8
+ [no-reply](https://github.com/no-reply)
9
+
10
+ Additional thanks to the following for code review and issue reports leading to
11
+ this release:
12
+
13
+ [cjcolvar](https://github.com/cjcolvar)
14
+ [escowles](https://github.com/escowles)
15
+ [jeremyf](https://github.com/jeremyf)
16
+
1
17
  # v2.1.0 2020-01-09
2
18
 
3
19
  ## Changes since last release
@@ -10,14 +10,22 @@ module Valkyrie
10
10
  @id = id.to_s
11
11
  end
12
12
 
13
+ ##
14
+ # @return [String]
13
15
  def to_s
16
+ to_str
17
+ end
18
+
19
+ ##
20
+ # @return [String]
21
+ def to_str
14
22
  id
15
23
  end
16
24
 
17
25
  delegate :hash, to: :state
18
26
 
19
27
  def eql?(other)
20
- return (default_equality(other) || string_equality(other)) if Valkyrie.config.id_string_equality == true
28
+ return string_equality(other) if Valkyrie.config.id_string_equality == true
21
29
  default_equality(other)
22
30
  end
23
31
  alias == eql?
@@ -35,7 +43,7 @@ module Valkyrie
35
43
  end
36
44
 
37
45
  def string_equality(other)
38
- other.to_s == to_s
46
+ other == to_str
39
47
  end
40
48
 
41
49
  def state
@@ -75,7 +75,7 @@ RSpec.shared_examples 'a Valkyrie::ChangeSet' do |*_flags|
75
75
 
76
76
  describe "#optimistic_locking_enabled?" do
77
77
  it "delegates down to the resource" do
78
- expect(change_set.optimistic_locking_enabled?).to eq false
78
+ expect(change_set.optimistic_locking_enabled?).to eq change_set.resource.optimistic_locking_enabled?
79
79
  end
80
80
  end
81
81
  end
@@ -84,7 +84,7 @@ module Valkyrie
84
84
  Set = Array.constructor do |value|
85
85
  value = Array[value]
86
86
  clean_values = value.reject do |val|
87
- val == '' || (val.is_a?(Valkyrie::ID) && val.to_s == '')
87
+ (val.is_a?(Valkyrie::ID) && val.to_s == '') || val == ''
88
88
  end.reject(&:nil?).uniq
89
89
 
90
90
  clean_values.map do |val|
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Valkyrie
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valkyrie
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trey Pendragon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-09 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct