mws-merchant_fulfillment 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 21015136f3a3c468043cb1059a57810871aa3e70
4
- data.tar.gz: 42672691b88c375132dc6c9f38bb71d2a04cb116
3
+ metadata.gz: 21e1f631e9fcf4d24f6552e1a066eb24e4a144d4
4
+ data.tar.gz: 23613f881ca575e4a7c0649c168fcee635961670
5
5
  SHA512:
6
- metadata.gz: 264aeeb81883f23156cb4aa9e0eb4da1c8de3f2f236d64b2fc52543c9984de2011b325895af8e340bbe69dc95f5560af1bd954a73f1e63fcd198ee79b83da45b
7
- data.tar.gz: 4ad2397b4ded1ffa2d717e0470a00bd25cc921516404d39f2f963ffdbb7030ed2543ffbe29c2d99dec269749f7c8400f60e16ec16b686046460ef46e468a8c21
6
+ metadata.gz: b5fc0a1eb3e2bf5fad79869129aea450f74f5badc200d47120cbcc41b8e8c2dd04f8a71990e051a1ae06f5c7380fd07062455593bf28393289d6c4087fa8c232
7
+ data.tar.gz: a33adca1d7756b3fa1e1de013d6bea02a2c6bf587ece82a21136891cea0f2f990a41887971e71b76f38d8e1aa310d2b1370b5e8e5fc8bceb26165f4ed9ec84d2
data/.gitignore CHANGED
@@ -7,5 +7,7 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
 
10
+ Gemfile.lock
11
+
10
12
  # rspec failure tracking
11
13
  .rspec_status
@@ -5,8 +5,8 @@
5
5
  # Include only the specific lines that you're changing from the defaults.
6
6
  #
7
7
  ---
8
- require: rubocop-rspec
9
8
  AllCops:
9
+ TargetRubyVersion: 2.3
10
10
  Exclude:
11
11
  - 'Gemfile.lock'
12
12
  - 'tmp/**/*'
@@ -23,8 +23,17 @@ Metrics/BlockLength:
23
23
  Exclude:
24
24
  - 'Guardfile'
25
25
  - 'spec/**/*.rb'
26
+ Naming/FileName:
27
+ Exclude:
28
+ - 'lib/mws-merchant_fulfillment.rb'
26
29
  Style/BracesAroundHashParameters:
27
30
  Enabled: false
31
+ Style/FrozenStringLiteralComment:
32
+ Exclude:
33
+ - 'Gemfile'
34
+ - 'Guardfile'
35
+ - 'Rakefile'
36
+ - 'bin/*'
28
37
  Style/ClassCheck:
29
38
  Enabled: false
30
39
  Style/RegexpLiteral:
@@ -67,21 +76,3 @@ Style/TrailingCommaInHashLiteral:
67
76
  EnforcedStyleForMultiline: comma
68
77
  Style/TrailingCommaInArguments:
69
78
  EnforcedStyleForMultiline: comma
70
- RSpec/ContextWording:
71
- Enabled: false
72
- RSpec/EmptyLineAfterHook:
73
- Enabled: false
74
- RSpec/EmptyLineAfterSubject:
75
- Enabled: false
76
- RSpec/ExampleLength:
77
- Enabled: false
78
- RSpec/MultipleExpectations:
79
- Max: 5
80
- RSpec/NestedGroups:
81
- Max: 6
82
- RSpec/LetSetup:
83
- Enabled: false
84
- RSpec/ScatteredLet:
85
- Enabled: false
86
- RSpec/ScatteredSetup:
87
- Enabled: false
data/Guardfile CHANGED
@@ -5,7 +5,7 @@ group :red_green_refactor_rb, halt_on_fail: true do
5
5
  }
6
6
  rspec_format = "--format documentation"
7
7
 
8
- rspec_options[:cmd] = "bin/rspec #{rspec_format}"
8
+ rspec_options[:cmd] = "bundle exec rspec #{rspec_format}"
9
9
 
10
10
  guard 'rspec', rspec_options do
11
11
  watch(%r{spec/spec_helper.rb}) { "spec" }
