File tree Expand file tree Collapse file tree 5 files changed +27
-2
lines changed Expand file tree Collapse file tree 5 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 1.5.1] - 2021-03-02
9+
10+ ### Fixed
11+
12+ - Fixed a ` NameError ` that was thrown when ` Patch::Sdg ` was called. Specs have been added to ensure this does not happen again.
13+
814## [ 1.5.0] - 2021-03-01
915
1016### Changed
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- patch_ruby (1.4.0 )
4+ patch_ruby (1.5.1 )
55 json (~> 2.1 , >= 2.1.0 )
66 typhoeus (~> 1.0 , >= 1.0.1 )
77
Original file line number Diff line number Diff line change 3636require 'patch_ruby/models/project'
3737require 'patch_ruby/models/project_list_response'
3838require 'patch_ruby/models/project_response'
39+ require 'patch_ruby/models/sdg'
3940require 'patch_ruby/models/standard'
4041
4142# APIs
Original file line number Diff line number Diff line change 1111=end
1212
1313module Patch
14- VERSION = '1.5.0 '
14+ VERSION = '1.5.1 '
1515end
Original file line number Diff line number Diff line change 1+ describe Patch do
2+ context 'Models' do
3+ it 'defines all models' do
4+ constants . each do |constant |
5+ expect { Patch . const_get ( constant ) } . not_to raise_error
6+ end
7+ end
8+ end
9+
10+ def constants
11+ # Given a file path return the constant of that path, for example:
12+ # 'lib/patch_ruby/models/project_response.rb' -> ProjectResponse
13+ Dir . glob ( "lib/patch_ruby/models/*.rb" ) . map do |file |
14+ parsed_filename = file . split ( '/' ) . last . split ( '.' ) . first
15+ constant = parsed_filename . split ( '_' ) . map ( &:capitalize ) . join ( '' )
16+ end
17+ end
18+ end
You can’t perform that action at this time.
0 commit comments