mobility 0.4.2 → 0.4.3

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: 940b49f8c3a48cc006aa2a981627065adcc7a645
4
- data.tar.gz: 75aef5224d15662c0297f5bf0665d496d08c2118
3
+ metadata.gz: 43cf8100f2f537180ffae1d90e7ac2bd78ba045e
4
+ data.tar.gz: 5e62d1a469b7c438779a212844737b97c6251384
5
5
  SHA512:
6
- metadata.gz: a4e0c11a3349d6761afe95d858a9c85887ddb442713076a6f064ab59bcb6e957646bbaac68c3b0d8b9715e54af5dca03b1332cc55d06defaa62e8406e5a11778
7
- data.tar.gz: cff9fff5d014f38c90a81ade0ce87f8d007c02dcfd7090a61c73e0472c939c95fe05048256b7d09a3676a8cd9648d618db0a2ba14abc3ab723cbeb5d9b8040b3
6
+ metadata.gz: c93092fb57649f458305fa368e72156137751e6d740ead6206b91325d5daf6b1287102096eb69c10ef238f503ea33b80f1383c1f98d94ecddda2ba728ee68be7
7
+ data.tar.gz: e018ec6117e9c5029a7a1249bc01e8f276eb5102583166074205ba3e23f133b039b83da33bb51e2488f75328b86e73faa5ea860016748e1081779c4e7cc28eb4
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## 0.4
4
4
 
