zip-codes 0.2.1 → 0.3.0

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
- SHA1:
3
- metadata.gz: d5b6d8f84a17a2eabf38e0000d5c080e26ae5edc
4
- data.tar.gz: c8dd1f409b8dba1b71e426fa7bffbd57ad73ece2
2
+ SHA256:
3
+ metadata.gz: f1390d52143eacf6202ea38069276b2141e06e646877344c1d5258ad8417db33
4
+ data.tar.gz: 80892335aa66f962d30343e8c30baf976832b7e097c1311ecd79c37035c62a0c
5
5
  SHA512:
6
- metadata.gz: 518fdab86094a7fd16e0fd12541087b1409b37d78d7ef30ba8b08b9cd0cb181c504bb8ef531a04fce74346595bb59ff13d43a2630b2d77ec81c1e5eb063e53a9
7
- data.tar.gz: 5f4a8657ea7457f91120f787bdb77c0ddd62b70fd7bf44b37259621ebe4e3f60b1ce4f99d5d21223b6d7722fa6b9527b76456d18550f0230ac43494ca5a6f590
6
+ metadata.gz: ac6540ecd586e267b632438069fa2fc3d33b853fe7dea0ad259a2ebfb5562a5b412f98d2a69a60feeb62fb34d59cd0049c9db955cfe64cc9135445053ccf22b7
7
+ data.tar.gz: 7a406e918789216a1252ba8344c53138c83d722fcc219956a32350283562001637455df00cdaa0c29df6ce92d67e6c576405a64ae458105159fd40d07b52413d
data/.rubocop.yml ADDED
@@ -0,0 +1,146 @@
1
+ require:
2
+ - rubocop-rake
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 3.0
6
+
7
+ Gemspec/DeprecatedAttributeAssignment: # new in 1.30
8
+ Enabled: true
9
+ Gemspec/RequireMFA: # new in 1.23
10
+ Enabled: true
11
+ Layout/LineContinuationLeadingSpace: # new in 1.31
12
+ Enabled: true
13
+ Layout/LineContinuationSpacing: # new in 1.31
14
+ Enabled: true
15
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
16
+ Enabled: true
17
+ Layout/SpaceBeforeBrackets: # new in 1.7
18
+ Enabled: true
19
+ Lint/AmbiguousAssignment: # new in 1.7
20
+ Enabled: true
21
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
22
+ Enabled: true
23
+ Lint/AmbiguousRange: # new in 1.19
24
+ Enabled: true
25
+ Lint/ConstantOverwrittenInRescue: # new in 1.31
26
+ Enabled: true
27
+ Lint/DeprecatedConstants: # new in 1.8
28
+ Enabled: true
29
+ Lint/DuplicateBranch: # new in 1.3
30
+ Enabled: true
31
+ Lint/DuplicateMagicComment: # new in 1.37
32
+ Enabled: true
33
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
34
+ Enabled: true
35
+ Lint/EmptyBlock: # new in 1.1
36
+ Enabled: true
37
+ Lint/EmptyClass: # new in 1.3
38
+ Enabled: true
39
+ Lint/EmptyInPattern: # new in 1.16
40
+ Enabled: true
41
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
42
+ Enabled: true
43
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
44
+ Enabled: true
45
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
46
+ Enabled: true
47
+ Lint/NonAtomicFileOperation: # new in 1.31
48
+ Enabled: true
49
+ Lint/NumberedParameterAssignment: # new in 1.9
50
+ Enabled: true
51
+ Lint/OrAssignmentToConstant: # new in 1.9
52
+ Enabled: true
53
+ Lint/RedundantDirGlobSort: # new in 1.8
54
+ Enabled: true
55
+ Lint/RefinementImportMethods: # new in 1.27
56
+ Enabled: true
57
+ Lint/RequireRangeParentheses: # new in 1.32
58
+ Enabled: true
59
+ Lint/RequireRelativeSelfPath: # new in 1.22
60
+ Enabled: true
61
+ Lint/SymbolConversion: # new in 1.9
62
+ Enabled: true
63
+ Lint/ToEnumArguments: # new in 1.1
64
+ Enabled: true
65
+ Lint/TripleQuotes: # new in 1.9
66
+ Enabled: true
67
+ Lint/UnexpectedBlockArity: # new in 1.5
68
+ Enabled: true
69
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
70
+ Enabled: true
71
+ Lint/UselessRuby2Keywords: # new in 1.23
72
+ Enabled: true
73
+ Naming/BlockForwarding: # new in 1.24
74
+ Enabled: true
75
+ Security/CompoundHash: # new in 1.28
76
+ Enabled: true
77
+ Security/IoMethods: # new in 1.22
78
+ Enabled: true
79
+ Style/ArgumentsForwarding: # new in 1.1
80
+ Enabled: true
81
+ Style/CollectionCompact: # new in 1.2
82
+ Enabled: true
83
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
84
+ Enabled: true
85
+ Style/EmptyHeredoc: # new in 1.32
86
+ Enabled: true
87
+ Style/EndlessMethod: # new in 1.8
88
+ Enabled: true
89
+ Style/EnvHome: # new in 1.29
90
+ Enabled: true
91
+ Style/FetchEnvVar: # new in 1.28
92
+ Enabled: true
93
+ Style/FileRead: # new in 1.24
94
+ Enabled: true
95
+ Style/FileWrite: # new in 1.24
96
+ Enabled: true
97
+ Style/HashConversion: # new in 1.10
98
+ Enabled: true
99
+ Style/HashExcept: # new in 1.7
100
+ Enabled: true
101
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
102
+ Enabled: true
103
+ Style/InPatternThen: # new in 1.16
104
+ Enabled: true
105
+ Style/MagicCommentFormat: # new in 1.35
106
+ Enabled: true
107
+ Style/MapCompactWithConditionalBlock: # new in 1.30
108
+ Enabled: true
109
+ Style/MapToHash: # new in 1.24
110
+ Enabled: true
111
+ Style/MultilineInPatternThen: # new in 1.16
112
+ Enabled: true
113
+ Style/NegatedIfElseCondition: # new in 1.2
114
+ Enabled: true
115
+ Style/NestedFileDirname: # new in 1.26
116
+ Enabled: true
117
+ Style/NilLambda: # new in 1.3
118
+ Enabled: true
119
+ Style/NumberedParameters: # new in 1.22
120
+ Enabled: true
121
+ Style/NumberedParametersLimit: # new in 1.22
122
+ Enabled: true
123
+ Style/ObjectThen: # new in 1.28
124
+ Enabled: true
125
+ Style/OpenStructUse: # new in 1.23
126
+ Enabled: true
127
+ Style/OperatorMethodCall: # new in 1.37
128
+ Enabled: true
129
+ Style/QuotedSymbols: # new in 1.16
130
+ Enabled: true
131
+ Style/RedundantArgument: # new in 1.4
132
+ Enabled: true
133
+ Style/RedundantEach: # new in 1.38
134
+ Enabled: true
135
+ Style/RedundantInitialize: # new in 1.27
136
+ Enabled: true
137
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
138
+ Enabled: true
139
+ Style/RedundantStringEscape: # new in 1.37
140
+ Enabled: true
141
+ Style/SelectByRegexp: # new in 1.22
142
+ Enabled: true
143
+ Style/StringChars: # new in 1.12
144
+ Enabled: true
145
+ Style/SwapValues: # new in 1.1
146
+ Enabled: true
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
- # Specify your gem's dependencies in zip-codes.gemspec
4
5
  gemspec
