testrail_helper 0.0.1 → 0.0.2

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: b0179f957feb7015c0c1bbe73b2148bc0f4076e9
4
- data.tar.gz: cc020c62417f7e41b551dacec736bd7c74b30f1f
3
+ metadata.gz: 226cdeb774cca9ece1397a15d95b02a557371319
4
+ data.tar.gz: 85fcf6d22b6668b3831aa91db30eb0e8b303350d
5
5
  SHA512:
6
- metadata.gz: 7544aabd9f8a76675525ab6e900f0d643dc862790fb00e0474b6038db34586c6cff8b3ea4ad3d14200c853a5b83c0a14cf95f0f346e023f2f31f549a176584ac
7
- data.tar.gz: 06d0def213fcae9fab84f83d2bb747103bf2654bdb5eeb0bef95596fcb6dd3fde9e4eba2245faa10b94a6f52dcdb01e9c7e26fcebe3f6f8cf83921ffcb3d5749
6
+ metadata.gz: f9230bae3bab5e0fb952963093554e3b80b1091a39fd2908f83b373cd8ae28e17f69bc75b668785f12ac5ccdd35874083fc4bd3fed792f8aeb1dc92d7582dc55
7
+ data.tar.gz: 278f7c9bbb7a4d5f1780e5f27391872560ecd3f4c3de50c7309797097a75984cd203b604b9b155d356d43e8fbc0043a882bcb8b6f5669ad1b26f5900d402880d
data/Gemfile.lock ADDED
@@ -0,0 +1,35 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ testrail_helper (0.0.1)
5
+ json
6
+ testrail
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (3.2.22)
12
+ i18n (~> 0.6, >= 0.6.4)
13
+ multi_json (~> 1.0)
14
+ httparty (0.11.0)
15
+ multi_json (~> 1.0)
16
+ multi_xml (>= 0.5.2)
17
+ i18n (0.7.0)
18
+ json (1.8.3)
19
+ multi_json (1.11.2)
20
+ multi_xml (0.5.5)
21
+ rake (10.4.2)
22
+ testrail (0.0.3)
23
+ activesupport (~> 3.1)
24
+ httparty (~> 0.11.0)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ bundler (~> 1.10)
31
+ rake (~> 10.0)
32
+ testrail_helper!
33
+
34
+ BUNDLED WITH
35
+ 1.10.5
data/README.md CHANGED
@@ -16,7 +16,7 @@ And then execute:
16
16
 
17
17
  Or install it yourself as:
18
18
 
19
- $ gem install testrail_helperr
19
+ $ gem install testrail_helper
20
20
 
21
21
  ## Usage
22
22
 
@@ -39,7 +39,7 @@ write_to_file(cases,'/output/filename')
39
39
 
40
40
  ## Development
41
41
 
42
- After checking out the re`po, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
42
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
43
43
 
44
44
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
45
45
 
@@ -54,6 +54,20 @@ module TestrailHelper
54
54
  @master_list
55
55
  end
56
56
 
57
+ def update_test_case(case_id,params={})
58
+ puts "updating"
59
+ params.merge({title:get_title(case_id)})
60
+ puts params
61
+ uri = "update_case/#{case_id}"
62
+ puts @client.send_post(uri,params)
63
+ end
64
+
65
+ def get_title(case_id)
66
+ puts "getting title"
67
+ uri = "get_case/#{case_id}"
68
+ @client.send_get(uri)
69
+ end
70
+
57
71
  def write_to_file(list,filename)
58
72
  File.open(filename, "w+") do |f|
59
73
  list.each { |element| f.puts(element) }
@@ -1,3 +1,3 @@
1
1
  module TestrailHelper
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/test.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/lib/testrail_helper')
2
2
 
3
3
  # create a new client
4
- client = TestrailHelper::Client.new(username:'',password: '',url: 'https://blarg.testrail.com/')
4
+ client = TestrailHelper::Client.new(username:'mattfairbourn@gmail.com',password: 'CanvasP@$$',url: 'https://canvas.testrail.com/')
5
5
 
6
6
  # get a list of test cases by passing in the suite_id and section_id
7
7
  cases = client.get_all_test_cases_in_section(suite_id: "729", section_id: "8")
@@ -13,4 +13,7 @@ filtered_cases_with_and = client.filter_by_fields_and(cases,priority_id: 4, crea
13
13
  filtered_cases_with_or = client.filter_by_fields_or(cases,priority_id: 4, created_by: 34)
14
14
 
15
15
  # write list to file
16
- write_to_file(cases,'/output/filename')
16
+ write_to_file(cases,'/output/filename')
17
+
18
+ # update test case with desired params.
19
+ client.update_test_case(217617,type_id:3,custom_automated:true,custom_preconds:"blarg")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrail_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kinezu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-12 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -73,6 +73,7 @@ extensions: []
73
73
  extra_rdoc_files: []
74
74
  files:
75
75
  - Gemfile
76
+ - Gemfile.lock
76
77
  - LICENSE.txt
77
78
  - README.md
78
79
  - Rakefile