tablesalt 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee4d140357ee3b519a18444aa1169b3120ea0f24343e5388e1d8976ad1470ea8
4
- data.tar.gz: 66294a0e9b57e81d871b4849f8a90500319a1b0d1fc15bb178a717f29c7cc5f0
3
+ metadata.gz: b748decee67357032513760ef56652e9cd510eaae1bb247bbcb19c2978ee133c
4
+ data.tar.gz: c1a25d82211fd442579c0171ae6d0b9c08ad8c64c2901ce974c4a33445c9427c
5
5
  SHA512:
6
- metadata.gz: b3cf41ba51efe02cede8b09e0bcccc22a36ca992ba601a442f84ef7b7a2deeab7bb573c861ee44bc6d52556d8fddcee4937683a218ca823994c015e897c4a972
7
- data.tar.gz: 763b3d9745c88c2f7486334627bc5a5f0c45a015bc7af20c64a7f2e8a8667141cccaf4b950e0d67f81241e6c339ae57562ddb1b0dc205152af98dd2acdb92db9
6
+ metadata.gz: 11c47d79acf5c10bb19dc6f3e9948b56fcdb894fbb46a8b270610b3c50a74a7f62202bd0ef7560898d272160822157fd14eb86fde8fe619b355f462c39191fd9
7
+ data.tar.gz: 51c11940f31b4ae3cf713a2184992ec0f58a2543df4f3a061fc349c6c334d6628e22f998ce92f735db0be5f8b39f717b627da68db0e5e65ef0cef21bed8eb7a9
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Tablesalt
4
4
  # This constant is managed by spicerack
5
- VERSION = "0.12.0"
5
+ VERSION = "0.13.0"
6
6
  end
data/lib/tablesalt.rb CHANGED
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "active_support"
4
- require "active_support/core_ext/class/attribute"
5
4
  require "short_circu_it"
6
5
 
7
6
  require "tablesalt/version"
8
7
 
9
- require "tablesalt/dsl/defaults"
10
8
  require "tablesalt/stringable_object"
11
9
 
12
10
  module Tablesalt; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tablesalt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Minneti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-28 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -49,7 +49,6 @@ files:
49
49
  - LICENSE.txt
50
50
  - README.md
51
51
  - lib/tablesalt.rb
52
- - lib/tablesalt/dsl/defaults.rb
53
52
  - lib/tablesalt/stringable_object.rb
54
53
  - lib/tablesalt/version.rb
55
54
  homepage: https://github.com/Freshly/spicerack/tree/master/tablesalt
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Defaults allow for storing values to use when none are specified by the developer.
4
- module Tablesalt
5
- module Dsl
6
- module Defaults
7
- extend ActiveSupport::Concern
8
-
9
- included do
10
- class_attribute :_defaults, instance_writer: false, default: {}
11
- end
12
-
13
- class_methods do
14
- def inherited(base)
15
- dup = _defaults.dup
16
- base._defaults = dup.each { |k, v| dup[k] = v.dup }
17
- super
18
- end
19
-
20
- private
21
-
22
- def define_default(attribute, static: nil, &block)
23
- _defaults[attribute] = Value.new(static: static, &block)
24
- end
25
- end
26
-
27
- class Value
28
- def initialize(static: nil, &block)
29
- @value = (static.nil? && block_given?) ? block : static
30
- end
31
-
32
- def value
33
- (@value.respond_to?(:call) ? instance_eval(&@value) : @value).dup
34
- end
35
- end
36
- end
37
- end
38
- end