lt-lcms 0.3.1 → 0.4.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
  SHA256:
3
- metadata.gz: 4218af65b6387e63291c22563ea8afd65e674d1097f070f0e27100056d126de0
4
- data.tar.gz: 3c288ecb99ac82616317f9195ff46b110375b857aa40d2fbb67ae9eebb1f099e
3
+ metadata.gz: 0457fdeb3cc39fc8c06e638d92632c67620466d737bb8985dea9f209bb382c67
4
+ data.tar.gz: b6d8fcca9427740ba2b5a5a08a057e7d4f547ad40c281ee3ae7f3e0eb9f84c02
5
5
  SHA512:
6
- metadata.gz: 46c144afd69d0693fd59ac34034763f0ff0ce83f6244abcad89cbde11088446647d3b5eae419e85589c17cc100fd9f4bed99a84da3595fb42dca38472e096a0b
7
- data.tar.gz: 2027cb6f6348e89d2fd6560dfd91cb29e8bb0255bc44635944d7f7c7de7dfb7b5c1c813212d468a192dd7731d55cb6aa4c30f5d7b89f65932189739bbc4e95e4
6
+ metadata.gz: dfe6be47de5df9ce8c38b19901a6a80662eb6fcf9da1ed725d0abc148e54ea16072e2839058985e8decbe2f4899b99f5360ecc239fd3d2cf219337b9581371ce
7
+ data.tar.gz: d5bafdcdc0ea552af35f2a4dc9821defb963386aa62ff89f874ef247c7603490a76fb08af5f7ab5803f7fa49b9feea4a31c604a2132ab089ecf613b60f5f7cae
@@ -58,7 +58,7 @@ engines:
58
58
  # Style and quality checks for Ruby code.
59
59
  # Includes support for modern Rubies (2.2+).
60
60
  enabled: true
61
- channel: rubocop-0-59
61
+ channel: rubocop-0-93
62
62
  exclude_paths:
63
63
  - vendor/
64
64
  ratings:
@@ -0,0 +1,41 @@
1
+ name: "Rubocop"
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ rubocop:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+
11
+ steps:
12
+ - name: Checkout repository
13
+ uses: actions/checkout@v2
14
+
15
+ # If running on a self-hosted runner, check it meets the requirements
16
+ # listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners
17
+ - name: Set up Ruby
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: 2.6
21
+
22
+ - name: Intall legacy bundler version
23
+ run: gem install bundler -v 1.17.3
24
+
25
+ # This step is not necessary if you add the gem to your Gemfile
26
+ - name: Install Code Scanning integration
27
+ run: bundle _1.17.3_ add code-scanning-rubocop --version 0.4.0 --skip-install
28
+
29
+ - name: Install dependencies
30
+ run: bundle _1.17.3_ install
31
+
32
+ - name: Rubocop run
33
+ run: |
34
+ bash -c "
35
+ bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
36
+ [[ $? -ne 2 ]]
37
+ "
38
+ - name: Upload Sarif output
39
+ uses: github/codeql-action/upload-sarif@v1
40
+ with:
41
+ sarif_file: rubocop.sarif
@@ -12,7 +12,11 @@ AllCops:
12
12
  - bin/*
13
13
  - db/schema.rb
14
14
  - node_modules/**/*
15
- TargetRubyVersion: 2.5
15
+ NewCops: enable
16
+ TargetRubyVersion: 2.6
17
+
18
+ Layout/LineLength:
19
+ Max: 120
16
20
 
17
21
  Layout/MultilineMethodCallIndentation:
18
22
  EnforcedStyle: indented_relative_to_receiver
@@ -35,16 +39,13 @@ Metrics/ClassLength:
35
39
  Metrics/CyclomaticComplexity:
36
40
  Max: 9
37
41
 
38
- Metrics/LineLength:
39
- Max: 120
40
-
41
42
  Metrics/MethodLength:
42
43
  Max: 50
43
44
 
44
45
  Metrics/PerceivedComplexity:
