performify 0.3.0 → 0.4.0
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 +4 -4
- data/README.md +1 -1
- data/lib/performify/base.rb +9 -3
- data/lib/performify/version.rb +1 -1
- data/performify.gemspec +0 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a96ab69ab79f8f0b99f818b762c932b86d31ecc6
|
|
4
|
+
data.tar.gz: 58b169f4eccdffbb8caf2fddee1c5b89bb4369d4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a1e944109d8ad0205d7080234a9073031f98af811c6b90aa018564661fd435c75952393c580e10a1881996eef203bbec337e38105199f4e3f1934162a3b2c3a
|
|
7
|
+
data.tar.gz: 82897b5b49b010f89481da7c23dda87f200b22f2e0ad7d63719aeb87ba99584cc10f92f5b697c51595eac21a074a5f4d050e793cab584ba6b065f45a6778b00a
|
data/README.md
CHANGED
|
@@ -243,7 +243,7 @@ end
|
|
|
243
243
|
|
|
244
244
|
## Development
|
|
245
245
|
|
|
246
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/
|
|
246
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/rspec spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
247
247
|
|
|
248
248
|
To install this gem onto your local machine, run `bin/rake install`. To release a new version, update the version number in `version.rb`, and then run `bin/rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
249
249
|
|
data/lib/performify/base.rb
CHANGED
|
@@ -18,9 +18,8 @@ module Performify
|
|
|
18
18
|
|
|
19
19
|
return if args.empty?
|
|
20
20
|
|
|
21
|
-
validate(args)
|
|
22
|
-
|
|
23
|
-
end
|
|
21
|
+
validate(args)
|
|
22
|
+
define_singleton_methods(args)
|
|
24
23
|
|
|
25
24
|
fail!(with_callbacks: true) if errors?
|
|
26
25
|
end
|
|
@@ -75,5 +74,12 @@ module Performify
|
|
|
75
74
|
def fail?
|
|
76
75
|
@result.blank?
|
|
77
76
|
end
|
|
77
|
+
|
|
78
|
+
private def define_singleton_methods(args)
|
|
79
|
+
param_names = schema ? schema.rules.keys : args.keys
|
|
80
|
+
param_names.each do |param_name|
|
|
81
|
+
define_singleton_method(param_name) { args[param_name] }
|
|
82
|
+
end
|
|
83
|
+
end
|
|
78
84
|
end
|
|
79
85
|
end
|
data/lib/performify/version.rb
CHANGED
data/performify.gemspec
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: performify
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergey Tsvetkov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
169
169
|
version: '0'
|
|
170
170
|
requirements: []
|
|
171
171
|
rubyforge_project:
|
|
172
|
-
rubygems_version: 2.
|
|
172
|
+
rubygems_version: 2.6.11
|
|
173
173
|
signing_key:
|
|
174
174
|
specification_version: 4
|
|
175
175
|
summary: Service classes that makes your life easier
|