simphi 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/simphi/simphi_input.rb +5 -5
- data/simphi.gemspec +1 -1
- data/spec/simphi_input_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e181f65075d3f50bcd0475fed89924d3ddb208a0
|
4
|
+
data.tar.gz: 4e4988aca2c5815de37054940e4508a189ee9091
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 367d2575a59094f7805db547fc3951803a79e3ec0f5722c1de83bb69c30a2c454bd219b513c7292ee65da23020256ac0c439b77261c8da5a37669fc75b35f848
|
7
|
+
data.tar.gz: 0eee4339b5accf5b351d27c0ae944388e8c5068e2d1c1897a62a93ad3a002b543353e9b4e0b12859b0e78eb4cfefc22d68b39e63c06fd71425e194adc3813ed2
|
data/lib/simphi/simphi_input.rb
CHANGED
@@ -13,7 +13,7 @@ module Simphi
|
|
13
13
|
def input(wrapper_options)
|
14
14
|
@io = ActiveSupport::SafeBuffer.new
|
15
15
|
|
16
|
-
@builder.fields_for "#{attribute_name}-
|
16
|
+
@builder.fields_for "#{attribute_name}-simphi" do |b|
|
17
17
|
@hash_builder = b
|
18
18
|
|
19
19
|
@io.tap do |sb|
|
@@ -38,7 +38,7 @@ module Simphi
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def not_required_attributes
|
41
|
-
attribute_value.try(:keys).to_a - required_attributes + [:
|
41
|
+
attribute_value.try(:keys).to_a - required_attributes + [:sample_simphi]
|
42
42
|
end
|
43
43
|
|
44
44
|
def get_fields_for(array, start, required = false)
|
@@ -81,7 +81,7 @@ module Simphi
|
|
81
81
|
opts = input_options_for(:hash_pair)
|
82
82
|
klass = ["hash-#{index}"]
|
83
83
|
klass << opts.fetch(:class, 'row hash-pair')
|
84
|
-
klass << 'sample' if key == :
|
84
|
+
klass << 'sample' if key == :sample_simphi
|
85
85
|
klass << 'has_error' if error(key)
|
86
86
|
klass * ' '
|
87
87
|
|
@@ -102,7 +102,7 @@ module Simphi
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def key_options(key)
|
105
|
-
extends = if key == :
|
105
|
+
extends = if key == :sample_simphi
|
106
106
|
{ disabled: 'disabled' }
|
107
107
|
else
|
108
108
|
{ value: key }
|
@@ -114,7 +114,7 @@ module Simphi
|
|
114
114
|
def value_options(key)
|
115
115
|
value = attribute_value.try(:[], key)
|
116
116
|
opts = {}
|
117
|
-
opts.merge!({ disabled: 'disabled' }) if key == :
|
117
|
+
opts.merge!({ disabled: 'disabled' }) if key == :sample_simphi
|
118
118
|
opts.merge!(value ? { value: value } : {})
|
119
119
|
opts.merge( input_options_for(:value_input) )
|
120
120
|
end
|
data/simphi.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "simphi"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.4"
|
8
8
|
spec.authors = ["Alex Beznos"]
|
9
9
|
spec.email = ["beznosa@yahoo.com"]
|
10
10
|
spec.summary = %q{Ability to deale with hash like inputs}
|
data/spec/simphi_input_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simphi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Beznos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_form
|