abbyy-cloud 0.0.7 → 0.0.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: 22ccdf6c83c1c16d2d88e4e2c1db6e92350f855b
4
- data.tar.gz: 5487edca014bb2b01839ad1c018c417b9ba90d6e
3
+ metadata.gz: 938b0d59f4470c20fcf36a978dc3af2cc452f572
4
+ data.tar.gz: 7f714120a1f2f07cfb70584a0665f6c83beb754f
5
5
  SHA512:
6
- metadata.gz: 73afb10ed62e83e82275e2ed91b4dea2c4a84e3624b5b6352ed163f63bc34db49c0acdb3e824a8394232c8a9773e26628b1c8f43bd14e54a2def0edda5415822
7
- data.tar.gz: c3238c14723df68f93233c9f99d03b7203a82a1b09f84f25e190dab8597a126799baa4dbd66dc03b4a82fe1aa4fdd9d3230f3534684ed68bbc6739bc3a7c93e8
6
+ metadata.gz: cd173cce75744e96fbd2d176c9f76436433312f4d29f623793acc6f87eea43de16e3bcf96fd88fc96be7a9242a7a97189280286ba5b4abdb43542d404fecf773
7
+ data.tar.gz: fb9899694839692475db2373b008ba9839ecd9f1e197de4e6cd42b85934f766fd58feae413dda05a3d58e3743d5247d3e8803a156f4b0b62bde062626da41978
@@ -1,6 +1,14 @@
1
1
  # Master (to be released)
2
2
 
3
- [Compare v0.0.7...HEAD](https://github.com/nepalez/abbyy-cloud/compare/v0.0.7...HEAD)
3
+ [Compare v0.0.8...HEAD](https://github.com/nepalez/abbyy-cloud/compare/v0.0.8...HEAD)
4
+
5
+ # [v0.0.8 2016-09-17](https://github.com/nepalez/abbyy-cloud/tree/v0.0.8)
6
+
7
+ ### Bugs Fixed
8
+
9
+ * Remove unnecessary arguments of submitted order (nepalez)
10
+
11
+ [Compare v0.0.7...v0.0.8](https://github.com/nepalez/abbyy-cloud/compare/v0.0.7...v0.0.8)
4
12
 
5
13
  # [v0.0.7 2016-09-09](https://github.com/nepalez/abbyy-cloud/tree/v0.0.7)
6
14
 
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "abbyy-cloud"
6
- gem.version = "0.0.7"
6
+ gem.version = "0.0.8"
7
7
  gem.authors = ["Andrew Kozin"]
8
8
  gem.email = ["andrew.kozin@gmail.com"]
9
9
  gem.summary = "HTTP client to ABBYY Cloud API"
@@ -14,10 +14,9 @@ class ABBYY::Cloud
14
14
  attribute :email, Types::Strict::String.optional
15
15
  attribute :contact_culture, Types::Strict::String.optional
16
16
  attribute :contact_utc_offset, Types::Coercible::String.optional
17
- attribute :mt_engine, Types::Strict::String
17
+ attribute :mt_engine, Types::Strict::String.optional
18
18
  attribute :approval_required, Types::Form::Bool
19
19
  attribute :is_manual_estimation, Types::Form::Bool
20
- attribute :cost_type, Types::CostType
21
20
  attribute :unit_type, Types::UnitType
22
21
  attribute :currency, Types::Currency
23
22
  attribute :from, Types::Locale
@@ -25,6 +24,8 @@ class ABBYY::Cloud
25
24
  attribute :to, Types::FilledArray.member(Types::Locale)
26
25
  attribute :files, Types::FilledArray.member(Types::FileReference)
27
26
  attribute :category, Types::Strict::String.optional
27
+ attribute :cost_type,
28
+ Types::CostType.default(Models::CostType.new("Default"))
28
29
  end
29
30
 
30
31
  response_body Models::FullOrder
@@ -5,21 +5,13 @@ RSpec.describe "orders.create" do
5
5
 
6
6
  let(:request) do
7
7
  {
8
- type: "ht_professional",
9
- email: "user@example.com",
10
- contact_culture: "ru",
11
- contact_utc_offset: "+04:00Z",
12
- label: "baz",
13
- mt_engine: "Bing",
14
- approval_required: true,
15
- is_manual_estimation: true,
16
- cost_type: "SomeDiscounts",
17
- unit_type: "Words",
18
- currency: "RUB",
19
- from: "ru",
20
- to: ["de"],
21
- files: [{ id: "foo", token: "bar" }],
22
- category: "Games > Lego"
8
+ type: "ht_professional",
9
+ unit_type: "Words",
10
+ currency: "RUB",
11
+ from: "ru",
12
+ to: ["de"],
13
+ files: [{ id: "foo", token: "bar" }],
14
+ category: "Games > Lego"
23
15
  }
24
16
  end
25
17
 
@@ -116,15 +108,6 @@ RSpec.describe "orders.create" do
116
108
  end
117
109
  end
118
110
 
119
- context "without cost_type:" do
120
- before { request.delete :cost_type }
121
-
122
- it "raises ArgumentError without sending a request" do
123
- expect { subject }.to raise_error(ABBYY::Cloud::ArgumentError)
124
- expect(a_request(:any, //)).not_to have_been_made
125
- end
126
- end
127
-
128
111
  context "without unit_type:" do
129
112
  before { request.delete :unit_type }
130
113
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abbyy-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kozin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-14 00:00:00.000000000 Z
11
+ date: 2016-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-initializer