Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rubocop] Step 5 #214

Merged
merged 37 commits into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9a604f2
[rubocop] fix Style/AndOr
AliSoftware Feb 18, 2021
3c24919
[rubocop] fix Style/BarePercentLiterals
AliSoftware Feb 18, 2021
604b017
[rubocop] fix Style/BlockDelimiters
AliSoftware Feb 18, 2021
70c7b6e
[rubocop] fix Style/BracesAroundHashParameters
AliSoftware Feb 18, 2021
75c9583
[rubocop] fix Style/ClassAndModuleChildren
AliSoftware Feb 18, 2021
a9d818d
[rubocop] fix Style/ClassCheck
AliSoftware Feb 18, 2021
3bb7aed
[rubocop] fix Style/ConditionalAssignment
AliSoftware Feb 18, 2021
bfb40c9
[rubocop] fix Style/DefWithParentheses
AliSoftware Feb 18, 2021
bda5e57
[rubocop] fix Style/EmptyLiteral
AliSoftware Feb 18, 2021
2a93320
[rubocop] configure Style/EmptyMethod
AliSoftware Feb 18, 2021
9c77eca
[rubocop] fix Style/Encoding
AliSoftware Feb 18, 2021
9f2c690
[rubocop] fix Style/ExpandPathArguments
AliSoftware Feb 18, 2021
4a56484
[rubocop] fix Style/FormatString
AliSoftware Feb 18, 2021
191e9e5
[rubocop] disable Style/FrozenStringLiteralComment
AliSoftware Feb 18, 2021
5830fc7
[rubocop] fix Style/HashSyntax
AliSoftware Feb 18, 2021
a882be7
[rubocop] fix Style/IfUnlessModifier
AliSoftware Feb 18, 2021
7fe4b1a
[rubocop] fix Style/InverseMethods
AliSoftware Feb 18, 2021
4cb320a
[rubocop] fix Style/ParenthesesAroundCondition
AliSoftware Feb 18, 2021
0250763
[rubocop] fix Style/MultilineIfThen
AliSoftware Feb 18, 2021
3750c49
[rubocop] fix Style/NegatedIf
AliSoftware Feb 18, 2021
0bc24dc
[rubocop] fix Style/NegatedUnless
AliSoftware Feb 18, 2021
79995c3
[rubocop] fix Style/NilComparison
AliSoftware Feb 18, 2021
6de7f59
[rubocop] fix Style/NonNilCheck (safe-auto-correct)
AliSoftware Feb 18, 2021
b7691b6
[rubocop] fix Style/NonNilCheck (manual fixes) ⚠️
AliSoftware Feb 18, 2021
f84285d
[rubocop] ⚠️ Manual fix of Metrics/AbcSize
AliSoftware Feb 18, 2021
27fd9d1
[rubocop] fix Style/Not
AliSoftware Feb 18, 2021
7976a90
[rubocop] fix Style/NumericLiteralPrefix
AliSoftware Feb 18, 2021
9d47d7d
[rubocop] fix Style/PercentLiteralDelimiters
AliSoftware Feb 18, 2021
461eb41
[rubocop] fix Style/RegexpLiteral
AliSoftware Feb 18, 2021
16a9ecb
[rubocop] fix Style/Semicolon
AliSoftware Feb 18, 2021
dc044c3
[rubocop] fix Style/StringLiteralsInInterpolation
AliSoftware Feb 18, 2021
9c5080d
[rubocop] fix Style/TrailingCommaInArguments
AliSoftware Feb 18, 2021
3b6252c
[rubocop] fix Style/TrailingCommaInArrayLiteral
AliSoftware Feb 18, 2021
17b1e76
[rubocop] fix Style/TrailingCommaInHashLiteral
AliSoftware Feb 18, 2021
4492cc7
Add comment about octal notation for chmod-like flags
AliSoftware Feb 24, 2021
f6499f7
[rubocop] fix Style/TrailingCommaInArrayLiteral
AliSoftware Feb 24, 2021
fd8d9bd
build_entries doesn't need the whole config Hash
AliSoftware Feb 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Gemspec/OrderedDependencies:
Lint/UnusedMethodArgument:
Enabled: false

