mobility 0.3.1 → 0.3.2

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
2
  SHA1:
3
- metadata.gz: 7758652b17c028026785aab433d317fa8508b3b1
4
- data.tar.gz: 359c5dd578fe9f7d2f1cb3aef187aacbf3a12246
3
+ metadata.gz: c42bb66ac64ed65434f7550515f60ab7907001d6
4
+ data.tar.gz: 8a977f61b918d4ff6f0f23f6accb810b15c4d3d5
5
5
  SHA512:
6
- metadata.gz: 42dc9e922f1da3baccad99b8acaff68b7ff7f69623b700ba71b698337c2d21dd78ec53b07d533d7c3cfb732d4f44b999506e31103ab2027e591146ddb65556be
7
- data.tar.gz: ce8545687458395b0817ef6f478262664478afcc6a3b9d22441d1eae61268f8d705deacef2ba30f01e2573bafc688f4d51d813cf62bfe444bf5bce3cfb93c9c7
6
+ metadata.gz: 3974c3e07c18c765342863943d098eed06ff944ff8339029bf3e24c27d81c0462688798706e771595a83ebc7fc36c99f156f65de35d27a68aab9bfe56e87103a
7
+ data.tar.gz: 2105d1889d4c54dafdcf41f98c2a76ee7e09773df1166caa86d31b7e320495a7e080757a9c8ec061472d341b86a35bb6059f8f981a6efe787fc7c5d39d388921
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## 0.3
4
4
 
5
+ ### 0.3.2 (December 1, 2017)
6
+ * Fix issue with querying on translated attributes with Sequel Table backend ([#121](https://github.com/shioyama/mobility/pull/121))
7
+
5
8
  ### 0.3.1 (December 1, 2017)
6
9
  * Disable AR::Dirty method overrides for AR >= 5.2 (and < 5.1 for `has_attribute`) ([#120](https://github.com/shioyama/mobility/pull/120))
7
10
 
data/Gemfile CHANGED
@@ -10,8 +10,8 @@ group :development, :test do
10
10
  elsif ENV['RAILS_VERSION'] == '4.2'
11
11
  gem 'activerecord', '>= 4.2.6', '< 5.0'
12
12
  elsif ENV['RAILS_VERSION'] == '5.2'
13
- gem 'activerecord', '>= 5.2.0.beta1'
14
- gem 'railties', '>= 5.2.0.beta1'
13
+ gem 'activerecord', '>= 5.2.0.beta1', '< 5.3'
14
+ gem 'railties', '>= 5.2.0.beta1', '< 5.3'
15
15
  else
16
16
  gem 'activerecord', '>= 5.1', '< 5.2'
17
17
  end
@@ -19,8 +19,8 @@ group :development, :test do
19
19
  elsif ENV['ORM'] == 'sequel'
20
20
  if ENV['SEQUEL_VERSION'] == '4.41'
21
21
  gem 'sequel', '>= 4.41.0', '< 4.46.0'
22
- elsif ENV['SEQUEL_VERSION'] == 'latest'
23
- gem 'sequel', '>= 5.0.0'
22
+ elsif ENV['SEQUEL_VERSION'] == '5.0'
23
+ gem 'sequel', '>= 5.0.0', '< 6.0.0'
24
24
  else
25
25
  gem 'sequel', '>= 4.46.0', '< 5.0'
26
26
  end
@@ -1,51 +1,20 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mobility (0.3.0)
4
+ mobility (0.3.1)
5
5
  i18n (>= 0.6.10, < 0.10)
6
6
  request_store (~> 1.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionpack (5.1.4)
12
- actionview (= 5.1.4)
13
- activesupport (= 5.1.4)
14
- rack (~> 2.0)
15
- rack-test (>= 0.6.3)
16
- rails-dom-testing (~> 2.0)
17
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
18
- actionview (5.1.4)
19
- activesupport (= 5.1.4)
20
- builder (~> 3.1)
21
- erubi (~> 1.4)
22
- rails-dom-testing (~> 2.0)
23
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
24
- activemodel (5.1.4)
25
- activesupport (= 5.1.4)
26
- activerecord (5.1.4)
27
- activemodel (= 5.1.4)
28
- activesupport (= 5.1.4)
29
- arel (~> 8.0)
30
- activesupport (5.1.4)
31
- concurrent-ruby (~> 1.0, >= 1.0.2)
32
- i18n (~> 0.7)
33
- minitest (~> 5.1)
34
- tzinfo (~> 1.1)
35
- arel (8.0.0)
36
- builder (3.2.3)
37
11
  byebug (9.1.0)
38
12
  coderay (1.1.2)
39
13
  concurrent-ruby (1.0.5)
40
- crass (1.0.3)
41
14
  database_cleaner (1.6.2)
42
15
  diff-lcs (1.3)
43
- erubi (1.7.0)
44
16
  ffi (1.9.18)
45
17
  formatador (0.2.5)
46
- generator_spec (0.9.4)
47
- activesupport (>= 3.0.0)
48
- railties (>= 3.0.0)
49
18
  guard (2.14.1)
50
19
  formatador (>= 0.2.4)
51
20
  listen (>= 2.7, < 4.0)
@@ -66,17 +35,10 @@ GEM
66
35
  rb-fsevent (~> 0.9, >= 0.9.4)
67
36
  rb-inotify (~> 0.9, >= 0.9.7)
68
37
  ruby_dep (~> 1.2)
69
- loofah (2.1.1)
70
- crass (~> 1.0.2)
71
- nokogiri (>= 1.5.9)
72
38
  lumberjack (1.0.12)
73
39
  method_source (0.9.0)
74
- mini_portile2 (2.3.0)
75
- minitest (5.10.3)
76
40
  mysql2 (0.4.10)
77
41
  nenv (0.3.0)
78
- nokogiri (1.8.1)
79
- mini_portile2 (~> 2.3.0)
80
42
  notiffany (0.1.1)
81
43
  nenv (~> 0.1)
82
44
  shellany (~> 0.0)
@@ -87,20 +49,6 @@ GEM
87
49
  pry-byebug (3.5.1)
88
50
  byebug (~> 9.1)
89
51
  pry (~> 0.10)
90
- rack (2.0.3)
91
- rack-test (0.8.2)
92
- rack (>= 1.0, < 3)
93
- rails-dom-testing (2.0.3)
94
- activesupport (>= 4.2.0)
95
- nokogiri (>= 1.6)
96
- rails-html-sanitizer (1.0.3)
97
- loofah (~> 2.0)
98
- railties (5.1.4)
99
- actionpack (= 5.1.4)
100
- activesupport (= 5.1.4)
101
- method_source
102
- rake (>= 0.8.7)
103
- thor (>= 0.18.1, < 2.0)
104
52
  rake (12.3.0)
105
53
  rb-fsevent (0.10.2)
106
54
  rb-inotify (0.9.10)
@@ -120,22 +68,18 @@ GEM
120
68
  rspec-support (~> 3.7.0)
121
69
  rspec-support (3.7.0)
122
70
  ruby_dep (1.5.0)
71
+ sequel (5.2.0)
123
72
  shellany (0.0.1)
124
73
  sqlite3 (1.3.13)
125
74
  thor (0.20.0)
126
- thread_safe (0.3.6)
127
- tzinfo (1.2.4)
128
- thread_safe (~> 0.1)
129
75
  yard (0.9.12)
130
76
 
131
77
  PLATFORMS
132
78
  ruby
133
79
 
134
80
  DEPENDENCIES
135
- activerecord (>= 5.1, < 5.2)
136
81
  bundler (~> 1.12)
137
82
  database_cleaner (~> 1.5, >= 1.5.3)
138
- generator_spec (~> 0.9.4)
139
83
  guard-rspec
140
84
  mobility!
141
85
  mysql2 (~> 0.4.9)
@@ -143,6 +87,7 @@ DEPENDENCIES
143
87
  pry-byebug
144
88
  rake (~> 12, >= 12.2.1)
145
89
  rspec (~> 3.0)
90
+ sequel (>= 5.0.0, < 6.0.0)
146
91
  sqlite3
147
92
  yard (~> 0.9.0)
148
93
 
data/README.md CHANGED
@@ -52,7 +52,7 @@ Installation
52
52
  Add this line to your application's Gemfile:
53
53
 
54
54
  ```ruby
55
- gem 'mobility', '~> 0.3.1'
55
+ gem 'mobility', '~> 0.3.2'
56
56
  ```
57
57
 
58
58
  Mobility is cryptographically signed. To be sure the gem you install hasn't
data/Rakefile CHANGED
@@ -37,7 +37,13 @@ namespace :db do
37
37
 
38
38
  desc "Set up the database schema"
39
39
  task up: :setup do
40
- require "spec_helper"
40
+ orm = ENV['ORM']
41
+ return unless orm
42
+
43
+ require orm
44
+ require "database"
45
+ require "#{orm}/schema"
46
+ DB = Mobility::Test::Database.connect(orm)
41
47
  Mobility::Test::Schema.up
42
48
  end
43
49
 
@@ -19,8 +19,11 @@ module Mobility
19
19
 
20
20
  def define_join_method(association_name, translation_class, table_name: nil, foreign_key: nil, **)
21
21
  define_method :"join_#{association_name}" do |**options|
22
- return self if (@__mobility_table_joined || []).include?(table_name)
23
- (@__mobility_table_joined ||= []) << table_name
22
+ if joins = @opts[:join]
23
+ # Return self if we've already joined this table
24
+ return self if joins.find { |clause| clause.table_expr == table_name }
25
+ end
26
+
24
27
  join_type = options[:outer_join] ? :left_outer : :inner
25
28
  join_table(join_type,
26
29
  translation_class.table_name,
@@ -1,3 +1,3 @@
1
1
  module Mobility
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Salzberg
metadata.gz.sig CHANGED
Binary file