qa_cube 0.0.9.1 → 0.1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43ca1d0ce472f43cd2ac66eced4c1b0289bae5d8
4
- data.tar.gz: 5eed9e78c68439374a9205b5a03343ff3fdf6701
3
+ metadata.gz: 1c668ed5362671c9f87c87d9f220c41a88cf7ed4
4
+ data.tar.gz: a49b4dcdf409c9b7850ff31bfb5b25455b9d2256
5
5
  SHA512:
6
- metadata.gz: 7a025af8a91d76c013aaf6e1b4a87c272a8901220797deecf03e55511a4c465c49914ad1e4450bcba3b187bda6a0674267dc07b4ed125d1aecbacc5e111a30e8
7
- data.tar.gz: 7bfed9dae484577dc0fb904eb751a99a552711c5dd629291c14cb06ecf29f0dabeeeedf09f8a269aff374c91dce013498dbe56e184b0fdd722198b223826f3a6
6
+ metadata.gz: 5129c685306b3c3a801231a06528df6b4db0d34556edd5bd72eeb1c875fbe3566f70307f5218ae64b4668d2a72dc11ec17f7f8acb9cbcbdc8b370da42596a565
7
+ data.tar.gz: b6c8053f2a71a5b01fb5a35a41b31735e2187750be159b42bc2e638ba2386bc8ec95ad70bfd3836faf2caed374da979797c3c559339e08fdf94aa54b7b669881
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # QaCube
2
2
 
3
- Various tools useful for QA written in `ruby`.
3
+ Will hopefully one day be a collection of tools useful for QA's/Test automation engineers working with *ruby*. Currently it's just one tool.
4
4
 
5
5
  Current contents:
6
6
  - Sheets-Appender
@@ -24,14 +24,20 @@ Or install it yourself as:
24
24
 
25
25
  ## Usage
26
26
 
27
- TODO: Write usage instructions here
28
-
29
- ## Development
27
+ #### Sheets Appender
28
+ ```
29
+ require 'google-sheets-appender'
30
30
 
31
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
31
+ range = 'A1:A'
32
+ spreadsheet_id = '0123456789abcdef'
33
+ sheet_name = 'ASheetName'
34
+ client_secret_path = '/directory/containing/client/secret/file/'
35
+ workspace = '/directory/containing/credentials/directory/' # You'll be prompted to generate a new key if no `.credentials` dir containing a valid key is found here.
32
36
 
33
- 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).
37
+ appender = QaCube::SheetsAppender.new(spreadsheet_id: spreadsheet_id, sheet_name: sheet_name, client_secrets_path: client_secret_path, range: range, workspace_dir: workspace_dir)
38
+ appender.append(values: [[a,b,c,d,e,f,g]])
34
39
 
40
+ ```
35
41
  ## Contributing
36
42
 
37
43
  Bug reports and pull requests are welcome on GitHub at https://github.com/btalpers/qa_cube.
@@ -19,10 +19,6 @@ module QaCube
19
19
  @verbose = false
20
20
  end
21
21
  @client_secrets_path = client_secrets_path
22
- if @client_secrets_path[-1] != "/"
23
- @client_secrets_path += '/'
24
- end
25
- @client_secrets_path += 'client_secret.json'
26
22
  @service = Google::Apis::SheetsV4::SheetsService.new
27
23
  @service.authorization = authorize
28
24
  @spreadsheet_id = spreadsheet_id
@@ -30,6 +26,12 @@ module QaCube
30
26
  @range = "\'#{sheet_name}\'!#{range}"
31
27
  end
32
28
 
29
+ # returns a 'ValueRange' (see: https://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/SheetsV4/ValueRange)
30
+ def read_sheet
31
+ sheet = @service.get_spreadsheet_values(@spreadsheet_id, @range)
32
+ sheet
33
+ end
34
+
33
35
  def append(values:)
34
36
  request_body = Google::Apis::SheetsV4::ValueRange.new({values: values})
35
37
  response = @service.append_spreadsheet_value(@spreadsheet_id, @range, request_body, value_input_option: "USER_ENTERED")
@@ -1,3 +1,3 @@
1
1
  module QaCube
2
- VERSION = "0.0.9.1"
2
+ VERSION = "0.1.0.0"
3
3
  end
data/qa_cube.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Bennett Talpers"]
10
10
  spec.email = ["bennett.talpers@gmail.com"]
11
11
 
12
- spec.summary = %q{A collection of QA tools.}
12
+ spec.summary = %q{Some tools useful for QA's, written in Ruby.}
13
13
  spec.description = %q{A collection of QA tooling. Currently only includes sheetsappender, which is a tool for appending data to an existing google sheets page}
14
14
  spec.homepage = "https://github.com/btalpers/qa_cube"
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qa_cube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9.1
4
+ version: 0.1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bennett Talpers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-24 00:00:00.000000000 Z
11
+ date: 2018-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -107,8 +107,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.6.11
111
111
  signing_key:
112
112
  specification_version: 4
113
- summary: A collection of QA tools.
113
+ summary: Some tools useful for QA's, written in Ruby.
114
114
  test_files: []