localeapp 2.2.0 → 2.3.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/CHANGELOG.md +4 -0
- data/features/push.feature +3 -3
- data/lib/localeapp/cli/push.rb +6 -3
- data/lib/localeapp/version.rb +1 -1
- data/spec/localeapp/cli/push_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e980b2b5650345f5dd313cc10d90565c933c80d
|
4
|
+
data.tar.gz: 71fb78f68e8ba17a77f455959e5ae93afba5b167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a250730215706813c93ec256abc58726f1174e21cc13a9a3cb8579c6abf7a4718c2b055102ab989c82a83bf7f770a6016e7f5230aec7467b206db8ef3856495
|
7
|
+
data.tar.gz: abbc4fdb58a0b443242893e96857ecee7630832e269244158354c99ea3cb231ffb5eda4bbd8bc1112070e0e944417e91d5ac28e085751dc3d16014aedc854393
|
data/CHANGELOG.md
CHANGED
data/features/push.feature
CHANGED
@@ -12,7 +12,7 @@ Feature: `push' command
|
|
12
12
|
Pushing file en.yml:
|
13
13
|
Success!
|
14
14
|
|
15
|
-
config/locales/en.yml queued for processing.
|
15
|
+
config/locales/en.yml queued for processing. (id: 12345)
|
16
16
|
"""
|
17
17
|
|
18
18
|
Scenario: Pushes all locales within given directory
|
@@ -28,12 +28,12 @@ Feature: `push' command
|
|
28
28
|
Pushing file en.yml:
|
29
29
|
Success!
|
30
30
|
|
31
|
-
config/locales/en.yml queued for processing.
|
31
|
+
config/locales/en.yml queued for processing. (id: 12345)
|
32
32
|
|
33
33
|
Pushing file es.yml:
|
34
34
|
Success!
|
35
35
|
|
36
|
-
config/locales/es.yml queued for processing.
|
36
|
+
config/locales/es.yml queued for processing. (id: 12345)
|
37
37
|
"""
|
38
38
|
|
39
39
|
Scenario: Reports an error when the given API key is incorrect
|
data/lib/localeapp/cli/push.rb
CHANGED
@@ -31,9 +31,12 @@ module Localeapp
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def report_success(response)
|
34
|
-
|
35
|
-
@output.puts
|
36
|
-
|
34
|
+
id = JSON.parse(response.body)["id"]
|
35
|
+
@output.puts <<-eoh
|
36
|
+
Success!
|
37
|
+
|
38
|
+
#{@file_path} queued for processing. (id: #{id})
|
39
|
+
eoh
|
37
40
|
end
|
38
41
|
|
39
42
|
def report_failure(response)
|
data/lib/localeapp/version.rb
CHANGED
@@ -57,3 +57,15 @@ describe Localeapp::CLI::Push, "#push_file(file_path)" do
|
|
57
57
|
pusher.push_file('foo')
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
61
|
+
describe Localeapp::CLI::Push, "#report_success" do
|
62
|
+
let(:output) { StringIO.new }
|
63
|
+
let(:body) { JSON.generate(id: 12345) }
|
64
|
+
let(:response) { double "response", body: body }
|
65
|
+
subject(:pusher) { described_class.new output: output }
|
66
|
+
|
67
|
+
it "prints the response import identifier on the output" do
|
68
|
+
pusher.report_success response
|
69
|
+
expect(output.string).to match /queued for processing.+id: 12345/
|
70
|
+
end
|
71
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localeapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Dell
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-08-
|
13
|
+
date: 2017-08-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n
|