easypost 5.0.0 → 5.0.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: b93e828aba22bcf673243120c7d51ab0d5bc813828204c5045ee7cbf4526bad2
4
- data.tar.gz: 904d0537ad8f78924dee006329b59a1b07ce3496c33d07149684ec4219547978
3
+ metadata.gz: be1297ea7c20b21f3f959cb281001d7435902ede623ca47ac981dba2b19309c6
4
+ data.tar.gz: 73e65fb3a6dc6a00635d0ae1f4351edcdaf427d5d29c7cf8254f43a770208033
5
5
  SHA512:
6
- metadata.gz: 64bbae9d00138cfc8634bb12a2d07b96dbfc951a93c2c983fa4a7da77e49bfc3d5ae2471ebca3ec84a5cb7c74fa88a1b851998c799119c071200bc37cd0645eb
7
- data.tar.gz: 1d6910376670da796ee8daf8ed7c54e54591cd7f0770b7d363a38bd9d406a229e1df364fa7c16aa0f688830e171be82cb0ddb2f2331dd125a980158fad8d23c1
6
+ metadata.gz: 99d4ded392e0e2b5a3a30c3eb58c9b9dff59997d479ae0174fa59a6b0d8dec1260f3861fd3d3a965545fc910c48cd137ccd1b24704db0f56d0287e15890c4f94
7
+ data.tar.gz: c31978176d4f25898021b9306180171e86826e48409de7a007cd0aeff371e528dfe8b690963c9cc97df3288ba61db27658b8780add0e29943db13a99d095f6df
@@ -44,6 +44,8 @@ jobs:
44
44
  bundler-cache: true
45
45
  - name: Install Dependencies
46
46
  run: make install
47
+ - name: Install style guides
48
+ run: make install-styleguide
47
49
  - name: Lint Project
48
50
  run: make lint
49
51
  - name: Run security analysis
data/.gitignore CHANGED
@@ -24,3 +24,5 @@ test/tmp
24
24
  test/version_tmp
25
25
  tmp
26
26
  vendor/
27
+ /easycop.yml
28
+ /.rubocop.yml
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v5.0.1 (2023-06-20)
4
+
5
+ - Fixes a bug where the params of a `customs_info` on create weren't wrapped properly which led to an empty set of `customs_items`
6
+
3
7
  ## v5.0.0 (2023-06-06)
4
8
 
5
9
  See our [Upgrade Guide](UPGRADE_GUIDE.md#upgrading-from-4x-to-50) for more details.
data/Makefile CHANGED
@@ -20,16 +20,23 @@ coverage:
20
20
  docs:
21
21
  bundle exec rdoc lib -o docs --title "EasyPost Ruby Docs"
22
22
 
23
- ## fix - Fix Rubocop errors
24
- fix:
23
+ ## format - Fix Rubocop errors
24
+ format:
25
25
  bundle exec rubocop -a
26
26
 
27
+ ## install-styleguide - Import the style guides (Unix only)
28
+ install-styleguide: | update-examples-submodule
29
+ sh examples/symlink_directory_files.sh examples/style_guides/ruby .
30
+
27
31
  ## install - Install globally from source
28
- install:
29
- git submodule init
30
- git submodule update
32
+ install: | update-examples-submodule
31
33
  bundle install
32
34
 
35
+ ## update-examples-submodule - Update the examples submodule
36
+ update-examples-submodule:
37
+ git submodule init
38
+ git submodule update --remote
39
+
33
40
  ## lint - Lint the project
34
41
  lint:
35
42
  bundle exec rubocop
@@ -52,8 +59,6 @@ test:
52
59
  bundle exec rspec
53
60
 
54
61
  ## update - Updates dependencies
55
- update:
56
- git submodule init
57
- git submodule update --remote
62
+ update: | update-examples-submodule
58
63
 
59
- .PHONY: help build clean coverage docs fix install lint publish release scan test update
64
+ .PHONY: help build clean coverage docs format install install-styleguide lint publish release scan test update update-examples-submodule
data/README.md CHANGED
@@ -136,11 +136,14 @@ For additional support, see our [org-wide support policy](https://github.com/Eas
136
136
  # Install dependencies
137
137
  make install
138
138
 
139
+ # Install style guide (Unix only)
140
+ make install-style
141
+
139
142
  # Lint project
140
143
  make lint
141
144
 
142
145
  # Fix linting errors
143
- make fix
146
+ make format
144
147
 
145
148
  # Run tests (coverage is generated on a successful test suite run)
146
149
  EASYPOST_TEST_API_KEY=123... EASYPOST_PROD_API_KEY=123... make test
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.0
1
+ 5.0.1
@@ -43,7 +43,10 @@ class EasyPost::HttpClient
43
43
  # Attempt to make the request and return the response.
44
44
  Net::HTTP.start(
45
45
  uri.host,
46
- uri.port, use_ssl: true, read_timeout: read_timeout, open_timeout: open_timeout,
46
+ uri.port,
47
+ use_ssl: true,
48
+ read_timeout: read_timeout,
49
+ open_timeout: open_timeout,
47
50
  ) do |http|
48
51
  http.request(request)
49
52
  end
@@ -5,7 +5,9 @@ class EasyPost::Services::CustomsInfo < EasyPost::Services::Service
5
5
 
6
6
  # Create a CustomsInfo object
7
7
  def create(params)
8
- @client.make_request(:post, 'customs_infos', MODEL_CLASS, params)
8
+ wrapped_params = { customs_info: params }
9
+
10
+ @client.make_request(:post, 'customs_infos', MODEL_CLASS, wrapped_params)
9
11
  end
10
12
 
11
13
  # Retrieve a CustomsInfo object
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easypost
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - EasyPost Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-06 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: brakeman
@@ -221,7 +221,6 @@ files:
221
221
  - ".github/workflows/ci.yml"
222
222
  - ".gitignore"
223
223
  - ".gitmodules"
224
- - ".rubocop.yml"
225
224
  - CHANGELOG.md
226
225
  - Gemfile
227
226
  - LICENSE
@@ -231,7 +230,6 @@ files:
231
230
  - UPGRADE_GUIDE.md
232
231
  - VERSION
233
232
  - bin/easypost-irb
234
- - easycop.yml
235
233
  - easypost.gemspec
236
234
  - lib/easypost.rb
237
235
  - lib/easypost/client.rb
data/.rubocop.yml DELETED
@@ -1,16 +0,0 @@
1
- inherit_from: easycop.yml
2
-
3
- AllCops:
4
- SuggestExtensions: false
5
- Exclude:
6
- - bin/**/*
7
- - docs/**/*
8
- - examples/**/*
9
- - vendor/bundle/**/*
10
- # We are ignoring RSpec/FilePath because Simplecov doesn't play nice with nested spec files
11
- RSpec/FilePath:
12
- Enabled: false
13
- # TODO: Remove this once we start using keyword arguments
14
- Style/OptionalBooleanParameter:
15
- Exclude:
16
- - 'lib/easypost/services/*.rb'
data/easycop.yml DELETED
@@ -1,180 +0,0 @@
1
- # This file was generated by
2
- # `rake easycop:init`
3
- # on 2019-12-16 19:20:52 +0000 using EasyCop version 0.1.
4
- ---
5
- require:
6
- - rubocop-rspec
7
- AllCops:
8
- TargetRubyVersion: 2.6
9
- NewCops: disable
10
- Layout/BlockAlignment:
11
- Enabled: true
12
- EnforcedStyleAlignWith: start_of_block
13
- Layout/DotPosition:
14
- Enabled: true
15
- AutoCorrect: true
16
- EnforcedStyle: leading
17
- Layout/EmptyLineAfterGuardClause:
18
- Enabled: true
19
- AutoCorrect: true
20
- Layout/EmptyLinesAroundArguments:
21
- Enabled: true
22
- AutoCorrect: true
23
- Layout/EmptyLinesAroundExceptionHandlingKeywords:
24
- Enabled: true
25
- AutoCorrect: true
26
- Layout/EndAlignment:
27
- Enabled: true
28
- EnforcedStyleAlignWith: keyword
29
- AutoCorrect: true
30
- Layout/MultilineMethodCallBraceLayout:
31
- EnforcedStyle: new_line
32
- Layout/MultilineHashBraceLayout:
33
- EnforcedStyle: new_line
34
- Layout/MultilineArrayBraceLayout:
35
- EnforcedStyle: new_line
36
- Layout/FirstArrayElementLineBreak:
37
- Enabled: true
38
- Layout/FirstHashElementLineBreak:
39
- Enabled: true
40
- Layout/FirstMethodArgumentLineBreak:
41
- Enabled: true
42
- Layout/LineLength:
43
- Max: 120
44
- AllowedPatterns:
45
- - "(\\A|\\s)#"
46
- Layout/LineEndStringConcatenationIndentation: # new in 1.18
47
- Enabled: true
48
- Layout/SpaceBeforeBrackets: # new in 1.7
49
- Enabled: true
50
- RSpec/SharedExamples:
51
- Enabled: false
52
- RSpec/NestedGroups:
53
- Enabled: false
54
- RSpec/ExampleLength:
55
- Enabled: false
56
- RSpec/ImplicitSubject:
57
- Enabled: false
58
- RSpec/MultipleExpectations:
59
- Enabled: false
60
- RSpec/MultipleMemoizedHelpers:
61
- Enabled: false
62
- RSpec/IdenticalEqualityAssertion: # new in 2.4
63
- Enabled: true
64
- Style/BlockDelimiters:
65
- Enabled: true
66
- EnforcedStyle: braces_for_chaining
67
- Style/ClassAndModuleChildren:
68
- Enabled: true
69
- EnforcedStyle: compact
70
- Style/Documentation:
71
- Enabled: false
72
- Style/MethodCalledOnDoEndBlock:
73
- Severity: warning
74
- Enabled: true
75
- Style/RaiseArgs:
76
- Enabled: false
77
- Style/RescueStandardError:
78
- Enabled: true
79
- Style/MultilineBlockChain:
80
- Enabled: false
81
- Style/TrailingCommaInHashLiteral:
82
- EnforcedStyleForMultiline: consistent_comma
83
- Style/TrailingCommaInArguments:
84
- EnforcedStyleForMultiline: consistent_comma
85
- Style/TrailingCommaInArrayLiteral:
86
- EnforcedStyleForMultiline: consistent_comma
87
- Style/SymbolArray:
88
- Enabled: false
89
- Style/IfUnlessModifier:
90
- Enabled: false
91
- Metrics/BlockLength:
92
- Enabled: false
93
- Metrics/ClassLength:
94
- Enabled: false
95
- Metrics/CyclomaticComplexity:
96
- Enabled: false
97
- Metrics/PerceivedComplexity:
98
- Enabled: false
99
- Metrics/ModuleLength:
100
- Enabled: false
101
- Metrics/MethodLength:
102
- Enabled: false
103
- Metrics/ParameterLists:
104
- Enabled: false
105
- Metrics/AbcSize:
106
- Enabled: false
107
- Gemspec/DeprecatedAttributeAssignment:
108
- Enabled: true
109
- Lint/AmbiguousAssignment: # new in 1.7
110
- Enabled: true
111
- Lint/AmbiguousRange: # new in 1.19
112
- Enabled: true
113
- Lint/DeprecatedConstants: # new in 1.8
114
- Enabled: true
115
- Lint/DuplicateBranch: # new in 1.3
116
- Enabled: true
117
- Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
118
- Enabled: true
119
- Lint/EmptyBlock: # new in 1.1
120
- Enabled: true
121
- Lint/EmptyClass: # new in 1.3
122
- Enabled: true
123
- Lint/EmptyInPattern: # new in 1.16
124
- Enabled: true
125
- Lint/LambdaWithoutLiteralBlock: # new in 1.8
126
- Enabled: true
127
- Lint/NoReturnInBeginEndBlocks: # new in 1.2
128
- Enabled: true
129
- Lint/NumberedParameterAssignment: # new in 1.9
130
- Enabled: true
131
- Lint/OrAssignmentToConstant: # new in 1.9
132
- Enabled: true
133
- Lint/RedundantDirGlobSort: # new in 1.8
134
- Enabled: true
135
- Lint/SymbolConversion: # new in 1.9
136
- Enabled: true
137
- Lint/ToEnumArguments: # new in 1.1
138
- Enabled: true
139
- Lint/TripleQuotes: # new in 1.9
140
- Enabled: true
141
- Lint/UnexpectedBlockArity: # new in 1.5
142
- Enabled: true
143
- Lint/UnmodifiedReduceAccumulator: # new in 1.1
144
- Enabled: true
145
- Naming/InclusiveLanguage: # new in 1.18
146
- Enabled: true
147
- Style/ArgumentsForwarding: # new in 1.1
148
- Enabled: true
149
- Style/CollectionCompact: # new in 1.2
150
- Enabled: true
151
- Style/DocumentDynamicEvalDefinition: # new in 1.1
152
- Enabled: true
153
- Style/EndlessMethod: # new in 1.8
154
- Enabled: true
155
- Style/HashConversion: # new in 1.10
156
- Enabled: true
157
- Style/HashExcept: # new in 1.7
158
- Enabled: true
159
- Style/IfWithBooleanLiteralBranches: # new in 1.9
160
- Enabled: true
161
- Style/InPatternThen: # new in 1.16
162
- Enabled: true
163
- Style/MultilineInPatternThen: # new in 1.16
164
- Enabled: true
165
- Style/NegatedIfElseCondition: # new in 1.2
166
- Enabled: true
167
- Style/NilLambda: # new in 1.3
168
- Enabled: true
169
- Style/QuotedSymbols: # new in 1.16
170
- Enabled: true
171
- Style/RedundantArgument: # new in 1.4
172
- Enabled: true
173
- Style/RedundantSelfAssignmentBranch: # new in 1.19
174
- Enabled: true
175
- Style/StringChars: # new in 1.12
176
- Enabled: true
177
- Style/SwapValues: # new in 1.1
178
- Enabled: true
179
- RSpec/Rails/AvoidSetupHook: # new in 2.4
180
- Enabled: true