paperclip-globalize3 2.3.0 → 3.0.0
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 +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +44 -0
- data/.rubocop_todo.yml +35 -0
- data/.travis.yml +13 -7
- data/.yardopts +5 -0
- data/Appraisals +44 -12
- data/CHANGELOG.md +31 -0
- data/README.md +7 -7
- data/Rakefile +3 -3
- data/gemfiles/rails_4.2_pc_4_2.gemfile +4 -4
- data/gemfiles/rails_4.2_pc_4_3.gemfile +8 -0
- data/gemfiles/rails_4.2_pc_5_0.gemfile +8 -0
- data/gemfiles/rails_4.2_pc_5_2.gemfile +8 -0
- data/gemfiles/rails_5.0_pc_4_2.gemfile +8 -0
- data/gemfiles/rails_5.0_pc_5_0.gemfile +8 -0
- data/gemfiles/rails_5.0_pc_5_2.gemfile +8 -0
- data/gemfiles/rails_5.1_pc_4_2.gemfile +8 -0
- data/gemfiles/rails_5.1_pc_5_0.gemfile +8 -0
- data/gemfiles/rails_5.1_pc_5_2.gemfile +8 -0
- data/lib/paperclip/globalize3/attachment.rb +74 -119
- data/lib/paperclip/globalize3/gem_helper.rb +1 -4
- data/lib/paperclip/globalize3/version.rb +1 -1
- data/lib/{paperclip-globalize3.rb → paperclip/globalize3.rb} +6 -10
- data/paperclip-globalize3.gemspec +25 -19
- data/spec/data/models.rb +8 -9
- data/spec/data/schema.rb +4 -5
- data/spec/paperclip/globalize3/attachment_spec.rb +198 -0
- data/spec/spec_helper.rb +55 -23
- metadata +106 -40
- data/gemfiles/rails_4.0_pc_4_1.gemfile +0 -8
- data/gemfiles/rails_4.0_pc_4_2.gemfile +0 -8
- data/gemfiles/rails_4.2_pc_4_1.gemfile +0 -8
- data/spec/attachment_helper_spec.rb +0 -151
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab76787f50ea1fc671e86d2a88514adaac3d15ba
|
4
|
+
data.tar.gz: 8831d59aaa2b52741be85a7561b2bce68a9c8a77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d5c3cd80b86f608871bfdf9d1ff6d69e6b987b37d133c65106fdc2c65f0789dd72c2878cb2f9d16b822b2c488d1c93c5d0b1cbcad834a2ef9a34df5f52fba8c
|
7
|
+
data.tar.gz: d466da7201f9421f8f3f4263e7557aab42cb4d06c26fb4ca66158b7875826ca6d84b6c1212cda9af525167ae511b5d80639c0377643face3132177b4da2b901e
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
require: rubocop-rspec
|
2
|
+
|
3
|
+
inherit_from: .rubocop_todo.yml
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
Include:
|
7
|
+
- 'Appraisals'
|
8
|
+
- '**/*.gemspec'
|
9
|
+
- '**/*.rake'
|
10
|
+
- '**/*.gemfile'
|
11
|
+
- '**/Gemfile'
|
12
|
+
- '**/Rakefile'
|
13
|
+
- '**/Capfile'
|
14
|
+
TargetRubyVersion: 2.2
|
15
|
+
|
16
|
+
Layout/AlignHash:
|
17
|
+
EnforcedColonStyle: 'table'
|
18
|
+
|
19
|
+
Layout/AlignParameters:
|
20
|
+
EnforcedStyle: 'with_fixed_indentation'
|
21
|
+
|
22
|
+
Layout/DotPosition:
|
23
|
+
EnforcedStyle: 'trailing'
|
24
|
+
|
25
|
+
Layout/SpaceInsideHashLiteralBraces:
|
26
|
+
EnforcedStyle: 'no_space'
|
27
|
+
|
28
|
+
Metrics/AbcSize:
|
29
|
+
Exclude:
|
30
|
+
- 'lib/paperclip/globalize3/attachment.rb'
|
31
|
+
|
32
|
+
Metrics/MethodLength:
|
33
|
+
Exclude:
|
34
|
+
- 'lib/paperclip/globalize3/attachment.rb'
|
35
|
+
|
36
|
+
Metrics/LineLength:
|
37
|
+
Max: 120
|
38
|
+
|
39
|
+
Naming/VariableNumber:
|
40
|
+
EnforcedStyle: 'snake_case'
|
41
|
+
|
42
|
+
Style/EmptyElse:
|
43
|
+
Exclude:
|
44
|
+
- 'lib/paperclip/globalize3/attachment.rb'
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config`
|
3
|
+
# on 2018-02-07 16:16:24 +0100 using RuboCop version 0.52.1.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 3
|
10
|
+
# Configuration parameters: CountComments, ExcludedMethods.
|
11
|
+
Metrics/BlockLength:
|
12
|
+
Max: 152
|
13
|
+
|
14
|
+
# Offense count: 2
|
15
|
+
# Configuration parameters: .
|
16
|
+
# SupportedStyles: have_received, receive
|
17
|
+
RSpec/MessageSpies:
|
18
|
+
EnforcedStyle: receive
|
19
|
+
|
20
|
+
# Offense count: 1
|
21
|
+
# Configuration parameters: AggregateFailuresByDefault.
|
22
|
+
RSpec/MultipleExpectations:
|
23
|
+
Max: 2
|
24
|
+
|
25
|
+
# Offense count: 1
|
26
|
+
# Configuration parameters: Max.
|
27
|
+
RSpec/NestedGroups:
|
28
|
+
Exclude:
|
29
|
+
- 'spec/paperclip/globalize3/attachment_spec.rb'
|
30
|
+
|
31
|
+
# Offense count: 1
|
32
|
+
# Configuration parameters: IgnoreSymbolicNames.
|
33
|
+
RSpec/VerifiedDoubles:
|
34
|
+
Exclude:
|
35
|
+
- 'spec/paperclip/globalize3/attachment_spec.rb'
|
data/.travis.yml
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
before_install: gem install bundler -v '
|
3
|
+
- 2.2.2
|
4
|
+
- 2.3.5
|
5
|
+
- 2.4.3
|
6
|
+
before_install: gem install bundler -v '>= 1.13'
|
7
7
|
script: "bundle exec rake spec"
|
8
8
|
gemfile:
|
9
|
-
- gemfiles/rails_4.0_pc_4_1.gemfile
|
10
|
-
- gemfiles/rails_4.0_pc_4_2.gemfile
|
11
|
-
- gemfiles/rails_4.2_pc_4_1.gemfile
|
12
9
|
- gemfiles/rails_4.2_pc_4_2.gemfile
|
10
|
+
- gemfiles/rails_4.2_pc_4_3.gemfile
|
11
|
+
- gemfiles/rails_4.2_pc_5_0.gemfile
|
12
|
+
- gemfiles/rails_4.2_pc_5_2.gemfile
|
13
|
+
- gemfiles/rails_5.0_pc_4_2.gemfile
|
14
|
+
- gemfiles/rails_5.0_pc_5_0.gemfile
|
15
|
+
- gemfiles/rails_5.0_pc_5_2.gemfile
|
16
|
+
- gemfiles/rails_5.1_pc_4_2.gemfile
|
17
|
+
- gemfiles/rails_5.1_pc_5_0.gemfile
|
18
|
+
- gemfiles/rails_5.1_pc_5_2.gemfile
|
data/.yardopts
ADDED
data/Appraisals
CHANGED
@@ -1,23 +1,55 @@
|
|
1
|
-
# Rails 4.
|
2
|
-
|
3
|
-
appraise 'rails-4.0-pc-4-1' do
|
4
|
-
gem 'rails', '~> 4.0.0'
|
5
|
-
gem 'paperclip', '~> 4.1.0'
|
6
|
-
end
|
1
|
+
# Rails 4.2
|
7
2
|
|
8
|
-
appraise 'rails-4.
|
9
|
-
gem 'rails', '~> 4.
|
3
|
+
appraise 'rails-4.2-pc-4-2' do
|
4
|
+
gem 'rails', '~> 4.2.0'
|
10
5
|
gem 'paperclip', '~> 4.2.0'
|
11
6
|
end
|
12
7
|
|
13
|
-
|
8
|
+
appraise 'rails-4.2-pc-4-3' do
|
9
|
+
gem 'rails', '~> 4.2.0'
|
10
|
+
gem 'paperclip', '~> 4.3.0'
|
11
|
+
end
|
14
12
|
|
15
|
-
appraise 'rails-4.2-pc-
|
13
|
+
appraise 'rails-4.2-pc-5-0' do
|
16
14
|
gem 'rails', '~> 4.2.0'
|
17
|
-
gem 'paperclip', '~>
|
15
|
+
gem 'paperclip', '~> 5.0.0'
|
18
16
|
end
|
19
17
|
|
20
|
-
appraise 'rails-4.2-pc-
|
18
|
+
appraise 'rails-4.2-pc-5-2' do
|
21
19
|
gem 'rails', '~> 4.2.0'
|
20
|
+
gem 'paperclip', '~> 5.2.0'
|
21
|
+
end
|
22
|
+
|
23
|
+
# Rails 5.0
|
24
|
+
|
25
|
+
appraise 'rails-5.0-pc-4-2' do
|
26
|
+
gem 'rails', '~> 5.0.0'
|
22
27
|
gem 'paperclip', '~> 4.2.0'
|
23
28
|
end
|
29
|
+
|
30
|
+
appraise 'rails-5.0-pc-5-0' do
|
31
|
+
gem 'rails', '~> 5.0.0'
|
32
|
+
gem 'paperclip', '~> 5.0.0'
|
33
|
+
end
|
34
|
+
|
35
|
+
appraise 'rails-5.0-pc-5-2' do
|
36
|
+
gem 'rails', '~> 5.0.0'
|
37
|
+
gem 'paperclip', '~> 5.2.0'
|
38
|
+
end
|
39
|
+
|
40
|
+
# Rails 5.1
|
41
|
+
|
42
|
+
appraise 'rails-5.1-pc-4-2' do
|
43
|
+
gem 'rails', '~> 5.1.0'
|
44
|
+
gem 'paperclip', '~> 4.2.0'
|
45
|
+
end
|
46
|
+
|
47
|
+
appraise 'rails-5.1-pc-5-0' do
|
48
|
+
gem 'rails', '~> 5.1.0'
|
49
|
+
gem 'paperclip', '~> 5.0.0'
|
50
|
+
end
|
51
|
+
|
52
|
+
appraise 'rails-5.1-pc-5-2' do
|
53
|
+
gem 'rails', '~> 5.1.0'
|
54
|
+
gem 'paperclip', '~> 5.2.0'
|
55
|
+
end
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# (unreleased)
|
2
|
+
|
3
|
+
* Bugfixes
|
4
|
+
* (none)
|
5
|
+
* Enhancements
|
6
|
+
* (none)
|
7
|
+
|
8
|
+
# 3.0.0 (2018-02-07)
|
9
|
+
|
10
|
+
* Breaking changes
|
11
|
+
* Drop support for ruby < 2.2.2
|
12
|
+
* Drop support for rails < 4.2
|
13
|
+
* Drop support for paperclip < 4.2
|
14
|
+
* Drop support for globalize < 5.0
|
15
|
+
* Move paperclip-globalize3.rb to paperclip/globalize3.rb
|
16
|
+
(if you manually require 'paperclip-globalize3', change it to 'paperclip/globalize3')
|
17
|
+
* Bugfixes
|
18
|
+
* (none)
|
19
|
+
* Enhancements
|
20
|
+
* Support ruby 2.3 and 2.4
|
21
|
+
* Test with paperclip 4.3
|
22
|
+
* Support paperclip 5.0/5.1/5.2
|
23
|
+
* Support rails 5.1
|
24
|
+
* Internal / development
|
25
|
+
* Bump dependencies
|
26
|
+
* Add rubocop
|
27
|
+
* Add yard
|
28
|
+
|
29
|
+
# 2.x and before
|
30
|
+
|
31
|
+
(Sorry, there was no CHANGELOG before, so please refer to github commits.)
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Paperclip::Globalize3
|
2
2
|
|
3
|
-
[](https://travis-ci.org/emjot/paperclip-globalize3)
|
4
4
|
|
5
5
|
Use locale-specific attachments in your Rails app with [paperclip](https://github.com/thoughtbot/paperclip) and
|
6
6
|
[globalize](https://github.com/globalize/globalize).
|
@@ -11,17 +11,17 @@ Note that this implementation patches some methods in the `Paperclip::Attachment
|
|
11
11
|
|
12
12
|
## Compatibility
|
13
13
|
|
14
|
-
|
14
|
+
* paperclip 4.2 - 5.2
|
15
|
+
* globalize 5.x
|
16
|
+
* Rails 4.2/5.0/5.1
|
15
17
|
|
16
|
-
|
17
|
-
|
18
|
-
For paperclip 3.x with globalize3 support please use the 1.x versions of this gem.
|
18
|
+
For support of previous paperclip / globalize / rails versions please refer to the 2.x versions of this gem.
|
19
19
|
|
20
20
|
## Installation
|
21
21
|
|
22
22
|
Add this line to your application's Gemfile:
|
23
23
|
|
24
|
-
gem 'paperclip-globalize3'
|
24
|
+
gem 'paperclip-globalize3'
|
25
25
|
|
26
26
|
And then execute:
|
27
27
|
|
@@ -29,7 +29,7 @@ And then execute:
|
|
29
29
|
|
30
30
|
Or install it yourself as:
|
31
31
|
|
32
|
-
$ gem install paperclip-globalize3
|
32
|
+
$ gem install paperclip-globalize3
|
33
33
|
|
34
34
|
## Usage
|
35
35
|
|
data/Rakefile
CHANGED
@@ -5,14 +5,14 @@ require 'rspec/core/rake_task'
|
|
5
5
|
require 'wwtd/tasks'
|
6
6
|
|
7
7
|
desc 'Default: run all tests with all supported versions'
|
8
|
-
task :
|
8
|
+
task default: :all
|
9
9
|
|
10
10
|
desc 'Run tests with all supported Rails versions.'
|
11
|
-
task :
|
11
|
+
task all: ['appraisal:install'] do
|
12
12
|
exec('rake appraisal spec')
|
13
13
|
end
|
14
14
|
|
15
|
-
task :
|
15
|
+
task local: 'wwtd:local' # run all gemfiles with local ruby
|
16
16
|
|
17
17
|
desc 'Run all tests'
|
18
18
|
RSpec::Core::RakeTask.new('spec') do |t|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# This file was generated by Appraisal
|
2
2
|
|
3
|
-
source
|
3
|
+
source 'https://rubygems.org'
|
4
4
|
|
5
|
-
gem
|
6
|
-
gem
|
5
|
+
gem 'rails', '~> 4.2.0'
|
6
|
+
gem 'paperclip', '~> 4.2.0'
|
7
7
|
|
8
|
-
gemspec :
|
8
|
+
gemspec path: '../'
|
@@ -1,143 +1,98 @@
|
|
1
1
|
module Paperclip
|
2
2
|
module Globalize3
|
3
|
+
# Prepend to the paperclip `Attachment` class to transparently read and write
|
4
|
+
# your attachments in context of the current locale using globalize.
|
5
|
+
#
|
6
|
+
# E.g. `my_model.my_attachment` returns a different attachment when your
|
7
|
+
# current locale is 'en' compared to when your current locale is 'de'.
|
8
|
+
#
|
9
|
+
# Requires a :locale interpolation for your paperclip attachment(s) and the
|
10
|
+
# respective columns to be translated.
|
3
11
|
module Attachment
|
12
|
+
def assign(uploaded_file)
|
13
|
+
@file =
|
14
|
+
if Paperclip::Attachment.default_options.key?(:adapter_options) # paperclip >= 5.2.0
|
15
|
+
Paperclip.io_adapters.for(uploaded_file, @options[:adapter_options])
|
16
|
+
else # paperclip < 5.2.0
|
17
|
+
Paperclip.io_adapters.for(uploaded_file)
|
18
|
+
end
|
19
|
+
ensure_required_accessors!
|
20
|
+
ensure_required_validations!
|
4
21
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
base.send :alias_method_chain, :clear, :globalize3
|
9
|
-
base.send :alias_method_chain, :queue_all_for_delete, :globalize3
|
10
|
-
base.send :alias_method_chain, :queue_some_for_delete, :globalize3
|
11
|
-
end
|
12
|
-
|
13
|
-
module InstanceMethods
|
14
|
-
def assign_with_globalize3(uploaded_file)
|
15
|
-
@file = Paperclip.io_adapters.for(uploaded_file)
|
16
|
-
ensure_required_accessors!
|
17
|
-
ensure_required_validations!
|
18
|
-
|
19
|
-
if @file.assignment?
|
20
|
-
clear(*only_process, :locales => Globalize.locale) # [paperclip-globalize3] only clear current locale
|
21
|
-
if @file.nil?
|
22
|
-
nil
|
23
|
-
else
|
24
|
-
assign_attributes
|
25
|
-
post_process_file
|
26
|
-
reset_file_if_original_reprocessed
|
27
|
-
end
|
28
|
-
else
|
22
|
+
if @file.assignment?
|
23
|
+
clear(*only_process, locales: Globalize.locale) # [paperclip-globalize3] only clear current locale
|
24
|
+
if @file.nil?
|
29
25
|
nil
|
26
|
+
else
|
27
|
+
assign_attributes
|
28
|
+
post_process_file
|
29
|
+
reset_file_if_original_reprocessed
|
30
30
|
end
|
31
|
+
else
|
32
|
+
nil
|
31
33
|
end
|
34
|
+
end
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
36
|
+
def clear(*args)
|
37
|
+
options = args.extract_options!
|
38
|
+
styles_to_clear = args
|
39
|
+
if styles_to_clear.any?
|
40
|
+
queue_some_for_delete(*styles_to_clear, options)
|
41
|
+
else
|
42
|
+
queue_all_for_delete(options)
|
43
|
+
@queued_for_write = {}
|
44
|
+
@errors = {}
|
43
45
|
end
|
46
|
+
end
|
44
47
|
|
45
|
-
|
48
|
+
private
|
46
49
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
end
|
50
|
+
def queue_all_for_delete(options = {}) #:nodoc:
|
51
|
+
with_locales_if_translated(options[:locales]) do
|
52
|
+
super()
|
51
53
|
end
|
54
|
+
end
|
52
55
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
end
|
56
|
+
def queue_some_for_delete(*args)
|
57
|
+
options = args.extract_options!
|
58
|
+
styles = args
|
59
|
+
with_locales_if_translated(options[:locales]) do
|
60
|
+
super(styles)
|
59
61
|
end
|
62
|
+
end
|
60
63
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
else
|
75
|
-
yield
|
76
|
-
end
|
64
|
+
# Yields the given block in context of Globalize#with_locales, but handles these situations gracefully:
|
65
|
+
#
|
66
|
+
# * if it is not translated (=> then don't use Globalize)
|
67
|
+
# * if there are no locales given (=> then use all translated locales)
|
68
|
+
# * if there are `with_locales` requested for which there are no translations (=> then skip those)
|
69
|
+
#
|
70
|
+
# @param [Symbol, Array[Symbol], nil] with_locales only yield block for these translated locales
|
71
|
+
def with_locales_if_translated(with_locales = nil)
|
72
|
+
if translated?
|
73
|
+
locales = with_locales.nil? ? translated_locales : [*with_locales] & translated_locales
|
74
|
+
Globalize.with_locales(locales) { yield }
|
75
|
+
else
|
76
|
+
yield
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
def assign_attributes
|
85
|
-
@queued_for_write[:original] = @file
|
86
|
-
assign_file_information
|
87
|
-
assign_fingerprint(@file.fingerprint)
|
88
|
-
assign_timestamps
|
89
|
-
end
|
90
|
-
|
91
|
-
def assign_file_information
|
92
|
-
instance_write(:file_name, cleanup_filename(@file.original_filename))
|
93
|
-
instance_write(:content_type, @file.content_type.to_s.strip)
|
94
|
-
instance_write(:file_size, @file.size)
|
95
|
-
end
|
96
|
-
|
97
|
-
def assign_fingerprint(fingerprint)
|
98
|
-
if instance_respond_to?(:fingerprint)
|
99
|
-
instance_write(:fingerprint, fingerprint)
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
def assign_timestamps
|
104
|
-
if has_enabled_but_unset_created_at?
|
105
|
-
instance_write(:created_at, Time.now)
|
106
|
-
end
|
107
|
-
|
108
|
-
instance_write(:updated_at, Time.now)
|
109
|
-
end
|
110
|
-
|
111
|
-
def post_process_file
|
112
|
-
dirty!
|
113
|
-
|
114
|
-
if post_processing
|
115
|
-
post_process(*only_process)
|
116
|
-
end
|
117
|
-
end
|
80
|
+
# Whether both the model and the attachment are translated
|
81
|
+
def translated?
|
82
|
+
instance.respond_to?(:translated_locales) && instance.translated?(:"#{name}_file_name")
|
83
|
+
end
|
118
84
|
|
119
|
-
|
120
|
-
|
121
|
-
|
85
|
+
# Returns the locales for which there are translations for the model instance, if applicable
|
86
|
+
# (nil if the model or the attachment is not translated).
|
87
|
+
#
|
88
|
+
# @return [Array[Symbol], nil]
|
89
|
+
def translated_locales
|
90
|
+
return unless translated?
|
122
91
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
reset_updater
|
127
|
-
end
|
128
|
-
|
129
|
-
def reset_updater
|
130
|
-
if instance.respond_to?(updater)
|
131
|
-
instance.send(updater)
|
132
|
-
end
|
133
|
-
end
|
134
|
-
|
135
|
-
def updater
|
136
|
-
:"#{name}_file_name_will_change!"
|
137
|
-
end
|
138
|
-
end
|
92
|
+
# TODO: translated_locales are not present any more when this is called via destroy callback
|
93
|
+
# (unless 'translates' is defined AFTER 'has_attached_file' in the model class)
|
94
|
+
instance.translated_locales
|
139
95
|
end
|
140
|
-
|
141
96
|
end
|
142
97
|
end
|
143
98
|
end
|
@@ -1,15 +1,12 @@
|
|
1
1
|
module Paperclip
|
2
2
|
module Globalize3
|
3
|
-
|
4
3
|
# Like Bundler::GemHelper, but tags versions without the 'v' prefix (e.g. '1.0.0' instead of 'v1.0.0')
|
5
4
|
class GemHelper < Bundler::GemHelper
|
6
|
-
|
7
5
|
protected
|
8
6
|
|
9
7
|
def version_tag
|
10
|
-
|
8
|
+
version.to_s
|
11
9
|
end
|
12
|
-
|
13
10
|
end
|
14
11
|
end
|
15
12
|
end
|