acfs 1.1.1 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c817db357dd15f037cfc22b5259d24543787d0bb
4
- data.tar.gz: 8d05571a8bdb9ae33e91045c7f6720a5449e9c71
2
+ SHA256:
3
+ metadata.gz: 3c18e797eac0b3abed6b8e813fe02868e26b75ae6a83067502adcc4b4b4176cf
4
+ data.tar.gz: a3825baa81a2d24a925a820968580bd2006c3e64500de45feec106b17090e325
5
5
  SHA512:
6
- metadata.gz: 840955a85653d562f89d5ad95ed38eca94531dcb7215aa74d340036c13753295d14d290aab2e4ed9232e4428dd6ce25a3b02706fee455694298d243950a83f3c
7
- data.tar.gz: aaf42e7aae1d406eb64c92854e753edd68c21cdcb1b77f14cd2694574b56fbb4047daae0c16b30d7f1bad926df3a250c828221868c83645e63d0bb8c746d45b3
6
+ metadata.gz: ce0d4f99f72aaad7ff0242026c5fe0efef7442f7dd44f7b44b1bb7e9947115cc8049d24c1977b418140155f66091d070f8c3a983164047f105d4b5a4995a9e2e
7
+ data.tar.gz: 58054596b40e2453e1790b3c74c56450b5a0d020bf7ad5d10fe61da68d1e791872e79fa0fa2990d713cf05e9da7055fb700437df5e2063530170ad26d9d210f3
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.0
4
+
5
+ * Add Rails 5.2 compatibility
6
+
3
7
  ## 1.1.1
4
8
 
5
9
  * `each_item`: Pass collection to provided block (#40)
@@ -47,7 +47,7 @@ class Acfs::Resource
47
47
  # Attributes and their values.
48
48
  #
49
49
  def attributes
50
- @attributes ||= HashWithIndifferentAccess.new
50
+ @_attrs ||= HashWithIndifferentAccess.new
51
51
  end
52
52
 
53
53
  # @api public
@@ -8,26 +8,14 @@ class Acfs::Resource
8
8
 
9
9
  # @api private
10
10
  #
11
- # Resets all changes. Does not touch previous changes.
12
- #
13
11
  def reset_changes
14
- changed_attributes.clear
15
- end
16
-
17
- # @api private
18
- #
19
- # Save current changes as previous changes and reset
20
- # current one.
21
- #
22
- def swap_changes
23
- @previously_changed = changes
24
- reset_changes
12
+ clear_changes_information
25
13
  end
26
14
 
27
15
  # @api private
28
16
  #
29
17
  def save!(*)
30
- super.tap {|_| swap_changes }
18
+ super.tap {|_| changes_applied }
31
19
  end
32
20
 
33
21
  # @api private
@@ -40,7 +28,7 @@ class Acfs::Resource
40
28
  # @api private
41
29
  #
42
30
  def write_raw_attribute(name, value, opts = {})
43
- attribute_will_change! name if opts[:change].nil? || opts[:change]
31
+ attribute_will_change!(name) if opts[:change].nil? || opts[:change]
44
32
  super
45
33
  end
46
34
  end
@@ -1,8 +1,8 @@
1
1
  module Acfs
2
2
  module VERSION
3
3
  MAJOR = 1
4
- MINOR = 1
5
- PATCH = 1
4
+ MINOR = 2
5
+ PATCH = 0
6
6
  STAGE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-15 00:00:00.000000000 Z
11
+ date: 2018-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  version: '0'
229
229
  requirements: []
230
230
  rubyforge_project:
231
- rubygems_version: 2.5.2
231
+ rubygems_version: 2.7.3
232
232
  signing_key:
233
233
  specification_version: 4
234
234
  summary: An abstract API base client for service oriented application.