testrail_api 1.1.4 → 1.1.5

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: c6f7720639e2ba3bd2b848adb7a7e79d2a465520
4
- data.tar.gz: 74ce8b582e4c144836a0795e38e3d0dc7352ef05
3
+ metadata.gz: 840efd8d6e369836653cefe4e32cbef7839b4cff
4
+ data.tar.gz: 02a305886c4b6f2e621f769c217111820646498a
5
5
  SHA512:
6
- metadata.gz: eb28d4dad5bde2d31c9ae0d57d0e7365aeedd51b2c34f2a22ce0fd99ac1608c69261de3c271dc02a65463aa5c8accc1c06d4993d251cb6af5ff102ce1b5b31f2
7
- data.tar.gz: cc7d3314cfa8c899759814b1bec561a26fd2649e52e8e0c653282a18b08947177e0a7356985434c7ebbbb0b3d70b544eb4ce6afd705a653d42bd9899f7fe9b5e
6
+ metadata.gz: 0f2de92adcc2a248126b033f60a353b28bd8d0b0a08612313517a5a92ca472906a9a3b35ba6fec8bc98aaff71905bf0cfbc3f50113c5ba4d086e4a64b020bd5b
7
+ data.tar.gz: cccc0d38383c177c70dfe8598784718d40ba91ae70d87a4c682f4c7d614fcba4fe1977963ca84b0d888f2c0a49b5d9d25a4ae5ab2d4dbbc1ab323faee6b221a9
data/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem 'testrail_api', '~> 0.1.1'
12
+ gem 'testrail_api', '~> 1.1.5'
13
13
  ```
14
14
 
15
15
  And then execute:
data/lib/testrail_api.rb CHANGED
@@ -1,6 +1 @@
1
- require 'core_ext/to_list'
2
-
3
- require 'typhoeus'
4
- require 'json'
5
-
6
1
  require 'testrail_api/client'
@@ -1,3 +1,5 @@
1
+ require 'core_ext/to_list'
2
+
1
3
  require 'testrail_api/client/case_fields'
2
4
  require 'testrail_api/client/case_types'
3
5
  require 'testrail_api/client/cases'
@@ -1,10 +1,12 @@
1
1
  require 'testrail_api/api'
2
2
  require 'testrail_api/default'
3
- require 'testrail_api/version'
3
+
4
+ require 'typhoeus'
5
+ require 'json'
4
6
 
5
7
  module TestRail
6
8
  class Client
7
- include API
9
+ include TestRail::Client::API
8
10
 
9
11
  attr_reader :server, :email, :password
10
12
 
@@ -41,7 +43,7 @@ module TestRail
41
43
  end
42
44
 
43
45
  def user_agent
44
- @user_agent ||= "TestRail API v2 Gem #{VERSION}"
46
+ @user_agent ||= "TestRail API v2 Gem #{TestRail::VERSION}"
45
47
  end
46
48
 
47
49
  def get(path, opts = {})
@@ -11,7 +11,7 @@ module TestRail
11
11
  # Default headers
12
12
  HEADERS ||= {
13
13
  'Content-Type' => MEDIA_TYPE,
14
- # 'Accept' => MEDIA_TYPE,
14
+ 'Accept' => MEDIA_TYPE,
15
15
  'User-Agent' => USER_AGENT
16
16
  }.freeze
17
17
  end
@@ -1,3 +1,3 @@
1
1
  module TestRail
2
- VERSION ||= '1.1.4'.freeze
2
+ VERSION ||= '1.1.5'.freeze
3
3
  end
data/test.rb ADDED
@@ -0,0 +1,31 @@
1
+ # a = { 'a' => 'b', 'b' => { 'c' => 'd' } }
2
+ # b = { 'a' => 'b', 'b' => { 'c' => 'f' } }
3
+ # c = { 'a' => 'b', 'b' => { 'c' => 'd' }, 'x' => 'z' }
4
+ #
5
+ # class Hash
6
+ # def deep_equal?(b)
7
+ # a = self
8
+ # keys = a.keys | b.keys
9
+ # keys.each do |k|
10
+ # a_v = a[k]
11
+ # b_v = b[k]
12
+ # if a_v.is_a?(Hash) && b_v.is_a?(Hash)
13
+ # res = a_v.deep_equal? b_v
14
+ # return false unless res
15
+ # end
16
+ # if a_v != b_v
17
+ # puts ({ k => [a_v, b_v] })
18
+ # return false
19
+ # end
20
+ # end
21
+ # true
22
+ # end
23
+ # end
24
+ #
25
+ # p a.deep_equal? c
26
+ # p a.deep_equal? b
27
+ # p b.deep_equal? c
28
+ #
29
+ # p c.deep_equal? a
30
+ # p b.deep_equal? a
31
+ # p c.deep_equal? b
data/test2.rb ADDED
@@ -0,0 +1,38 @@
1
+ # a = { 'a' => 'b', 'b' => { 'c' => 'd' } }
2
+ # b = { 'a' => 'b', 'b' => { 'c' => 'f' } }
3
+ # c = { 'a' => 'b', 'b' => { 'c' => 'd' }, 'x' => 'z' }
4
+ #
5
+ # def compare_hashes (hash1, hash2)
6
+ # diff = {}
7
+ # hash1.each do |k, v|
8
+ # if v.is_a?(Hash)
9
+ # compare_hashes(v, hash2[k])
10
+ # else
11
+ # if hash2[k] != v
12
+ # diff[k] = [v, hash2[k]]
13
+ # p diff
14
+ # return
15
+ # end
16
+ # end
17
+ # end
18
+ #
19
+ # hash2.each do |k, v|
20
+ # if v.is_a?(Hash)
21
+ # compare_hashes(v, hash1[k])
22
+ # else
23
+ # if hash1[k] != v
24
+ # diff[k] = [v, hash1[k]]
25
+ # p diff
26
+ # return
27
+ # end
28
+ # end
29
+ # end
30
+ # end
31
+ #
32
+ # p compare_hashes(a, c)
33
+ # p compare_hashes(b, c)
34
+ # p compare_hashes(a, b)
35
+ # #
36
+ # # p compare_hashes(c, a)
37
+ # # p compare_hashes(b, c)
38
+ # # p compare_hashes(b, a)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrail_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Zhukov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2016-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,6 +91,8 @@ files:
91
91
  - lib/testrail_api/client/users.rb
92
92
  - lib/testrail_api/default.rb
93
93
  - lib/testrail_api/version.rb
94
+ - test.rb
95
+ - test2.rb
94
96
  - testrail_api.gemspec
95
97
  homepage: https://github.com/kirillzh/testrail_api
96
98
  licenses: