rosette-client 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 936ddc8965abb6e1cfde1f50ea5c93e3a83692cc
4
- data.tar.gz: a40f035e3f0b359ee1ecb9d0eef706de16b95bfc
3
+ metadata.gz: 9394ee593441cd5f2fa908869d55e77db3f96aa0
4
+ data.tar.gz: 39ac2927bbd289d847b8540267be27937172c78b
5
5
  SHA512:
6
- metadata.gz: cccbbc279e2b8789695763ef1781aa47d899a73c17d30f2734fae6e5608bfc80a501295778925f39c622ef01f78b8cbb575a969da1d42e56832aa177d5cd20b1
7
- data.tar.gz: e7ea501370c74b4614d527299877147d2b60dbb9491785b1747c073648350ee5140c4bcc119e043cf1c13af60fc5af1e017fec9a105e351d154746478fbe8508
6
+ metadata.gz: 4e00b05b794b7712ff4b655fe7c46d87d940888841fa4a9770e4bb2882adef2b28a5bb625e5ca5e1db1f5b34e8c56467e02ec4631256209d1974c15356b7ff1c
7
+ data.tar.gz: 2ae55650a60c39f8d76dd3368fe8e6af7c0e165d8495988961ee2a66505e8fe9d2f3d519dc8efd1a2ef97952b2d7fee00b19395a150a6ac8e1afecdcd8a52669
@@ -23,3 +23,7 @@
23
23
  == 1.0.5
24
24
 
25
25
  * Pull command now parses args correctly.
26
+
27
+ == 1.0.6
28
+
29
+ * Pull command now accepts the -p path argument.
@@ -9,9 +9,9 @@ module Rosette
9
9
  module Client
10
10
  module Commands
11
11
 
12
- PullCommandArgs = Struct.new(:ref, :file_pattern, :serializer) do
12
+ PullCommandArgs = Struct.new(:ref, :file_pattern, :serializer, :paths) do
13
13
  def self.from_argv(argv, repo, terminal)
14
- options = {}
14
+ options = { paths: '' }
15
15
 
16
16
  parser = OptionParser.new do |opts|
17
17
  desc = "File pattern to use. Can contain these placeholders:\n" +
@@ -31,6 +31,13 @@ module Rosette
31
31
  serializer.strip!
32
32
  options[:serializer] = serializer.empty? ? nil : serializer
33
33
  end
34
+
35
+ desc = 'The paths to use to restrict the export to only phrases ' +
36
+ 'found at those paths. Should be pipe-separated.'
37
+
38
+ opts.on('-p paths', '--paths paths', desc) do |path|
39
+ options[:paths] = path.strip
40
+ end
34
41
  end
35
42
 
36
43
  parser.parse(argv)
@@ -40,7 +47,8 @@ module Rosette
40
47
  new(
41
48
  options[:ref],
42
49
  options[:file_pattern],
43
- options[:serializer]
50
+ options[:serializer],
51
+ options[:paths]
44
52
  )
45
53
  end
46
54
 
@@ -87,7 +95,8 @@ module Rosette
87
95
  ref: args.ref,
88
96
  locale: locale['code'],
89
97
  serializer: args.serializer,
90
- base_64_encode: true
98
+ base_64_encode: true,
99
+ paths: args.paths
91
100
  })
92
101
 
93
102
  handle_error(response) do |response|
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rosette
4
4
  module Client
5
- VERSION = "1.0.5"
5
+ VERSION = "1.0.6"
6
6
  end
7
7
  end
@@ -16,6 +16,7 @@ describe PullCommand do
16
16
  let(:commit_id) { base_repo.git('rev-parse HEAD').strip }
17
17
  let(:serializer) { 'yaml/rails' }
18
18
  let(:file_pattern) { 'config/locales/%{locale.code}.yml' }
19
+ let(:paths) { '' }
19
20
  let(:command) do
20
21
  PullCommand.new(
21
22
  api, terminal, writer, repo, [
@@ -43,7 +44,8 @@ describe PullCommand do
43
44
  repo_name: repo_name,
44
45
  ref: commit_id,
45
46
  serializer: serializer,
46
- base_64_encode: true
47
+ base_64_encode: true,
48
+ paths: paths
47
49
  }
48
50
  end
49
51
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rosette-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-04 00:00:00.000000000 Z
11
+ date: 2015-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.2.3
107
+ rubygems_version: 2.4.6
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Git command integration for the Rosette internationalization platform that