google_maps_embed 0.1.0 → 0.1.2
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 +4 -4
- data/.rubocop.yml +211 -0
- data/README.md +2 -0
- data/lib/google_maps_embed/static_map.rb +3 -3
- data/lib/google_maps_embed/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f0630cf61a66a9f1718b08928a9143f3796597f992c6059eab890424a6f2195
|
|
4
|
+
data.tar.gz: 5f0a55503fb3ab630c8085270d97421d71af529b80fffdd7be7703109d00eaaf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cafa3586abf3b924af47ea22e2dd92fc263cb8b38965b57a3e2da5e7d0601fdbae62e7f5a86dcc39f1cc64250d95fcda1f2b8c329fe8266429106f818e9c28a
|
|
7
|
+
data.tar.gz: fb19398e00f7b8c7a053281f9af2fbf15d62414a7a3fe7e483c95908e706978a83bb18a2818e8e7fa4c5d147cd69859e5f1184d36869933834c62d3af0b02348
|
data/.rubocop.yml
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
AllCops:
|
|
2
2
|
TargetRubyVersion: 3.0
|
|
3
|
+
SuggestExtensions: false
|
|
4
|
+
|
|
5
|
+
Style/Documentation:
|
|
6
|
+
Enabled: false
|
|
3
7
|
|
|
4
8
|
Style/StringLiterals:
|
|
5
9
|
EnforcedStyle: double_quotes
|
|
@@ -18,3 +22,210 @@ Metrics/PerceivedComplexity:
|
|
|
18
22
|
|
|
19
23
|
Metrics/AbcSize:
|
|
20
24
|
Enabled: false
|
|
25
|
+
|
|
26
|
+
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
|
27
|
+
Enabled: true
|
|
28
|
+
Gemspec/DevelopmentDependencies: # new in 1.44
|
|
29
|
+
Enabled: true
|
|
30
|
+
Gemspec/RequireMFA: # new in 1.23
|
|
31
|
+
Enabled: false
|
|
32
|
+
Layout/LineContinuationLeadingSpace: # new in 1.31
|
|
33
|
+
Enabled: true
|
|
34
|
+
Layout/LineContinuationSpacing: # new in 1.31
|
|
35
|
+
Enabled: true
|
|
36
|
+
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
|
37
|
+
Enabled: true
|
|
38
|
+
Layout/SpaceBeforeBrackets: # new in 1.7
|
|
39
|
+
Enabled: true
|
|
40
|
+
Lint/AmbiguousAssignment: # new in 1.7
|
|
41
|
+
Enabled: true
|
|
42
|
+
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
|
43
|
+
Enabled: true
|
|
44
|
+
Lint/AmbiguousRange: # new in 1.19
|
|
45
|
+
Enabled: true
|
|
46
|
+
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
|
47
|
+
Enabled: true
|
|
48
|
+
Lint/DeprecatedConstants: # new in 1.8
|
|
49
|
+
Enabled: true
|
|
50
|
+
Lint/DuplicateBranch: # new in 1.3
|
|
51
|
+
Enabled: true
|
|
52
|
+
Lint/DuplicateMagicComment: # new in 1.37
|
|
53
|
+
Enabled: true
|
|
54
|
+
Lint/DuplicateMatchPattern: # new in 1.50
|
|
55
|
+
Enabled: true
|
|
56
|
+
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
|
|
57
|
+
Enabled: true
|
|
58
|
+
Lint/EmptyBlock: # new in 1.1
|
|
59
|
+
Enabled: true
|
|
60
|
+
Lint/EmptyClass: # new in 1.3
|
|
61
|
+
Enabled: true
|
|
62
|
+
Lint/EmptyInPattern: # new in 1.16
|
|
63
|
+
Enabled: true
|
|
64
|
+
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
|
65
|
+
Enabled: true
|
|
66
|
+
Lint/ItWithoutArgumentsInBlock: # new in 1.59
|
|
67
|
+
Enabled: true
|
|
68
|
+
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
|
69
|
+
Enabled: true
|
|
70
|
+
Lint/LiteralAssignmentInCondition: # new in 1.58
|
|
71
|
+
Enabled: true
|
|
72
|
+
Lint/MixedCaseRange: # new in 1.53
|
|
73
|
+
Enabled: true
|
|
74
|
+
Lint/NoReturnInBeginEndBlocks: # new in 1.2
|
|
75
|
+
Enabled: true
|
|
76
|
+
Lint/NonAtomicFileOperation: # new in 1.31
|
|
77
|
+
Enabled: true
|
|
78
|
+
Lint/NumberedParameterAssignment: # new in 1.9
|
|
79
|
+
Enabled: true
|
|
80
|
+
Lint/OrAssignmentToConstant: # new in 1.9
|
|
81
|
+
Enabled: true
|
|
82
|
+
Lint/RedundantDirGlobSort: # new in 1.8
|
|
83
|
+
Enabled: true
|
|
84
|
+
Lint/RedundantRegexpQuantifiers: # new in 1.53
|
|
85
|
+
Enabled: true
|
|
86
|
+
Lint/RefinementImportMethods: # new in 1.27
|
|
87
|
+
Enabled: true
|
|
88
|
+
Lint/RequireRangeParentheses: # new in 1.32
|
|
89
|
+
Enabled: true
|
|
90
|
+
Lint/RequireRelativeSelfPath: # new in 1.22
|
|
91
|
+
Enabled: true
|
|
92
|
+
Lint/SymbolConversion: # new in 1.9
|
|
93
|
+
Enabled: true
|
|
94
|
+
Lint/ToEnumArguments: # new in 1.1
|
|
95
|
+
Enabled: true
|
|
96
|
+
Lint/TripleQuotes: # new in 1.9
|
|
97
|
+
Enabled: true
|
|
98
|
+
Lint/UnexpectedBlockArity: # new in 1.5
|
|
99
|
+
Enabled: true
|
|
100
|
+
Lint/UnmodifiedReduceAccumulator: # new in 1.1
|
|
101
|
+
Enabled: true
|
|
102
|
+
Lint/UselessRescue: # new in 1.43
|
|
103
|
+
Enabled: true
|
|
104
|
+
Lint/UselessRuby2Keywords: # new in 1.23
|
|
105
|
+
Enabled: true
|
|
106
|
+
Metrics/CollectionLiteralLength: # new in 1.47
|
|
107
|
+
Enabled: true
|
|
108
|
+
Naming/BlockForwarding: # new in 1.24
|
|
109
|
+
Enabled: true
|
|
110
|
+
Security/CompoundHash: # new in 1.28
|
|
111
|
+
Enabled: true
|
|
112
|
+
Security/IoMethods: # new in 1.22
|
|
113
|
+
Enabled: true
|
|
114
|
+
Style/ArgumentsForwarding: # new in 1.1
|
|
115
|
+
Enabled: true
|
|
116
|
+
Style/ArrayIntersect: # new in 1.40
|
|
117
|
+
Enabled: true
|
|
118
|
+
Style/CollectionCompact: # new in 1.2
|
|
119
|
+
Enabled: true
|
|
120
|
+
Style/ComparableClamp: # new in 1.44
|
|
121
|
+
Enabled: true
|
|
122
|
+
Style/ConcatArrayLiterals: # new in 1.41
|
|
123
|
+
Enabled: true
|
|
124
|
+
Style/DataInheritance: # new in 1.49
|
|
125
|
+
Enabled: true
|
|
126
|
+
Style/DirEmpty: # new in 1.48
|
|
127
|
+
Enabled: true
|
|
128
|
+
Style/DocumentDynamicEvalDefinition: # new in 1.1
|
|
129
|
+
Enabled: true
|
|
130
|
+
Style/EmptyHeredoc: # new in 1.32
|
|
131
|
+
Enabled: true
|
|
132
|
+
Style/EndlessMethod: # new in 1.8
|
|
133
|
+
Enabled: true
|
|
134
|
+
Style/EnvHome: # new in 1.29
|
|
135
|
+
Enabled: true
|
|
136
|
+
Style/ExactRegexpMatch: # new in 1.51
|
|
137
|
+
Enabled: true
|
|
138
|
+
Style/FetchEnvVar: # new in 1.28
|
|
139
|
+
Enabled: true
|
|
140
|
+
Style/FileEmpty: # new in 1.48
|
|
141
|
+
Enabled: true
|
|
142
|
+
Style/FileRead: # new in 1.24
|
|
143
|
+
Enabled: true
|
|
144
|
+
Style/FileWrite: # new in 1.24
|
|
145
|
+
Enabled: true
|
|
146
|
+
Style/HashConversion: # new in 1.10
|
|
147
|
+
Enabled: true
|
|
148
|
+
Style/HashExcept: # new in 1.7
|
|
149
|
+
Enabled: false
|
|
150
|
+
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
|
151
|
+
Enabled: true
|
|
152
|
+
Style/InPatternThen: # new in 1.16
|
|
153
|
+
Enabled: true
|
|
154
|
+
Style/MagicCommentFormat: # new in 1.35
|
|
155
|
+
Enabled: true
|
|
156
|
+
Style/MapCompactWithConditionalBlock: # new in 1.30
|
|
157
|
+
Enabled: true
|
|
158
|
+
Style/MapIntoArray: # new in 1.63
|
|
159
|
+
Enabled: true
|
|
160
|
+
Style/MapToHash: # new in 1.24
|
|
161
|
+
Enabled: true
|
|
162
|
+
Style/MapToSet: # new in 1.42
|
|
163
|
+
Enabled: true
|
|
164
|
+
Style/MinMaxComparison: # new in 1.42
|
|
165
|
+
Enabled: true
|
|
166
|
+
Style/MultilineInPatternThen: # new in 1.16
|
|
167
|
+
Enabled: true
|
|
168
|
+
Style/NegatedIfElseCondition: # new in 1.2
|
|
169
|
+
Enabled: true
|
|
170
|
+
Style/NestedFileDirname: # new in 1.26
|
|
171
|
+
Enabled: true
|
|
172
|
+
Style/NilLambda: # new in 1.3
|
|
173
|
+
Enabled: true
|
|
174
|
+
Style/NumberedParameters: # new in 1.22
|
|
175
|
+
Enabled: true
|
|
176
|
+
Style/NumberedParametersLimit: # new in 1.22
|
|
177
|
+
Enabled: true
|
|
178
|
+
Style/ObjectThen: # new in 1.28
|
|
179
|
+
Enabled: true
|
|
180
|
+
Style/OpenStructUse: # new in 1.23
|
|
181
|
+
Enabled: true
|
|
182
|
+
Style/OperatorMethodCall: # new in 1.37
|
|
183
|
+
Enabled: true
|
|
184
|
+
Style/QuotedSymbols: # new in 1.16
|
|
185
|
+
Enabled: true
|
|
186
|
+
Style/RedundantArgument: # new in 1.4
|
|
187
|
+
Enabled: true
|
|
188
|
+
Style/RedundantArrayConstructor: # new in 1.52
|
|
189
|
+
Enabled: true
|
|
190
|
+
Style/RedundantConstantBase: # new in 1.40
|
|
191
|
+
Enabled: true
|
|
192
|
+
Style/RedundantCurrentDirectoryInPath: # new in 1.53
|
|
193
|
+
Enabled: true
|
|
194
|
+
Style/RedundantDoubleSplatHashBraces: # new in 1.41
|
|
195
|
+
Enabled: true
|
|
196
|
+
Style/RedundantEach: # new in 1.38
|
|
197
|
+
Enabled: true
|
|
198
|
+
Style/RedundantFilterChain: # new in 1.52
|
|
199
|
+
Enabled: true
|
|
200
|
+
Style/RedundantHeredocDelimiterQuotes: # new in 1.45
|
|
201
|
+
Enabled: true
|
|
202
|
+
Style/RedundantInitialize: # new in 1.27
|
|
203
|
+
Enabled: true
|
|
204
|
+
Style/RedundantLineContinuation: # new in 1.49
|
|
205
|
+
Enabled: true
|
|
206
|
+
Style/RedundantRegexpArgument: # new in 1.53
|
|
207
|
+
Enabled: true
|
|
208
|
+
Style/RedundantRegexpConstructor: # new in 1.52
|
|
209
|
+
Enabled: true
|
|
210
|
+
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
|
211
|
+
Enabled: true
|
|
212
|
+
Style/RedundantStringEscape: # new in 1.37
|
|
213
|
+
Enabled: true
|
|
214
|
+
Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
|
|
215
|
+
Enabled: true
|
|
216
|
+
Style/SelectByRegexp: # new in 1.22
|
|
217
|
+
Enabled: true
|
|
218
|
+
Style/SendWithLiteralMethodName: # new in 1.64
|
|
219
|
+
Enabled: true
|
|
220
|
+
Style/SingleLineDoEndBlock: # new in 1.57
|
|
221
|
+
Enabled: true
|
|
222
|
+
Style/StringChars: # new in 1.12
|
|
223
|
+
Enabled: true
|
|
224
|
+
Style/SuperArguments: # new in 1.64
|
|
225
|
+
Enabled: true
|
|
226
|
+
Style/SuperWithArgsParentheses: # new in 1.58
|
|
227
|
+
Enabled: true
|
|
228
|
+
Style/SwapValues: # new in 1.1
|
|
229
|
+
Enabled: true
|
|
230
|
+
Style/YAMLFileRead: # new in 1.53
|
|
231
|
+
Enabled: true
|
data/README.md
CHANGED
|
@@ -22,9 +22,9 @@ class StaticMap
|
|
|
22
22
|
|
|
23
23
|
coords = options.key?(:latitude) && options.key?(:longitude) ? "#{options[:latitude]},#{options[:longitude]}" : ""
|
|
24
24
|
center = if coords.empty? && options.key?(:address)
|
|
25
|
-
|
|
25
|
+
"center=#{URI.encode_www_form_component(options[:address])}"
|
|
26
26
|
else
|
|
27
|
-
"center
|
|
27
|
+
"center=#{coords}"
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
api_key = [options[:api_key], GoogleMapsEmbed.configuration.static_key,
|
|
@@ -76,7 +76,7 @@ class StaticMap
|
|
|
76
76
|
current << "#{k}:#{URI.encode_www_form_component(v)}" if v.is_a? String
|
|
77
77
|
current << URI.encode_www_form_component(v.join("|")) if v.is_a? Array
|
|
78
78
|
end
|
|
79
|
-
options_url << "#{option_type}=" + current.join("%7C")
|
|
79
|
+
options_url << ("#{option_type}=" + current.join("%7C"))
|
|
80
80
|
end
|
|
81
81
|
|
|
82
82
|
options_url.join("&").gsub("%2C", ",")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google_maps_embed
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Austin Nazworth
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-07-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: |2
|
|
14
14
|
Google_Maps_Embed is a versatile Ruby gem designed to simplify the generation of Google Maps URLs
|