formulate 0.0.10 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d82b8e72b6ba956042851a01d37f637423df2d4e
4
+ data.tar.gz: 4338c8fe3928fdcd69f962fc6fafef871057ca3d
5
+ SHA512:
6
+ metadata.gz: f331419dcdd21759a780e8ab96c7dc8d51d200a616445b5f39d7201589b4bedcbb44acfec49e7595df6e25a8e0366950d15c5df50b6f9fc4d83cdd7bff244e95
7
+ data.tar.gz: 7a8cd7123847c2caa8d0e4339af30a24cf8258629348e235f34f9bd09accab438338b3fecb78c454f2364c977603e44fe25650fac69e3398b31dfba0d58cfc1b
data/CHANGELOG.md ADDED
@@ -0,0 +1,58 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2013-12-03)
4
+
5
+ * Require Rails 4 ([Tyler Hunt][tylerhunt])
6
+
7
+ ## 0.0.10 (2013-03-11)
8
+
9
+ * Set the default form builder using helper option ([Tyler Hunt][tylerhunt])
10
+ * Make the form helper opt-in ([Tyler Hunt][tylerhunt])
11
+ * Overhaul the form styles ([Tyler Hunt][tylerhunt])
12
+
13
+ ## 0.0.9 (2012-10-17)
14
+
15
+ * Fix form helper when not using Active Record ([Tyler Hunt][tylerhunt])
16
+
17
+ ## 0.0.8 (2012-10-17)
18
+
19
+ * Allow a custom CSS form class to be set ([Tyler Hunt][tylerhunt])
20
+ * Keep Rails’ original CSS form class intact ([Tyler Hunt][tylerhunt])
21
+ * Support `placeholder: true` for automatic values ([Tyler Hunt][tylerhunt])
22
+
23
+ ## 0.0.7 (2012-05-19)
24
+
25
+ * Disable reset styles ([Tyler Hunt][tylerhunt])
26
+ * Improve styling of inputs ([Tyler Hunt][tylerhunt])
27
+ * Ensure `:label` is not used as input option ([Tyler Hunt][tylerhunt])
28
+
29
+ ## 0.0.6 (2012-05-11)
30
+
31
+ * Use custom error handler to add class to field ([Tyler Hunt][tylerhunt])
32
+ * Add `:prefix` and `:suffix` options ([Tyler Hunt][tylerhunt])
33
+
34
+ ## 0.0.5 (2012-05-10)
35
+
36
+ * Make the input `font-family` configurable ([Tyler Hunt][tylerhunt])
37
+ * Switch to pessimistic version constraints ([Tyler Hunt][tylerhunt])
38
+
39
+ ## 0.0.4 (2012-05-01)
40
+
41
+ * Yield value and hide input when passing a block ([Tyler Hunt][tylerhunt])
42
+ * Change `:style` option to `:class` ([Tyler Hunt][tylerhunt])
43
+ * Fix read-only styles ([Tyler Hunt][tylerhunt])
44
+
45
+ ## 0.0.3 (2012-04-29)
46
+
47
+ * Add state select and country select input helpers ([Tyler Hunt][tylerhunt])
48
+
49
+ ## 0.0.2 (2012-04-28)
50
+
51
+ * Specify dependencies on Ruby 1.9 and Haml ([Tyler Hunt][tylerhunt])
52
+ * Fix default form builder setting in initializer ([Tyler Hunt][tylerhunt])
53
+
54
+ ## 0.0.1 (2012-04-28)
55
+
56
+ * Initial release ([Tyler Hunt][tylerhunt])
57
+
58
+ [tylerhunt]: https://github.com/tylerhunt
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
- source 'https://rubygems.org'
1
+ source 'https://rubygems.org/'
2
2
 
3
- # Specify your gem's dependencies in formulate.gemspec
4
3
  gemspec
data/formulate.gemspec CHANGED
@@ -1,22 +1,23 @@
1
1
  require './lib/formulate/version'
2
2
 
3
- Gem::Specification.new do |gem|
4
- gem.name = 'formulate'
5
- gem.version = Formulate::VERSION
6
- gem.summary = 'Rails form builder with flexible markup and styles.'
7
- gem.homepage = 'http://github.com/tylerhunt/formulate'
8
- gem.author = 'Tyler Hunt'
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'formulate'
5
+ spec.version = Formulate::VERSION
6
+ spec.authors = ['Tyler Hunt']
7
+ spec.summary = 'Rails form builder with flexible markup and styles.'
8
+ spec.homepage = 'https://github.com/tylerhunt/formulate'
9
+ spec.license = 'MIT'
9
10
 
10
- gem.required_ruby_version = '>= 1.9'
11
+ spec.required_ruby_version = '>= 1.9'
11
12
 
