skn_utils 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +18 -18
- data/README.rdoc +223 -0
- data/Rakefile +1 -0
- data/lib/skn_utils/attribute_helpers.rb +9 -1
- data/lib/skn_utils/generic_bean.rb +1 -0
- data/lib/skn_utils/nested_result_base.rb +6 -1
- data/lib/skn_utils/page_controls.rb +1 -0
- data/lib/skn_utils/result_bean_with_errors.rb +5 -1
- data/lib/skn_utils/version.rb +1 -1
- data/skn_utils.gemspec +7 -1
- metadata +6 -7
- data/LICENSE.txt +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31af39f0868ea4999dc766b6aae69160f4bddd49
|
4
|
+
data.tar.gz: e93e86e18c70fabab120f77f6bc84c6f9d858337
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e02f2ff71734ebfc2ebc213575eef8f15015c8fb879ac7b8222f6a0e21caa1e247daae0041f9d264a5c649de7bf86857734daf6b88341c6e34d3250085e886ef
|
7
|
+
data.tar.gz: a443ea041ec7ab9495f0662082913ffc75bd8c4380c1c6187b13784b09e2f6490a3acc0bbe17d298f90ec44ad20457b63ce456d9f62e56733a89701a8f037884
|
data/LICENSE
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
|
1
|
+
Copyright (c) 2015 James Scott Jr
|
2
2
|
|
3
|
-
|
3
|
+
MIT License
|
4
4
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
of this software and associated documentation files (the
|
7
|
-
in the Software without restriction, including
|
8
|
-
to use, copy, modify, merge, publish,
|
9
|
-
copies of the Software, and to
|
10
|
-
furnished to do so, subject to
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
11
12
|
|
12
|
-
The above copyright notice and this permission notice shall be
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
22
15
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,223 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/skn_utils.svg)](http://badge.fury.io/rb/skn_utils)
|
2
|
+
|
3
|
+
= SknUtils
|
4
|
+
Rails Gem containing a Ruby PORO (Plain Old Ruby Object) that can be instantiated at runtime with an input hash. This library creates an Object with instance variables and associated getters and setters for Dot or Hash notational access to each instance variable. Additional instance variables can be added post-create by 'obj.my_new_var = "some value"', or simply assigning it.
|
5
|
+
|
6
|
+
|
7
|
+
The intent of this component is to be a container of data results, with easy access to its contents with on-demand transformation to hash, xml, or json.
|
8
|
+
|
9
|
+
* If the key's value is also a hash, it too can optionally become an Object.
|
10
|
+
* if the key's value is a Array of Hashes, each element of the Array can optionally become an Object.
|
11
|
+
|
12
|
+
This nesting action is controlled by the value of the options key ':depth'.
|
13
|
+
The key :depth defaults to :multi, an has options of :single, :multi, or :multi_with_arrays
|
14
|
+
|
15
|
+
The ability of the resulting Object to be Marshalled(dump/load) can be preserved by merging configuration options
|
16
|
+
into the input params key ':enable_serialization' set to true. It defaults to false for speed purposes
|
17
|
+
|
18
|
+
|
19
|
+
=== Configuration Options
|
20
|
+
--------------------------------
|
21
|
+
|
22
|
+
:enable_serialization = false -- [ true | false ], for speed, omits creation of attr_accessor
|
23
|
+
:depth = :multi -- [ :single | :multi | :multi_with_arrays ]
|
24
|
+
|
25
|
+
=== Public Components
|
26
|
+
--------------------------------
|
27
|
+
|
28
|
+
Inherit from NestedResultBase or instantiate an pre-built Class:
|
29
|
+
SknUtils::GenericBean # => Serializable, includes attr_accessors, and follows hash values only.
|
30
|
+
SknUtils::PageControls # => Serializable, includes attr_accessors, and follows hash values and arrays of hashes.
|
31
|
+
SknUtils::ResultBean # => Not Serializable, includes attr_accessors, and follows hash values only.
|
32
|
+
SknUtils::ResultsBeanWithErrors # => Same as ResultBean with addition of ActiveModel::Errors object.
|
33
|
+
or Include AttributeHelpers # => Add getter/setters, and hash notation access to instance vars of any object.
|
34
|
+
|
35
|
+
|
36
|
+
== Basic features include:
|
37
|
+
```ruby
|
38
|
+
- provides the hash or dot notation methods of accessing values from object created; i.e
|
39
|
+
'obj = ResultBean.new({value1: "some value", value2: {one: 1, two: "two"}})
|
40
|
+
'x = obj.value1' or 'x = obj.value2.one'
|
41
|
+
'x = obj["value1"]'
|
42
|
+
'x = obj[:value1]'
|
43
|
+
|
44
|
+
- enables serialization by avoiding the use of ''singleton_class'' methods which breaks Serializers:
|
45
|
+
Serializer supports xml, json, hash, and standard Marshall''ing
|
46
|
+
|
47
|
+
person = PageControls.new({name: "Bob"})
|
48
|
+
person.attributes # => {"name"=>"Bob"}
|
49
|
+
person.serializable_hash # => {"name"=>"Bob"}
|
50
|
+
person.to_hash # => {"name"=>"Bob"}
|
51
|
+
person.to_json # => "{\"name\":\"Bob\"}"
|
52
|
+
person.to_xml # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<page-controls>\n <name>Bob</name>\n</page-controls>\n"
|
53
|
+
dmp = Marshal.dump(person) # => "\x04\bo:\x1ASknUtils::PageControls\x06:\n@nameI\"\bBob\x06:\x06ET"
|
54
|
+
person = Marshal.load(dmp) # => #<SknUtils::PageControls:0x007faede906d40 @name="Bob">
|
55
|
+
|
56
|
+
***GenericBean designed to automatically handle the setup for serialization and multi level without arrays
|
57
|
+
|
58
|
+
- post create additions:
|
59
|
+
'obj = ResultBean.new({value1: "some value", value2: {one: 1, two: "two"}})
|
60
|
+
'x = obj.one' --causes NoMethodError
|
61
|
+
'x = obj.one = 'some other value' --creates a new instance value with accessors
|
62
|
+
'x = obj.one = {key1: 1, two: "two"}' --creates a new ***bean as the value of obj.one
|
63
|
+
'y = obj.one.two' --returns "two"
|
64
|
+
'y = obj.one[:two] --returns "two"
|
65
|
+
'y = obj.one['two'] --returns "two"
|
66
|
+
|
67
|
+
- supports predicates <attr>? and clear_<attr>? method patterns:
|
68
|
+
'obj = PageControls.new({name: "Something", phone: "2609998888"})'
|
69
|
+
'obj.name?' # => true true or false, like obj.name.present?
|
70
|
+
'obj.clear_name' # => nil sets :name to nil
|
71
|
+
```
|
72
|
+
|
73
|
+
The combination of this NestedResultBase(dot notation class) and AttributeHelpers(hash notation module), produces this effect given the same params hash:
|
74
|
+
|
75
|
+
SknUtils::ResultBean.new(params) Basic dot notation: effect of :depth
|
76
|
+
---------------------------------------------------- -----------------------------------------------------------------
|
77
|
+
|
78
|
+
(DOES NOT FOLLOW Values) :depth => :single
|
79
|
+
```ruby
|
80
|
+
* params = {one: 1, drb.one = 1
|
81
|
+
two: { one: 1, drb.two = {one: 1, two: 'two}
|
82
|
+
two: "two" drb.two.two = NoMethodError
|
83
|
+
},
|
84
|
+
three: [ {one: 'one', two: 2}, drb.three = [{one: 'one', two: 2},{three: 'three', four: 4}]
|
85
|
+
{three: 'three', four: 4} drb.three[1] = {three: 'three', four: 4}
|
86
|
+
] drb.three[1].four = NoMethodError
|
87
|
+
}
|
88
|
+
```
|
89
|
+
|
90
|
+
(Follow VALUES that are Hashes only.) :depth => :multi
|
91
|
+
```ruby
|
92
|
+
* params = {one: 1, drb.one = 1
|
93
|
+
two: { one: 1, drb.two = <SknUtils::ResultBean>
|
94
|
+
two: "two" drb.two.two = 'two'
|
95
|
+
},
|
96
|
+
three: [ {one: 'one', two: 2}, drb.three = [{one: 'one', two: 2},{three: 'three', four: 4}]
|
97
|
+
{three: 'three', four: 4} drb.three[1] = {three: 'three', four: 4}
|
98
|
+
] drb.three[1].four = NoMethodError
|
99
|
+
}
|
100
|
+
```
|
101
|
+
|
102
|
+
(Follow VALUES that are Hashes and/or Arrays of Hashes) :depth => :multi_with_arrays
|
103
|
+
```ruby
|
104
|
+
* params = {one: 1, drb.one = 1
|
105
|
+
two: { one: 1, drb.two = <SknUtils::ResultBean>
|
106
|
+
two: "two" drb.two.two = 'two'
|
107
|
+
},
|
108
|
+
three: [ {one: 'one', two: 2}, drb.three = [<SknUtils::ResultBean>,<SknUtils::ResultBean>]
|
109
|
+
{three: 'three', four: 4} drb.three[1] = <SknUtils::ResultBean>
|
110
|
+
] drb.three[1].four = 4
|
111
|
+
}
|
112
|
+
|
113
|
+
```
|
114
|
+
= Usage:
|
115
|
+
|
116
|
+
(DOES NOT FOLLOW Values)
|
117
|
+
```ruby
|
118
|
+
class SmallPackage < SknUtils::NestedResultBase
|
119
|
+
def initialize(params={})
|
120
|
+
super( params.merge({depth: :single}) ) # override default of :multi level
|
121
|
+
end
|
122
|
+
end
|
123
|
+
```
|
124
|
+
|
125
|
+
(Follow VALUES that are Hashes only.)
|
126
|
+
```ruby
|
127
|
+
class ResultBean < SknUtils::NestedResultBase
|
128
|
+
# defaults to :multi level
|
129
|
+
end
|
130
|
+
|
131
|
+
-- or --
|
132
|
+
|
133
|
+
class ResultBean < SknUtils::NestedResultBase
|
134
|
+
def initialize(params={})
|
135
|
+
# your other init stuff here
|
136
|
+
super(params) # default taken
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
-- or --
|
141
|
+
|
142
|
+
class ResultBean < SknUtils::NestedResultBase
|
143
|
+
def initialize(params={})
|
144
|
+
# your other init stuff here
|
145
|
+
super( params.merge({depth: :multi}) ) # Specified
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
** - or -- enable serialization and default to multi
|
150
|
+
class GenericBean < SknUtils::NestedResultBase
|
151
|
+
def initialize(params={})
|
152
|
+
super( params.merge({enable_serialization: true}) ) # Specified with Serialization Enabled
|
153
|
+
end
|
154
|
+
end
|
155
|
+
```
|
156
|
+
|
157
|
+
(Follow VALUES that are Hashes and/or Arrays of Hashes, and enable Serializers)
|
158
|
+
```ruby
|
159
|
+
class PageControl < SknUtils::NestedResultBase
|
160
|
+
def initialize(params={})
|
161
|
+
super( params.merge({depth: :multi_with_arrays, enable_serialization: true}) ) # override defaults
|
162
|
+
end
|
163
|
+
end
|
164
|
+
```
|
165
|
+
|
166
|
+
|
167
|
+
NOTE: Cannot be Marshalled/Serialized unless input params.merge({enable_serialization: true}) -- default is false
|
168
|
+
Use GenericBean or PageControls if serialization is needed, they initialize with this value true.
|
169
|
+
|
170
|
+
== Installation
|
171
|
+
----------------
|
172
|
+
runtime prereqs: gem 'active_model', '~> 3.0'
|
173
|
+
|
174
|
+
Add this line to your application's Gemfile:
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
gem 'skn_utils'
|
178
|
+
```
|
179
|
+
|
180
|
+
And then execute:
|
181
|
+
|
182
|
+
$ bundle
|
183
|
+
|
184
|
+
Or install it yourself as:
|
185
|
+
|
186
|
+
$ gem install skn_utils
|
187
|
+
|
188
|
+
== Build
|
189
|
+
|
190
|
+
1. $ git clone git@github.com:skoona/skn_utils.git
|
191
|
+
2. $ cd skn_utils
|
192
|
+
3. $ gem install bundler
|
193
|
+
4. $ bundle install
|
194
|
+
5. $ bundle exec rspec
|
195
|
+
6. $ gem build skn_utils.gemspec
|
196
|
+
7. $ gem install skn_utils
|
197
|
+
* Done
|
198
|
+
|
199
|
+
== Console Workout
|
200
|
+
|
201
|
+
Start with building gem first.
|
202
|
+
```bash
|
203
|
+
$ cd skn_utils
|
204
|
+
$ bundle exec pry
|
205
|
+
[1] pry(main)> require 'active_model'
|
206
|
+
[2] pry(main)> require 'skn_utils'
|
207
|
+
[3] pry(main)> rb = SknUtils::ResultBean.new({sample: [{one: "one", two: "two"},{one: 1, two: 2}] })
|
208
|
+
[4] pry(main)> pg = SknUtils::PageControls.new({sample: [{one: "one", two: "two"},{one: 1, two: 2}] })
|
209
|
+
[5] pry(main)> pg.sample.first.one # Tip :multi_with_arrays
|
210
|
+
[6] pry(main)> rb.sample.first.one # Tip :multi without arrays you will get a NoMethodError
|
211
|
+
[7] pry(main)> rb.sample.first[:one]
|
212
|
+
|
213
|
+
[n] pry(main)> exit
|
214
|
+
* Done
|
215
|
+
```
|
216
|
+
|
217
|
+
== Contributing
|
218
|
+
|
219
|
+
1. Fork it
|
220
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
221
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
222
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
223
|
+
5. Create a new Pull Request
|
data/Rakefile
CHANGED
@@ -51,16 +51,18 @@ module SknUtils
|
|
51
51
|
end
|
52
52
|
|
53
53
|
# An alternative mechanism for property access.
|
54
|
-
#
|
54
|
+
# Hash notation
|
55
55
|
def [](attr)
|
56
56
|
send("#{attr}")
|
57
57
|
end
|
58
58
|
|
59
|
+
# Hash notation
|
59
60
|
def []=(attr, value)
|
60
61
|
send("#{attr}=", value)
|
61
62
|
end
|
62
63
|
|
63
64
|
# determines if this is one of our objects
|
65
|
+
#:nodoc:
|
64
66
|
def attribute_helper_object
|
65
67
|
true
|
66
68
|
end
|
@@ -70,6 +72,7 @@ module SknUtils
|
|
70
72
|
##
|
71
73
|
private
|
72
74
|
|
75
|
+
#:nodoc:
|
73
76
|
def attribute?(attr)
|
74
77
|
if attr.is_a? Symbol
|
75
78
|
send(attr).present?
|
@@ -78,6 +81,7 @@ module SknUtils
|
|
78
81
|
end
|
79
82
|
end
|
80
83
|
|
84
|
+
#:nodoc:
|
81
85
|
def clear_attribute(attr)
|
82
86
|
if attr.is_a? Symbol
|
83
87
|
instance_variable_set("@#{attr.to_s}", nil)
|
@@ -88,14 +92,17 @@ module SknUtils
|
|
88
92
|
|
89
93
|
# Determines operable Options in effect for this instance
|
90
94
|
# see NestedResultBase
|
95
|
+
#:nodoc:
|
91
96
|
def serial_required?
|
92
97
|
respond_to? :serialization_required? and serialization_required?
|
93
98
|
end
|
94
99
|
# see NestedResultBase
|
100
|
+
#:nodoc:
|
95
101
|
def multi_required?
|
96
102
|
respond_to? :depth_level and depth_level != :single
|
97
103
|
end
|
98
104
|
# see NestedResultBase
|
105
|
+
#:nodoc:
|
99
106
|
def multi_with_arrays_required?
|
100
107
|
respond_to? :depth_level and depth_level == :multi_with_arrays
|
101
108
|
end
|
@@ -111,6 +118,7 @@ module SknUtils
|
|
111
118
|
# Using any form of singleton_class() will break the generic bean, which requires Serialization.
|
112
119
|
# However not adding attr_accessors may impact performance, as method_missing must fill-in for read/writes
|
113
120
|
##
|
121
|
+
#:nodoc:
|
114
122
|
def method_missing(method, *args, &block)
|
115
123
|
# puts("method_missing/method/class/*args=#{method}/#{method.class.name}/#{args}")
|
116
124
|
if method.to_s.start_with?('clear_') and instance_variable_defined?("@#{method.to_s[6..-1]}")
|
@@ -156,6 +156,7 @@ module SknUtils
|
|
156
156
|
# :depth defaults to :multi
|
157
157
|
# :enable_serialization controls the use of singleton_method() to preserve the ability to Marshal
|
158
158
|
# :enable_serialization defaults to false
|
159
|
+
#:nodoc:
|
159
160
|
def initialize(params={})
|
160
161
|
@skn_enabled_depth = params.delete(:depth) {|not_found| :multi }
|
161
162
|
@skn_enable_serialization = params.delete(:enable_serialization) {|not_found| false }
|
@@ -169,6 +170,7 @@ module SknUtils
|
|
169
170
|
end
|
170
171
|
end
|
171
172
|
|
173
|
+
#:nodoc:
|
172
174
|
def single_level_initializer(params={}) # Single Level Initializer -- ignore value eql hash
|
173
175
|
params.each do |k,v|
|
174
176
|
key = clean_key(k)
|
@@ -177,6 +179,7 @@ module SknUtils
|
|
177
179
|
end
|
178
180
|
end
|
179
181
|
|
182
|
+
#:nodoc:
|
180
183
|
def multi_level_initializer(params={}) # Multi Level Initializer -- value eql hash then interate
|
181
184
|
params.each do |k,v|
|
182
185
|
key = clean_key(k)
|
@@ -189,6 +192,7 @@ module SknUtils
|
|
189
192
|
end
|
190
193
|
end
|
191
194
|
|
195
|
+
#:nodoc:
|
192
196
|
def multi_level_incl_arrays_initializer(params={}) # Multi Level Initializer including Arrays of Hashes
|
193
197
|
params.each do |k,v|
|
194
198
|
key = clean_key(k)
|
@@ -208,12 +212,13 @@ module SknUtils
|
|
208
212
|
@skn_enable_serialization
|
209
213
|
end
|
210
214
|
|
211
|
-
# enablement for latter additions
|
215
|
+
# enablement for latter additions
|
212
216
|
def depth_level
|
213
217
|
@skn_enabled_depth
|
214
218
|
end
|
215
219
|
|
216
220
|
# Some keys have chars not suitable for symbol keys
|
221
|
+
#:nodoc:
|
217
222
|
def clean_key(original)
|
218
223
|
formatted_key = original.to_s
|
219
224
|
if /^[#|@|:]/.match(formatted_key) # filter out (@xsi) from '@xsi:type' keys
|
@@ -22,20 +22,24 @@ module SknUtils
|
|
22
22
|
|
23
23
|
attr_reader :errors
|
24
24
|
|
25
|
+
#:nodoc:
|
25
26
|
def initialize(params={})
|
26
27
|
@errors = params.delete :errors
|
27
28
|
@errors = ActiveModel::Errors.new(self) unless @errors.present?
|
28
29
|
super(params)
|
29
30
|
end
|
30
|
-
|
31
|
+
|
32
|
+
#:nodoc:
|
31
33
|
def read_attribute_for_validation(attr)
|
32
34
|
send(attr)
|
33
35
|
end
|
34
36
|
|
37
|
+
#:nodoc:
|
35
38
|
def self.human_attribute_name(attr, options = {})
|
36
39
|
attr
|
37
40
|
end
|
38
41
|
|
42
|
+
#:nodoc:
|
39
43
|
def self.lookup_ancestors
|
40
44
|
[self]
|
41
45
|
end
|
data/lib/skn_utils/version.rb
CHANGED
data/skn_utils.gemspec
CHANGED
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = SknUtils::VERSION
|
9
9
|
spec.author = 'James Scott Jr'
|
10
10
|
spec.email = 'skoona@gmail.com'
|
11
|
+
spec.date = %q{2015-04-06}
|
11
12
|
spec.summary = <<EOF
|
12
13
|
Ruby convenience utilities, the first being a ResultBean.
|
13
14
|
|
@@ -52,5 +53,10 @@ EOF
|
|
52
53
|
spec.add_development_dependency "rake", ">= 0"
|
53
54
|
spec.add_development_dependency "rspec", '~> 3.0'
|
54
55
|
spec.add_development_dependency "pry", ">= 0"
|
55
|
-
|
56
|
+
|
57
|
+
## Make sure you can build the gem on older versions of RubyGems too:
|
58
|
+
spec.rubygems_version = "1.6.2"
|
59
|
+
spec.required_rubygems_version = Gem::Requirement.new(">= 0") if spec.respond_to? :required_rubygems_version=
|
60
|
+
spec.required_ruby_version = '>= 2.0.0'
|
61
|
+
spec.specification_version = 3 if spec.respond_to? :specification_version
|
56
62
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skn_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Scott Jr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -99,8 +99,8 @@ files:
|
|
99
99
|
- ".rspec"
|
100
100
|
- Gemfile
|
101
101
|
- LICENSE
|
102
|
-
- LICENSE.txt
|
103
102
|
- README.md
|
103
|
+
- README.rdoc
|
104
104
|
- Rakefile
|
105
105
|
- lib/skn_utils.rb
|
106
106
|
- lib/skn_utils/attribute_helpers.rb
|
@@ -122,8 +122,7 @@ homepage: https://github.com/skoona/skn_utils
|
|
122
122
|
licenses:
|
123
123
|
- MIT
|
124
124
|
metadata: {}
|
125
|
-
post_install_message:
|
126
|
-
be added!
|
125
|
+
post_install_message:
|
127
126
|
rdoc_options: []
|
128
127
|
require_paths:
|
129
128
|
- lib
|
@@ -131,7 +130,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
130
|
requirements:
|
132
131
|
- - ">="
|
133
132
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
133
|
+
version: 2.0.0
|
135
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
135
|
requirements:
|
137
136
|
- - ">="
|
@@ -141,7 +140,7 @@ requirements: []
|
|
141
140
|
rubyforge_project:
|
142
141
|
rubygems_version: 2.4.6
|
143
142
|
signing_key:
|
144
|
-
specification_version:
|
143
|
+
specification_version: 3
|
145
144
|
summary: Ruby convenience utilities, the first being a ResultBean. ResultBean is
|
146
145
|
a PORO (Plain Old Ruby Object) which inherits from NestedResultBean class (inlcuded).
|
147
146
|
This class is intantiated via a hash at Ruby/Rails Runtime, allows access to vars
|
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2015 James Scott Jr
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|