globalize 4.0.0.alpha.5 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/Gemfile.lock +0 -11
- data/lib/globalize.rb +0 -1
- data/lib/globalize/active_record/act_macro.rb +0 -13
- data/lib/globalize/version.rb +3 -0
- metadata +28 -19
- data/lib/globalize/versioning.rb +0 -5
- data/lib/globalize/versioning/paper_trail.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c30dff66a561a7f6e3f79ecffe00afea16dd86ff
|
4
|
+
data.tar.gz: 264b67a3bf456f27ca3ee32e476fe39781402422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b3670a385e89e159fdac80e336743357a1adea54f124cd023a086970ef0612711b2f7e78a98508ba48b1bea675361934af4726dce868ee582eb2bbac15fd16c
|
7
|
+
data.tar.gz: 7a3f197f7368577e0824ae58072b388993e90e7867c3e24a4a4abb934838625de3cef78410f584e9b0229c149d485c589b10047f0e2352fbda20813074e5e37e
|
data/Gemfile
CHANGED
@@ -2,8 +2,6 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
# forking off airblade/paper_trail to use the rails4 branch.
|
6
|
-
gem 'paper_trail', github: 'airblade/paper_trail', branch: 'master'
|
7
5
|
# Per https://github.com/bmabey/database_cleaner/issues/224
|
8
6
|
gem 'database_cleaner', github: 'bmabey/database_cleaner', branch: 'master'
|
9
7
|
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,3 @@
|
|
1
|
-
GIT
|
2
|
-
remote: git://github.com/airblade/paper_trail.git
|
3
|
-
revision: 25c349588b1107c1bb77ffcfb5a98e5227044507
|
4
|
-
branch: master
|
5
|
-
specs:
|
6
|
-
paper_trail (3.0.0)
|
7
|
-
activerecord (>= 3.0, < 5.0)
|
8
|
-
activesupport (>= 3.0, < 5.0)
|
9
|
-
|
10
1
|
GIT
|
11
2
|
remote: git://github.com/bmabey/database_cleaner.git
|
12
3
|
revision: 072492166e82969136d1abaeccbcadaae4fe6539
|
@@ -20,7 +11,6 @@ PATH
|
|
20
11
|
globalize (4.0.0.alpha.5)
|
21
12
|
activemodel (>= 4.0.0)
|
22
13
|
activerecord (>= 4.0.0)
|
23
|
-
paper_trail (~> 3.0.0.beta)
|
24
14
|
|
25
15
|
GEM
|
26
16
|
remote: https://rubygems.org/
|
@@ -285,7 +275,6 @@ DEPENDENCIES
|
|
285
275
|
globalize!
|
286
276
|
minitest
|
287
277
|
minitest-reporters
|
288
|
-
paper_trail!
|
289
278
|
pry
|
290
279
|
pry-nav
|
291
280
|
rake
|
data/lib/globalize.rb
CHANGED
@@ -78,19 +78,6 @@ module Globalize
|
|
78
78
|
|
79
79
|
after_create :save_translations!
|
80
80
|
after_update :save_translations!
|
81
|
-
|
82
|
-
setup_globalize_versioning(options[:versioning]) if options[:versioning]
|
83
|
-
end
|
84
|
-
|
85
|
-
def setup_globalize_versioning(versioning_options)
|
86
|
-
if versioning_options.is_a?(Hash)
|
87
|
-
translation_class.versioned(versioning_options)
|
88
|
-
else
|
89
|
-
::ActiveRecord::Base.extend(Globalize::Versioning::PaperTrail)
|
90
|
-
|
91
|
-
translation_class.has_paper_trail
|
92
|
-
delegate :version, :versions, :to => :translation
|
93
|
-
end
|
94
81
|
end
|
95
82
|
end
|
96
83
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: globalize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sven Fuchs
|
@@ -23,6 +23,9 @@ dependencies:
|
|
23
23
|
- - '>='
|
24
24
|
- !ruby/object:Gem::Version
|
25
25
|
version: 4.0.0
|
26
|
+
- - <
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '5'
|
26
29
|
type: :runtime
|
27
30
|
prerelease: false
|
28
31
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,6 +33,9 @@ dependencies:
|
|
30
33
|
- - '>='
|
31
34
|
- !ruby/object:Gem::Version
|
32
35
|
version: 4.0.0
|
36
|
+
- - <
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '5'
|
33
39
|
- !ruby/object:Gem::Dependency
|
34
40
|
name: activemodel
|
35
41
|
requirement: !ruby/object:Gem::Requirement
|
@@ -37,6 +43,9 @@ dependencies:
|
|
37
43
|
- - '>='
|
38
44
|
- !ruby/object:Gem::Version
|
39
45
|
version: 4.0.0
|
46
|
+
- - <
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '5'
|
40
49
|
type: :runtime
|
41
50
|
prerelease: false
|
42
51
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -44,20 +53,9 @@ dependencies:
|
|
44
53
|
- - '>='
|
45
54
|
- !ruby/object:Gem::Version
|
46
55
|
version: 4.0.0
|
47
|
-
-
|
48
|
-
name: paper_trail
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
56
|
+
- - <
|
52
57
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ~>
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: 3.0.0.beta
|
58
|
+
version: '5'
|
61
59
|
- !ruby/object:Gem::Dependency
|
62
60
|
name: database_cleaner
|
63
61
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,9 +146,8 @@ executables: []
|
|
148
146
|
extensions: []
|
149
147
|
extra_rdoc_files: []
|
150
148
|
files:
|
151
|
-
- lib/globalize/versioning.rb
|
152
|
-
- lib/globalize/versioning/paper_trail.rb
|
153
149
|
- lib/globalize/interpolation.rb
|
150
|
+
- lib/globalize/version.rb
|
154
151
|
- lib/globalize/active_record.rb
|
155
152
|
- lib/globalize/active_record/attributes.rb
|
156
153
|
- lib/globalize/active_record/instance_methods.rb
|
@@ -177,7 +174,19 @@ homepage: http://github.com/globalize/globalize
|
|
177
174
|
licenses:
|
178
175
|
- MIT
|
179
176
|
metadata: {}
|
180
|
-
post_install_message:
|
177
|
+
post_install_message: |2+
|
178
|
+
|
179
|
+
Globalize has extracted versioning support to a separate gem named
|
180
|
+
globalize-versioning. If you are using versioning (with paper_trail
|
181
|
+
or any other versioning gem), please add the line
|
182
|
+
"gem 'globalize-versioning'" to your Gemfile and go to the github
|
183
|
+
page at globalize/globalize-versioning if you encounter any problems.
|
184
|
+
|
185
|
+
Note that the globalize-versioning gem does not delegate versions to
|
186
|
+
the translation table, so you will have to update your syntax to
|
187
|
+
the form: `post.translation.versions`. See the globalize-versioning
|
188
|
+
readme for details.
|
189
|
+
|
181
190
|
rdoc_options: []
|
182
191
|
require_paths:
|
183
192
|
- lib
|
@@ -188,9 +197,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
197
|
version: '0'
|
189
198
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
190
199
|
requirements:
|
191
|
-
- - '
|
200
|
+
- - '>='
|
192
201
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
202
|
+
version: '0'
|
194
203
|
requirements: []
|
195
204
|
rubyforge_project: '[none]'
|
196
205
|
rubygems_version: 2.0.3
|
data/lib/globalize/versioning.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'paper_trail'
|
2
|
-
|
3
|
-
module Globalize
|
4
|
-
module Versioning
|
5
|
-
module PaperTrail
|
6
|
-
# At present this isn't used but we may use something similar in paper trail
|
7
|
-
# shortly, so leaving it around to reference easily.
|
8
|
-
#def versioned_columns
|
9
|
-
#super + self.class.translated_attribute_names
|
10
|
-
#end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
ActiveRecord::Base.class_eval do
|
16
|
-
class << self
|
17
|
-
def has_paper_trail_with_globalize(*args)
|
18
|
-
has_paper_trail_without_globalize(*args)
|
19
|
-
include Globalize::Versioning::PaperTrail
|
20
|
-
end
|
21
|
-
alias_method_chain :has_paper_trail, :globalize
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
PaperTrail::Version.class_eval do
|
26
|
-
|
27
|
-
before_save do |version|
|
28
|
-
version.locale = Globalize.locale.to_s
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.for_this_locale
|
32
|
-
where :locale => Globalize.locale.to_s
|
33
|
-
end
|
34
|
-
|
35
|
-
def sibling_versions_with_locales
|
36
|
-
sibling_versions_without_locales.for_this_locale
|
37
|
-
end
|
38
|
-
alias_method_chain :sibling_versions, :locales
|
39
|
-
end
|