padrino-helpers 0.11.3 → 0.11.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/README.rdoc +1 -1
  3. data/lib/padrino-helpers.rb +3 -5
  4. data/lib/padrino-helpers/asset_tag_helpers.rb +32 -40
  5. data/lib/padrino-helpers/breadcrumb_helpers.rb +21 -39
  6. data/lib/padrino-helpers/form_builder/abstract_form_builder.rb +121 -118
  7. data/lib/padrino-helpers/form_builder/standard_form_builder.rb +6 -9
  8. data/lib/padrino-helpers/form_helpers.rb +190 -193
  9. data/lib/padrino-helpers/format_helpers.rb +29 -42
  10. data/lib/padrino-helpers/locale/cs.yml +14 -14
  11. data/lib/padrino-helpers/locale/da.yml +1 -1
  12. data/lib/padrino-helpers/locale/de.yml +1 -1
  13. data/lib/padrino-helpers/locale/en.yml +16 -16
  14. data/lib/padrino-helpers/locale/es.yml +16 -16
  15. data/lib/padrino-helpers/locale/fr.yml +1 -2
  16. data/lib/padrino-helpers/locale/hu.yml +16 -16
  17. data/lib/padrino-helpers/locale/it.yml +2 -2
  18. data/lib/padrino-helpers/locale/ja.yml +16 -16
  19. data/lib/padrino-helpers/locale/lv.yml +16 -16
  20. data/lib/padrino-helpers/locale/nl.yml +1 -1
  21. data/lib/padrino-helpers/locale/no.yml +1 -1
  22. data/lib/padrino-helpers/locale/pl.yml +7 -7
  23. data/lib/padrino-helpers/locale/pt_br.yml +16 -16
  24. data/lib/padrino-helpers/locale/ro.yml +16 -16
  25. data/lib/padrino-helpers/locale/ru.yml +16 -16
  26. data/lib/padrino-helpers/locale/sv.yml +16 -16
  27. data/lib/padrino-helpers/locale/tr.yml +16 -16
  28. data/lib/padrino-helpers/locale/uk.yml +16 -16
  29. data/lib/padrino-helpers/locale/zh_cn.yml +16 -16
  30. data/lib/padrino-helpers/locale/zh_tw.yml +16 -16
  31. data/lib/padrino-helpers/number_helpers.rb +10 -15
  32. data/lib/padrino-helpers/output_helpers.rb +49 -57
  33. data/lib/padrino-helpers/output_helpers/abstract_handler.rb +16 -18
  34. data/lib/padrino-helpers/output_helpers/erb_handler.rb +11 -12
  35. data/lib/padrino-helpers/output_helpers/haml_handler.rb +9 -9
  36. data/lib/padrino-helpers/output_helpers/slim_handler.rb +11 -13
  37. data/lib/padrino-helpers/render_helpers.rb +5 -6
  38. data/lib/padrino-helpers/tag_helpers.rb +18 -21
  39. data/lib/padrino-helpers/translation_helpers.rb +4 -6
  40. data/test/fixtures/markup_app/app.rb +7 -3
  41. data/test/fixtures/render_app/app.rb +1 -0
  42. data/test/test_asset_tag_helpers.rb +1 -1
  43. data/test/test_form_builder.rb +5 -6
  44. data/test/test_form_helpers.rb +24 -12
  45. data/test/test_format_helpers.rb +3 -3
  46. data/test/test_number_helpers.rb +4 -0
  47. data/test/test_output_helpers.rb +1 -1
  48. data/test/test_render_helpers.rb +1 -1
  49. data/test/test_tag_helpers.rb +1 -1
  50. metadata +9 -15
@@ -2,16 +2,16 @@ require File.expand_path(File.dirname(__FILE__) + '/helper')
2
2
  require File.expand_path(File.dirname(__FILE__) + '/fixtures/markup_app/app')
3
3
 
4
4
  describe "FormatHelpers" do
5
+ include Padrino::Helpers::FormatHelpers
6
+
5
7
  def app
6
- MarkupDemo.tap { |app| app.set :environment, :test }
8
+ MarkupDemo
7
9
  end
8
10
 
9
11
  def setup
10
12
  Time.stubs(:now).returns(Time.utc(1983, 11, 9, 5))
