fuel_surcharge 1.2.2 → 1.2.3

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: a6db529ef07a052e6406c2cc32c414bfd6a8cca577ab239c78bb3622cb326a93
4
- data.tar.gz: 29f736220eb3c8c7ef87a02ae2c02a9812f280cf4c0a9590adaffb76df02a26b
3
+ metadata.gz: 4d59ac295ec772f6ef58925b7efea23afef211b61150133799fa1cd36e3b2fea
4
+ data.tar.gz: c8b3bac573e405cb223118e2b1d7551ea586ddb294438328016ece0b3b467084
5
5
  SHA512:
6
- metadata.gz: 9775e48cea5cf6b9aa79fb078e75480d8545a9716ec7a8daa3865468ddcf1a7410043da62249baa43dd2cfe0423e5591a6c1d54e28879d9621684cd2f062cfa2
7
- data.tar.gz: 2bb3b0601f7331ba9b27ca87b2bdc0c2119cee206729e79119248ec070ca132622ca7ac09cb9e7ae365dfa9e4dc4a650b9f1aa7f62ecc9e0e13298a790cc4a93
6
+ metadata.gz: 7d471ee6a31f4787d01977d61b9fa7efd0b8d1a9587e257489788e8d60be637e3fc67bc110385da55237d2d5ed9629d63fd03bcdb28b19024123befbe44bf90f
7
+ data.tar.gz: 470a5873cae9eb266c3511670a0d3da921616514299b76fe69302bfe4b4527efb6a169658e2ba009205abb319d5b7c2eb9c6f28427a6cd399418b556838d8aa6
@@ -1,20 +1,35 @@
1
1
  # Change Log
2
2
 
