Skip to content

Commit

Permalink
Merge pull request #30 from learningtapestry/google-api-upgrade
Browse files Browse the repository at this point in the history
updated lt-google-api/google api/reverted ruby 2.7 support
  • Loading branch information
shlag3n authored Dec 23, 2023
2 parents 0d6ee08 + 53a8140 commit 132bc0a
Show file tree
Hide file tree
Showing 11 changed files with 100 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AllCops:
- db/schema.rb
- node_modules/**/*
NewCops: enable
TargetRubyVersion: 3.2
TargetRubyVersion: 2.7

Gemspec/DevelopmentDependencies:
EnforcedStyle: gemspec
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1
2.7.7
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased](https://github.com/learningtapestry/lcms-engine/compare/v0.5.0...HEAD)
## [Unreleased](https://github.com/learningtapestry/lcms-engine/compare/v0.6.0...HEAD)

## [0.6.0](https://github.com/learningtapestry/lt-lcms/compare/v0.5.0...v0.6.0) - 2023-12-23
### Added

- Added Docker support [@paranoicsan](https://github.com/paranoicsan)
Expand All @@ -14,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Updated dependencies [@paranoicsan](https://github.com/paranoicsan)
- Ruby updated to 2.7.7 [@shlag3n](https://github.com/shlag3n) at the main branch, 3.x version will be at separate branch ruby-3-upgrade
- Bump lt-google-api to 0.3.0 to upgrade google api to 0.11 [@shlag3n](https://github.com/shlag3n)

## [0.5.0](https://github.com/learningtapestry/lt-lcms/compare/v0.4.4...v0.5.0) - 2023-07-07

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2.1
FROM ruby:2.7.7

ENV APP_PATH /app/
ENV LANG C.UTF-8
Expand All @@ -9,7 +9,7 @@ WORKDIR $APP_PATH

COPY . $APP_PATH

ENV BUNDLER_VERSION 2.4.6
ENV BUNDLER_VERSION 2.4.22
RUN gem install bundler:"$BUNDLER_VERSION" \
&& bundle install --jobs `expr $(cat /proc/cpuinfo | grep -c "cpu cores") - 1` --retry 3 \
&& rm -rf /usr/local/bundle/cache/*.gem \
Expand Down
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in lt-lcms.gemspec
gemspec

gem 'lt-google-api', github: 'learningtapestry/lt-google-api',
branch: 'master',
ref: '74c9baa'
82 changes: 23 additions & 59 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
GIT
remote: https://github.com/learningtapestry/lt-google-api
revision: 74c9baa3cb73775ccb2f9dfeedce04baed163398
ref: 74c9baa
branch: master
specs:
lt-google-api (0.2.4)
google-api-client (~> 0.46)
googleauth (~> 0.14)

PATH
remote: .
specs:
lt-lcms (0.5.0)
google-api-client (~> 0.38)
lt-lcms (0.6.0)
google-apis-core (~> 0.11, >= 0.11.1)
httparty (~> 0.18)
lt-google-api (~> 0.3)
nokogiri (~> 1.10, >= 1.10.8)
rubyzip (~> 2)

Expand All @@ -25,44 +16,22 @@ GEM
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.5)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.1.1)
childprocess (4.1.0)
concurrent-ruby (1.2.2)
csv (3.2.7)
declarative (0.0.20)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
faraday (2.7.12)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday-net_http (3.0.2)
ffi (1.15.5)
fileutils (1.7.1)
gems (1.2.0)
google-api-client (0.53.0)
google-apis-core (~> 0.1)
google-apis-generator (~> 0.1)
google-apis-core (0.11.1)
google-apis-core (0.11.2)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
Expand All @@ -71,21 +40,17 @@ GEM
retriable (>= 2.0, < 4.a)
rexml
webrick
google-apis-discovery_v1 (0.14.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-generator (0.12.0)
activesupport (>= 5.0)
gems (~> 1.2)
google-apis-drive_v3 (0.46.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-discovery_v1 (~> 0.5)
thor (>= 0.20, < 2.a)
googleauth (0.17.1)
faraday (>= 0.17.3, < 2.0)
google-cloud-env (2.1.0)
faraday (>= 1.0, < 3.a)
googleauth (1.9.1)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.1)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.15)
signet (>= 0.16, < 2.a)
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
Expand All @@ -100,12 +65,13 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.5.3)
memoist (0.16.2)
lt-google-api (0.3.0)
google-apis-drive_v3 (~> 0.46)
googleauth (~> 1.9)
mini_mime (1.1.5)
minitest (5.19.0)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.3.0)
nokogiri (1.15.4-aarch64-linux)
racc (~> 1.4)
nokogiri (1.15.4-x86_64-linux)
Expand All @@ -119,14 +85,14 @@ GEM
parser (3.2.2.3)
ast (~> 2.4.1)
racc
public_suffix (5.0.3)
public_suffix (5.0.4)
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbs (3.2.1)
rbs (3.1.3)
regexp_parser (2.8.1)
representable (3.2.0)
declarative (< 0.1.0)
Expand All @@ -152,7 +118,7 @@ GEM
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
securerandom (0.2.2)
signet (0.17.0)
signet (0.18.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
Expand All @@ -175,7 +141,6 @@ GEM
strscan (3.0.6)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.2.2)
trailblazer-option (0.1.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
Expand All @@ -189,12 +154,11 @@ PLATFORMS

DEPENDENCIES
bundler (~> 2.4)
lt-google-api!
lt-lcms!
overcommit (~> 0.60)
rake (~> 13.0)
rubocop (~> 1.54)
steep (~> 1.5.3)

BUNDLED WITH
2.4.6
2.4.22
4 changes: 2 additions & 2 deletions lib/lt/lcms/lesson/downloader/gdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module Lcms
module Lesson
module Downloader
class Gdoc < Base
GOOGLE_DRAWING_RE = %r{https?://docs\.google\.com/?[^"]*/drawings/[^"]*}i
GOOGLE_URL_RE = %r{https://www\.google\.com/url\?q=([^&]*)&?.*}i
GOOGLE_DRAWING_RE = %r{https?://docs\.google\.com/?[^"]*/drawings/[^"]*}i.freeze
GOOGLE_URL_RE = %r{https://www\.google\.com/url\?q=([^&]*)&?.*}i.freeze
MIME_TYPE = 'application/vnd.google-apps.document'
MIME_TYPE_EXPORT = 'text/html'

Expand Down
4 changes: 2 additions & 2 deletions lib/lt/lcms/lesson/uploader/gdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ def initialize(credentials)

def upload(name, content, content_type, parent_folder_id = nil)
file_metadata = {
name:,
name: name,
mime_type: Lt::Google::Api::Drive::MIME_FILE
}
file_metadata[:parents] = Array.wrap(parent_folder_id) unless parent_folder_id.nil?
file = service.create_file(
file_metadata,
fields: 'id',
upload_source: StringIO.new(content),
content_type:,
content_type: content_type,
supports_all_drives: true
)
file.id
Expand Down
2 changes: 1 addition & 1 deletion lib/lt/lcms/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Lt
module Lcms
VERSION = '0.5.0'
VERSION = '0.6.0'
end
end
7 changes: 3 additions & 4 deletions lt-lcms.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
spec.description = ''
spec.license = 'Apache-2.0'

spec.required_ruby_version = '>= 3.2'
spec.required_ruby_version = '>= 2.7'

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
Expand All @@ -34,10 +34,9 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_dependency 'google-api-client', '~> 0.38'
spec.add_dependency 'google-apis-core', '~> 0.11', '>= 0.11.1'
spec.add_dependency 'httparty', '~> 0.18'
# NOTE: Temporary moved to Gemfile
# spec.add_dependency 'lt-google-api', '~> 0.2', '>= 0.2.4'
spec.add_dependency 'lt-google-api', '~> 0.3'
spec.add_dependency 'nokogiri', '~> 1.10', '>= 1.10.8'
spec.add_dependency 'rubyzip', '~> 2'

Expand Down
62 changes: 61 additions & 1 deletion rbs_collection.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sources:
- type: git
name: ruby/gem_rbs_collection
revision: b42e4de88058603a34446942143b3ac197b9685c
revision: 20e6e0f0685139dbd29df50e03367e222aa5d1b8
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
path: ".gem_rbs_collection"
Expand All @@ -15,6 +15,14 @@ gems:
revision: b42e4de88058603a34446942143b3ac197b9685c
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: addressable
version: '2.8'
source:
type: git
name: ruby/gem_rbs_collection
revision: 20e6e0f0685139dbd29df50e03367e222aa5d1b8
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: ast
version: '2.4'
source:
Expand Down Expand Up @@ -43,6 +51,10 @@ gems:
revision: b42e4de88058603a34446942143b3ac197b9685c
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: fileutils
version: '0'
source:
type: stdlib
- name: forwardable
version: '0'
source:
Expand Down Expand Up @@ -119,6 +131,14 @@ gems:
revision: b42e4de88058603a34446942143b3ac197b9685c
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: parser
version: '3.2'
source:
type: git
name: ruby/gem_rbs_collection
revision: 20e6e0f0685139dbd29df50e03367e222aa5d1b8
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rainbow
version: '3.0'
source:
Expand All @@ -127,6 +147,38 @@ gems:
revision: b42e4de88058603a34446942143b3ac197b9685c
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rake
version: '13.0'
source:
type: git
name: ruby/gem_rbs_collection
revision: 20e6e0f0685139dbd29df50e03367e222aa5d1b8
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: regexp_parser
version: '2.8'
source:
type: git
name: ruby/gem_rbs_collection
revision: 20e6e0f0685139dbd29df50e03367e222aa5d1b8
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rubocop
version: '1.57'
source:
type: git
name: ruby/gem_rbs_collection
revision: 20e6e0f0685139dbd29df50e03367e222aa5d1b8
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rubocop-ast
version: '1.30'
source:
type: git
name: ruby/gem_rbs_collection
revision: 20e6e0f0685139dbd29df50e03367e222aa5d1b8
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rubyzip
version: '2.3'
source:
Expand All @@ -143,6 +195,14 @@ gems:
version: '0'
source:
type: stdlib
- name: thor
version: '1.2'
source:
type: git
name: ruby/gem_rbs_collection
revision: 20e6e0f0685139dbd29df50e03367e222aa5d1b8
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: time
version: '0'
source:
Expand Down

0 comments on commit 132bc0a

Please sign in to comment.