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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c36520c11a8143bcede2faf085f2bf6997125a6
4
- data.tar.gz: 4eabe10fae1866cd901737942aa8ef4a48459b08
3
+ metadata.gz: e181f65075d3f50bcd0475fed89924d3ddb208a0
4
+ data.tar.gz: 4e4988aca2c5815de37054940e4508a189ee9091
5
5
  SHA512:
6
- metadata.gz: 2566a0b80155769ce9e21047ac01b78f5a57c26c79ed4b5f7233db1578ec15058f4383cdba61a0dd64a20303fa0687fef69fa099d235cd747fb4af5ffe0f1baa
7
- data.tar.gz: 92eb8b1e0901d783d8f00bb1b0ced6f089a1998600a05fbfe21f99e42781cce6f2f79e27d6714c1857ec3a0d0b444a09159cba3fb3b9490a624cada22de2dfed
6
+ metadata.gz: 367d2575a59094f7805db547fc3951803a79e3ec0f5722c1de83bb69c30a2c454bd219b513c7292ee65da23020256ac0c439b77261c8da5a37669fc75b35f848
7
+ data.tar.gz: 0eee4339b5accf5b351d27c0ae944388e8c5068e2d1c1897a62a93ad3a002b543353e9b4e0b12859b0e78eb4cfefc22d68b39e63c06fd71425e194adc3813ed2
@@ -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}-shi_hash" do |b|
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 + [:sample_shi_hash]
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 == :sample_shi_hash
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 == :sample_shi_hash
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 == :sample_shi_hash
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.3"
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}
@@ -1,5 +1,5 @@
1
1
  require "spec_helper"
2
- require "simphi"
2
+ require "simphi/form_builder"
3
3
  require "simphi/simphi_input"
4
4
 
5
5
  RSpec.shared_examples "with add more button" do
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.3
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-16 00:00:00.000000000 Z
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_form