mobility 0.1.16 → 0.1.17

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: 1bb421026048d4880dc432cee0bbb14f04205b30
4
- data.tar.gz: 1b17af3cadacee16f359d9954c330368426f4042
3
+ metadata.gz: 4b2c85161a42ab2c88e2794d754ce12233267609
4
+ data.tar.gz: cae36c91d8ebcaa6e626a1409b6b28acd2e123d5
5
5
  SHA512:
6
- metadata.gz: e61e6725c7e9da3ca6cf1d52bab83d0db7ce2c44fe88a1dc93c24e5f07541811bd9e610c534d8df8558402ea2c4753d5b058e13e739550e71b1f5f1f7d602947
7
- data.tar.gz: aa490f3b65ea4f0a16709f4e8aa4d4b964892efb20feaf404c405129baaa2618bf62daa5f515638170837a1857ca341c024426ca4f2526f1f92af8e3c46910ee
6
+ metadata.gz: 74dc7a52f90f4949bbe061e34dbcead628fbeba9e04582d687f1db0930b4bcdf19cc69e3e6fcb397a47d6e30f5311dc71cf4254152d544ac77cd6d5770022979
7
+ data.tar.gz: 47b403bd4f85a0401a662eb5ff69233eca34a6965ed8f9d8a0c82480622d6e41abf623f7efed257db8e8b978a28144d7eba56238ef8692c8b6b25665090d23c7
data/CHANGELOG.md CHANGED
@@ -2,10 +2,13 @@
2
2
 
3
3
  ## 0.1
4
4
 
5
+ ### 0.1.17 (June 16, 2017)
6
+ * Fix STI issues ([#43](https://github.com/shioyama/mobility/pull/43))
7
+
5
8
  ### 0.1.16 (May 29, 2017)
6
9
  * Fix deprecation warnings using class_name ([#32](https://github.com/shioyama/mobility/pull/32))
7
10
  * Avoid using respond_to? on relation, to fix ImmutableRelation exception
8
- ([d3e974855f7e772b5df43f665a2251a1982cfff0](https://github.com/shioyama/mobility/commit/d3e974855f7e772b5df43f665a2251a1982cfff0).
11
+ ([d3e974](https://github.com/shioyama/mobility/commit/d3e974855f7e772b5df43f665a2251a1982cfff0)).
9
12
 
10
13
  ### 0.1.15 (May 21, 2017)
11
14
  * Add support for uniqueness validation ([#28](https://github.com/shioyama/mobility/pull/28))
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mobility (0.1.15)
4
+ mobility (0.1.16)
5
5
  i18n (>= 0.6.10, < 0.9)
6
6
  request_store (~> 1.0)
7
7
 
@@ -68,12 +68,12 @@ GEM
68
68
  nokogiri (>= 1.5.9)
69
69
  lumberjack (1.0.12)
70
70
  method_source (0.8.2)
71
- mini_portile2 (2.1.0)
71
+ mini_portile2 (2.2.0)
72
72
  minitest (5.10.2)
73
73
  mysql2 (0.3.21)
74
74
  nenv (0.3.0)
75
- nokogiri (1.7.2)
76
- mini_portile2 (~> 2.1.0)
75
+ nokogiri (1.8.0)
76
+ mini_portile2 (~> 2.2.0)
77
77
  notiffany (0.1.1)
78
78
  nenv (~> 0.1)
79
79
  shellany (~> 0.0)
data/README.md CHANGED
@@ -47,7 +47,7 @@ Installation
47
47
  Add this line to your application's Gemfile:
48
48
 
49
49
  ```ruby
50
- gem 'mobility', '~> 0.1.16'
50
+ gem 'mobility', '~> 0.1.17'
51
51
  ```
52
52
 
53
53
  To translate attributes on a model, include (or extend) `Mobility`, then call
data/lib/mobility.rb CHANGED
@@ -248,7 +248,8 @@ module Mobility
248
248
  end
249
249
 
250
250
  def inherited(subclass)
251
- subclass.instance_variable_set(:@mobility, @mobility)
251
+ subclass.instance_variable_set(:@mobility, @mobility.dup)
252
+ super
252
253
  end
253
254
  end
254
255
 
@@ -45,7 +45,7 @@ module Mobility
45
45
  relation.joins(m.join(t, join_type).
46
46
  on(t[:key].eq(attribute).
47
47
  and(t[:locale].eq(Mobility.locale).
48
- and(t[:translatable_type].eq(name).
48
+ and(t[:translatable_type].eq(base_class.name).
49
49
  and(t[:translatable_id].eq(m[:id]))))).join_sources)
50
50
  end
51
51
  end
@@ -1,3 +1,3 @@
1
1
  module Mobility
2
- VERSION = "0.1.16"
2
+ VERSION = "0.1.17"
3
3
  end
@@ -27,5 +27,10 @@ simple delegator, so any missing method will be delegated to the model class.
27
27
  def << backend_module
28
28
  modules << backend_module
29
29
  end
30
+
31
+ def initialize_dup(other)
32
+ @modules = other.modules.map(&:dup)
33
+ super
34
+ end
30
35
  end
31
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Salzberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-29 00:00:00.000000000 Z
11
+ date: 2017-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: request_store