validate_as_seo_tag 0.0.1 → 0.0.2

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: e16830b7743ae2664959b57ae625beaddcc65048
4
+ data.tar.gz: fe9eb48c344e74a50fbd01609bec99590da42104
5
+ SHA512:
6
+ metadata.gz: 1a873f59a30753254b3d9cee5a6892cdcb7baa9c4a1e1707181a054c61b9fa280e708cac939208485cd28a82b12d4e0c4f6fd62f2beeb3425b541c956dc6707a
7
+ data.tar.gz: 6510566214d9dec8473fa20c20b977ef9bf4bfd21363f66421bb1d1edff8942a0a4fd61afcb022bc542e1921e5abdcb801beae9eb8970bccf74647e62f352e55
@@ -1,6 +1,6 @@
1
1
  module ActiveRecord
2
2
  module Validations
3
- class ValidateAsSeoTag < ActiveModel::EachValidator # :nodoc:
3
+ class ValidateSlugFormat < ActiveModel::EachValidator # :nodoc:
4
4
  def initialize(options)
5
5
  default_options = {
6
6
  message: 'does not appear to be valid SEO-tag',
@@ -35,7 +35,11 @@ module ActiveRecord
35
35
 
36
36
  module ClassMethods
37
37
  def validate_as_seo_tag(*attr_names)
38
- validates_with ValidateAsSeoTag, _merge_attributes(attr_names)
38
+ validates_with ValidateSlugFormat, _merge_attributes(attr_names)
39
+ end
40
+
41
+ def validates_slug_format_of(*attr_names)
42
+ validates_with ValidateSlugFormat, _merge_attributes(attr_names)
39
43
  end
40
44
  end
41
45
  end
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "validate_as_seo_tag"
7
- spec.version = '0.0.1'
7
+ spec.version = '0.0.2'
8
8
  spec.authors = ["Mitrofanov Dmitry"]
9
9
  spec.email = ["mdima@it-guru.biz"]
10
10
  spec.description = %q{Validate SEO-tag format}
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validate_as_seo_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Mitrofanov Dmitry
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-12 00:00:00.000000000 Z
11
+ date: 2014-05-10 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.3'
22
20
  type: :development
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
26
  version: '1.3'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
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
40
  version: '0'
46
41
  description: Validate SEO-tag format
@@ -50,36 +45,35 @@ executables: []
50
45
  extensions: []
51
46
  extra_rdoc_files: []
52
47
  files:
53
- - .gitignore
48
+ - ".gitignore"
54
49
  - Gemfile
55
50
  - LICENSE.txt
56
51
  - README.md
57
52
  - Rakefile
58
- - lib/validate_as_seo_tag.rb
53
+ - lib/validate_slug_format.rb
59
54
  - validate_as_seo_tag.gemspec
60
55
  homepage: ''
61
56
  licenses:
62
57
  - MIT
58
+ metadata: {}
63
59
  post_install_message:
64
60
  rdoc_options: []
65
61
  require_paths:
66
62
  - lib
67
63
  required_ruby_version: !ruby/object:Gem::Requirement
68
- none: false
69
64
  requirements:
70
- - - ! '>='
65
+ - - ">="
71
66
  - !ruby/object:Gem::Version
72
67
  version: '0'
73
68
  required_rubygems_version: !ruby/object:Gem::Requirement
74
- none: false
75
69
  requirements:
76
- - - ! '>='
70
+ - - ">="
77
71
  - !ruby/object:Gem::Version
78
72
  version: '0'
79
73
  requirements: []
80
74
  rubyforge_project:
81
- rubygems_version: 1.8.23
75
+ rubygems_version: 2.2.2
82
76
  signing_key:
83
- specification_version: 3
77
+ specification_version: 4
84
78
  summary: Validate SEO-tag format
85
79
  test_files: []