simple_form_extension 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +22 -0
- data/README.md +35 -0
- data/Rakefile +1 -0
- data/lib/generators/simple_form_extension/install_generator.rb +16 -0
- data/lib/generators/simple_form_extension/templates/config/initializers/simple_form_extension.rb +58 -0
- data/lib/generators/simple_form_extension/templates/config/locales/simple_form_extension.en.yml +9 -0
- data/lib/simple_form_extension.rb +16 -0
- data/lib/simple_form_extension/.DS_Store +0 -0
- data/lib/simple_form_extension/components.rb +8 -0
- data/lib/simple_form_extension/components/icons.rb +13 -0
- data/lib/simple_form_extension/components/popovers.rb +46 -0
- data/lib/simple_form_extension/ext/form_builder.rb +20 -0
- data/lib/simple_form_extension/inputs.rb +14 -0
- data/lib/simple_form_extension/inputs/boolean_input.rb +16 -0
- data/lib/simple_form_extension/inputs/collection_check_boxes_input.rb +15 -0
- data/lib/simple_form_extension/inputs/collection_radio_buttons_input.rb +15 -0
- data/lib/simple_form_extension/inputs/color_input.rb +15 -0
- data/lib/simple_form_extension/inputs/date_time_input.rb +15 -0
- data/lib/simple_form_extension/inputs/file_input.rb +26 -0
- data/lib/simple_form_extension/inputs/image_input.rb +25 -0
- data/lib/simple_form_extension/inputs/numeric_input.rb +26 -0
- data/lib/simple_form_extension/translations.rb +7 -0
- data/lib/simple_form_extension/version.rb +3 -0
- data/simple_form_extension.gemspec +27 -0
- metadata +128 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a263173adb23bdab220fa74f54d2b0d7c4f001da
|
4
|
+
data.tar.gz: ec33e9c539a3e1f89feb81e5be90e48516a28c35
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0b55b1322f13609f1e9153a163884efa9c9c39c363ce16019a0dcff6359765ab3830f5de90ee7695772fbfdd3f9789c0e2e5d327577730c794712daa8735e725
|
7
|
+
data.tar.gz: e26f356bb4180838cb60c1bdea77d012fd942c57712b97c276018998358c50cafb7608b1e0b06da64053ad40379c60f32adaaa1ac4a77dab62848b782afd0f74
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 alex@glyph.fr
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# SimpleFormExtension
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'simple_form_extension'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install simple_form_extension
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
To use the popover component, please include in a javascript file :
|
22
|
+
|
23
|
+
```javascript
|
24
|
+
$('body').popover(selector: '[rel="popover"]')
|
25
|
+
```
|
26
|
+
|
27
|
+
TODO: Write usage instructions here
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
1. Fork it ( http://github.com/<my-github-username>/simple_form_extension/fork )
|
32
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
33
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
34
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
35
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
desc "Copy SimpleFormExtension files"
|
5
|
+
source_root File.expand_path('../templates', __FILE__)
|
6
|
+
|
7
|
+
def copy_config
|
8
|
+
template "config/initializers/simple_form_extension.rb"
|
9
|
+
end
|
10
|
+
|
11
|
+
def copy_locales
|
12
|
+
template "config/locales/simple_form_extension.en.yml"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/generators/simple_form_extension/templates/config/initializers/simple_form_extension.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Use this setup block to configure all options available in SimpleForm.
|
2
|
+
SimpleForm.setup do |config|
|
3
|
+
config.wrappers :input_group_append, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
4
|
+
b.use :html5
|
5
|
+
b.use :placeholder
|
6
|
+
b.use :label, class: 'control-label'
|
7
|
+
|
8
|
+
b.wrapper tag: 'div', class: "input-group" do |ba|
|
9
|
+
ba.use :icon, wrap_with: { tag: 'span', class: 'input-group-addon' }
|
10
|
+
ba.use :input, class: 'form-control'
|
11
|
+
end
|
12
|
+
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
13
|
+
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
14
|
+
end
|
15
|
+
|
16
|
+
config.wrappers :input_group_prepend, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
17
|
+
b.use :html5
|
18
|
+
b.use :placeholder
|
19
|
+
b.use :label, class: 'control-label'
|
20
|
+
|
21
|
+
b.wrapper tag: 'div', class: "input-group" do |ba|
|
22
|
+
ba.use :input, class: 'form-control'
|
23
|
+
ba.use :icon, wrap_with: { tag: 'span', class: 'input-group-addon' }
|
24
|
+
end
|
25
|
+
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
26
|
+
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
27
|
+
end
|
28
|
+
|
29
|
+
config.wrappers :popover, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
30
|
+
b.use :html5
|
31
|
+
b.use :placeholder
|
32
|
+
b.use :label, class: 'control-label'
|
33
|
+
|
34
|
+
b.wrapper tag: 'div', class: "input-group" do |ba|
|
35
|
+
ba.use :input, class: 'form-control'
|
36
|
+
ba.use :popover, wrap_with: { tag: 'span', class: 'input-group-addon' }
|
37
|
+
end
|
38
|
+
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
39
|
+
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
40
|
+
end
|
41
|
+
|
42
|
+
config.wrappers :label_popover, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
43
|
+
b.use :html5
|
44
|
+
b.use :placeholder
|
45
|
+
|
46
|
+
b.wrapper tag: 'div', class: 'label-wrapper' do |label|
|
47
|
+
label.use :label, class: 'control-label'
|
48
|
+
label.use :popover
|
49
|
+
end
|
50
|
+
|
51
|
+
b.wrapper tag: 'div' do |ba|
|
52
|
+
ba.use :input, class: 'form-control'
|
53
|
+
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
54
|
+
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "simple_form_extension/version"
|
2
|
+
|
3
|
+
module SimpleFormExtension
|
4
|
+
extend ActiveSupport::Autoload
|
5
|
+
|
6
|
+
eager_autoload do
|
7
|
+
autoload :Translations
|
8
|
+
autoload :Components
|
9
|
+
autoload :Inputs
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
SimpleForm::Inputs::Base.send(:include, SimpleFormExtension::Components::Icons)
|
14
|
+
SimpleForm::Inputs::Base.send(:include, SimpleFormExtension::Components::Popovers)
|
15
|
+
|
16
|
+
SimpleForm.custom_inputs_namespaces << 'SimpleFormExtension::Inputs'
|
Binary file
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Components
|
3
|
+
module Popovers
|
4
|
+
|
5
|
+
def popover(wrapper_options)
|
6
|
+
return nil unless options[:popover]
|
7
|
+
|
8
|
+
options = {
|
9
|
+
class: 'btn-popover fa fa-question-circle',
|
10
|
+
:rel => 'popover',
|
11
|
+
:'data-toggle' => 'popover',
|
12
|
+
:'data-container' => 'body',
|
13
|
+
:'data-title' => popover_title,
|
14
|
+
:'data-content' => popover_content,
|
15
|
+
:'data-placement' => popover_position,
|
16
|
+
:'data-trigger' => popover_tigger
|
17
|
+
}
|
18
|
+
|
19
|
+
template.content_tag(:i, '', options)
|
20
|
+
end
|
21
|
+
|
22
|
+
|
23
|
+
def popover_title
|
24
|
+
popover_options[:title]
|
25
|
+
end
|
26
|
+
|
27
|
+
def popover_content
|
28
|
+
popover_options[:content]
|
29
|
+
end
|
30
|
+
|
31
|
+
def popover_position
|
32
|
+
popover_options[:position] ||= "auto"
|
33
|
+
end
|
34
|
+
|
35
|
+
def popover_tigger
|
36
|
+
popover_options[:trigger] ||= "click"
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def popover_options
|
42
|
+
options[:popover] ||= {}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'simple_form/form_builder'
|
2
|
+
|
3
|
+
module SimpleForm
|
4
|
+
class FormBuilder < ActionView::Helpers::FormBuilder
|
5
|
+
alias_method :_original_find_mapping, :find_mapping
|
6
|
+
|
7
|
+
def find_mapping(input_type)
|
8
|
+
camelized = if (klass = self.class.mappings[input_type])
|
9
|
+
name = klass.name
|
10
|
+
(name =~ /^SimpleForm::Inputs/) ? name.split("::").last : name
|
11
|
+
else
|
12
|
+
"#{ input_type.to_s.camelize }Input"
|
13
|
+
end
|
14
|
+
|
15
|
+
mapping = attempt_mapping(camelized, SimpleFormExtension::Inputs)
|
16
|
+
return (discovery_cache[input_type] = mapping) if mapping
|
17
|
+
_original_find_mapping(input_type)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
extend ActiveSupport::Autoload
|
4
|
+
|
5
|
+
autoload :DateTimeInput
|
6
|
+
autoload :BooleanInput
|
7
|
+
autoload :NumericInput
|
8
|
+
autoload :CollectionCheckBoxesInput
|
9
|
+
autoload :CollectionRadioButtonsInput
|
10
|
+
autoload :ColorInput
|
11
|
+
autoload :FileInput
|
12
|
+
autoload :ImageInput
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
class BooleanInput < SimpleForm::Inputs::BooleanInput
|
4
|
+
def input(wrapper_options = nil)
|
5
|
+
input_html_options[:class] << "check_boxes"
|
6
|
+
super
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def build_check_box(unchecked_value, options)
|
12
|
+
"#{@builder.check_box(attribute_name, input_html_options, checked_value, unchecked_value)} <i class=\"checkbox-icon\"></i>".html_safe
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput
|
4
|
+
protected
|
5
|
+
|
6
|
+
def build_nested_boolean_style_item_tag(collection_builder)
|
7
|
+
"#{collection_builder.check_box} <i class=\"checkbox-icon\"></i> #{collection_builder.text}".html_safe
|
8
|
+
end
|
9
|
+
|
10
|
+
def item_wrapper_class
|
11
|
+
nested_boolean_style? ? "checkbox" : "checkbox-inline"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
class CollectionRadioButtonsInput < SimpleForm::Inputs::CollectionRadioButtonsInput
|
4
|
+
protected
|
5
|
+
|
6
|
+
def build_nested_boolean_style_item_tag(collection_builder)
|
7
|
+
"#{collection_builder.radio_button} <i class=\"radio-icon\"></i> #{collection_builder.text}".html_safe
|
8
|
+
end
|
9
|
+
|
10
|
+
def item_wrapper_class
|
11
|
+
nested_boolean_style? ? "radio" : "radio-inline"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
class ColorInput < SimpleForm::Inputs::Base
|
4
|
+
def input(wrapper_options = nil)
|
5
|
+
input_html_options[:class] << "colorpicker form-control"
|
6
|
+
"<div class=\"input-group color\">
|
7
|
+
#{@builder.text_field(attribute_name, input_html_options)}
|
8
|
+
<span class=\"input-group-addon\">
|
9
|
+
<i style=\"background-color: ;\"></i>
|
10
|
+
</span>
|
11
|
+
</div>".html_safe
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
class DateTimeInput < SimpleForm::Inputs::DateTimeInput
|
4
|
+
def input(wrapper_options = nil)
|
5
|
+
input_html_options[:class] << "form-control"
|
6
|
+
"<div class=\"input-group\">
|
7
|
+
#{@builder.text_field(attribute_name, input_html_options)}
|
8
|
+
<div class=\"input-group-addon btn-onclick-event\">
|
9
|
+
<i class=\"fa fa-calendar\"></i>
|
10
|
+
</div>
|
11
|
+
</div> ".html_safe
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
class FileInput < SimpleForm::Inputs::Base
|
4
|
+
include SimpleFormExtension::Translations
|
5
|
+
|
6
|
+
def input(wrapper_options = nil)
|
7
|
+
input_html_options[:class] << "file-upload"
|
8
|
+
|
9
|
+
"<div class=\"fileinput fileinput-new input-group\" data-provides=\"fileinput\">
|
10
|
+
<div class=\"form-control uneditable-input\" data-trigger=\"fileinput\">
|
11
|
+
<i class=\"fa fa-file fileinput-exists\"></i>
|
12
|
+
<span class=\"fileinput-filename\"></span>
|
13
|
+
</div>
|
14
|
+
<div class=\"input-group-btn\">
|
15
|
+
<div class=\"btn btn-default btn-file\" type=\"button\">
|
16
|
+
<span class=\"fileinput-new\">#{ translate('file.select') }</span>
|
17
|
+
<span class=\"fileinput-exists\">#{ translate('file.change') }</span>
|
18
|
+
#{@builder.file_field(attribute_name, input_html_options)}
|
19
|
+
</div>
|
20
|
+
<button class=\"btn btn-danger fileinput-exists\" data-dismiss=\"fileinput\" type=\"button\"><i class=\"fa fa-times\"></i></button>
|
21
|
+
</div>
|
22
|
+
</div>".html_safe
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
class ImageInput < SimpleForm::Inputs::Base
|
4
|
+
include SimpleFormExtension::Translations
|
5
|
+
|
6
|
+
def input(wrapper_options = nil)
|
7
|
+
input_html_options[:class] << "image-upload"
|
8
|
+
|
9
|
+
"<div class=\"fileinput fileinput-new\" data-provides=\"fileinput\">
|
10
|
+
<div class=\"\">
|
11
|
+
<div class=\"btn btn-default btn-file\" type=\"button\">
|
12
|
+
<span class=\"fileinput-new\">#{ translate('image.select') }</span>
|
13
|
+
<span class=\"fileinput-exists\">#{ translate('image.change') }</span>
|
14
|
+
#{@builder.file_field(attribute_name, input_html_options)}
|
15
|
+
</div>
|
16
|
+
<button class=\"btn btn-danger fileinput-exists pull-right\" data-dismiss=\"fileinput\" type=\"button\"><i class=\"fa fa-times\"></i></button>
|
17
|
+
</div>
|
18
|
+
<div class=\"fileinput-preview thumbnail\">
|
19
|
+
<img data-src='holder.js/100%x100%' alt=\"100%x100%\" src=\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOTAiIGhlaWdodD0iMTQwIj48cmVjdCB3aWR0aD0iMTkwIiBoZWlnaHQ9IjE0MCIgZmlsbD0iI2VlZSI+PC9yZWN0Pjx0ZXh0IHRleHQtYW5jaG9yPSJtaWRkbGUiIHg9Ijk1IiB5PSI3MCIgc3R5bGU9ImZpbGw6I2FhYTtmb250LXdlaWdodDpib2xkO2ZvbnQtc2l6ZToxMnB4O2ZvbnQtZmFtaWx5OkFyaWFsLEhlbHZldGljYSxzYW5zLXNlcmlmO2RvbWluYW50LWJhc2VsaW5lOmNlbnRyYWwiPjE5MHgxNDA8L3RleHQ+PC9zdmc+\" style=\"height: 100%; width: 100%; display: block;\">
|
20
|
+
</div>
|
21
|
+
</div>".html_safe
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module SimpleFormExtension
|
2
|
+
module Inputs
|
3
|
+
class NumericInput < SimpleForm::Inputs::Base
|
4
|
+
def input(wrapper_options = nil)
|
5
|
+
input_html_options[:class] << "spinner-input form-control"
|
6
|
+
if options.fetch(:spinner, true)
|
7
|
+
"<div class=\"input-group spinner\">
|
8
|
+
#{@builder.text_field(attribute_name, input_html_options)}
|
9
|
+
<span class=\"input-group-btn\">
|
10
|
+
<span class=\"spinner-buttons btn-group-vertical\">
|
11
|
+
<button class=\"btn btn-default spinner-up\" type=\"button\" tabindex=\"-1\">
|
12
|
+
<i class=\"fa fa-chevron-up\"></i>
|
13
|
+
</button>
|
14
|
+
<button class=\"btn btn-default spinner-down\" type=\"button\" tabindex=\"-1\">
|
15
|
+
<i class=\"fa fa-chevron-down\"></i>
|
16
|
+
</button>
|
17
|
+
</span>
|
18
|
+
</span>
|
19
|
+
</div> ".html_safe
|
20
|
+
else
|
21
|
+
@builder.number_field(attribute_name, input_html_options)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'simple_form_extension/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'simple_form_extension'
|
9
|
+
spec.version = SimpleFormExtension::VERSION
|
10
|
+
spec.authors = ['Alexandre Vasseur']
|
11
|
+
spec.email = ['alex@glyph.fr']
|
12
|
+
spec.summary = %q{A simple extention for simple_form with, colorpiker, icon, fileupload, image upload}
|
13
|
+
spec.description = %q{A simple extention for simple_form with, colorpiker, icon, fileupload, image upload}
|
14
|
+
spec.homepage = 'http://www.glyph.fr'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_dependency 'rails', '>= 3.1'
|
23
|
+
spec.add_dependency 'simple_form'
|
24
|
+
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
26
|
+
spec.add_development_dependency 'rake'
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simple_form_extension
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alexandre Vasseur
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: simple_form
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.5'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.5'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A simple extention for simple_form with, colorpiker, icon, fileupload,
|
70
|
+
image upload
|
71
|
+
email:
|
72
|
+
- alex@glyph.fr
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- Gemfile
|
79
|
+
- LICENSE.txt
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- lib/generators/simple_form_extension/install_generator.rb
|
83
|
+
- lib/generators/simple_form_extension/templates/config/initializers/simple_form_extension.rb
|
84
|
+
- lib/generators/simple_form_extension/templates/config/locales/simple_form_extension.en.yml
|
85
|
+
- lib/simple_form_extension.rb
|
86
|
+
- lib/simple_form_extension/.DS_Store
|
87
|
+
- lib/simple_form_extension/components.rb
|
88
|
+
- lib/simple_form_extension/components/icons.rb
|
89
|
+
- lib/simple_form_extension/components/popovers.rb
|
90
|
+
- lib/simple_form_extension/ext/form_builder.rb
|
91
|
+
- lib/simple_form_extension/inputs.rb
|
92
|
+
- lib/simple_form_extension/inputs/boolean_input.rb
|
93
|
+
- lib/simple_form_extension/inputs/collection_check_boxes_input.rb
|
94
|
+
- lib/simple_form_extension/inputs/collection_radio_buttons_input.rb
|
95
|
+
- lib/simple_form_extension/inputs/color_input.rb
|
96
|
+
- lib/simple_form_extension/inputs/date_time_input.rb
|
97
|
+
- lib/simple_form_extension/inputs/file_input.rb
|
98
|
+
- lib/simple_form_extension/inputs/image_input.rb
|
99
|
+
- lib/simple_form_extension/inputs/numeric_input.rb
|
100
|
+
- lib/simple_form_extension/translations.rb
|
101
|
+
- lib/simple_form_extension/version.rb
|
102
|
+
- simple_form_extension.gemspec
|
103
|
+
homepage: http://www.glyph.fr
|
104
|
+
licenses:
|
105
|
+
- MIT
|
106
|
+
metadata: {}
|
107
|
+
post_install_message:
|
108
|
+
rdoc_options: []
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '0'
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
requirements: []
|
122
|
+
rubyforge_project:
|
123
|
+
rubygems_version: 2.4.1
|
124
|
+
signing_key:
|
125
|
+
specification_version: 4
|
126
|
+
summary: A simple extention for simple_form with, colorpiker, icon, fileupload, image
|
127
|
+
upload
|
128
|
+
test_files: []
|