rails-angulate 0.0.5.rc1 → 0.0.5.rc2

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: 028e9269a483d6f3148f726cf86b2c5f49d50dc3
4
- data.tar.gz: 24f89a7798749b0c76ea78c50abb300019e77068
3
+ metadata.gz: 746aecc1ab2ad42de660621e9a13dee05d152060
4
+ data.tar.gz: a33a211dc9e608310669960a79321c8f26be5bcf
5
5
  SHA512:
6
- metadata.gz: 089bc3386ff49bf0d79c9488016e34fea3c29a6c1ae4678bd928d957533df0831854a1c49e4c98c2a7ee28cd92d1d8f96a3c3b10a8066486d26edf142af7db70
7
- data.tar.gz: 2f1038662c1f44a85cbc4d4ca9f7f422cd6ba4817a80e9715c5bc9c5cff5a3e57c63d4b7f013f6b75eefc96419df32435657df42c952d0a3e87ba485d554cf79
6
+ metadata.gz: 9db0417675c8b5828fba257608246c47a2f613e07660be98a9037eac44c46195fc228b1d8b10512aa3efb4d13952271fd59a0ce150694ea3c2b6dea6c268ba02
7
+ data.tar.gz: 39a302b1b00e5c0e76f08183ed942b51d97bc0fd1c8386b558b2b29de8d16cad59a9081750848148d8c822b9612f0ffdb1da3276fe08e1b262549b207e275624
@@ -1,7 +1,7 @@
1
1
  module Rails
2
2
  module Angulate
3
3
  module Mappers
4
- class Base
4
+ class BaseMapper
5
5
  attr_reader :validator, :model, :attribute
6
6
 
7
7
  def self.inherited(mapper)
@@ -27,7 +27,7 @@ module Rails
27
27
  with_i18n do |locale|
28
28
  locale.t(:format, {
29
29
  default: "%{attribute} %{message}",
30
- attribute: attr_name,
30
+ attribute: attr_name.to_s.humanize,
31
31
  message: message
32
32
  })
33
33
  end
@@ -40,7 +40,7 @@ module Rails
40
40
  {
41
41
  kind_to_ng(validator.kind) => default_message || locale.t(:"messages.#{validator.kind}", {
42
42
  model: model.class.name.humanize,
43
- attribute: attribute
43
+ attribute: attribute.to_s.humanize
44
44
  })
45
45
  }
46
46
  end
@@ -1,7 +1,7 @@
1
1
  module Rails
2
2
  module Angulate
3
3
  module Mappers
4
- class FormatValidatorMapper < Base
4
+ class FormatValidatorMapper < BaseMapper
5
5
  def ng_attributes
6
6
  {}.tap do |attrs|
7
7
  if pattern = validator_options[:javascript_format]
@@ -1,7 +1,7 @@
1
1
  module Rails
2
2
  module Angulate
3
3
  module Mappers
4
- class LengthValidatorMapper < Base
4
+ class LengthValidatorMapper < BaseMapper
5
5
  OPTION_MAP = { is: :islength, minimum: :minlength, maximum: :maxlength }.freeze
6
6
 
7
7
  def ng_attributes
@@ -1,7 +1,7 @@
1
1
  module Rails
2
2
  module Angulate
3
3
  module Mappers
4
- class NumericalityValidatorMapper < Base
4
+ class NumericalityValidatorMapper < BaseMapper
5
5
  CHECKS = ActiveModel::Validations::NumericalityValidator::CHECKS
6
6
 
7
7
  def ng_attributes
@@ -1,7 +1,7 @@
1
1
  module Rails
2
2
  module Angulate
3
3
  module Mappers
4
- class ValidatorMapper < Base
4
+ class ValidatorMapper < BaseMapper
5
5
  def ng_attributes
6
6
  {
7
7
  "ng-#{mapped_kind}" => true
@@ -1,4 +1,4 @@
1
- require 'rails/angulate/mappers/base'
1
+ require 'rails/angulate/mappers/base_mapper'
2
2
 
3
3
  module Rails
4
4
  module Angulate
@@ -1,5 +1,5 @@
1
1
  module Rails
2
2
  module Angulate
3
- VERSION = "0.0.5.rc1"
3
+ VERSION = "0.0.5.rc2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-angulate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.rc1
4
+ version: 0.0.5.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stan Bondi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-02 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -99,7 +99,7 @@ files:
99
99
  - lib/rails/angulate/helpers/tags/ng_validation_errors.rb
100
100
  - lib/rails/angulate/helpers/tags/tag_common.rb
101
101
  - lib/rails/angulate/mappers.rb
102
- - lib/rails/angulate/mappers/base.rb
102
+ - lib/rails/angulate/mappers/base_mapper.rb
103
103
  - lib/rails/angulate/mappers/format_validator_mapper.rb
104
104
  - lib/rails/angulate/mappers/length_validator_mapper.rb
105
105
  - lib/rails/angulate/mappers/numericality_validator_mapper.rb