lt-lcms 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: 4e86552226b2a1d601b69d9f7ba128aef282e19bd9bbe5a954c9effa91e20778
4
- data.tar.gz: e39929a79b6806c7f06c088c54f0f2607dfa54faeef9a896f5d72f4bb3b18345
3
+ metadata.gz: 59af00db8e2e7e35cb72345b9194d013caf031764dc8d1d326c53ed38c51f970
4
+ data.tar.gz: 9d49f1e203df39afe5ec9768a1ed41d57e78f9aa295acfee50f85734ddf67996
5
5
  SHA512:
6
- metadata.gz: 6800edd4f477c8d1e656ca550809c9591a11fabdca49a72496cf7d1c204fc0d4176f2974a2b97743610ad87c2bda9a77bc2862ce1c7171777ce625890f3201c7
7
- data.tar.gz: 2575cfa59818ca47765ed07551a75e9718ddfddbf7c96224ee9c65d3347b51ebb8b44f36a0623d25f9649ff956a4ea988ab4f476ca7774b40aed9f676929ce9b
6
+ metadata.gz: c2200f66051030cf3876f4ac410db1703ea8df8bdc1047456a6c99845a9859d74607962845f0340a11f9948fd49e194ce612de41ad118fcd63e1c5f674a1624e
7
+ data.tar.gz: f9b4c0e6f535bb16cef6fd2d15b37345e027f1275c8b74fc7c693ea4fbb0cafe874436ac0818b87f4e077fed7c7a21550d9a8bd7331240866bbe99be74f99f22
data/.codeclimate.yml ADDED
@@ -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/**/*
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Change log
2
+
3
+ ## 0.1.1 (2019-06-10)
4
+
5
+ ### Bug fixes
6
+
7
+ * [#3](https://github.com/learningtapestry/lt-lcms/issues/3): Retrieve Google credentials token correctly ([@paranoicsan][])
8
+
9
+ ## 0.1.0 (2019-03-12)
10
+
11
+ * Initial release
data/Gemfile CHANGED
@@ -6,6 +6,3 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  # Specify your gem's dependencies in lt-lcms.gemspec
8
8
  gemspec
9
-
10
- gem 'lt-google-api', git: 'https://github.com/learningtapestry/lt-google-api',
11
- branch: 'master', ref: '566114e2'
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Lt::Lcms
2
2
 
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/07fa3d2919744d3bf328/maintainability)](https://codeclimate.com/github/learningtapestry/lt-lcms/maintainability)
4
+ [![Codeship Status for learningtapestry/lt-lcms](https://app.codeship.com/projects/b151f4e0-26f8-0137-ffc2-3e508df156a9/status?branch=master)](https://app.codeship.com/projects/330485)
5
+
6
+
3
7
  ## Installation
4
8
 
5
9
  Add this line to your application's Gemfile:
@@ -26,10 +26,14 @@ module Lt
26
26
  def handle_google_drawings(html)
27
27
  return html unless (match = html.scan(GOOGLE_DRAWING_RE))
28
28
 
29
- headers = { 'Authorization' => "Bearer #{@credentials.access_token}" }
29
+ bearer = @credentials.fetch_access_token!['access_token']
30
+ headers = { 'Authorization' => "Bearer #{bearer}" }
30
31
 
31
32
  match.to_a.uniq.each do |url|
32
33
  response = HTTParty.get CGI.unescapeHTML(url), headers: headers
34
+
35
+ next unless response.code == 200
36
+
33
37
  new_src = "data:#{response.content_type};base64, #{Base64.encode64(response)}\" drawing_url=\"#{url}"
34
38
  html = html.gsub(url, new_src)
35
39
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Lt
4
4
  module Lcms
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
data/lt-lcms.gemspec CHANGED
@@ -36,10 +36,9 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
36
36
  spec.add_dependency 'lt-google-api', '~> 0.1'
37
37
  spec.add_dependency 'rubyzip', '~> 1.2.2'
38
38
 
39
- spec.add_development_dependency 'brakeman'
40
39
  spec.add_development_dependency 'bundler', '~> 1.16'
41
40
  spec.add_development_dependency 'bundler-audit'
42
41
  spec.add_development_dependency 'overcommit', '~> 0.46'
43
42
  spec.add_development_dependency 'rake', '~> 10.0'
44
- spec.add_development_dependency 'rubocop'
43
+ spec.add_development_dependency 'rubocop', '~> 0.59.2'
45
44
  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.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: 2019-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.2
69
- - !ruby/object:Gem::Dependency
70
- name: brakeman
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: bundler
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -140,16 +126,16 @@ dependencies:
140
126
  name: rubocop
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - ">="
129
+ - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: '0'
131
+ version: 0.59.2
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - ">="
136
+ - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: '0'
138
+ version: 0.59.2
153
139
  description: ''
154
140
  email:
155
141
  - alexander@learningtapeestry.com
@@ -158,11 +144,13 @@ executables: []
158
144
  extensions: []
159
145
  extra_rdoc_files: []
160
146
  files:
147
+ - ".codeclimate.yml"
161
148
  - ".gitignore"
162
149
  - ".overcommit.yml"
163
150
  - ".rubocop.yml"
164
151
  - ".ruby-gemset"
165
152
  - ".ruby-version"
153
+ - CHANGELOG.md
166
154
  - Gemfile
167
155
  - LICENSE
168
156
  - README.md
@@ -200,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
188
  version: '0'
201
189
  requirements: []
202
190
  rubyforge_project:
203
- rubygems_version: 2.7.7
191
+ rubygems_version: 2.7.9
204
192
  signing_key:
205
193
  specification_version: 4
206
194
  summary: Contains set of classes to work with Google Docs based lesson objects