lt-google-api 0.1.0 → 0.1.1

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
  SHA256:
3
- metadata.gz: 7ea9aea369ed0e260419ed6e8cb2bc477cdfcc9206de728d47923606880bd5ec
4
- data.tar.gz: f77ae355c24ab032a4e0493bdd59125adeaae6a1c3245f818ba47e4c20c1eaeb
3
+ metadata.gz: 2396f1acdc1cc0370e8a3443bf3e13e6c3d436e9abc5a0cbb7f586121095194a
4
+ data.tar.gz: b9eae1600c9b30bac463c5b8ec1b39ca800b092306468c02adf5ce250c29264d
5
5
  SHA512:
6
- metadata.gz: 6d2bed2e4b25ff71e5fc08b1ecaf2448f6c22e9769ce343b358c248dc460ea8fbe31d7b9f0d5bbf926b3099b2fbd33e2e6ac2918e380b8e0cb352664b8ad8ec8
7
- data.tar.gz: d8d250f4947d90789cc7d4b49313a7140bd9eccd2600a73fc4c77ba7c68d70326b40893fbd43acd8bdb47c4440ad781eaec37b415037d9cc7931051932cfe79d
6
+ metadata.gz: 5128bd51df7d59ce37e382411dc69b9794fd3014a490c0d5762994cb01d6e372246d383778812257b55b3787151f7dc5f0fe8197692459862705c668ff851a99
7
+ data.tar.gz: c025162a5a4802d00409aa60958f6b51b6f174b45f4289321943d9b4f3248839fb07a4a7f1dc08efaeed4482b97aaaed60f99da98ed1867509464f143ac9340e
@@ -0,0 +1,78 @@
1
+ version: "2"
2
+ checks:
3
+ argument-count:
4
+ enabled: true
5
+ config:
6
+ threshold: 5
7
+ complex-logic:
8
+ enabled: true
9
+ config:
10
+ threshold: 4
11
+ file-lines:
12
+ enabled: true
13
+ config:
14
+ threshold: 1000
15
+ method-complexity:
16
+ enabled: true
17
+ config:
18
+ threshold: 20
19
+ method-count:
20
+ enabled: true
21
+ config:
22
+ threshold: 45
23
+ method-lines:
24
+ enabled: false
25
+ nested-control-flow:
26
+ enabled: true
27
+ config:
28
+ threshold: 4
29
+ return-statements:
30
+ enabled: true
31
+ config:
32
+ threshold: 4
33
+ similar-code:
34
+ enabled: true
35
+ config:
36
+ threshold: 75
37
+ identical-code:
38
+ enabled: true
39
+ config:
40
+ threshold: 25
41
+ engines:
42
+ duplication:
43
+ # Duplication analyzes JavaScript (including JSX and ES6), PHP, Python,
44
+ # and Ruby code for structural similarities.
45
+ enabled: true
46
+ config:
47
+ languages:
48
+ - ruby
49
+ - javascript
50
+ fixme:
51
+ enabled: true
52
+ config:
53
+ strings:
54
+ - BUG
55
+ - FIXME
56
+ - HACK
57
+ rubocop:
58
+ # Style and quality checks for Ruby code.
59
+ # Includes support for modern Rubies (2.2+).
60
+ enabled: true
61
+ channel: rubocop-0-59
62
+ exclude_paths:
63
+ - vendor/
64
+ ratings:
65
+ # to receive a letter grade for a particular file or overall GPA for your project
66
+ paths:
67
+ - "app/**/*"
68
+ - "lib/**/*"
69
+ - "**.rb"
70
+ - "**.js"
71
+ exclude_paths:
72
+ - app/assets/javascripts/vendor/**/*
73
+ - features/**/*
74
+ - spec/**/*
75
+ - vendor/**/*
76
+ - node_modules/**/*
77
+ - db/**/*
78
+ - config/**/*
@@ -0,0 +1,21 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased](https://github.com/learningtapestry/lt-google-api/compare/v0.1.1...HEAD)
8
+
9
+ ## [0.1.1](https://github.com/learningtapestry/lt-lcms/compare/v0.1.0...v0.1.1) - 2019-06-10
10
+
11
+ ### Added
12
+
13
+ - Add Codeship and Codeclimate integrations [@paranoicsan](https://github.com/paranoicsan)
14
+
15
+ ### Fixed
16
+
17
+ - Ignores files marked as TRASHED on fetch IDs [@paranoicsan](https://github.com/paranoicsan)
18
+
19
+ ## [0.1.0] - 2019-03-12
20
+
21
+ - Initial release
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Lt::Google::Api
2
2
 
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/14c045858a1bdf132c3f/maintainability)](https://codeclimate.com/github/learningtapestry/lt-google-api/maintainability)
4
+ [![Codeship Status for learningtapestry/lt-google-api](https://app.codeship.com/projects/c23dbbf0-26f8-0137-d557-666da1a91ebd/status?branch=master)](https://app.codeship.com/projects/330486)
5
+
3
6
  ## Installation
4
7
 
5
8
  Add this line to your application's Gemfile:
@@ -73,7 +73,7 @@ module Lt
73
73
  mime_type: MIME_FOLDER,
74
74
  parents: [parent_id]
75
75
  )
76
- service.create_file(metadata).id
76
+ service.create_file(metadata)&.id
77
77
  end
78
78
 
79
79
  def list_file_ids_in(folder_id, mime_type: MIME_FILE, with_subfolders: true)
@@ -81,10 +81,11 @@ module Lt
81
81
  page_token = nil
82
82
  loop do
83
83
  response = service.list_files(
84
- q: "'#{folder_id}' in parents",
84
+ q: "'#{folder_id}' in parents and trashed = false",
85
85
  fields: 'files(id, mime_type), nextPageToken',
86
86
  page_token: page_token
87
87
  )
88
+ break if response.nil?
88
89
 
89
90
  response.files.each do |f|
90
91
  case f.mime_type
@@ -104,7 +105,7 @@ module Lt
104
105
  service.list_files(
105
106
  q: "'#{folder_id}' in parents and name = '#{name}' and mimeType = '#{MIME_FOLDER}' and trashed = false",
106
107
  fields: 'files(id)'
107
- ).files
108
+ )&.files
108
109
  end
109
110
 
110
111
  private
@@ -113,7 +114,7 @@ module Lt
113
114
  service.list_files(
114
115
  q: "'#{folder_id}' in parents and mimeType = '#{MIME_FILE}' and trashed = false",
115
116
  fields: 'files(id, name)'
116
- ).files
117
+ )&.files
117
118
  end
118
119
  end
119
120
  end
@@ -3,7 +3,7 @@
3
3
  module Lt
4
4
  module Google
5
5
  module Api
6
- VERSION = '0.1.0'
6
+ VERSION = '0.1.1'
7
7
  end
8
8
  end
9
9
  end
@@ -34,10 +34,9 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
34
34
  spec.add_dependency 'google-api-client'
35
35
  spec.add_dependency 'googleauth'
36
36
 
37
- spec.add_development_dependency 'brakeman'
38
37
  spec.add_development_dependency 'bundler', '~> 1.16'
39
38
  spec.add_development_dependency 'bundler-audit'
40
- spec.add_development_dependency 'overcommit', '~> 0.46'
39
+ spec.add_development_dependency 'overcommit', '~> 0.49.1'
41
40
  spec.add_development_dependency 'rake', '~> 10.0'
42
- spec.add_development_dependency 'rubocop'
41
+ spec.add_development_dependency 'rubocop', '~> 0.59.2'
43
42
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lt-google-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kuznetsov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-12 00:00:00.000000000 Z
11
+ date: 2020-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: brakeman
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: bundler
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +72,14 @@ dependencies:
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '0.46'
75
+ version: 0.49.1
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '0.46'
82
+ version: 0.49.1
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: rake
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -112,16 +98,16 @@ dependencies:
112
98
  name: rubocop
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - ">="
101
+ - - "~>"
116
102
  - !ruby/object:Gem::Version
117
- version: '0'
103
+ version: 0.59.2
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - ">="
108
+ - - "~>"
123
109
  - !ruby/object:Gem::Version
124
- version: '0'
110
+ version: 0.59.2
125
111
  description: ''
126
112
  email:
127
113
  - alexander@learningtapeestry.com
@@ -130,11 +116,13 @@ executables: []
130
116
  extensions: []
131
117
  extra_rdoc_files: []
132
118
  files:
119
+ - ".codeclimate.yml"
133
120
  - ".gitignore"
134
121
  - ".overcommit.yml"
135
122
  - ".rubocop.yml"
136
123
  - ".ruby-gemset"
137
124
  - ".ruby-version"
125
+ - CHANGELOG.md
138
126
  - Gemfile
139
127
  - LICENSE
140
128
  - README.md
@@ -169,8 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
157
  - !ruby/object:Gem::Version
170
158
  version: '0'
171
159
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.7.7
160
+ rubygems_version: 3.0.6
174
161
  signing_key:
175
162
  specification_version: 4
176
163
  summary: Provides the set of classes to simplify work with Google services