11
13
  end
12
14
 
13
- include Padrino::Helpers::FormatHelpers
14
-
15
15
  context 'for #simple_format method' do
16
16
  should "format simple text into html format" do
17
17
  actual_text = simple_format("Here is some basic text...\n...with a line break.")
@@ -4,6 +4,10 @@ require File.expand_path(File.dirname(__FILE__) + '/fixtures/markup_app/app')
4
4
  describe "NumberHelpers" do
5
5
  include Padrino::Helpers::NumberHelpers
6
6
 
7
+ def app
8
+ MarkupDemo
9
+ end
10
+
7
11
  def kilobytes(number)
8
12
  number * 1024
9
13
  end
@@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/fixtures/markup_app/app')
3
3
 
4
4
  describe "OutputHelpers" do
5
5
  def app
6
- MarkupDemo.tap { |app| app.set :environment, :test }
6
+ MarkupDemo
7
7
  end
8
8
 
9
9
  context 'for #content_for method' do
@@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/fixtures/render_app/app')
3
3
 
4
4
  describe "RenderHelpers" do
5
5
  def app
6
- RenderDemo.tap { |app| app.set :environment, :test }
6
+ RenderDemo
7
7
  end
8
8
 
9
9
  context 'for #partial method and object' do
@@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/fixtures/markup_app/app')
3
3
 
4
4
  describe "TagHelpers" do
5
5
  def app
6
- MarkupDemo.tap { |app| app.set :environment, :test }
6
+ MarkupDemo
7
7
  end
8
8
 
9
9
  context 'for #tag method' do
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.3
5
- prerelease:
4
+ version: 0.11.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Padrino Team
@@ -12,28 +11,25 @@ authors:
12
11
  autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2013-07-29 00:00:00.000000000 Z
14
+ date: 2013-09-24 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: padrino-core
19
18
  requirement: !ruby/object:Gem::Requirement
20
- none: false
21
19
  requirements:
22
20
  - - '='
23
21
  - !ruby/object:Gem::Version
24
- version: 0.11.3
22
+ version: 0.11.4
25
23
  type: :runtime
26
24
  prerelease: false
27
25
  version_requirements: !ruby/object:Gem::Requirement
28
- none: false
29
26
  requirements:
30
27
  - - '='
31
28
  - !ruby/object:Gem::Version
32
- version: 0.11.3
29
+ version: 0.11.4
33
30
  - !ruby/object:Gem::Dependency
34
31
  name: i18n
35
32
  requirement: !ruby/object:Gem::Requirement
36
- none: false
37
33
  requirements:
38
34
  - - ~>
39
35
  - !ruby/object:Gem::Version
@@ -41,7 +37,6 @@ dependencies:
41
37
  type: :runtime
42
38
  prerelease: false
43
39
  version_requirements: !ruby/object:Gem::Requirement
44
- none: false
45
40
  requirements:
46
41
  - - ~>
47
42
  - !ruby/object:Gem::Version
@@ -165,28 +160,27 @@ files:
165
160
  - test/test_tag_helpers.rb
166
161
  homepage: http://www.padrinorb.com
167
162
  licenses: []
163
+ metadata: {}
168
164
  post_install_message:
169
165
  rdoc_options:
170
166
  - --charset=UTF-8
171
167
  require_paths:
172
168
  - lib
173
169
  required_ruby_version: !ruby/object:Gem::Requirement
174
- none: false
175
170
  requirements:
176
- - - ! '>='
171
+ - - '>='
177
172
  - !ruby/object:Gem::Version
178
173
  version: '0'
179
174
  required_rubygems_version: !ruby/object:Gem::Requirement
180
- none: false
181
175
  requirements:
182
- - - ! '>='
176
+ - - '>='
183
177
  - !ruby/object:Gem::Version
184
178
  version: 1.3.6
185
179
  requirements: []
186
180
  rubyforge_project: padrino-helpers
187
- rubygems_version: 1.8.25
181
+ rubygems_version: 2.0.6
188
182
  signing_key:
189
- specification_version: 3
183
+ specification_version: 4
190
184
  summary: Helpers for padrino
191
185
  test_files:
192
186
  - test/fixtures/markup_app/app.rb