Style/EmptyMethod:
EnforcedStyle: expanded

########## Metrics / Max Lengths Rules

Metrics/LineLength:
Expand Down
140 changes: 0 additions & 140 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,22 +214,6 @@ Security/Open:
- 'spec/android_merge_translators_strings_spec.rb'
- 'spec/ios_merge_translators_strings_spec.rb'

# Offense count: 18
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: always, conditionals
Style/AndOr:
Exclude:
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_localize_libs_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_build_prechecks.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/extract_release_notes_for_version_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_metadata_source.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb'

# Offense count: 12
# Configuration parameters: AllowedChars.
Style/AsciiComments:
Expand All @@ -244,134 +228,10 @@ Style/AsciiComments:
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb'
- 'spec/ios_lint_localizations_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: percent_q, bare_percent
Style/BarePercentLiterals:
Exclude:
- 'Dangerfile'

# Offense count: 24
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
Exclude:
- 'bin/drawText'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_create_xml_release_notes.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/configure/configure_validate_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/configure_helper.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb'

# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
Exclude:
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/close_milestone_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/setfrozentag_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_version_helper.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/models/configuration.rb'
- 'spec/android_merge_translators_strings_spec.rb'
- 'spec/ios_merge_translators_strings_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_localize_helper.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: is_a?, kind_of?
Style/ClassCheck:
Exclude:
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_downloadmetadata_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_development_certificates_to_provisioning_profiles.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/add_devices_to_provisioning_profiles.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
# SupportedStyles: assign_to_condition, assign_inside_condition
Style/ConditionalAssignment:
Exclude:
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/promo_screenshots_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb'

# Offense count: 22
# Cop supports --auto-correct.
Style/DefWithParentheses:
Exclude:
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_beta.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_final_release.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_hotfix.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_bump_version_release.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_beta.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_hotfix.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_bump_version_release.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/an_metadata_update_helper.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/android/android_git_helper.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/git_helper.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_git_helper.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/metadata_update_helper.rb'
- 'spec/android_merge_translators_strings_spec.rb'
- 'spec/ios_merge_translators_strings_spec.rb'

# Offense count: 91
Style/Documentation:
Enabled: false

# Offense count: 7
# Cop supports --auto-correct.
Style/EmptyLiteral:
Exclude:
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/an_update_metadata_source_action.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_merge_translators_strings.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/common/gp_update_metadata_source.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_merge_translators_strings.rb'
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/ios/ios_version_helper.rb'

# Offense count: 71
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, expanded
Style/EmptyMethod:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Style/Encoding:
Exclude:
- 'fastlane-plugin-wpmreleasetoolkit.gemspec'

# Offense count: 3
# Cop supports --auto-correct.
Style/ExpandPathArguments:
Exclude:
- 'Dangerfile'
- 'fastlane-plugin-wpmreleasetoolkit.gemspec'
- 'spec/spec_helper.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: format, sprintf, percent
Style/FormatString:
Exclude:
- 'lib/fastlane/plugin/wpmreleasetoolkit/helper/promo_screenshots_helper.rb'

# Offense count: 104
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down
4 changes: 2 additions & 2 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
def version
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'fastlane/plugin/wpmreleasetoolkit/version'
Fastlane::Wpmreleasetoolkit::VERSION
Expand All @@ -15,7 +15,7 @@ end
`git checkout Gemfile.lock &> /dev/null`