5
+ ### 0.4.3 (February 18, 2018)
6
+ * Add missing require in container backend
7
+ ([#174](https://github.com/shioyama/mobility/pull/174))
8
+ * Update dependencies to support i18n v1.0
9
+ * Use `locale: true` instead of `fallback: false` in dirty plugin
10
+ ([a52998](https://github.com/shioyama/mobility/commit/a52998479893e33a6df5bfd395f50f76884cf64e))
11
+
5
12
  ### 0.4.2 (January 29, 2018)
6
13
  * Refactor find_by for translated attributes
7
14
  ([#160](https://github.com/shioyama/mobility/pull/160))
data/Gemfile CHANGED
@@ -12,8 +12,10 @@ group :development, :test do
12
12
  elsif ENV['RAILS_VERSION'] == '5.1'
13
13
  gem 'activerecord', '>= 5.1', '< 5.2'
14
14
  else
15
- gem 'activerecord', '>= 5.2.0.beta1', '< 5.3'
16
- gem 'railties', '>= 5.2.0.beta1', '< 5.3'
15
+ # TODO: change to '>= 5.2.0.beta1, < 5.3'
16
+ # once dirty specs pass in 5.2.0.rc1
17
+ gem 'activerecord', '5.2.0.beta2'
18
+ gem 'railties', '5.2.0.beta2'
17
19
  end
18
20
  gem "generator_spec", '~> 0.9.4'
19
21
  elsif ENV['ORM'] == 'sequel'
data/Gemfile.lock CHANGED
@@ -1,21 +1,52 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mobility (0.4.1)
4
+ mobility (0.4.2)
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.2.0.rc1)
12
+ actionview (= 5.2.0.rc1)
13
+ activesupport (= 5.2.0.rc1)
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.2.0.rc1)
19
+ activesupport (= 5.2.0.rc1)
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.2.0.rc1)
25
+ activesupport (= 5.2.0.rc1)
26
+ activerecord (5.2.0.rc1)
27
+ activemodel (= 5.2.0.rc1)
28
+ activesupport (= 5.2.0.rc1)
29
+ arel (>= 9.0)
30
+ activesupport (5.2.0.rc1)
31
+ concurrent-ruby (~> 1.0, >= 1.0.2)
32
+ i18n (~> 0.7)
33
+ minitest (~> 5.1)
34
+ tzinfo (~> 1.1)
35
+ arel (9.0.0)
11
36
  benchmark-ips (2.7.2)
37
+ builder (3.2.3)
12
38
  byebug (9.1.0)
13
39
  coderay (1.1.2)
14
40
  concurrent-ruby (1.0.5)
41
+ crass (1.0.3)
15
42
  database_cleaner (1.6.2)
16
43
  diff-lcs (1.3)
17
- ffi (1.9.18)
44
+ erubi (1.7.0)
45
+ ffi (1.9.21)
18
46
  formatador (0.2.5)
47
+ generator_spec (0.9.4)
48
+ activesupport (>= 3.0.0)
49
+ railties (>= 3.0.0)
19
50
  guard (2.14.2)
20
51
  formatador (>= 0.2.4)
21
52
  listen (>= 2.7, < 4.0)
@@ -36,10 +67,17 @@ GEM
36
67
  rb-fsevent (~> 0.9, >= 0.9.4)
37
68
  rb-inotify (~> 0.9, >= 0.9.7)
38
69
  ruby_dep (~> 1.2)
70
+ loofah (2.1.1)
71
+ crass (~> 1.0.2)
72
+ nokogiri (>= 1.5.9)
39
73
  lumberjack (1.0.12)
40
74
  method_source (0.9.0)
75
+ mini_portile2 (2.3.0)
76
+ minitest (5.11.3)
41
77
  mysql2 (0.4.10)
42
78
  nenv (0.3.0)
79
+ nokogiri (1.8.2)
80
+ mini_portile2 (~> 2.3.0)
43
81
  notiffany (0.1.1)
44
82
  nenv (~> 0.1)
45
83
  shellany (~> 0.0)
@@ -50,7 +88,20 @@ GEM
50
88
  pry-byebug (3.5.1)
51
89
  byebug (~> 9.1)
52
90
  pry (~> 0.10)
53
- rack (2.0.3)
91
+ rack (2.0.4)
92
+ rack-test (0.8.2)
93
+ rack (>= 1.0, < 3)
94
+ rails-dom-testing (2.0.3)
95
+ activesupport (>= 4.2.0)
96
+ nokogiri (>= 1.6)
97
+ rails-html-sanitizer (1.0.3)
98
+ loofah (~> 2.0)
99
+ railties (5.2.0.rc1)
100
+ actionpack (= 5.2.0.rc1)
101
+ activesupport (= 5.2.0.rc1)
102
+ method_source
103
+ rake (>= 0.8.7)
104
+ thor (>= 0.18.1, < 2.0)
54
105
  rake (12.3.0)
55
106
  rb-fsevent (0.10.2)
56
107
  rb-inotify (0.9.10)
@@ -69,29 +120,33 @@ GEM
69
120
  rspec-mocks (3.7.0)
70
121
  diff-lcs (>= 1.2.0, < 2.0)
71
122
  rspec-support (~> 3.7.0)
72
- rspec-support (3.7.0)
123
+ rspec-support (3.7.1)
73
124
  ruby_dep (1.5.0)
74
- sequel (5.4.0)
75
125
  shellany (0.0.1)
76
126
  sqlite3 (1.3.13)
77
127
  thor (0.20.0)
128
+ thread_safe (0.3.6)
129
+ tzinfo (1.2.5)
130
+ thread_safe (~> 0.1)
78
131
  yard (0.9.12)
79
132
 
80
133
  PLATFORMS
81
134
  ruby
82
135
 
83
136
  DEPENDENCIES
137
+ activerecord (>= 5.2.0.beta1, < 5.3)
84
138
  benchmark-ips
85
139
  bundler (~> 1.12)
86
140
  database_cleaner (~> 1.5, >= 1.5.3)
141
+ generator_spec (~> 0.9.4)
87
142
  guard-rspec
88
143
  mobility!
89
144
  mysql2 (~> 0.4.9)
90
145
  pg (< 1.0)
91
146
  pry-byebug
147
+ railties (>= 5.2.0.beta1, < 5.3)
92
148
  rake (~> 12, >= 12.2.1)
93
149
  rspec (~> 3.0)
94
- sequel (>= 5.0.0, < 6.0.0)
95
150
  sqlite3
96
151
  yard (~> 0.9.0)
97
152
 
data/ISSUE_TEMPLATE.md CHANGED
@@ -1,5 +1,9 @@
1
1
  <!--- Provide a general summary of the issue in the Title above -->
2
2
 
3
+ <!--- NOTE: if you are asking a question about usage, please post your question-->
4
+ <!--- to StackOverflow with the "mobility" tag instead of using an issue for -->
5
+ <!--- this purpose. Issues are for bugs and feature requests only. Thanks! -->
6
+
3
7
  ## Context
4
8
  <!--- Provide a more detailed introduction to the issue itself, including what -->
5
9
  <!--- backend/ORM you are using, what version of Mobility you are using, and -->
data/README.md CHANGED
@@ -54,7 +54,7 @@ Installation
54
54
  Add this line to your application's Gemfile:
55
55
 
56
56
  ```ruby
57
- gem 'mobility', '~> 0.4.2'
57
+ gem 'mobility', '~> 0.4.3'
58
58
  ```
59
59
 
60
60
  Mobility is cryptographically signed. To be sure the gem you install hasn't
data/lib/mobility.rb CHANGED
@@ -87,12 +87,12 @@ module Mobility
87
87
  model_class.singleton_class.send(:alias_method, translates, :mobility_accessor)
88
88
  end
89
89
 
90
- if Loaded::ActiveRecord
91
- model_class.include(ActiveRecord) if model_class < ::ActiveRecord::Base
90
+ if Loaded::ActiveRecord && model_class < ::ActiveRecord::Base
91
+ model_class.include(ActiveRecord)
92
92
  end
93
93
 
94
- if Loaded::Sequel
95
- model_class.include(Sequel) if model_class < ::Sequel::Model
94
+ if Loaded::Sequel && model_class < ::Sequel::Model
95
+ model_class.include(Sequel)
96
96
  end
97
97
  end
98
98
 
@@ -1,3 +1,5 @@
1
+ require "mobility/backends/active_record"
2
+
1
3
  module Mobility
2
4
  module Backends
3
5
  =begin
@@ -31,7 +31,7 @@ value of the translated attribute if passed to it.
31
31
  locale_accessor = Mobility.normalize_locale_accessor(attribute, locale)
32
32
  if model.changed_attributes.has_key?(locale_accessor) && model.changed_attributes[locale_accessor] == value
33
33
  model.send(:attributes_changed_by_setter).except!(locale_accessor)
34
- elsif read(locale, options.merge(fallback: false)) != value
34
+ elsif read(locale, options.merge(locale: true)) != value
35
35
  model.send(:mobility_changed_attributes) << locale_accessor
36
36
  model.send(:attribute_will_change!, locale_accessor)
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module Mobility
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
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.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Salzberg
@@ -30,7 +30,7 @@ cert_chain:
30
30
  eGDROPZoL5RXwiOnRbexxa7dcAxMrDfGB/hpiunIPWPsi4n5P7K/6OO/sGVMl9xv
31
31
  SZBPXjzrHdyOFLBYXB+PG7s3F/4=
32
32
  -----END CERTIFICATE-----
33
- date: 2018-01-29 00:00:00.000000000 Z
33
+ date: 2018-02-18 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: request_store
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: 0.6.10
56
56
  - - "<"
57
57
  - !ruby/object:Gem::Version
58
- version: '0.10'
58
+ version: '1.1'
59
59
  type: :runtime
60
60
  prerelease: false
61
61
  version_requirements: !ruby/object:Gem::Requirement
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 0.6.10
66
66
  - - "<"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.10'
68
+ version: '1.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file