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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 778186a71665c8f24e361206ffa3b65ac2cee621
4
- data.tar.gz: 60bfaf8940fd301c0854e2c1d41d4a2d4862cab8
3
+ metadata.gz: 8e980b2b5650345f5dd313cc10d90565c933c80d
4
+ data.tar.gz: 71fb78f68e8ba17a77f455959e5ae93afba5b167
5
5
  SHA512:
6
- metadata.gz: '06567599ed2fa7388bdcbd49b448d426ebfa581566128af299520eac8e56c1b4c993e0fa48ae6eb34eabd4ea87e7803d228e8c693381dab6809ad754c2a4ab0b'
7
- data.tar.gz: 69ea7fb872f3f4524d448c31f968373a70e8db445b03328cb3392856d3e4e103363376cba9e51209c128adc9c907695cd0d033e17b385385121d16af1cea5c6f
6
+ metadata.gz: 1a250730215706813c93ec256abc58726f1174e21cc13a9a3cb8579c6abf7a4718c2b055102ab989c82a83bf7f770a6016e7f5230aec7467b206db8ef3856495
7
+ data.tar.gz: abbc4fdb58a0b443242893e96857ecee7630832e269244158354c99ea3cb231ffb5eda4bbd8bc1112070e0e944417e91d5ac28e085751dc3d16014aedc854393
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # master
2
2
 
3
+ # Version 2.3.0
4
+
5
+ * Report import identifier on push success
6
+
3
7
  # Version 2.2.0
4
8
 
5
9
  * Read API key from environment in generated config files, instead of
@@ -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
@@ -31,9 +31,12 @@ module Localeapp
31
31
  end
32
32
 
33
33
  def report_success(response)
34
- @output.puts "Success!"
35
- @output.puts ""
36
- @output.puts "#{@file_path} queued for processing."
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)
@@ -1,3 +1,3 @@
1
1
  module Localeapp
2
- VERSION = "2.2.0"
2
+ VERSION = "2.3.0"
3
3
  end
@@ -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.2.0
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-15 00:00:00.000000000 Z
13
+ date: 2017-08-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: i18n