data/Rakefile CHANGED
@@ -3,4 +3,4 @@ require "rspec/core/rake_task"
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task :default => :spec # rubocop:disable Style/HashSyntax
@@ -16,10 +16,10 @@ module MWS
16
16
  private
17
17
 
18
18
  def add_namespace(path)
19
- path
20
- .split('/')
21
- .map { |attr| "xmlns:#{attr}" }
22
- .join('/')
19
+ path.
20
+ split('/').
21
+ map { |attr| "xmlns:#{attr}" }.
22
+ join('/')
23
23
  end
24
24
  end
25
25
  end
@@ -38,7 +38,7 @@ module MWS
38
38
 
39
39
  def time_at_xpath(path)
40
40
  text = text_at_xpath(path)
41
- Time.zone.parse(CGI.unescape(text)) if text
41
+ Time.parse(CGI.unescape(text)) if text
42
42
  end
43
43
 
44
44
  def text_at_xpath(path)
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'peddler'
4
4
  require 'nokogiri'
5
+ require 'mws/merchant_fulfillment/service_status'
5
6
  require 'mws/merchant_fulfillment/shipping_services'
6
7
 
7
8
  module MWS
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'mws/merchant_fulfillment/entity'
4
+ require 'mws/merchant_fulfillment/service_status_message'
5
+
6
+ module MWS
7
+ module MerchantFulfillment
8
+ class ServiceStatus < Entity
9
+ attribute(:status) do
10
+ text_at_xpath('Status')
11
+ end
12
+
13
+ attribute(:timestamp) do
14
+ time_at_xpath('Timestamp')
15
+ end
16
+
17
+ attribute(:message_id) do
18
+ text_at_xpath('MessageId')
19
+ end
20
+
21
+ attribute(:messages) do
22
+ xpath('Messages/Message').map { |node| ServiceStatusMessage.new(node) }
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'mws/merchant_fulfillment/entity'
4
+
5
+ module MWS
6
+ module MerchantFulfillment
7
+ class ServiceStatusMessage < Entity
8
+ attribute(:locale) do
9
+ text_at_xpath('Locale')
10
+ end
11
+
12
+ attribute(:text) do
13
+ text_at_xpath('Text')
14
+ end
15
+ end
16
+ end
17
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module MWS
4
4
  module MerchantFulfillment
5
- VERSION = '1.0.1'
5
+ VERSION = '1.0.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mws-merchant_fulfillment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Becker
@@ -189,20 +189,21 @@ files:
189
189
  - ".rubocop.yml"
190
190
  - ".travis.yml"
191
191
  - Gemfile
192
- - Gemfile.lock
193
192
  - Guardfile
194
193
  - LICENSE
195
194
  - README.md
196
195
  - Rakefile
197
196
  - bin/console
198
197
  - bin/setup
199
- - lib/mws-merchant-fulfillment.rb
198
+ - lib/mws-merchant_fulfillment.rb
200
199
  - lib/mws/merchant_fulfillment/available_format_options_for_label.rb
201
200
  - lib/mws/merchant_fulfillment/collection.rb
202
201
  - lib/mws/merchant_fulfillment/document.rb
203
202
  - lib/mws/merchant_fulfillment/entity.rb
204
203
  - lib/mws/merchant_fulfillment/parser.rb
205
204
  - lib/mws/merchant_fulfillment/rate.rb
205
+ - lib/mws/merchant_fulfillment/service_status.rb
206
+ - lib/mws/merchant_fulfillment/service_status_message.rb
206
207
  - lib/mws/merchant_fulfillment/shipping_service.rb
207
208
  - lib/mws/merchant_fulfillment/shipping_service_option.rb
208
209
  - lib/mws/merchant_fulfillment/shipping_services.rb
