crowdin-api 0.4.1 → 0.5.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: 8c138f45a8854edffda7bcb6bc573895758b6e20
4
- data.tar.gz: aa1132583f473f6b27d6a3631f8353fb6fb74072
3
+ metadata.gz: d8029f63eaa8d5f48f6c6e8d9c42df69c04300db
4
+ data.tar.gz: a54c19e8ae9e6547b3e924c7caa5d4cf68e57d89
5
5
  SHA512:
6
- metadata.gz: cb3a25cd79a827e583cf4329b086d9b5156b6de3f5bdb6afeafd944b09c3b3b923dd557c9b312c94840a1a53bf67022aced7ed029e555017c213110049e6d896
7
- data.tar.gz: fc721048b93b6f4961d4b5457af231398d509a950e65623aa1d4c09128b61d342e38113c8276e7535094389c7b867c5c4502ee4f4c8121b135816d2940633110
6
+ metadata.gz: a48309684f64281309cf81e639353a6139ce8e61c2e7ed2a9cb51979dd337b5de35461d7d86a88e68c361057e27e12ef138748a85cab33e3997adc4ea30d5d47
7
+ data.tar.gz: cd1aa0400e8e0763f78d2bf52ea03c89a4e7a51cea239b648cd33cae7f77d6c962c0ce9b5fbfbdf9a9bbba8c247b33555488e01343452d9f7f3c0617d014ca92
@@ -47,7 +47,6 @@ module Crowdin
47
47
  :headers => {},
48
48
  :params => {},
49
49
  :timeout => nil,
50
- :open_timeout => nil,
51
50
  :key => @api_key,
52
51
  :'account-key' => @account_key,
53
52
  :json => true
@@ -87,7 +86,7 @@ module Crowdin
87
86
  }
88
87
  end
89
88
 
90
- log.debug("args: #{@response.args}") if log
89
+ log.debug("args: #{@response.request.args}") if log
91
90
 
92
91
  if @response.headers[:content_disposition]
93
92
  filename = params[:output] || @response.headers[:content_disposition][/attachment; filename="(.+?)"/, 1]
@@ -37,12 +37,12 @@ module Crowdin
37
37
  ] }]
38
38
 
39
39
  params[:titles] = Hash[files.map { |f| [f[:dest], f[:title]] }]
40
- params[:titles].delete_if { |k, v| v.nil? }
40
+ params[:titles].delete_if { |_, v| v.nil? }
41
41
 
42
42
  params[:export_patterns] = Hash[files.map { |f| [f[:dest], f[:export_pattern]] }]
43
- params[:export_patterns].delete_if { |k, v| v.nil? }
43
+ params[:export_patterns].delete_if { |_, v| v.nil? }
44
44
 
45
- params.delete_if { |k, v| v.to_s.empty? }
45
+ params.delete_if { |_, v| v.respond_to?(:empty?) ? !!v.empty? : !v }
46
46
 
47
47
  request(
48
48
  :method => :post,
@@ -80,12 +80,12 @@ module Crowdin
80
80
  }]
81
81
 
82
82
  params[:titles] = Hash[files.map { |f| [f[:dest], f[:title]] }]
83
- params[:titles].delete_if { |k, v| v.nil? }
83
+ params[:titles].delete_if { |_, v| v.nil? }
84
84
 
85
85
  params[:export_patterns] = Hash[files.map { |f| [f[:dest], f[:export_pattern]] }]
86
- params[:export_patterns].delete_if { |k, v| v.nil? }
86
+ params[:export_patterns].delete_if { |_, v| v.nil? }
87
87
 
88
- params.delete_if { |k, v| v.to_s.empty? }
88
+ params.delete_if { |_, v| v.respond_to?(:empty?) ? !!v.empty? : !v }
89
89
 
90
90
  request(
91
91
  :method => :post,
@@ -1,5 +1,5 @@
1
1
  module Crowdin
2
2
  class API
3
- VERSION = "0.4.1"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,117 +1,117 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdin-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Crowdin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-07 00:00:00.000000000 Z
11
+ date: 2017-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.8'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.8'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.4'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: webmock
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '2.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sinatra
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.4'
62
- - - '>='
62
+ - - ">="
63
63
  - !ruby/object:Gem::Version
64
64
  version: 1.4.7
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ~>
69
+ - - "~>"
70
70
  - !ruby/object:Gem::Version
71
71
  version: '1.4'
72
- - - '>='
72
+ - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: 1.4.7
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: bundler
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ~>
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '1.9'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ~>
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '1.9'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rake
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ~>
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
95
  version: '10.0'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ~>
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '10.0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: pry
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - ~>
107
+ - - "~>"
108
108
  - !ruby/object:Gem::Version
109
109
  version: 0.10.3
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - ~>
114
+ - - "~>"
115
115
  - !ruby/object:Gem::Version
116
116
  version: 0.10.3
117
117
  description: Ruby Client for the Crowdin API
@@ -123,12 +123,12 @@ extra_rdoc_files:
123
123
  - README.md
124
124
  - LICENSE
125
125
  files:
126
- - README.md
127
126
  - LICENSE
127
+ - README.md
128
+ - lib/crowdin-api.rb
128
129
  - lib/crowdin-api/errors.rb
129
- - lib/crowdin-api/version.rb
130
130
  - lib/crowdin-api/methods.rb
131
- - lib/crowdin-api.rb
131
+ - lib/crowdin-api/version.rb
132
132
  homepage: https://github.com/crowdin/crowdin-api/
133
133
  licenses:
134
134
  - MIT
@@ -139,17 +139,17 @@ require_paths:
139
139
  - lib
140
140
  required_ruby_version: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - '>='
142
+ - - ">="
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  requirements:
147
- - - '>='
147
+ - - ">="
148
148
  - !ruby/object:Gem::Version
149
149
  version: '0'
150
150
  requirements: []
151
151
  rubyforge_project:
152
- rubygems_version: 2.0.14.1
152
+ rubygems_version: 2.5.2
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Client library to manage translations on Crowdin