data/Gemfile.lock CHANGED
@@ -1,17 +1,45 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zip-codes (0.1.0)
4
+ zip-codes (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- rake (10.1.0)
9
+ ast (2.4.2)
10
+ json (2.6.2)
11
+ parallel (1.22.1)
12
+ parser (3.1.3.0)
13
+ ast (~> 2.4.1)
14
+ rainbow (3.1.1)
15
+ rake (13.0.6)
16
+ regexp_parser (2.6.1)
17
+ rexml (3.2.5)
18
+ rubocop (1.39.0)
19
+ json (~> 2.3)
20
+ parallel (~> 1.10)
21
+ parser (>= 3.1.2.1)
22
+ rainbow (>= 2.2.2, < 4.0)
23
+ regexp_parser (>= 1.8, < 3.0)
24
+ rexml (>= 3.2.5, < 4.0)
25
+ rubocop-ast (>= 1.23.0, < 2.0)
26
+ ruby-progressbar (~> 1.7)
27
+ unicode-display_width (>= 1.4.0, < 3.0)
28
+ rubocop-ast (1.24.0)
29
+ parser (>= 3.1.1.0)
30
+ rubocop-rake (0.6.0)
31
+ rubocop (~> 1.0)
32
+ ruby-progressbar (1.11.0)
33
+ unicode-display_width (2.3.0)
10
34
 
11
35
  PLATFORMS
12
36
  ruby
13
37
 
14
38
  DEPENDENCIES
15
- bundler (~> 1.3)
16
- rake
39
+ rake (~> 13.0.0)
40
+ rubocop (~> 1.39.0)
41
+ rubocop-rake (~> 0.6.0)
17
42
  zip-codes!
43
+
44
+ BUNDLED WITH
45
+ 2.3.26
data/Rakefile CHANGED
@@ -1,18 +1,18 @@
1
- require "bundler/gem_tasks"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
2
4
  require 'yaml'
3
5
 
4
6
  task :convert do
5
7
  codes = {}
6
8
  File.open('lib/data/US.txt').each_line do |line|
7
- array = line.split("\t")
9
+ array = line.split('\t')
8
10
  codes[array[1]] = {
9
11
  state_code: array[4],
10
12
  state_name: array[3],
11
- city: array[2]
13
+ city: array[2]
12
14
  }
13
15
  end
14
16
 
15
- File.open("lib/data/US.yml", "w") do |file|
16
- file.write codes.to_yaml
17
- end
17
+ File.write('lib/data/US.yml', codes.to_yaml)
18
18
  end