@@ -1,117 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- mws-merchant_fulfillment (1.0.0)
5
- money (~> 6.0)
6
- nokogiri (~> 1.5)
7
- peddler (~> 2.0)
8
- structure (~> 1.0)
9
-
10
- GEM
11
- remote: http://rubygems.org/
12
- specs:
13
- ast (2.4.0)
14
- coderay (1.1.2)
15
- concurrent-ruby (1.1.4)
16
- diff-lcs (1.3)
17
- excon (0.62.0)
18
- ffi (1.10.0)
19
- formatador (0.2.5)
20
- guard (2.15.0)
21
- formatador (>= 0.2.4)
22
- listen (>= 2.7, < 4.0)
23
- lumberjack (>= 1.0.12, < 2.0)
24
- nenv (~> 0.1)
25
- notiffany (~> 0.0)
26
- pry (>= 0.9.12)
27
- shellany (~> 0.0)
28
- thor (>= 0.18.1)
29
- guard-compat (1.2.1)
30
- guard-rspec (4.7.3)
31
- guard (~> 2.1)
32
- guard-compat (~> 1.1)
33
- rspec (>= 2.99.0, < 4.0)
34
- guard-rubocop (1.3.0)
35
- guard (~> 2.0)
36
- rubocop (~> 0.20)
37
- i18n (1.5.3)
38
- concurrent-ruby (~> 1.0)
39
- jaro_winkler (1.5.2)
40
- jeff (2.0.0)
41
- excon (>= 0.22.1)
42
- listen (3.1.5)
43
- rb-fsevent (~> 0.9, >= 0.9.4)
44
- rb-inotify (~> 0.9, >= 0.9.7)
45
- ruby_dep (~> 1.2)
46
- lumberjack (1.0.13)
47
- method_source (0.9.2)
48
- mini_portile2 (2.4.0)
49
- money (6.13.2)
50
- i18n (>= 0.6.4, <= 2)
51
- multi_xml (0.6.0)
52
- nenv (0.3.0)
53
- nokogiri (1.10.1)
54
- mini_portile2 (~> 2.4.0)
55
- notiffany (0.1.1)
56
- nenv (~> 0.1)
57
- shellany (~> 0.0)
58
- parallel (1.13.0)
59
- parser (2.6.0.0)
60
- ast (~> 2.4.0)
61
- peddler (2.0.4)
62
- excon (>= 0.50.0)
63
- jeff (~> 2.0)
64
- multi_xml (>= 0.5.0)
65
- powerpack (0.1.2)
66
- pry (0.12.2)
67
- coderay (~> 1.1.0)
68
- method_source (~> 0.9.0)
69
- rainbow (3.0.0)
70
- rake (10.5.0)
71
- rb-fsevent (0.10.3)
72
- rb-inotify (0.10.0)
73
- ffi (~> 1.0)
74
- rspec (3.8.0)
75
- rspec-core (~> 3.8.0)
76
- rspec-expectations (~> 3.8.0)
77
- rspec-mocks (~> 3.8.0)
78
- rspec-core (3.8.0)
79
- rspec-support (~> 3.8.0)
80
- rspec-expectations (3.8.2)
81
- diff-lcs (>= 1.2.0, < 2.0)
82
- rspec-support (~> 3.8.0)
83
- rspec-mocks (3.8.0)
84
- diff-lcs (>= 1.2.0, < 2.0)
85
- rspec-support (~> 3.8.0)
86
- rspec-support (3.8.0)
87
- rubocop (0.64.0)
88
- jaro_winkler (~> 1.5.1)
89
- parallel (~> 1.10)
90
- parser (>= 2.5, != 2.5.1.1)
91
- powerpack (~> 0.1)
92
- rainbow (>= 2.2.2, < 4.0)
93
- ruby-progressbar (~> 1.7)
94
- unicode-display_width (~> 1.4.0)
95
- ruby-progressbar (1.10.0)
96
- ruby_dep (1.5.0)
97
- shellany (0.0.1)
98
- structure (1.0.3)
99
- thor (0.20.3)
100
- unicode-display_width (1.4.1)
101
-
102
- PLATFORMS
103
- ruby
104
-
105
- DEPENDENCIES
106
- bundler (~> 1.17)
107
- guard
108
- guard-rspec
109
- guard-rubocop
110
- mws-merchant_fulfillment!
111
- pry
112
- rake (~> 10.0)
113
- rspec (~> 3.0)
114
- rubocop
115
-
116
- BUNDLED WITH
117
- 1.17.1