Skip to content

Commit

Permalink
lock webmock version, rubocops
Browse files Browse the repository at this point in the history
  • Loading branch information
achiurizo committed Jan 25, 2024
1 parent 9ae0cd8 commit 98f82e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Style/BlockDelimiters:
Enabled: false
Style/CharacterLiteral:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/ClassCheck:
Enabled: false
Style/ClassVars:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ group :development do
end

gem "builder", ">= 2.1.2"
gem "webmock", ">= 0"
gem "minitest", ">= 4.0"
gem "mocha", ">= 2.0"
gem "oga", ">= 2.5", "< 3"
Expand All @@ -52,6 +51,7 @@ group :development do
gem 'rb-readline', '~> 0.4.2'
gem 'rubocop', '~> 1.6', :platforms => [:mri]
gem 'rubocop-minitest', '~>0.34.4', :platforms => [:mri]
gem "webmock", "~> 3.19"
gem "yard", ">= 0.7.2"

platforms :jruby do
Expand Down
8 changes: 4 additions & 4 deletions padrino-gen/test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class Minitest::Spec
def stop_time_for_test
time = Time.now
Time.stubs(:now).returns(time)
return time
time
end

def stub_static_files
# register fake URL to avoid downloading static files every time tests run
fake_uri_base = "https://raw.github.com/padrino/padrino-static/master/"
%W[
%w[
js/dojo.js
js/ext.js
js/jquery.js
Expand Down Expand Up @@ -52,7 +52,7 @@ def generate(name, *params)
def generate_with_parts(name, *params)
features, constants = [$", Object.constants].map{|x| Marshal.load(Marshal.dump(x)) }

if root = params.find{|x| x.index(/\-r=|\-\-root=/) }
if root = params.find{|x| x.index(/-r=|--root=/) }
root = root.split(/=/)[1]
options, model_path = {}, File.expand_path(File.join(root, "/models/**/*.rb"))
options = params.pop if params.last.is_a?(Hash)
Expand All @@ -77,7 +77,7 @@ def expects_generated_project(options={})
options = options.dup
project_root = options.delete(:root)
project_name = options.delete(:name)
components = options.sort_by{ |k, v| k.to_s }.map{ |component, value| "--#{component}=#{value}" }
components = options.sort_by{ |k, _v| k.to_s }.map{ |component, value| "--#{component}=#{value}" }
params = [project_name, *components].push("-r=#{project_root}")
Padrino.expects(:bin_gen).with(*params.unshift('project')).returns(true)
end
Expand Down

0 comments on commit 98f82e6

Please sign in to comment.