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 +4 -4
- data/History.txt +4 -0
- data/lib/rosette/client/commands/pull_command.rb +13 -4
- data/lib/rosette/client/version.rb +1 -1
- data/spec/commands/pull_command_spec.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9394ee593441cd5f2fa908869d55e77db3f96aa0
|
4
|
+
data.tar.gz: 39ac2927bbd289d847b8540267be27937172c78b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e00b05b794b7712ff4b655fe7c46d87d940888841fa4a9770e4bb2882adef2b28a5bb625e5ca5e1db1f5b34e8c56467e02ec4631256209d1974c15356b7ff1c
|
7
|
+
data.tar.gz: 2ae55650a60c39f8d76dd3368fe8e6af7c0e165d8495988961ee2a66505e8fe9d2f3d519dc8efd1a2ef97952b2d7fee00b19395a150a6ac8e1afecdcd8a52669
|
data/History.txt
CHANGED
@@ -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|
|
@@ -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.
|
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-
|
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.
|
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
|