samvera-persona 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/samvera-persona/version.rb +1 -1
- data/lib/samvera-persona.rb +6 -9
- data/spec/dummy/config/application.rb +1 -0
- data/spec/lib/samvera-persona_spec.rb +26 -0
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cef385bcd3bd3987f936d4301f99ab6a0e1a501b10f7a68d855d0fb8b9c7adab
|
4
|
+
data.tar.gz: 69623aa007302ddd6f86fd7d99dd70e62fdfab3348813f75969dd1f7bcbe8812
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 865675b926c7c0ed6e0c49cb23c50dd96be5a7cbfc2197371660cf8433f1bbc0d38ee4c0f23421f05c05c05b20df8f1bc0ec54a7d5eb67e9909025a77aa187bc
|
7
|
+
data.tar.gz: 7831d9f34a3bb25c7b4f01a67c41d8093b50c632cbeb301a8b6691d982bc4c3d3f2632f9d5aeb3c9e556577c7b828e4ae2787b1a29d274659e116e22a720e8fc
|
data/lib/samvera-persona.rb
CHANGED
@@ -1,20 +1,17 @@
|
|
1
1
|
# requires all dependencies
|
2
2
|
Gem.loaded_specs['samvera-persona'].dependencies.each do |d|
|
3
3
|
require d.name unless d.type == :development
|
4
|
-
|
4
|
+
end
|
5
5
|
|
6
|
-
|
6
|
+
require "samvera-persona/engine"
|
7
7
|
|
8
8
|
module Samvera
|
9
9
|
module Persona
|
10
|
-
|
11
|
-
|
12
|
-
self.soft_delete = true
|
10
|
+
mattr_accessor :soft_delete
|
11
|
+
self.soft_delete = true
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
end
|
13
|
+
def self.setup
|
14
|
+
yield self
|
17
15
|
end
|
18
|
-
|
19
16
|
end
|
20
17
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
RSpec.describe Samvera::Persona do
|
4
|
+
it "has a version number" do
|
5
|
+
expect(Samvera::Persona::VERSION).not_to be nil
|
6
|
+
end
|
7
|
+
|
8
|
+
describe "configuration" do
|
9
|
+
it "sets a default for soft_delete" do
|
10
|
+
expect(Samvera::Persona.soft_delete).to eq true
|
11
|
+
end
|
12
|
+
|
13
|
+
context "with setup block" do
|
14
|
+
around do |example|
|
15
|
+
original = Samvera::Persona.soft_delete
|
16
|
+
example.run
|
17
|
+
Samvera::Persona.soft_delete = original
|
18
|
+
end
|
19
|
+
|
20
|
+
it "sets soft_delete" do
|
21
|
+
expect { Samvera::Persona.setup { |config| config.soft_delete = false } }
|
22
|
+
.to change { Samvera::Persona.soft_delete }.from(true).to(false)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samvera-persona
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Kaufman
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: 5.2.4.3
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
23
|
+
version: '7.1'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: 5.2.4.3
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '7.1'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: paranoia
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,6 +93,20 @@ dependencies:
|
|
93
93
|
- - "<"
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: '3.0'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: sprockets-rails
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
96
110
|
- !ruby/object:Gem::Dependency
|
97
111
|
name: capybara
|
98
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -283,6 +297,7 @@ files:
|
|
283
297
|
- spec/dummy/public/favicon.ico
|
284
298
|
- spec/dummy/tmp/development_secret.txt
|
285
299
|
- spec/factories/users.rb
|
300
|
+
- spec/lib/samvera-persona_spec.rb
|
286
301
|
- spec/presenters/samvera/persona/users_presenter_spec.rb
|
287
302
|
- spec/rails_helper.rb
|
288
303
|
- spec/routing/admin_routes_spec.rb
|
@@ -379,6 +394,7 @@ test_files:
|
|
379
394
|
- spec/dummy/public/favicon.ico
|
380
395
|
- spec/dummy/tmp/development_secret.txt
|
381
396
|
- spec/factories/users.rb
|
397
|
+
- spec/lib/samvera-persona_spec.rb
|
382
398
|
- spec/presenters/samvera/persona/users_presenter_spec.rb
|
383
399
|
- spec/rails_helper.rb
|
384
400
|
- spec/routing/admin_routes_spec.rb
|