simple_form_fileinput 0.0.4 → 0.0.5

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: c10a766801b75e03fa91317d3f128c43a79d6c4c
4
- data.tar.gz: b6cdcc296ba7bdbda64218f819635ea56f726bb3
3
+ metadata.gz: 3dca876a79cd021608978528d458a9737570c5c7
4
+ data.tar.gz: a60ec3a64abb2d7953a6fb54fe3507a7377facab
5
5
  SHA512:
6
- metadata.gz: d5288a9be02ac3b0c9eb5f8a8c3b25604f4f718900837b07e93f2e89aa3336cd2a49b9251e3d355e1298f64b1d8f37009eb4edb0449836ef3672bb5c82c6b657
7
- data.tar.gz: 4594d3e631a45f255ca39c20b8e09e35472d8a83e88747fd872846ad52f2031ed3b77b5e2d6b2973e4280363b3586f96cb96a6a558c8495e5800dfae72e632dc
6
+ metadata.gz: 28d3e7c7a965d3616e178aaddf8422aa44b7ecdd45950d925c2e23db4fdba749662e63473c6471b4d28178b7323452585f81c670c5d922f8bca61dc984ec6cb1
7
+ data.tar.gz: 48a06ce5501e70717f80c58a6be167c5f3cb65f6a55cc76c5d07f3fce80d6858ea57c8fd9ac5eecffc1ad596a3fb9ac59a363201da3e1b902117b9f69ea9a6a4
@@ -1,15 +1,17 @@
1
1
  module SimpleForm
2
2
  module Inputs
3
3
  class FileInput < Base
4
- def input
5
- input_html_options[:title] = 'Drop a file here, or click to browse...'
6
- if input_html_options.key?(:data)
7
- input_html_options[:data][:filename_placement] = 'inside'
4
+ def input(wrapper_options)
5
+ merged_input_options = merge_wrapper_options input_html_options, wrapper_options
6
+ merged_input_options[:data] ||= {}
7
+ if Rails.env.test?
8
+ merged_input_options[:data][:bfi_disabled] = true
8
9
  else
9
- input_html_options[:data] = {:filename_placement => 'inside'}
10
+ merged_input_options[:title] = 'Drop a file here, or click to browse...'
11
+ merged_input_options[:data][:filename_placement] = 'inside'
10
12
  end
11
- @builder.file_field(attribute_name, input_html_options)
13
+ @builder.file_field(attribute_name, merged_input_options)
12
14
  end
13
15
  end
14
16
  end
15
- end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module SimpleFormFileinput
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require "simple_form_fileinput/version"
2
+ require "simple_form_fileinput/capybara_helpers"
2
3
 
3
4
  module SimpleFormFileinput
4
5
  class Engine < ::Rails::Engine
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_fileinput
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - smit1625
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-24 00:00:00.000000000 Z
11
+ date: 2015-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler