crowdin-api 0.2.7 → 0.2.8

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: edab77917b7aa81877cf9b9059a86aec36ea9380
4
- data.tar.gz: 6eb9e4d0761a6f40e981c214927e7bfe15327869
3
+ metadata.gz: 64b8a63b7fb6d1093527bc7c30bb2148ac08c730
4
+ data.tar.gz: d33ba088a54b166682341a9d3582e8032bc0d8fb
5
5
  SHA512:
6
- metadata.gz: ae33ab347a97ecc33a40f0dee64f4f2cf69ad2df3de5032a87b79107e55e7d2617772adb9b3001155b00ddf60f63f3312f77dc6f4bc4b642b3e0469c0177f7cf
7
- data.tar.gz: 79e697e2bb4846105184f3ea378a564a7ccdd4d624c82f19981ca0f2aaa47c8974a6be6fd802133b9ec63f052e23d5fec4f88cb168a6aa69100bea0d3e2fdab6
6
+ metadata.gz: c2832d70dffea84d666d93e6e8532f8861c5b85cfb836cce10693a59a6e2933d05b10fa0c608f815d50f1b916c9abb82ada600df72f6912562e0efd83bad5179
7
+ data.tar.gz: 4853a03097840ee54d0f1c728b533b9cedf605a454f99e57b7421a739ece03e9cd1503ca49b668b11a737d1ed8a590bcf88dfeccb1df679914baa0afd7c94435
data/lib/crowdin-api.rb CHANGED
@@ -45,7 +45,8 @@ module Crowdin
45
45
  options = {
46
46
  :headers => {},
47
47
  :params => {},
48
- :timeout => nil,
48
+ :timeout => -1,
49
+ :open_timeout => -1,
49
50
  :key => @api_key,
50
51
  :'account-key' => @account_key,
51
52
  :json => true
@@ -1,5 +1,5 @@
1
1
  module Crowdin
2
2
  class API
3
- VERSION = "0.2.7"
3
+ VERSION = "0.2.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crowdin-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Crowdin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-05 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -43,28 +43,16 @@ email:
43
43
  - support@crowdin.net
44
44
  executables: []
45
45
  extensions: []
46
- extra_rdoc_files: []
46
+ extra_rdoc_files:
47
+ - README.md
48
+ - LICENSE
47
49
  files:
48
- - ".rspec"
49
- - ".ruby-gemset"
50
- - ".ruby-version"
51
- - Gemfile
52
- - Gemfile.lock
53
50
  - LICENSE
54
51
  - README.md
55
- - Rakefile
56
- - crowdin-api.gemspec
57
- - examples/Gemfile
58
- - examples/project_info.rb
59
52
  - lib/crowdin-api.rb
60
53
  - lib/crowdin-api/errors.rb
61
54
  - lib/crowdin-api/methods.rb
62
55
  - lib/crowdin-api/version.rb
63
- - spec/crowdin-api_spec.rb
64
- - spec/features/external_request_spec.rb
65
- - spec/spec_helper.rb
66
- - spec/support/fake_crowdin.rb
67
- - spec/support/fixtures/supported-languages.json
68
56
  homepage: https://github.com/crowdin/crowdin-api/
69
57
  licenses:
70
58
  - MIT
@@ -89,9 +77,4 @@ rubygems_version: 2.4.5
89
77
  signing_key:
90
78
  specification_version: 4
91
79
  summary: Client library to manage translations on Crowdin
92
- test_files:
93
- - spec/crowdin-api_spec.rb
94
- - spec/features/external_request_spec.rb
95
- - spec/spec_helper.rb
96
- - spec/support/fake_crowdin.rb
97
- - spec/support/fixtures/supported-languages.json
80
+ test_files: []
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- crowdin
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- ruby
data/Gemfile DELETED
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
- gemspec
3
-
4
- # Specify your gem's dependencies in crowdin-api.gemspec
5
- # gem 'rest-client', :git => 'git://github.com/rest-client/rest-client.git'
6
- gem 'rest-client', '~> 1.6.8'
7
-
8
- group :test do
9
- gem 'webmock'
10
- gem 'sinatra'
11
- end
data/Gemfile.lock DELETED
@@ -1,52 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- crowdin-api (0.2.6)
5
- rest-client (~> 1.6.8)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- addressable (2.3.6)
11
- crack (0.4.2)
12
- safe_yaml (~> 1.0.0)
13
- diff-lcs (1.2.5)
14
- mime-types (1.25.1)
15
- rack (1.6.0)
16
- rack-protection (1.5.3)
17
- rack
18
- rdoc (4.2.0)
19
- rest-client (1.6.8)
20
- mime-types (~> 1.16)
21
- rdoc (>= 2.4.2)
22
- rspec (3.1.0)
23
- rspec-core (~> 3.1.0)
24
- rspec-expectations (~> 3.1.0)
25
- rspec-mocks (~> 3.1.0)
26
- rspec-core (3.1.7)
27
- rspec-support (~> 3.1.0)
28
- rspec-expectations (3.1.2)
29
- diff-lcs (>= 1.2.0, < 2.0)
30
- rspec-support (~> 3.1.0)
31
- rspec-mocks (3.1.3)
32
- rspec-support (~> 3.1.0)
33
- rspec-support (3.1.2)
34
- safe_yaml (1.0.4)
35
- sinatra (1.4.5)
36
- rack (~> 1.4)
37
- rack-protection (~> 1.4)
38
- tilt (~> 1.3, >= 1.3.4)
39
- tilt (1.4.1)
40
- webmock (1.20.4)
41
- addressable (>= 2.3.6)
42
- crack (>= 0.3.2)
43
-
44
- PLATFORMS
45
- ruby
46
-
47
- DEPENDENCIES
48
- crowdin-api!
49
- rest-client (~> 1.6.8)
50
- rspec
51
- sinatra
52
- webmock
data/Rakefile DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env rake
2
- require "bundler/gem_tasks"
data/crowdin-api.gemspec DELETED
@@ -1,21 +0,0 @@
1
- require File.expand_path('../lib/crowdin-api/version', __FILE__)
2
-
3
- Gem::Specification.new do |gem|
4
- gem.name = 'crowdin-api'
5
- gem.version = Crowdin::API::VERSION
6
-
7
- gem.authors = ['Crowdin']
8
- gem.email = ['support@crowdin.net']
9
- gem.homepage = 'https://github.com/crowdin/crowdin-api/'
10
- gem.description = 'Ruby Client for the Crowdin API'
11
- gem.summary = 'Client library to manage translations on Crowdin'
12
- gem.license = 'MIT'
13
-
14
- gem.files = `git ls-files`.split($\)
15
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
- gem.require_paths = ['lib']
18
-
19
- gem.add_runtime_dependency 'rest-client', '~> 1.6.8'
20
- gem.add_development_dependency 'rspec', '~> 0'
21
- end
data/examples/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- #gem 'rest-client', :git => 'git://github.com/rest-client/rest-client.git'
4
- gem 'rest-client', '~> 1.6.8'
5
- gem 'crowdin-api', :path => '../'
@@ -1,22 +0,0 @@
1
- require 'bundler'
2
- Bundler.setup :default
3
-
4
- require 'crowdin-api'
5
- require 'logger'
6
- require 'pp'
7
-
8
- puts Crowdin::API::VERSION
9
-
10
- API_KEY = '79323cdcd6b4566154c4fb9c6bbd3be1'
11
- PROJECT_ID = 'rubytestapi'
12
-
13
- crowdin = Crowdin::API.new(api_key: API_KEY, project_id: PROJECT_ID, base_url: 'https://api.crowdin.com')
14
- crowdin.log = Logger.new $stderr
15
-
16
- pp crowdin.supported_languages
17
- #pp crowdin.project_info
18
-
19
- # crowdin.add_directory('test')
20
- # file = { :dest => '/test.txt', :source => 'test.txt', :export_pattern => '/%three_letters_code%/%original_file_name%' }
21
- # crowdin.add_file([] << file)
22
- # crowdin.update_file([] << file)
@@ -1,16 +0,0 @@
1
- require 'spec_helper'
2
- require 'crowdin-api'
3
-
4
- describe Crowdin::API do
5
- before(:each) do
6
- @crowdin_client = Crowdin::API.new
7
- end
8
-
9
- it 'should have a version' do
10
- expect(Crowdin::API::VERSION).to eq('0.2.5')
11
- end
12
-
13
- it 'should get a list of supported languages' do
14
- expect(@crowdin_client.supported_languages).to eq([{}])
15
- end
16
- end
@@ -1,11 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'External request' do
4
- it 'should call crowdin api' do
5
- uri = URI('https://api.crowdin.com//api/project/123/supported-languages')
6
-
7
- response = JSON.load(Net::HTTP.get(uri))
8
-
9
- expect(response).to eq([{}])
10
- end
11
- end
data/spec/spec_helper.rb DELETED
@@ -1,101 +0,0 @@
1
- # This file was generated by the `rspec --init` command. Conventionally, all
2
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
- # file to always be loaded, without a need to explicitly require it in any files.
5
- #
6
- # Given that it is always loaded, you are encouraged to keep this file as
7
- # light-weight as possible. Requiring heavyweight dependencies from this file
8
- # will add to the boot time of your test suite on EVERY test run, even for an
9
- # individual file that may not need all of that loaded. Instead, consider making
10
- # a separate helper file that requires the additional dependencies and performs
11
- # the additional setup, and require it from the spec files that actually need it.
12
- #
13
- # The `.rspec` file also contains a few flags that are not defaults but that
14
- # users commonly want.
15
- #
16
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
-
18
- require 'json'
19
-
20
- require 'webmock/rspec'
21
- WebMock.disable_net_connect!(allow_localhost: true)
22
-
23
- require 'support/fake_crowdin'
24
-
25
- RSpec.configure do |config|
26
- # rspec-expectations config goes here. You can use an alternate
27
- # assertion/expectation library such as wrong or the stdlib/minitest
28
- # assertions if you prefer.
29
- config.expect_with :rspec do |expectations|
30
- # This option will default to `true` in RSpec 4. It makes the `description`
31
- # and `failure_message` of custom matchers include text for helper methods
32
- # defined using `chain`, e.g.:
33
- # be_bigger_than(2).and_smaller_than(4).description
34
- # # => "be bigger than 2 and smaller than 4"
35
- # ...rather than:
36
- # # => "be bigger than 2"
37
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
38
- end
39
-
40
- # rspec-mocks config goes here. You can use an alternate test double
41
- # library (such as bogus or mocha) by changing the `mock_with` option here.
42
- config.mock_with :rspec do |mocks|
43
- # Prevents you from mocking or stubbing a method that does not exist on
44
- # a real object. This is generally recommended, and will default to
45
- # `true` in RSpec 4.
46
- mocks.verify_partial_doubles = true
47
- end
48
-
49
- config.before(:each) do
50
- stub_request(:any, /api.crowdin.com/).to_rack(FakeCrowdin)
51
- end
52
-
53
- # The settings below are suggested to provide a good initial experience
54
- # with RSpec, but feel free to customize to your heart's content.
55
- =begin
56
- # These two settings work together to allow you to limit a spec run
57
- # to individual examples or groups you care about by tagging them with
58
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
59
- # get run.
60
- config.filter_run :focus
61
- config.run_all_when_everything_filtered = true
62
-
63
- # Limits the available syntax to the non-monkey patched syntax that is recommended.
64
- # For more details, see:
65
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
66
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
67
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
68
- config.disable_monkey_patching!
69
-
70
- # This setting enables warnings. It's recommended, but in some cases may
71
- # be too noisy due to issues in dependencies.
72
- config.warnings = true
73
-
74
- # Many RSpec users commonly either run the entire suite or an individual
75
- # file, and it's useful to allow more verbose output when running an
76
- # individual spec file.
77
- if config.files_to_run.one?
78
- # Use the documentation formatter for detailed output,
79
- # unless a formatter has already been configured
80
- # (e.g. via a command-line flag).
81
- config.default_formatter = 'doc'
82
- end
83
-
84
- # Print the 10 slowest examples and example groups at the
85
- # end of the spec run, to help surface which specs are running
86
- # particularly slow.
87
- config.profile_examples = 10
88
-
89
- # Run specs in random order to surface order dependencies. If you find an
90
- # order dependency and want to debug it, you can fix the order by providing
91
- # the seed, which is printed after each run.
92
- # --seed 1234
93
- config.order = :random
94
-
95
- # Seed global randomization in this process using the `--seed` CLI option.
96
- # Setting this allows you to use `--seed` to deterministically reproduce
97
- # test failures related to randomization by passing the same `--seed` value
98
- # as the one that triggered the failure.
99
- Kernel.srand config.seed
100
- =end
101
- end
@@ -1,19 +0,0 @@
1
- require 'sinatra/base'
2
-
3
- class FakeCrowdin < Sinatra::Base
4
- get '/api/project/:project_identifier/supported-languages' do
5
- json_response 200, 'supported-languages.json'
6
- end
7
-
8
- get '/api/project/supported-languages' do
9
- json_response 200, 'supported-languages.json'
10
- end
11
-
12
- private
13
-
14
- def json_response(response_code, file_name)
15
- content_type :json
16
- status response_code
17
- File.open(File.dirname(__FILE__) + '/fixtures/' + file_name, 'rb').read
18
- end
19
- end
@@ -1 +0,0 @@
1
- [{}]