if version.to_s != gemfile_lock_version.to_s
message = %Q{
message = %{
The version in the `Gemfile.lock` (`#{gemfile_lock_version}`) doesn't match the one in `version.rb` (`#{version}`).

Please run `bundle install` to make sure they match.
Expand Down
4 changes: 2 additions & 2 deletions bin/drawText
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ plugin_path = Pathname(__FILE__).dirname.parent
executable_path = plugin_path + 'lib/drawText'

# Run the script
allArgs = ARGV.map { |arg|
allArgs = ARGV.map do |arg|
argParts = arg.split('=')
argParts[1] = '"' + argParts[1] + '"'

argParts.join('=')
}.join(' ')
end.join(' ')

exec("#{executable_path} #{allArgs}")
4 changes: 1 addition & 3 deletions fastlane-plugin-wpmreleasetoolkit.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# coding: utf-8

lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'fastlane/plugin/wpmreleasetoolkit/version'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.run(params)

any_changes = false
libraries_strings_path.each do |lib|
any_changes = Fastlane::Helper::AndroidLocalizeHelper.merge_lib(main_strings_path, lib) or any_changes
(any_changes = Fastlane::Helper::AndroidLocalizeHelper.merge_lib(main_strings_path, lib)) || any_changes
end

if (any_changes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def self.create_target_file_path(orig_file_path)

# Creates the block instances
def self.create_block_parsers(release_version, block_files)
@blocks = Array.new
@blocks = []

# Inits default handler
@blocks.push Fastlane::Helper::UnknownMetadataBlock.new
Expand Down Expand Up @@ -135,21 +135,21 @@ def self.available_options
description: 'The path of the .po file to update',
is_string: true,
verify_block: proc do |value|
UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless (value and not value.empty?)
UI.user_error!("No .po file path for UpdateMetadataSourceAction given, pass using `po_file_path: 'file path'`") unless (value && (not value.empty?))
UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
end),
FastlaneCore::ConfigItem.new(key: :release_version,
env_name: 'FL_UPDATE_METADATA_SOURCE_RELEASE_VERSION',
description: 'The release version of the app (to use to mark the release notes)',
verify_block: proc do |value|
UI.user_error!("No relase version for UpdateMetadataSourceAction given, pass using `release_version: 'version'`") unless (value and not value.empty?)
UI.user_error!("No relase version for UpdateMetadataSourceAction given, pass using `release_version: 'version'`") unless (value && (not value.empty?))
end),
FastlaneCore::ConfigItem.new(key: :source_files,
env_name: 'FL_UPDATE_METADATA_SOURCE_SOURCE_FILES',
description: 'The hash with the path to the source files and the key to use to include their content',
is_string: false,
verify_block: proc do |value|
UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless (value and not value.empty?)
UI.user_error!("No source file hash for UpdateMetadataSourceAction given, pass using `source_files: 'source file hash'`") unless (value && (not value.empty?))
end)
]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ class AndroidBuildPrechecksAction < Action
def self.run(params)
require_relative '../../helper/android/android_version_helper.rb'

if (params[:final] and params[:beta])
if (params[:final] && params[:beta])
UI.user_error!("Can't build beta and final at the same time!")
end

Fastlane::Helper::GitHelper.ensure_on_branch!('release') unless other_action.is_ci()

message = ''
beta_version = Fastlane::Helper::Android::VersionHelper.get_release_version() unless !params[:beta] and !params[:final]
beta_version = Fastlane::Helper::Android::VersionHelper.get_release_version() unless !params[:beta] && !params[:final]
alpha_version = Fastlane::Helper::Android::VersionHelper.get_alpha_version() unless !params[:alpha]

if (params[:final] and Fastlane::Helper::Android::VersionHelper.is_beta_version?(beta_version))
if (params[:final] && Fastlane::Helper::Android::VersionHelper.is_beta_version?(beta_version))
UI.user_error!("Can't build a final release out of this branch because it's configured as a beta release!")
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ def self.is_supported?(platform)

private

def self.create_config()
def self.create_config
@current_version = Fastlane::Helper::Android::VersionHelper.get_release_version()
@current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version()
@new_version_beta = Fastlane::Helper::Android::VersionHelper.calc_next_beta_version(@current_version, @current_version_alpha)
@new_version_alpha = ENV['HAS_ALPHA_VERSION'].nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(@new_version_beta, @current_version_alpha)
end

def self.show_config()
def self.show_config
vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
UI.message("Current version: #{@current_version[vname]}(#{@current_version[vcode]})")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ def self.is_supported?(platform)

private

def self.create_config()
def self.create_config
@current_version = Fastlane::Helper::Android::VersionHelper.get_release_version()
@current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version()
@final_version = Fastlane::Helper::Android::VersionHelper.calc_final_release_version(@current_version, @current_version_alpha)
end

def self.show_config()
def self.show_config
vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
UI.message("Current version: #{@current_version[vname]}(#{@current_version[vcode]})")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def self.create_config(previous_version, new_version_name, new_version_code)
@new_release_branch = "release/#{@new_short_version}"
end

def self.show_config()
def self.show_config
UI.message("Current version: #{@current_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{@current_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]})")
UI.message("New hotfix version: #{@new_version[Fastlane::Helper::Android::VersionHelper::VERSION_NAME]}(#{@new_version[Fastlane::Helper::Android::VersionHelper::VERSION_CODE]})")
UI.message("Release branch: #{@new_release_branch}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ def self.is_supported?(platform)

private

def self.create_config()
def self.create_config
@current_version = Fastlane::Helper::Android::VersionHelper.get_release_version()
@current_version_alpha = Fastlane::Helper::Android::VersionHelper.get_alpha_version()
@new_version_beta = Fastlane::Helper::Android::VersionHelper.calc_next_release_version(@current_version, @current_version_alpha)
@new_version_alpha = ENV['HAS_ALPHA_VERSION'].nil? ? nil : Fastlane::Helper::Android::VersionHelper.calc_next_alpha_version(@new_version_beta, @current_version_alpha)
@new_release_branch = "release/#{@new_short_version}"
end

def self.show_config()
def self.show_config
vname = Fastlane::Helper::Android::VersionHelper::VERSION_NAME
vcode = Fastlane::Helper::Android::VersionHelper::VERSION_CODE
UI.message("Current version: #{@current_version[vname]}(#{@current_version[vcode]})")
Expand All @@ -76,7 +76,7 @@ def self.show_config()
UI.message("Release branch: #{@new_release_branch}")
end

def self.update_glotpress_key()
def self.update_glotpress_key
dm_file = ENV['DOWNLOAD_METADATA']
if (File.exist?(dm_file)) then
sh("sed -i '' \"s/let glotPressWhatsNewKey.*/let glotPressWhatsNewKey = \\\"v#{@new_short_version}-whats-new\\\"/\" #{dm_file}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def self.run(params)
require_relative '../../helper/android/android_git_helper.rb'

release_notes_path = params[:download_path] + '/release_notes.xml'
open(release_notes_path, 'w') { |f|
open(release_notes_path, 'w') do |f|
params[:locales].each do |loc|
puts "Looking for language: #{loc[1]}"
complete_path = "#{params[:download_path]}/#{loc[1]}/changelogs/#{params[:build_number]}.txt"
Expand All @@ -17,7 +17,7 @@ def self.run(params)
UI.message("File #{complete_path} not found. Skipping language #{loc[1]}")
end
end
}
end
end

#####################################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def self.merge_folder(strings_folder)
FileUtils.cp(main_file, tmp_main_file)

join_files = Dir.glob(File.join("#{strings_folder}", 'strings-*.xml'))
extra_strings = Array.new
extra_keys = Array.new
extra_strings = []
extra_keys = []
join_files.each do |join_strings|
my_strings = File.read(join_strings).split("\n")
my_strings.each do |string|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def self.run(params)
UI.user_error!("Milestone #{milestone_title} not found.")
end

Fastlane::Helper::GithubHelper.github_client().update_milestone(repository, milestone[:number], { :state => 'closed' })
Fastlane::Helper::GithubHelper.github_client().update_milestone(repository, milestone[:number], :state => 'closed')
end

def self.description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def self.extract_notes(release_notes_file_path, version)
File.open(release_notes_file_path).each do |line|
case state
when :discarding
if (line.match(/^(\d+\.)?(\d+\.)?(\*|\d+)$/)) and (line.strip() == version)
if (line.match(/^(\d+\.)?(\d+\.)?(\*|\d+)$/)) && (line.strip() == version)
state = :evaluating
end
when :evaluating
Expand Down
Loading