hexx-validators 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 +4 -4
- data/.gitignore +9 -0
- data/.travis.yml +5 -2
- data/Gemfile +4 -0
- data/Rakefile +1 -1
- data/hexx-validators.gemspec +17 -16
- data/lib/hexx-validators.rb +7 -4
- data/lib/hexx/validators.rb +3 -1
- data/lib/hexx/validators/generator.rb +3 -3
- data/lib/hexx/validators/version.rb +2 -1
- data/spec/spec_helper.rb +1 -6
- metadata +28 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e6072a2fd084ab76c6effcebf02b01ef9161b47
|
4
|
+
data.tar.gz: 71dcb75f1f2837047710c1f76438fb9da5963800
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 656d117c28bd1bda81d627d4cfb808745c190b7b4a4e72e5801b32497e30d4ae6c09050f051fcc31c6362a52def943ba38b406fba29101278dbc63de0ec51a1d
|
7
|
+
data.tar.gz: 34a4d675e0fdd88612d4cb80873ef8e7a14c8cc8ecd9e8dd8423a0e6d1a6121e639a93f4e968959a4e9cba033c7dfdfc4cf6054e964403560357e1a2a487a28d
|
data/.gitignore
ADDED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/hexx-validators.gemspec
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
$:.push File.expand_path("../lib", __FILE__)
|
2
2
|
require "hexx/validators/version"
|
3
3
|
|
4
|
-
Gem::Specification.new do |
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
|
6
|
+
gem.name = "hexx-validators"
|
7
|
+
gem.version = Hexx::Validators::VERSION.dup
|
8
|
+
gem.author = "Andrew Kozin"
|
9
|
+
gem.email = "andrew.kozin@gmail.com"
|
10
|
+
gem.homepage = "https://github.com/nepalez/hexx"
|
11
|
+
gem.summary = "Scaffolder for custom validators."
|
12
|
+
gem.description = "Thor-based generator of an ActiveModel validators" \
|
12
13
|
"and its unit test templates."
|
13
|
-
|
14
|
+
gem.license = "MIT"
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
gem.require_paths = ["lib"]
|
17
|
+
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
18
|
+
gem.test_files = Dir["spec/**/*.rb"]
|
19
|
+
gem.extra_rdoc_files = Dir["README.md", "LICENSE"]
|
19
20
|
|
20
|
-
|
21
|
-
|
21
|
+
gem.required_ruby_version = "~> 2.0"
|
22
|
+
gem.add_runtime_dependency "hexx-cli", "~> 0.0"
|
23
|
+
gem.add_development_dependency "hexx-rspec", "~> 0.2", ">= 0.2.2"
|
22
24
|
|
23
|
-
s.add_runtime_dependency "hexx", "~> 8.0"
|
24
25
|
end
|
data/lib/hexx-validators.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
require "hexx"
|
2
|
+
require "hexx-cli"
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
# Shared namespace for the Hexx-based gems.
|
5
|
+
module Hexx
|
6
|
+
|
7
|
+
require_relative "hexx/validators"
|
8
|
+
|
9
|
+
end # module Hexx
|
data/lib/hexx/validators.rb
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
# Shared namespace for the Hexx-based gems.
|
4
3
|
module Hexx
|
5
4
|
|
6
5
|
# Namespace for content of the 'hexx-validators'.
|
7
6
|
module Validators
|
8
7
|
|
8
|
+
require_relative "validators/version"
|
9
|
+
require_relative "validators/generator"
|
10
|
+
|
9
11
|
end # module Validators
|
10
12
|
|
11
13
|
end # module Hexx
|
@@ -9,7 +9,7 @@ module Hexx
|
|
9
9
|
# * scope class definition in `app/validators`;
|
10
10
|
# * scope specification in `spec/tests/validators`.
|
11
11
|
#
|
12
|
-
class Generator < Hexx::
|
12
|
+
class Generator < Hexx::CLI::Base
|
13
13
|
|
14
14
|
# @!scope class
|
15
15
|
# @!method start(arguments)
|
@@ -68,11 +68,11 @@ module Hexx
|
|
68
68
|
private
|
69
69
|
|
70
70
|
def project
|
71
|
-
@project ||= Hexx::Name.new ::File.basename(destination_root)
|
71
|
+
@project ||= Hexx::CLI::Name.new ::File.basename(destination_root)
|
72
72
|
end
|
73
73
|
|
74
74
|
def validator
|
75
|
-
@validator ||= Hexx::Name.new "validators/#{ name }"
|
75
|
+
@validator ||= Hexx::CLI::Name.new "validators/#{ name }"
|
76
76
|
end
|
77
77
|
|
78
78
|
def keys
|
data/spec/spec_helper.rb
CHANGED
@@ -4,12 +4,7 @@
|
|
4
4
|
require "hexx-suit"
|
5
5
|
|
6
6
|
# Loads runtime metrics in the current scope
|
7
|
-
Hexx::Suit.load_metrics_for(self)
|
8
|
-
|
9
|
-
# Loads the RSpec support files.
|
10
|
-
Dir.chdir File.expand_path("..", __FILE__) do
|
11
|
-
Dir["./support/config/*.rb"].each { |file| require file }
|
12
|
-
end
|
7
|
+
Hexx::Suit.load_metrics_for(self)
|
13
8
|
|
14
9
|
# Loads the code of the module.
|
15
10
|
require "hexx-validators"
|
metadata
CHANGED
@@ -1,29 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hexx-validators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: hexx
|
14
|
+
name: hexx-cli
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.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
|
-
version: '
|
26
|
+
version: '0.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: hexx-rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.2'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 0.2.2
|
37
|
+
type: :development
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.2'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.2.2
|
27
47
|
description: Thor-based generator of an ActiveModel validatorsand its unit test templates.
|
28
48
|
email: andrew.kozin@gmail.com
|
29
49
|
executables: []
|
@@ -31,9 +51,9 @@ extensions: []
|
|
31
51
|
extra_rdoc_files:
|
32
52
|
- README.md
|
33
53
|
- LICENSE
|
34
|
-
- config/metrics/STYLEGUIDE
|
35
54
|
files:
|
36
55
|
- ".coveralls.yml"
|
56
|
+
- ".gitignore"
|
37
57
|
- ".metrics"
|
38
58
|
- ".rspec"
|
39
59
|
- ".rubocop.yml"
|
@@ -79,7 +99,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
79
99
|
requirements:
|
80
100
|
- - "~>"
|
81
101
|
- !ruby/object:Gem::Version
|
82
|
-
version: '2.
|
102
|
+
version: '2.0'
|
83
103
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
104
|
requirements:
|
85
105
|
- - ">="
|
@@ -87,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
107
|
version: '0'
|
88
108
|
requirements: []
|
89
109
|
rubyforge_project:
|
90
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.4.6
|
91
111
|
signing_key:
|
92
112
|
specification_version: 4
|
93
113
|
summary: Scaffolder for custom validators.
|