administrate-field-enum 0.0.8 → 0.0.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 494c514e0d353bbaa223f425e3d5e55d3548b40b739b54982702d2cc34614799
|
4
|
+
data.tar.gz: c968f102fdb2ef1e62f6d951046e7a729c6fdbb6839fd5a89d68f49044b25f62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 947692b08dd00e2a859155460e8eccb35553d28c9c8e33d06db6451e383513b5e8491817d113f54375284ac617882f09b5e3da9874bdfa86efc08786a84ddce2
|
7
|
+
data.tar.gz: 0f0f7c05cdc5e9632c6227ce0beab8c7fc8eeec59e5d6c00f4b25c75a17bd5d97a8a820e151720e37e32db16995181b09c3eaa17b561dae0750e0a0664cce03e
|
@@ -2,10 +2,10 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'administrate-field-enum'
|
5
|
-
s.version = '0.0.
|
5
|
+
s.version = '0.0.9'
|
6
6
|
s.authors = ['Balbina Santana', 'Adrian Rangel']
|
7
|
-
s.email = ['adrian@
|
8
|
-
s.homepage = 'https://github.com/
|
7
|
+
s.email = ['adrian@valiot.io']
|
8
|
+
s.homepage = 'https://github.com/Valiot/administrate-field-enum'
|
9
9
|
s.summary = 'Enum field plugin for Administrate'
|
10
10
|
s.description = s.summary
|
11
11
|
s.license = 'MIT'
|
@@ -14,6 +14,5 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.files = `git ls-files`.split("\n")
|
15
15
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
16
|
|
17
|
-
s.add_dependency 'administrate'
|
18
|
-
s.add_dependency 'rails', '>= 4.2', '<= 6.0'
|
17
|
+
s.add_dependency 'administrate', '~> 0.12'
|
19
18
|
end
|
@@ -11,4 +11,25 @@ describe Administrate::Field::Enum do
|
|
11
11
|
expect(path).to eq("/fields/enum/#{page}")
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
describe '#html_options' do
|
16
|
+
it 'returns a hash of :html options' do
|
17
|
+
page = :show
|
18
|
+
field = Administrate::Field::Enum.with_options(html: { disabled: true, hidden: true, class: 'test' })
|
19
|
+
.new(:status, 'status', page)
|
20
|
+
|
21
|
+
expect(field.html_options[:disabled]).to be_truthy
|
22
|
+
expect(field.html_options[:hidden]).to be_truthy
|
23
|
+
expect(field.html_options[:class]).to eq('test')
|
24
|
+
end
|
25
|
+
|
26
|
+
it 'is empty by default' do
|
27
|
+
page = :show
|
28
|
+
field = Administrate::Field::Enum.new(:status, 'status', page)
|
29
|
+
|
30
|
+
expect(field.html_options[:disabled]).to be_falsy
|
31
|
+
expect(field.html_options[:hidden]).to be_falsy
|
32
|
+
expect(field.html_options[:class]).to be_nil
|
33
|
+
end
|
34
|
+
end
|
14
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate-field-enum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Balbina Santana
|
@@ -9,45 +9,25 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-01-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: administrate
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
20
|
+
version: '0.12'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '0'
|
28
|
-
- !ruby/object:Gem::Dependency
|
29
|
-
name: rails
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - ">="
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version: '4.2'
|
35
|
-
- - "<="
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '6.0'
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
requirements:
|
42
|
-
- - ">="
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
version: '4.2'
|
45
|
-
- - "<="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '6.0'
|
27
|
+
version: '0.12'
|
48
28
|
description: Enum field plugin for Administrate
|
49
29
|
email:
|
50
|
-
- adrian@
|
30
|
+
- adrian@valiot.io
|
51
31
|
executables: []
|
52
32
|
extensions: []
|
53
33
|
extra_rdoc_files: []
|
@@ -61,7 +41,7 @@ files:
|
|
61
41
|
- app/views/fields/enum/_show.html.erb
|
62
42
|
- lib/administrate/field/enum.rb
|
63
43
|
- spec/lib/administrate/field/enum_spec.rb
|
64
|
-
homepage: https://github.com/
|
44
|
+
homepage: https://github.com/Valiot/administrate-field-enum
|
65
45
|
licenses:
|
66
46
|
- MIT
|
67
47
|
metadata: {}
|