3
- ## [1.2.2](https://github.com/levups/fuel_surcharge/tree/1.2.2) (2019-08-01)
4
- [Full Changelog](https://github.com/levups/fuel_surcharge/compare/v1.2.1...1.2.2)
3
+ ## [1.2.2](https://github.com/levups/fuel_surcharge/tree/1.2.2) (2019-09-20)
4
+ [Full Changelog](https://github.com/levups/fuel_surcharge/compare/v1.2.2...1.2.2)
5
5
 
6
- **Fixed bugs:**
6
+ **Closed issues:**
7
+
8
+ - Chronopost fails to parse august in French [\#66](https://github.com/levups/fuel_surcharge/issues/66)
9
+
10
+ **Merged pull requests:**
11
+
12
+ - Replace HCL workflow with new github action style [\#65](https://github.com/levups/fuel_surcharge/pull/65) ([bobmaerten](https://github.com/bobmaerten))
13
+ - Bump standard from 0.1.3 to 0.1.4 [\#64](https://github.com/levups/fuel_surcharge/pull/64) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
14
+ - Bump standard from 0.1.2 to 0.1.3 [\#63](https://github.com/levups/fuel_surcharge/pull/63) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
15
+ - Bump standard from 0.1.0 to 0.1.2 [\#62](https://github.com/levups/fuel_surcharge/pull/62) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
16
+
17
+ ## [v1.2.2](https://github.com/levups/fuel_surcharge/tree/v1.2.2) (2019-08-01)
18
+ [Full Changelog](https://github.com/levups/fuel_surcharge/compare/v1.2.1...v1.2.2)
19
+
20
+ **Closed issues:**
7
21
 
8
22
  - TNT website change, again… [\#58](https://github.com/levups/fuel_surcharge/issues/58)
9
23
 
10
24
  **Merged pull requests:**
11
25
 
26
+ - Release v1.2.2 [\#60](https://github.com/levups/fuel_surcharge/pull/60) ([bobmaerten](https://github.com/bobmaerten))
12
27
  - Correct TNT website parsing [\#59](https://github.com/levups/fuel_surcharge/pull/59) ([bobmaerten](https://github.com/bobmaerten))
13
28
 
14
29
  ## [v1.2.1](https://github.com/levups/fuel_surcharge/tree/v1.2.1) (2019-07-22)
15
30
  [Full Changelog](https://github.com/levups/fuel_surcharge/compare/v1.2.0...v1.2.1)
16
31
 
17
- **Fixed bugs:**
32
+ **Closed issues:**
18
33
 
19
34
  - Website changes for TNT and Chronopost fuel surcharge infos [\#55](https://github.com/levups/fuel_surcharge/issues/55)
20
35
 
@@ -31,7 +46,7 @@
31
46
  ## [v1.2.0](https://github.com/levups/fuel_surcharge/tree/v1.2.0) (2019-04-23)
32
47
  [Full Changelog](https://github.com/levups/fuel_surcharge/compare/v1.1.0...v1.2.0)
33
48
 
34
- **Fixed bugs:**
49
+ **Closed issues:**
35
50
 
36
51
  - Error in gem push workflow action [\#32](https://github.com/levups/fuel_surcharge/issues/32)
37
52
 
@@ -58,13 +73,10 @@
58
73
  ## [v1.1.0](https://github.com/levups/fuel_surcharge/tree/v1.1.0) (2019-02-08)
59
74
  [Full Changelog](https://github.com/levups/fuel_surcharge/compare/v1.0.0...v1.1.0)
60
75
 
61
- **Implemented enhancements:**
62
-
63
- - Auto-publish new gem versions using Github Actions [\#25](https://github.com/levups/fuel_surcharge/issues/25)
64
-
65
- **Fixed bugs:**
76
+ **Closed issues:**
66
77
 
67
78
  - Error extracting time\_period for Chronopost [\#26](https://github.com/levups/fuel_surcharge/issues/26)
79
+ - Auto-publish new gem versions using Github Actions [\#25](https://github.com/levups/fuel_surcharge/issues/25)
68
80
 
69
81
  **Merged pull requests:**
70
82
 
@@ -98,13 +110,11 @@
98
110
  ## [v0.2.0](https://github.com/levups/fuel_surcharge/tree/v0.2.0) (2018-11-28)
99
111
  [Full Changelog](https://github.com/levups/fuel_surcharge/compare/v0.1.0...v0.2.0)
100
112
 
101
- **Implemented enhancements:**
102
-
103
- - Rename Tnt class to TNT [\#5](https://github.com/levups/fuel_surcharge/issues/5)
104
-
105
113
  **Closed issues:**
106
114
 
115
+ - Rename Tnt class to TNT [\#5](https://github.com/levups/fuel_surcharge/issues/5)
107
116
  - Bump to v.0.2.0 [\#7](https://github.com/levups/fuel_surcharge/issues/7)
117
+ - Rename Tnt to TNT for better consistency [\#4](https://github.com/levups/fuel_surcharge/issues/4)
108
118
 
109
119
  **Merged pull requests:**
110
120
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fuel_surcharge (1.2.2)
4
+ fuel_surcharge (1.2.3)
5
5
  http (~> 4.0)
6
6
 
7
7
  GEM
@@ -49,7 +49,7 @@ GEM
49
49
  octokit (4.14.0)
50
50
  sawyer (~> 0.8.0, >= 0.5.3)
51
51
  parallel (1.17.0)
52
- parser (2.6.3.0)
52
+ parser (2.6.4.1)
53
53
  ast (~> 2.4.0)
54
54
  public_suffix (3.0.3)
55
55
  rainbow (3.0.0)
@@ -62,13 +62,13 @@ GEM
62
62
  rainbow (>= 2.2.2, < 4.0)
63
63
  ruby-progressbar (~> 1.7)
64
64
  unicode-display_width (>= 1.4.0, < 1.7)
65
- rubocop-performance (1.4.0)
65
+ rubocop-performance (1.4.1)
66
66
  rubocop (>= 0.71.0)
67
67
  ruby-progressbar (1.10.1)
68
68
  sawyer (0.8.1)
69
69
  addressable (>= 2.3.5, < 2.6)
70
70
  faraday (~> 0.8, < 1.0)
71
- standard (0.1.0)
71
+ standard (0.1.4)
72
72
  rubocop (~> 0.72.0)
73
73
  rubocop-performance (~> 1.4.0)
74
74
  thread_safe (0.3.6)
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # A transporters fuel surcharge fetcher
2
2
 
3
- [![CircleCI](https://circleci.com/gh/levups/fuel_surcharge/tree/master.svg?style=svg)](https://circleci.com/gh/levups/fuel_surcharge/tree/master)
3
+ ![Build workflow](https://github.com/levups/fuel_surcharge/workflows/build/badge.svg)
4
+
5
+ ![Publish workflow](https://github.com/levups/fuel_surcharge/workflows/publish/badge.svg)
4
6
 
5
7
  Retrieve current air and road rates applied to transporters shipping costs and
6
8
  convert them to multipliers you can directly use in your app to calculate
data/Rakefile CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "github_changelog_generator/task"
5
- require "http"
6
- require "json"
7
5
  require "rake/testtask"
8
6
 
9
7
  Rake::TestTask.new(:test) do |t|
@@ -12,22 +10,4 @@ Rake::TestTask.new(:test) do |t|
12
10
  t.test_files = FileList["test/**/*_test.rb"]
13
11
  end
14
12
 
15
- desc "Check if a gem release is required"
16
- task :should_we_release_a_new_version do
17
- response = HTTP.get("https://rubygems.org/api/v1/gems/fuel_surcharge.json")
18
- unless response.code == 200
19
- puts "Unable to fetch rubygems version"
20
- puts response.inspect
21
- exit 1
22
- end
23
- gem_release = JSON.parse(response.to_s).dig("version")
24
-
25
- if FuelSurcharge::VERSION == gem_release
26
- puts "No release required"
27
- exit 78
28
- else
29
- puts "Let's release the v#{FuelSurcharge::VERSION}!"
30
- end
31
- end
32
-
33
13
  task default: :test
@@ -3,16 +3,20 @@
3
3
 
4
4
  require "fuel_surcharge"
5
5
 
6
- colissimo = FuelSurcharge::Colissimo.new
6
+ colissimo = FuelSurcharge::Colissimo.new
7
7
  chronopost = FuelSurcharge::Chronopost.new
8
- tnt = FuelSurcharge::TNT.new
8
+ tnt = FuelSurcharge::TNT.new
9
9
 
10
10
  [colissimo, chronopost, tnt].each do |fuel_surcharge|
11
11
  puts "---------------------------------------------------"
12
12
  puts "# Fuel surcharges for #{fuel_surcharge.class.name.split("::").last} on #{fuel_surcharge.time_period}"
13
- puts "# Fetched from #{fuel_surcharge.url}"
14
- puts
15
- puts "AIR = #{fuel_surcharge.air_percentage} / #{format "%.4f", fuel_surcharge.air_multiplier}"
16
- puts "ROAD = #{fuel_surcharge.road_percentage} / #{format "%.4f", fuel_surcharge.road_multiplier}"
17
- puts
13
+ if fuel_surcharge.air_percentage
14
+ puts "# Fetched from #{fuel_surcharge.url}"
15
+ puts
16
+ puts "AIR = #{fuel_surcharge.air_percentage} / #{format "%.4f", fuel_surcharge.air_multiplier}"
17
+ puts "ROAD = #{fuel_surcharge.road_percentage} / #{format "%.4f", fuel_surcharge.road_multiplier}"
18
+ puts
19
+ else
20
+ puts "# Unable to fetched data from #{fuel_surcharge.url}"
21
+ end
18
22
  end
@@ -8,16 +8,16 @@ require "fuel_surcharge/version"
8
8
  Gem::Specification.new do |spec|
9
9
  spec.required_ruby_version = "~> 2.5"
10
10
 
11
- spec.name = "fuel_surcharge"
11
+ spec.name = "fuel_surcharge"
12
12
  spec.version = FuelSurcharge::VERSION
13
13
  spec.authors = ["Bob Maerten", "Clément Joubert"]
14
- spec.email = ["bob@levups.com", "clement@levups.com"]
14
+ spec.email = ["bob@levups.com", "clement@levups.com"]
15
15
 
16
- spec.summary = "Retrieve current month's Transporters' fuel surcharge"
16
+ spec.summary = "Retrieve current month's Transporters' fuel surcharge"
17
17
  spec.description = "A simple gem to fetch transporters data every month."
18
18
 
19
19
  spec.homepage = "https://rubygems.org/gems/fuel_surcharge"
20
- spec.license = "MIT"
20
+ spec.license = "MIT"
21
21
 
22
22
  spec.metadata = {
23
23
  "bug_tracker_uri" => "https://github.com/levups/fuel_surcharge/issues",
@@ -31,8 +31,8 @@ Gem::Specification.new do |spec|
31
31
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
32
32
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|.github)/}) }
33
33
  end
34
- spec.bindir = "exe"
35
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
+ spec.bindir = "exe"
35
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
36
  spec.require_paths = ["lib"]
37
37
 
38
38
  spec.add_dependency "http", "~> 4.0"
@@ -24,7 +24,7 @@ module FuelSurcharge
24
24
  @parsed_values = {}
25
25
  return unless xml_root
26
26
 
27
- caps = xml_root.elements.first
27
+ caps = xml_root.elements.first
28
28
  month = caps.elements.first
29
29
  month.elements.each do |element|
30
30
  @parsed_values[element.name] = element.text
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FuelSurcharge
4
- VERSION = "1.2.2"
4
+ VERSION = "1.2.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fuel_surcharge
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Maerten
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-08-01 00:00:00.000000000 Z
12
+ date: 2019-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: http
@@ -118,7 +118,6 @@ executables:
118
118
  extensions: []
119
119
  extra_rdoc_files: []
120
120
  files:
121
- - ".circleci/config.yml"
122
121
  - ".github_changelog_generator"
123
122
  - ".gitignore"
124
123
  - ".rubocop.yml"
@@ -1,57 +0,0 @@
1
- version: 2
2
- references:
3
- unit: &unit
4
- run:
5
- name: Run test suite
6
- command: bundle exec rake
7
- restore: &restore
8
- restore_cache:
9
- keys:
10
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
11
- # fallback to using the latest cache if no exact match is found
12
- - v1-dependencies-
13
- bundle: &bundle
14
- run:
15
- name: install dependencies
16
- command: gem install bundler && bundle install --path vendor/bundle
17
- save: &save
18
- save_cache:
19
- paths:
20
- - ./vendor/bundle
21
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
22
- jobs:
23
- "ruby-2.5":
24
- docker:
25
- - image: circleci/ruby:2.5
26
- steps:
27
- - checkout
28
- - <<: *restore
29
- - <<: *bundle
30
- - <<: *save
31
- - <<: *unit
32
- "ruby-2.6":
33
- docker:
34
- - image: circleci/ruby:2.6
35
- steps:
36
- - checkout
37
- - <<: *restore
38
- - <<: *bundle
39
- - <<: *save
40
- - <<: *unit
41
- "jruby":
42
- docker:
43
- - image: circleci/jruby:9.2.6
44
- steps:
45
- - checkout
46
- - <<: *restore
47
- - <<: *bundle
48
- - <<: *save
49
- - <<: *unit
50
-
51
- workflows:
52
- version: 2
53
- build:
54
- jobs:
55
- - "ruby-2.5"
56
- - "ruby-2.6"
57
- - "jruby"