txgh 6.5.0 → 6.6.0

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: 43ad276d28ee9faf7890b9999a37781339d47595
4
- data.tar.gz: c4b12bcb3597a32bbeaeda790db3c2787b532deb
3
+ metadata.gz: 65977e1c05affd675121705335cd6f2953760620
4
+ data.tar.gz: 41dfe7023a6b6ba8a0b61837bf9ada4bd53c58ff
5
5
  SHA512:
6
- metadata.gz: fe5c554ed24c469465af5478dbcd5cd33a4cf56b2cad1b5e2577354c18d93a7a5bd07a52fd3d5806ea536ce4d0657b644fb5d84f9c66ab12370a4f4b9abdc319
7
- data.tar.gz: b94497fd76c0612bf47be298525bb03582ad6bafde70562e5b8e6cee39d1f5eb7dde2bd83190aec005dc3fcb098c275207feae057f6294c40cae7855fd40b860
6
+ metadata.gz: ee73e9f783884a37fbf3a095f99a389e6a00e802f40126a270d64659ee2e540a245b98c7f0aca49f9eb8400346d7aceec551a46e42b52a122f543eb593481480
7
+ data.tar.gz: 0fbd8d7e317674ebf2a13d1f4ded8f77ccb0ab05b4f1291bc30f80bdc48fd42a29015b2c0ea5ab335dd58eecc1553ff5fc889668d098841de7e6ae36abcf2a1f
@@ -94,9 +94,15 @@ module Txgh
94
94
  false
95
95
  end
96
96
 
97
- def download(tx_resource, lang)
98
- project_slug = tx_resource.project_slug
99
- resource_slug = tx_resource.resource_slug
97
+ def download(*args)
98
+ project_slug, resource_slug = case args.first
99
+ when TxResource, TxBranchResource
100
+ [args.first.project_slug, args.first.resource_slug]
101
+ else
102
+ [args[0], args[1]]
103
+ end
104
+
105
+ lang = args.last
100
106
 
101
107
  json_data = get_json(
102
108
  "#{API_ROOT}/project/#{project_slug}/resource/#{resource_slug}/translation/#{lang}/"
@@ -1,3 +1,3 @@
1
1
  module Txgh
2
- VERSION = '6.5.0'
2
+ VERSION = '6.6.0'
3
3
  end
@@ -10,4 +10,8 @@ class TestEvents < Txgh::Events
10
10
  published << { channel: channel, options: options }
11
11
  super
12
12
  end
13
+
14
+ def published_in(channel)
15
+ published.select { |event| event[:channel] == channel }
16
+ end
13
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txgh
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.5.0
4
+ version: 6.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Jackowski
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-27 00:00:00.000000000 Z
12
+ date: 2018-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: abroad
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  version: '0'
205
205
  requirements: []
206
206
  rubyforge_project:
207
- rubygems_version: 2.5.1
207
+ rubygems_version: 2.4.5.5
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: A library for syncing translation resources between Github and Transifex.