copy_tuner_client 0.0.12 → 0.0.14
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/.ruby-version +1 -0
- data/Gemfile.lock +1 -1
- data/README.md +16 -2
- data/gemfiles/2.3.gemfile.lock +1 -1
- data/gemfiles/3.0.gemfile.lock +1 -1
- data/gemfiles/3.1.gemfile.lock +1 -1
- data/lib/copy_tuner_client/configuration.rb +1 -1
- data/lib/copy_tuner_client/i18n_backend.rb +2 -1
- data/lib/copy_tuner_client/version.rb +1 -1
- data/spec/copy_tuner_client/configuration_spec.rb +1 -1
- data/spec/copy_tuner_client/request_sync_spec.rb +2 -2
- metadata +10 -3
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.9.3-p545
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,9 +4,23 @@ CopyTuner Client
|
|
4
4
|
[TODO] Write After
|
5
5
|
|
6
6
|
|
7
|
+
|
8
|
+
Development
|
9
|
+
=================
|
10
|
+
|
7
11
|
## Spec
|
8
12
|
|
13
|
+
### default spec
|
14
|
+
|
15
|
+
$ bundle exec rake
|
16
|
+
|
9
17
|
### Appraisal for Multi Version Rails spec
|
10
18
|
|
11
|
-
rake appraisal:install
|
12
|
-
rake appraisal
|
19
|
+
$ bundle exec rake appraisal:install
|
20
|
+
$ bundle exec rake appraisal
|
21
|
+
|
22
|
+
## release gem
|
23
|
+
|
24
|
+
$ bundle exec rake build # build gem to pkg/ dir
|
25
|
+
$ bundle exec rake install # install to local gem
|
26
|
+
$ bundle exec rake release # release gem to rubygems.org
|
data/gemfiles/2.3.gemfile.lock
CHANGED
data/gemfiles/3.0.gemfile.lock
CHANGED
data/gemfiles/3.1.gemfile.lock
CHANGED
@@ -251,7 +251,7 @@ module CopyTunerClient
|
|
251
251
|
|
252
252
|
# @return [String] current project url by api_key
|
253
253
|
def project_url
|
254
|
-
URI::Generic.build(scheme
|
254
|
+
URI::Generic.build(:scheme => self.protocol, :host => self.host, :port => self.port.to_i, :path => "/projects/#{self.api_key}").to_s
|
255
255
|
end
|
256
256
|
|
257
257
|
private
|
@@ -38,8 +38,9 @@ module CopyTunerClient
|
|
38
38
|
# Returns locales availabile for this CopyTuner project.
|
39
39
|
# @return [Array<String>] available locales
|
40
40
|
def available_locales
|
41
|
+
return @available_locales if defined?(@available_locales)
|
41
42
|
cached_locales = cache.keys.map { |key| key.split('.').first }
|
42
|
-
(cached_locales + super).uniq.map { |locale| locale.to_sym }
|
43
|
+
@available_locales = (cached_locales + super).uniq.map { |locale| locale.to_sym }
|
43
44
|
end
|
44
45
|
|
45
46
|
# Stores the given translations.
|
@@ -195,7 +195,7 @@ end
|
|
195
195
|
share_examples_for 'applied configuration' do
|
196
196
|
subject { CopyTunerClient::Configuration.new }
|
197
197
|
let(:backend) { stub('i18n-backend') }
|
198
|
-
let(:cache) { stub('cache', download
|
198
|
+
let(:cache) { stub('cache', :download => "download") }
|
199
199
|
let(:client) { stub('client') }
|
200
200
|
let(:logger) { FakeLogger.new }
|
201
201
|
let(:poller) { stub('poller') }
|
@@ -54,7 +54,7 @@ describe CopyTunerClient::RequestSync do
|
|
54
54
|
before { cache.stubs(:flush => nil, :download => nil) }
|
55
55
|
|
56
56
|
context 'in interval request' do
|
57
|
-
subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 10, last_synced
|
57
|
+
subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 10, :last_synced => Time.now) }
|
58
58
|
it "does not flush defaults" do
|
59
59
|
subject.call(env)
|
60
60
|
cache.should_not have_received(:flush)
|
@@ -66,7 +66,7 @@ describe CopyTunerClient::RequestSync do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
context 'over interval request' do
|
69
|
-
subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 10, last_synced
|
69
|
+
subject { CopyTunerClient::RequestSync.new(app, :cache => cache, :interval => 10, :last_synced => Time.now - 60) }
|
70
70
|
it "flushes defaults" do
|
71
71
|
subject.call(env)
|
72
72
|
cache.should have_received(:flush)
|
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.0.
|
4
|
+
version: 0.0.14
|
5
5
|
prerelease:
|
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:
|
12
|
+
date: 2014-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: i18n
|
@@ -291,6 +291,7 @@ extra_rdoc_files: []
|
|
291
291
|
files:
|
292
292
|
- .gitignore
|
293
293
|
- .rspec
|
294
|
+
- .ruby-version
|
294
295
|
- .travis.yml
|
295
296
|
- Appraisals
|
296
297
|
- Gemfile
|
@@ -360,15 +361,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
360
361
|
- - ! '>='
|
361
362
|
- !ruby/object:Gem::Version
|
362
363
|
version: '0'
|
364
|
+
segments:
|
365
|
+
- 0
|
366
|
+
hash: -629752729228829469
|
363
367
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
364
368
|
none: false
|
365
369
|
requirements:
|
366
370
|
- - ! '>='
|
367
371
|
- !ruby/object:Gem::Version
|
368
372
|
version: '0'
|
373
|
+
segments:
|
374
|
+
- 0
|
375
|
+
hash: -629752729228829469
|
369
376
|
requirements: []
|
370
377
|
rubyforge_project:
|
371
|
-
rubygems_version: 1.8.23
|
378
|
+
rubygems_version: 1.8.23.2
|
372
379
|
signing_key:
|
373
380
|
specification_version: 3
|
374
381
|
summary: Client for the CopyTuner copy management service
|