surrounded-rails 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: ecd54d50a5748dbadce5edd7d08073599d52066f
4
- data.tar.gz: f61de59c76cd518dd78a6eddf4d22358a019e971
3
+ metadata.gz: 3b0b7319d26b0fee975099397aa9949875e41aa5
4
+ data.tar.gz: 76c653cf97ddbabaf7fdfdb5c35a866719741511
5
5
  SHA512:
6
- metadata.gz: c4e949580313d7d66087895128709157c63c6702c5908d2fa7e201e5ec9215e557b9d98872c11ced440bc84ea97dc5e50c3f82b2dae7f9331663295d115055f3
7
- data.tar.gz: 2f46103c8d03a3394cba54c14254ee704465c37fc3fa617ab393c74677f4d4fc7fa9155243d25e6da1b61993d1978dcc25f327c654541620170a2f4a4d77589d
6
+ metadata.gz: b0cb372ffa98fa18f99165f42b4c5772eec3f6629598543c89ac9cc6d1a80fffd1fc5aa888c103980f535bfae6be6e8fbd879fc11ab250a6ae61a95910ca17c6
7
+ data.tar.gz: 6083c0385be798549a658b4ecfa825f5e4f6de4a49cbdffe3a95c6df02b5f4f5801b9e6295cee14d17c1fa9d1126a0df69c630dd4263cd4cd4bfb1e29fa407b5
@@ -1,5 +1,5 @@
1
1
  module Surrounded
2
2
  module Rails
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -6,18 +6,15 @@ module Surrounded
6
6
  initializer 'surrounded.active_record' do |app|
7
7
  ActiveRecord::Base.class_eval {
8
8
  include Surrounded
9
- # This relies on a private method (present in Rails 3 and 4)
10
- # because there is no earlier hook to set this variable.
9
+ # There is no earlier hook to set this variable.
11
10
  # The after_initialize callback occurs to late because
12
11
  # the initialize method has a procedure which calls
13
12
  # respond_to? and Surrounded adds respond_to_missing?
14
13
  # to get information from the context (which is the first
15
14
  # item in the @__surroundings__ collection).
16
- def init_internals_with_surrounded
17
- Surrounded.create_surroundings(self)
18
- init_internals_without_surrounded
15
+ def surroundings
16
+ @__surroundings__ ||= []
19
17
  end
20
- alias_method_chain :init_internals, :surrounded
21
18
  }
22
19
  end
23
20
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surrounded-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Jim Gay'"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-24 00:00:00.000000000 Z
11
+ date: 2014-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: surrounded