bootstrap3_form_builder 0.0.1 → 1.0.0

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: 5fefe7e1087f0ce25abda0eb9530119255983248
4
- data.tar.gz: 3e45e232473187c828a0d93a81f1a3ca38866d4d
3
+ metadata.gz: 0def3912ebf8fa022c85cb998cb5354c1ab42680
4
+ data.tar.gz: d6e0b235d0a4df385ce85cd12334382a227aacb9
5
5
  SHA512:
6
- metadata.gz: 77efd9bd64ee50f6c40ba473d3b20520afbf57434c086dc5fc202cd1a07ea3b166d9b077fe3c670ec883b4c968a15e2ffe9890fbfbc1821e9ec7bc2f0a614b09
7
- data.tar.gz: c27cbb295a6631d1ab6ff769aa17e8a5f8c90fb7324fbb05f4efb0538309d2cc7ddc367fa39db892d647a4e02d7e6d7489f6ceed1081d1cb26dafbc3912c9f4f
6
+ metadata.gz: ca34b41fceb1dbde32b6700ae127f5f3cde1f7197c08e9e411b918d8e145d9402c1cf1b9a7a4587bc66f41da5ab373895dad75b4959b384f994cc746c90ed5ec
7
+ data.tar.gz: ba99e247ccfffd028c952529a3575931f961436bc26a7137629f1d2b320ccba64fc5f710f5b011297409dcc1a1e6f0830675530c543a65ebe0e989643c37723f
@@ -8,7 +8,7 @@ module Bootstrap3FormBuilder
8
8
  end
9
9
 
10
10
  =begin
11
- Generates form fields that work with Twitter Bootstrap 3.
11
+ Generates form fields that work with Twitter Bootstrap 3.
12
12
  =end
13
13
  def self.create_tagged_field(method_name)
14
14
  define_method(method_name) do |label, *args|
@@ -75,7 +75,7 @@ Generates form fields that work with Twitter Bootstrap 3.
75
75
 
76
76
  format_validator = (validators.select { |v| v.class == ActiveModel::Validations::FormatValidator}).first
77
77
 
78
- if format_validator && allow_pattern
78
+ if format_validator && allow_pattern && !method_name.include?('email')
79
79
  options[:pattern] = format_validator.options[:with].source.html_safe
80
80
  options[:title] = format_validator.options[:message] || "#{options[:title]} is not a valid format"
81
81
  end
@@ -101,13 +101,13 @@ Generates form fields that work with Twitter Bootstrap 3.
101
101
  end
102
102
 
103
103
  if !input_prefix.empty? || !input_suffix.empty?
104
- input = @template.content_tag("div",
105
- input_prefix.html_safe +
106
- super(label, *(args << options)) +
104
+ input = @template.content_tag("div",
105
+ input_prefix.html_safe +
106
+ super(label, *(args << options)) +
107
107
  input_suffix.html_safe,
108
108
  :class => "input-group " + (options[:input_container_class] || ""))
109
109
  else
110
- input = super(label, *(args << options))
110
+ input = super(label, *(args << options))
111
111
 
112
112
  if options[:input_container_class]
113
113
  input = @template.content_tag("div", input.html_safe, :class => options[:input_container_class])
@@ -1,3 +1,3 @@
1
1
  module Bootstrap3FormBuilder
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap3_form_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zachary Wright
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-13 00:00:00.000000000 Z
11
+ date: 2016-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: sqlite3
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: ammeter
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: Custom form builder to create forms and inputs that work with Bootstrap
@@ -89,16 +89,16 @@ executables: []
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
+ - MIT-LICENSE
93
+ - Rakefile
94
+ - lib/bootstrap3_form_builder.rb
92
95
  - lib/bootstrap3_form_builder/form_builder.rb
93
96
  - lib/bootstrap3_form_builder/version.rb
94
- - lib/bootstrap3_form_builder.rb
95
97
  - lib/generators/bootstrap3_form_builder/install_generator.rb
96
- - lib/generators/templates/bootstrap3_form_builder/initializer.rb
97
98
  - lib/generators/templates/bootstrap3_form_builder/_error_messages.html.erb
98
99
  - lib/generators/templates/bootstrap3_form_builder/_error_messages.html.haml
100
+ - lib/generators/templates/bootstrap3_form_builder/initializer.rb
99
101
  - lib/tasks/bootstrap3_form_builder_tasks.rake
100
- - MIT-LICENSE
101
- - Rakefile
102
102
  homepage: https://github.com/zacharyw/bootstrap3-form-builder
103
103
  licenses:
104
104
  - MIT
@@ -109,17 +109,17 @@ require_paths:
109
109
  - lib
110
110
  required_ruby_version: !ruby/object:Gem::Requirement
111
111
  requirements:
112
- - - '>='
112
+ - - ">="
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
- - - '>='
117
+ - - ">="
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.0.14
122
+ rubygems_version: 2.5.1
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Builds forms with Twitter Bootstrap 3 styling.