grand_central 0.6.1 → 0.6.2

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: bdf2cddcf8d8dd60b0ed935c59465212894b34c10bba4fa411668af4a10f1413
4
- data.tar.gz: 6e962588d51ff887e484e29a2d92b58d6c3c591d69cd5812e884e28f712b6dc0
3
+ metadata.gz: bcc6320f0c782e23f544c8f7eb967494cb1cddd23d15aa5986752de8c740324e
4
+ data.tar.gz: e4031d8d41d76dc0d4bc14631f5d42b87b50e6c5fba237f4c8f4bd17ff480828
5
5
  SHA512:
6
- metadata.gz: fb77a7aedb047d02040c990741f70a2f7e6ca717945b6c9ae210ea119ab4af791a8cb79cf623fd12db039546a5b5be5d1a2d1b5de9039900e62f73cd65a9a18e
7
- data.tar.gz: 12fc78c06f8131c8be47a84a9094aabc9c389969589be45fa2b177d92804930e08e06dc2344c2b56b9573f1662143ba28daec48c3ab933257e7877067d6e1e75
6
+ metadata.gz: a363ca8a5ae9806b43fc6b1e3ff0460251b17eeb82a2a13b74a4f8150b06c9bab39d3128feb604e480f74857e94f2a3f4ca20568e4151d62d6c878112a38838e
7
+ data.tar.gz: f0093e033caa63ccdafd0a018027bc97b318b5e2c3e6949dedd43dd1349aaee78c1f702b7f91fe3cd77b374944a827759d78f54e31fdf72ce9ab0c582e7bcd99
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Jamie Gaskins"]
10
10
  spec.email = ["jgaskins@gmail.com"]
11
11
 
12
- spec.summary = %q{State and action management for Opal apps}
12
+ spec.summary = %q{State and action management for Ruby apps}
13
13
  spec.homepage = "https://github.com/clearwater-rb/grand_central"
14
14
 
15
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -30,14 +30,13 @@ module GrandCentral
30
30
  end
31
31
 
32
32
  def update attributes={}
33
- old_attributes = to_h
34
- new_attributes = old_attributes.merge(attributes)
33
+ return self if attributes.all? { |key, value| respond_to?(key) && send(key) == value }
35
34
 
36
- if new_attributes == old_attributes
37
- self
38
- else
39
- self.class.new(new_attributes)
35
+ new_attrs = self.class.attributes.each_with_object({}) do |attr, hash|
36
+ hash[attr] = attributes.fetch(attr) { send(attr) }
40
37
  end
38
+
39
+ self.class.new(new_attrs)
41
40
  end
42
41
 
43
42
  def to_h
@@ -1,3 +1,3 @@
1
1
  module GrandCentral
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grand_central
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Gaskins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-30 00:00:00.000000000 Z
11
+ date: 2018-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,8 +95,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project:
98
- rubygems_version: 2.7.2
98
+ rubygems_version: 2.7.3
99
99
  signing_key:
100
100
  specification_version: 4
101
- summary: State and action management for Opal apps
101
+ summary: State and action management for Ruby apps
102
102
  test_files: []