45
46
  Max: 9
46
47
 
47
- Naming/UncommunicativeMethodParamName:
48
+ Naming/MethodParameterName:
48
49
  MinNameLength: 2
49
50
 
50
51
  Style/AndOr:
@@ -1 +1 @@
1
- 2.5.2
1
+ 2.6.5
@@ -4,10 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.4.0](https://github.com/learningtapestry/lt-lcms/compare/v0.3.1...v0.4.0)
8
+
9
+ ### Added
10
+
11
+ - Add support for Google Shared Drives ([#12](https://github.com/learningtapestry/lt-lcms/pull/12))
12
+
7
13
  ## [0.3.0](https://github.com/learningtapestry/lt-lcms/compare/v0.3.0...v0.3.1)
8
14
 
9
15
  ### Fixed
10
- - Fix the URLs inside links in the downloaded GDoc [#9](https://github.com/learningtapestry/lt-lcms/pull/9)
16
+ - Fix the URLs inside links in the downloaded GDoc ([#9](https://github.com/learningtapestry/lt-lcms/pull/9))
11
17
 
12
18
  ## [0.3.0](https://github.com/learningtapestry/lt-lcms/compare/v0.2.0...v0.3.0)
13
19
 
@@ -4,7 +4,7 @@ PATH
4
4
  lt-lcms (0.3.1)
5
5
  google-api-client (~> 0.38)
6
6
  httparty (~> 0.18)
7
- lt-google-api (~> 0.1)
7
+ lt-google-api (~> 0.2)
8
8
  nokogiri (~> 1.10, >= 1.10.8)
9
9
  rubyzip (~> 2)
10
10
 
@@ -13,13 +13,13 @@ GEM
13
13
  specs:
14
14
  addressable (2.7.0)
15
15
  public_suffix (>= 2.0.2, < 5.0)
16
- ast (2.4.0)
17
- childprocess (1.0.0)
16
+ ast (2.4.1)
17
+ childprocess (4.0.0)
18
18
  declarative (0.0.20)
19
19
  declarative-option (0.1.0)
20
20
  faraday (1.0.1)
21
21
  multipart-post (>= 1.2, < 3)
22
- google-api-client (0.45.0)
22
+ google-api-client (0.46.1)
23
23
  addressable (~> 2.5, >= 2.5.1)
24
24
  googleauth (~> 0.9)
25
25
  httpclient (>= 2.8.1, < 3.0)
@@ -28,7 +28,7 @@ GEM
28
28
  retriable (>= 2.0, < 4.0)
29
29
  rexml
30
30
  signet (~> 0.12)
31
- googleauth (0.13.1)
31
+ googleauth (0.14.0)
32
32
  faraday (>= 0.17.3, < 2.0)
33
33
  jwt (>= 1.4, < 3.0)
34
34
  memoist (~> 0.16)
@@ -40,9 +40,8 @@ GEM
40
40
  multi_xml (>= 0.5.2)
41
41
  httpclient (2.8.3)
42
42
  iniparse (1.5.0)
43
- jaro_winkler (1.5.4)
44
43
  jwt (2.2.2)
45
- lt-google-api (0.1.1)
44
+ lt-google-api (0.2.0)
46
45
  google-api-client
47
46
  googleauth
48
47
  memoist (0.16.2)
@@ -57,30 +56,33 @@ GEM
57
56
  nokogiri (1.10.10)
58
57
  mini_portile2 (~> 2.4.0)
59
58
  os (1.1.1)
60
- overcommit (0.49.1)
61
- childprocess (>= 0.6.3, < 2.0)
59
+ overcommit (0.57.0)
60
+ childprocess (>= 0.6.3, < 5)
62
61
  iniparse (~> 1.4)
63
- parallel (1.19.1)
64
- parser (2.7.1.2)
65
- ast (~> 2.4.0)
66
- powerpack (0.1.2)
62
+ parallel (1.19.2)
63
+ parser (2.7.2.0)
64
+ ast (~> 2.4.1)
67
65
  public_suffix (4.0.6)
68
66
  rainbow (3.0.0)
69
67
  rake (13.0.1)
68
+ regexp_parser (1.8.2)
70
69
  representable (3.0.4)
71
70
  declarative (< 0.1.0)
72
71
  declarative-option (< 0.2.0)
73
72
  uber (< 0.2.0)
74
73
  retriable (3.1.2)
75
74
  rexml (3.2.4)
76
- rubocop (0.59.2)
77
- jaro_winkler (~> 1.5.1)
75
+ rubocop (0.93.1)
78
76
  parallel (~> 1.10)
79
- parser (>= 2.5, != 2.5.1.1)
80
- powerpack (~> 0.1)
77
+ parser (>= 2.7.1.5)
81
78
  rainbow (>= 2.2.2, < 4.0)
79
+ regexp_parser (>= 1.8)
80
+ rexml
81
+ rubocop-ast (>= 0.6.0)
82
82
  ruby-progressbar (~> 1.7)
83
- unicode-display_width (~> 1.0, >= 1.0.1)
83
+ unicode-display_width (>= 1.4.0, < 2.0)
84
+ rubocop-ast (0.8.0)
85
+ parser (>= 2.7.1.5)
84
86
  ruby-progressbar (1.10.1)
85
87
  rubyzip (2.3.0)
86
88
  signet (0.14.0)
@@ -97,9 +99,9 @@ PLATFORMS
97
99
  DEPENDENCIES
98
100
  bundler (~> 1.16)
99
101
  lt-lcms!
100
- overcommit (~> 0.49.1)
102
+ overcommit (~> 0.57)
101
103
  rake (~> 13.0)
102
- rubocop (~> 0.59.2)
104
+ rubocop (~> 0.93.1)
103
105
 
104
106
  BUNDLED WITH
105
107
  1.17.3
@@ -12,8 +12,8 @@ module Lt
12
12
  MIME_TYPE_EXPORT = 'text/plain'
13
13
 
14
14
  def self.file_id_for(url)
15
- url.scan(%r{/d/([^\/]+)/?}).first.try(:first) ||
16
- url.scan(%r{/open\?id=([^\/]+)/?}).first.try(:first)
15
+ url.scan(%r{/d/([^/]+)/?}).first.try(:first) ||
16
+ url.scan(%r{/open\?id=([^/]+)/?}).first.try(:first)
17
17
  end
18
18
 
19
19
  attr_reader :content
@@ -48,7 +48,9 @@ module Lt
48
48
 
49
49
  def file
50
50
  @file ||= service.get_file(
51
- file_id, fields: 'lastModifyingUser,modifiedTime,name,version'
51
+ file_id,
52
+ fields: 'lastModifyingUser,modifiedTime,name,version',
53
+ supports_all_drives: true
52
54
  )
53
55
  end
54
56
 
@@ -7,8 +7,8 @@ module Lt
7
7
  module Lesson
8
8
  module Downloader
9
9
  class Gdoc < Base
10
- GOOGLE_DRAWING_RE = %r{https?://docs\.google\.com/?[^"]*/drawings/[^"]*}i
11
- GOOGLE_URL_RE = %r{https://www\.google\.com/url\?q=([^&]*)&?.*}i
10
+ GOOGLE_DRAWING_RE = %r{https?://docs\.google\.com/?[^"]*/drawings/[^"]*}i.freeze
11
+ GOOGLE_URL_RE = %r{https://www\.google\.com/url\?q=([^&]*)&?.*}i.freeze
12
12
  MIME_TYPE = 'application/vnd.google-apps.document'
13
13
  MIME_TYPE_EXPORT = 'text/html'
14
14
 
@@ -25,6 +25,7 @@ module Lt
25
25
  private
26
26
 
27
27
  attr_reader :options
28
+
28
29
  BASE_DPI = 72.0
29
30
  private_constant :BASE_DPI
30
31
 
@@ -12,7 +12,7 @@ module Lt
12
12
  end
13
13
 
14
14
  def pdf_content
15
- service.get_file(file_id, download_dest: StringIO.new).string
15
+ service.get_file(file_id, download_dest: StringIO.new, supports_all_drives: true).string
16
16
  end
17
17
  end
18
18
  end
@@ -19,7 +19,8 @@ module Lt
19
19
  file_metadata,
20
20
  fields: 'id',
21
21
  upload_source: StringIO.new(content),
22
- content_type: content_type
22
+ content_type: content_type,
23
+ supports_all_drives: true
23
24
  )
24
25
  file.id
25
26
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lt
4
4
  module Lcms
5
- VERSION = '0.3.1'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
@@ -15,6 +15,8 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
15
15
  spec.description = ''
16
16
  spec.license = 'Apache-2.0'
17
17
 
18
+ spec.required_ruby_version = '>= 2.6'
19
+
18
20
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
19
21
  # to allow pushing to a single host or delete this section to allow pushing to any host.
20
22
  if spec.respond_to?(:metadata)
@@ -33,12 +35,12 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
33
35
 
34
36
  spec.add_dependency 'google-api-client', '~> 0.38'
35
37
  spec.add_dependency 'httparty', '~> 0.18'
36
- spec.add_dependency 'lt-google-api', '~> 0.1'
38
+ spec.add_dependency 'lt-google-api', '~> 0.2'
37
39
  spec.add_dependency 'nokogiri', '~> 1.10', '>= 1.10.8'
38
40
  spec.add_dependency 'rubyzip', '~> 2'
39
41
 
40
42
  spec.add_development_dependency 'bundler', '~> 1.16'
41
- spec.add_development_dependency 'overcommit', '~> 0.49.1'
43
+ spec.add_development_dependency 'overcommit', '~> 0.57'
42
44
  spec.add_development_dependency 'rake', '~> 13.0'
43
- spec.add_development_dependency 'rubocop', '~> 0.59.2'
45
+ spec.add_development_dependency 'rubocop', '~> 0.93.1'
44
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lt-lcms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kuznetsov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-25 00:00:00.000000000 Z
11
+ date: 2020-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.1'
47
+ version: '0.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.1'
54
+ version: '0.2'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: nokogiri
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: 0.49.1
109
+ version: '0.57'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: 0.49.1
116
+ version: '0.57'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: rake
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +134,14 @@ dependencies:
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: 0.59.2
137
+ version: 0.93.1
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: 0.59.2
144
+ version: 0.93.1
145
145
  description: ''
146
146
  email:
147
147
  - alexander@learningtapeestry.com
@@ -151,6 +151,7 @@ extensions: []
151
151
  extra_rdoc_files: []
152
152
  files:
153
153
  - ".codeclimate.yml"
154
+ - ".github/workflows/rubocop-analysis.yml"
154
155
  - ".gitignore"
155
156
  - ".overcommit.yml"
156
157
  - ".rubocop.yml"
@@ -180,7 +181,7 @@ licenses:
180
181
  - Apache-2.0
181
182
  metadata:
182
183
  allowed_push_host: https://rubygems.org
183
- post_install_message:
184
+ post_install_message:
184
185
  rdoc_options: []
185
186
  require_paths:
186
187
  - lib
@@ -188,15 +189,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
189
  requirements:
189
190
  - - ">="
190
191
  - !ruby/object:Gem::Version
191
- version: '0'
192
+ version: '2.6'
192
193
  required_rubygems_version: !ruby/object:Gem::Requirement
193
194
  requirements:
194
195
  - - ">="
195
196
  - !ruby/object:Gem::Version
196
197
  version: '0'
197
198
  requirements: []
198
- rubygems_version: 3.1.2
199
- signing_key:
199
+ rubygems_version: 3.0.6
200
+ signing_key:
200
201
  specification_version: 4
201
202
  summary: Contains set of classes to work with Google Docs based lesson objects
202
203
  test_files: []