12
- gem.add_dependency 'actionpack', '~> 3.0'
13
- gem.add_dependency 'activesupport', '~> 3.0'
14
- gem.add_dependency 'carmen', '~> 0.2.0'
15
- gem.add_dependency 'haml', '~> 3.0'
16
- gem.add_dependency 'sass-rails', '~> 3.0'
13
+ spec.add_dependency 'actionpack', '~> 4.0'
14
+ spec.add_dependency 'activesupport', '~> 4.0'
15
+ spec.add_dependency 'carmen', '~> 0.2.0'
16
+ spec.add_dependency 'haml', '~> 4.0'
17
+ spec.add_dependency 'sass-rails', '~> 4.0'
17
18
 
18
- gem.files = `git ls-files`.split($\)
19
- gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
20
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
- gem.require_paths = ['lib']
19
+ spec.files = `git ls-files`.split($\)
20
+ spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
21
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
22
+ spec.require_paths = ['lib']
22
23
  end
@@ -96,7 +96,7 @@ module Formulate
96
96
 
97
97
  label = label != false ? label(method, label) : nil
98
98
  markup = [label, prefix, input, suffix].compact
99
- markup.reverse! if type.in?(:check_box, :radio_button)
99
+ markup.reverse! if type.in?([:check_box, :radio_button])
100
100
 
101
101
  markup << @template.capture_haml do
102
102
  yield(object.send(method)) if block_given?
@@ -10,7 +10,9 @@ module Formulate
10
10
  when String, Symbol
11
11
  options[:html][:class] ||= ''
12
12
  else
13
- apply_form_for_options!(record, options)
13
+ object = record.is_a?(Array) ? record.last : record
14
+ raise ArgumentError, 'First argument in form cannot contain nil or be empty' unless object
15
+ apply_form_for_options!(record, object, options)
14
16
  end
15
17
 
16
18
  options[:html][:class] << ' formulate'
@@ -1,3 +1,3 @@
1
1
  module Formulate
2
- VERSION = '0.0.10'
2
+ VERSION = '0.1.0'
3
3
  end
metadata CHANGED
@@ -1,52 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formulate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
5
- prerelease:
4
+ version: 0.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tyler Hunt
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-11 00:00:00.000000000 Z
11
+ date: 2013-12-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: actionpack
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
- version: '3.0'
19
+ version: '4.0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
29
- version: '3.0'
26
+ version: '4.0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activesupport
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
37
- version: '3.0'
33
+ version: '4.0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
45
- version: '3.0'
40
+ version: '4.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: carmen
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ~>
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ~>
60
53
  - !ruby/object:Gem::Version
@@ -62,35 +55,31 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: haml
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ~>
68
60
  - !ruby/object:Gem::Version
69
- version: '3.0'
61
+ version: '4.0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ~>
76
67
  - !ruby/object:Gem::Version
77
- version: '3.0'
68
+ version: '4.0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: sass-rails
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
73
  - - ~>
84
74
  - !ruby/object:Gem::Version
85
- version: '3.0'
75
+ version: '4.0'
86
76
  type: :runtime
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
80
  - - ~>
92
81
  - !ruby/object:Gem::Version
93
- version: '3.0'
82
+ version: '4.0'
94
83
  description:
95
84
  email:
96
85
  executables: []
@@ -98,6 +87,7 @@ extensions: []
98
87
  extra_rdoc_files: []
99
88
  files:
100
89
  - .gitignore
90
+ - CHANGELOG.md
101
91
  - Gemfile
102
92
  - LICENSE
103
93
  - README.md
@@ -111,28 +101,28 @@ files:
111
101
  - vendor/assets/stylesheets/formulate.css.sass
112
102
  - vendor/assets/stylesheets/formulate/_normalize.css.sass
113
103
  - vendor/assets/stylesheets/formulate/_rhythm.css.sass
114
- homepage: http://github.com/tylerhunt/formulate
115
- licenses: []
104
+ homepage: https://github.com/tylerhunt/formulate
105
+ licenses:
106
+ - MIT
107
+ metadata: {}
116
108
  post_install_message:
117
109
  rdoc_options: []
118
110
  require_paths:
119
111
  - lib
120
112
  required_ruby_version: !ruby/object:Gem::Requirement
121
- none: false
122
113
  requirements:
123
- - - ! '>='
114
+ - - '>='
124
115
  - !ruby/object:Gem::Version
125
116
  version: '1.9'
126
117
  required_rubygems_version: !ruby/object:Gem::Requirement
127
- none: false
128
118
  requirements:
129
- - - ! '>='
119
+ - - '>='
130
120
  - !ruby/object:Gem::Version
131
121
  version: '0'
132
122
  requirements: []
133
123
  rubyforge_project:
134
- rubygems_version: 1.8.23
124
+ rubygems_version: 2.0.3
135
125
  signing_key:
136
- specification_version: 3
126
+ specification_version: 4
137
127
  summary: Rails form builder with flexible markup and styles.
138
128
  test_files: []