simple_strap_file 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b697bc4191b2878f53f8d5de2ac6319b5e2cc631
4
- data.tar.gz: 5a8a1782e7e9072b47e75fdde96952c429985e35
3
+ metadata.gz: f457f7cda35f4b6caeb6a9ba1cb308cc8c9f9bef
4
+ data.tar.gz: 895a765ad9623fc84d30a861ab7b8bd15a5dcfaa
5
5
  SHA512:
6
- metadata.gz: 13acaca21908ebd5853ab8662b37f94bfeb6cdec8fc26f1d26da1a0ee66c1ba6785d38360c09e750f0ef1d07dbf962fdb4f7aa4918bba5dcb8625c304d60bcf5
7
- data.tar.gz: 5989ee217a92823aa13bb7b308ab5812aaea2d362c9e160a3657da39006e932463482882c38aeb23c7963e9b0abcde947b82bc3baf9993169522e4defff9fe59
6
+ metadata.gz: 5b714a95dc6268b50bbd119503fa78d78f8957be816098b9895d22a9f5cc83cded4be5596695a8df2b7417838f1618a47209dc9f289a56758c38d1f4f0967b76
7
+ data.tar.gz: 3225469d1ef8430c8a538b7c9668e32c711c9614a562447e189ea7f02e2038c4e9b314987e8716f9107977320356aac93267bd2a79c904544a6209787cad787a
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
- # SimpleStrapFile
1
+ [![Gem Version](https://badge.fury.io/rb/simple_strap_file.svg)](http://badge.fury.io/rb/simple_strap_file)
2
2
 
3
+ # SimpleStrapFile
3
4
  [Simple Form](https://github.com/plataformatec/simple_form) component that provides a pretty file input using [Twitter Bootstrap](http://getbootstrap.com/) for styling.
4
5
 
5
6
  > Based on ['Whipping File Inputs Into Shape with Bootstrap 3'](http://www.abeautifulsite.net/whipping-file-inputs-into-shape-with-bootstrap-3/) by [Cory LaViska](https://twitter.com/claviska).
@@ -1,13 +1,14 @@
1
1
  class FileInput < SimpleForm::Inputs::FileInput
2
2
  # http://www.abeautifulsite.net/whipping-file-inputs-into-shape-with-bootstrap-3/
3
3
  def input(wrapper_options=nil)
4
- button = template.content_tag(:div, class: 'input-group') do
4
+ merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
5
+ template.content_tag(:div, class: 'input-group') do
5
6
  (template.content_tag(:span, class: 'input-group-btn') do
6
7
  template.content_tag(:span, class: 'btn btn-primary btn-file') do
7
- @builder.file_field(attribute_name) + raw('Browse&hellip;')
8
+ @builder.file_field(attribute_name, merged_input_options) + raw('Browse&hellip;')
8
9
  end
9
10
  end) +
10
- template.tag(:input, class: 'form-control', type: 'text', readonly: true)
11
+ template.tag(:input, input_html_options.merge({class: 'form-control', type: 'text'}))
11
12
  end
12
13
  end
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleStrapFile
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["mike.c.cowan@gmail.com"]
11
11
 
12
12
  spec.summary = "Simple Form component that provides a pretty file input using Bootstrap"
13
- spec.description = "Brings form file inputs in line with the other Bootstrap themed fields"
13
+ spec.description = "Brings Simple Form file inputs in line with the other Bootstrap themed fields"
14
14
  spec.homepage = "https://github.com/michaelcowan/simple-strap-file"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_strap_file
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Cowan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,8 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.1'
55
- description: Brings form file inputs in line with the other Bootstrap themed fields
55
+ description: Brings Simple Form file inputs in line with the other Bootstrap themed
56
+ fields
56
57
  email:
57
58
  - mike.c.cowan@gmail.com
58
59
  executables: []