copy_tuner_client 0.1.1.beta13 → 0.1.1.beta14
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.
data/Gemfile.lock
CHANGED
@@ -7,7 +7,6 @@ require 'copy_tuner_client/poller'
|
|
7
7
|
require 'copy_tuner_client/prefixed_logger'
|
8
8
|
require 'copy_tuner_client/request_sync'
|
9
9
|
require 'copy_tuner_client/copyray_middleware'
|
10
|
-
require 'copy_tuner_client/simple_form_extention'
|
11
10
|
|
12
11
|
module CopyTunerClient
|
13
12
|
# Used to set up and modify settings for the client.
|
@@ -170,6 +169,10 @@ module CopyTunerClient
|
|
170
169
|
development_environments.include? environment_name
|
171
170
|
end
|
172
171
|
|
172
|
+
def enable_middleware?
|
173
|
+
middleware && development? && !disable_middleware
|
174
|
+
end
|
175
|
+
|
173
176
|
# Determines if the content will fetched from the server
|
174
177
|
# @return [Boolean] Returns +true+ if in a test environment, +false+ otherwise.
|
175
178
|
def test?
|
@@ -196,7 +199,7 @@ module CopyTunerClient
|
|
196
199
|
process_guard = ProcessGuard.new(cache, poller, to_hash)
|
197
200
|
I18n.backend = I18nBackend.new(cache)
|
198
201
|
|
199
|
-
if
|
202
|
+
if enable_middleware?
|
200
203
|
logger.info "Using copytuner sync middleware"
|
201
204
|
middleware.use RequestSync, :cache => cache, :interval => sync_interval, :ignore_regex => sync_ignore_path_regex
|
202
205
|
middleware.use CopyTunerClient::CopyrayMiddleware
|
@@ -16,8 +16,10 @@ module CopyTunerClient
|
|
16
16
|
source
|
17
17
|
end
|
18
18
|
end
|
19
|
-
|
20
|
-
|
19
|
+
if CopyTunerClient.configuration.enable_middleware?
|
20
|
+
alias_method_chain :translate, :copyray_comment
|
21
|
+
alias :t :translate
|
22
|
+
end
|
21
23
|
end
|
22
24
|
end
|
23
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copy_tuner_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1.
|
4
|
+
version: 0.1.1.beta14
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
@@ -349,7 +349,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
349
349
|
version: '0'
|
350
350
|
segments:
|
351
351
|
- 0
|
352
|
-
hash:
|
352
|
+
hash: 4385524670175599867
|
353
353
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
354
354
|
none: false
|
355
355
|
requirements:
|