crowdin-api 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 6fc3e6ce99176c2e43fe93292f96253687aea7f6
4
+ data.tar.gz: ec88ff09da3da4fcffdcbb1bb08e58b12a1817b7
5
+ SHA512:
6
+ metadata.gz: 2ddef5cb15eb1ab063d9e8e96ef89fb029cce895ca5ed827d06fb33aac75e924f105d03eb0b05e905b4fe6ab64226748775a5514ef67d1781c80736a7ddc350b
7
+ data.tar.gz: f17b2f18e3b42302357f6988073abc05820eace9dd49c8898da5eb96ae53fe51151901b2c1efd5ee9f23800d931ff074acb38b6aff2c14058f2f4c9ee8606a5c
@@ -59,10 +59,14 @@ module Crowdin
59
59
  # POST http://api.crowdin.net/api/project/{project-identifier}/update-file?key={project-key}
60
60
  #
61
61
  def update_file(files, params = {})
62
- params[:files] = Hash[files.map{ |f| [
63
- f[:dest] || raise(ArgumentError, "'`:dest` is required'"),
64
- ::File.open(f[:source] || raise(ArgumentError, "'`:source` is required'") )
65
- ] }]
62
+ params[:files] = Hash[files.map{ |f|
63
+ dest = f[:dest] || raise(ArgumentError, "'`:dest` is required'")
64
+ source = ::File.open(f[:source] || raise(ArgumentError, "'`:source` is required'"))
65
+ source.define_singleton_method(:original_filename) do
66
+ dest
67
+ end
68
+ [dest, source]
69
+ }]
66
70
 
67
71
  params[:titles] = Hash[files.map{ |f| [f[:dest], f[:title]] }]
68
72
  params[:titles].delete_if{ |k, v| v.nil? }
@@ -1,5 +1,5 @@
1
1
  module Crowdin
2
2
  class API
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,30 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdin-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
5
- prerelease:
4
+ version: 0.2.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Crowdin
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-07-08 00:00:00.000000000 Z
11
+ date: 2014-07-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rest-client
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.7.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 1.7.0
30
27
  description: Ruby Client for the Crowdin API
@@ -48,26 +45,26 @@ files:
48
45
  homepage: https://github.com/crowdin/crowdin-api/
49
46
  licenses:
50
47
  - MIT
48
+ metadata: {}
51
49
  post_install_message:
52
50
  rdoc_options: []
53
51
  require_paths:
54
52
  - lib
55
53
  required_ruby_version: !ruby/object:Gem::Requirement
56
- none: false
57
54
  requirements:
58
- - - ! '>='
55
+ - - '>='
59
56
  - !ruby/object:Gem::Version
60
57
  version: '0'
61
58
  required_rubygems_version: !ruby/object:Gem::Requirement
62
- none: false
63
59
  requirements:
64
- - - ! '>='
60
+ - - '>='
65
61
  - !ruby/object:Gem::Version
66
62
  version: '0'
67
63
  requirements: []
68
64
  rubyforge_project:
69
- rubygems_version: 1.8.23
65
+ rubygems_version: 2.2.2
70
66
  signing_key:
71
- specification_version: 3
67
+ specification_version: 4
72
68
  summary: Client library to manage translations on Crowdin
73
69
  test_files: []
70
+ has_rdoc: