Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-haml-rails for openSUSE:Factory checked in at 2022-10-12 18:24:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-haml-rails (Old) and /work/SRC/openSUSE:Factory/.rubygem-haml-rails.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-haml-rails" Wed Oct 12 18:24:53 2022 rev:6 rq:1010036 version:2.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-haml-rails/rubygem-haml-rails.changes 2019-08-06 15:09:42.439796514 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-haml-rails.new.2275/rubygem-haml-rails.changes 2022-10-12 18:26:34.585938810 +0200 @@ -1,0 +2,6 @@ +Mon Oct 10 13:08:12 UTC 2022 - Stephan Kulow <[email protected]> + +updated to version 2.1.0 + no changelog found + +------------------------------------------------------------------- Old: ---- haml-rails-2.0.1.gem New: ---- haml-rails-2.1.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-haml-rails.spec ++++++ --- /var/tmp/diff_new_pack.iu6zLf/_old 2022-10-12 18:26:34.997939717 +0200 +++ /var/tmp/diff_new_pack.iu6zLf/_new 2022-10-12 18:26:35.001939726 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-haml-rails # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-haml-rails -Version: 2.0.1 +Version: 2.1.0 Release: 0 %define mod_name haml-rails %define mod_full_name %{mod_name}-%{version} @@ -32,7 +32,7 @@ BuildRequires: %{ruby >= 2.3.0} BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 -Url: https://github.com/indirect/haml-rails +URL: https://github.com/haml/haml-rails Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: let your Gemfile do the configuring @@ -40,7 +40,7 @@ Group: Development/Languages/Ruby %description -Haml-rails provides Haml generators for Rails 4. It also enables Haml as the +Haml-rails provides Haml generators for Rails 5. It also enables Haml as the templating engine for you, so you don't have to screw around in your own application.rb when your Gemfile already clearly indicated what templating engine you have installed. Hurrah. ++++++ haml-rails-2.0.1.gem -> haml-rails-2.1.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.github/workflows/ruby.yml new/.github/workflows/ruby.yml --- old/.github/workflows/ruby.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/.github/workflows/ruby.yml 2022-09-24 20:09:16.000000000 +0200 @@ -0,0 +1,64 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: Ruby + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: + - 3.1 + - 3.0 + - 2.7 + - jruby + gemfile: + - rails_7_0 + - rails_6_1 + - rails_6_0 + + include: + - ruby-version: 2.7 + gemfile: rails_5_2 + - ruby-version: 2.7 + gemfile: rails_5_1 + + - ruby-version: 2.6 + gemfile: rails_6_1 + - ruby-version: 2.6 + gemfile: rails_6_0 + - ruby-version: 2.6 + gemfile: rails_5_2 + - ruby-version: 2.6 + gemfile: rails_5_1 + + exclude: + - ruby-version: jruby + gemfile: rails_7_0 + + env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps + BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + uses: ruby/setup-ruby@v1 + # uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec rake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 2019-05-18 23:15:11.000000000 +0200 +++ new/.gitignore 2022-09-24 20:09:16.000000000 +0200 @@ -4,3 +4,4 @@ gemfiles/*.lock tmp/ /vendor/bundle +log diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2019-05-18 23:15:11.000000000 +0200 +++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -sudo: false -language: ruby -cache: bundler -before_install: - - "gem update --system" - - "gem install bundler" -rvm: - - 2.5.3 - - 2.4.5 - - 2.3.8 - - jruby-9.2.5.0 -gemfile: - - gemfiles/rails_5_2.gemfile - - gemfiles/rails_5_1.gemfile - - gemfiles/rails_5_2.gemfile - - gemfiles/rails_6.beta2.gemfile -matrix: - exclude: - - rvm: 2.3.8 - gemfile: gemfiles/rails_6.beta2.gemfile - - rvm: 2.4.5 - gemfile: gemfiles/rails_6.beta2.gemfile -script: "bundle exec rake test" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Appraisals new/Appraisals --- old/Appraisals 2019-05-18 23:15:11.000000000 +0200 +++ new/Appraisals 2022-09-24 20:09:16.000000000 +0200 @@ -1,27 +1,19 @@ -appraise "rails_4_0" do - gem "rails", "~> 4.0.1" -end - -appraise "rails_4_1" do - gem "rails", "4.1" -end - -appraise "rails_4_2" do - gem "rails", "4.2" +appraise "rails_5_1" do + gem "rails", "~> 5.1.0" end -appraise "rails_5_0" do - gem "rails", "5.0" +appraise "rails_5_2" do + gem "rails", "~> 5.2.0" end -appraise "rails_5_1" do - gem "rails", "5.1" +appraise "rails_6_0" do + gem "rails", "~> 6.0.0" end -appraise "rails_5_2" do - gem "rails", "5.2" +appraise "rails_6_1" do + gem "rails", "~> 6.1.0" end -appraise "rails_6.beta2" do - gem "rails", "6.0.0.beta2" +appraise "rails_7_0" do + gem "rails", "~> 7.0.0" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 2019-05-18 23:15:11.000000000 +0200 +++ new/Gemfile 2022-09-24 20:09:16.000000000 +0200 @@ -3,6 +3,4 @@ # Specify your gem's dependencies in haml-rails.gemspec gemspec -gem 'rubysl', '~> 2.0', platforms: :rbx -gem 'minitest', platforms: :rbx gem 'html2haml' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2019-05-18 23:15:11.000000000 +0200 +++ new/README.md 2022-09-24 20:09:16.000000000 +0200 @@ -1,7 +1,7 @@ # Haml-rails -[](https://travis-ci.org/indirect/haml-rails) +[](https://travis-ci.org/haml/haml-rails) -Haml-rails provides Haml generators for Rails 4. It also enables Haml as the templating engine for you, so you don't have to screw around in your own application.rb when your Gemfile already clearly indicated what templating engine you have installed. Hurrah. +Haml-rails provides Haml generators for Rails 5. It also enables Haml as the templating engine for you, so you don't have to screw around in your own application.rb when your Gemfile already clearly indicated what templating engine you have installed. Hurrah. To use it, add this line to your Gemfile: @@ -47,9 +47,13 @@ ### Older versions of Rails -The current version of Haml-rails requires 4.0.1 or later. +The current version of Haml-rails requires Rails 5.1 or later. -Haml-rails version 0.4 is the last version to support Rails 3. To use it, add this line to your Gemfile: +Haml-rails version 1.0.0 is the last version to support Rails 4. To use it, add this line to your Gemfile: + + gem "haml-rails", "~> 1.0.0" + +For Rails 3, use haml-rails version 0.4 by adding this line to your Gemfile instead: gem "haml-rails", "~> 0.4.0" Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_5_1.gemfile new/gemfiles/rails_5_1.gemfile --- old/gemfiles/rails_5_1.gemfile 2019-05-18 23:15:11.000000000 +0200 +++ new/gemfiles/rails_5_1.gemfile 2022-09-24 20:09:16.000000000 +0200 @@ -2,9 +2,7 @@ source "https://rubygems.org" -gem "rubysl", "~> 2.0", :platforms => :rbx -gem "minitest", :platforms => :rbx gem "html2haml" -gem "rails", "~> 5.1.5" +gem "rails", "~> 5.1.0" -gemspec :path => "../" +gemspec path: "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_5_2.gemfile new/gemfiles/rails_5_2.gemfile --- old/gemfiles/rails_5_2.gemfile 2019-05-18 23:15:11.000000000 +0200 +++ new/gemfiles/rails_5_2.gemfile 2022-09-24 20:09:16.000000000 +0200 @@ -2,9 +2,7 @@ source "https://rubygems.org" -gem "rubysl", "~> 2.0", :platforms => :rbx -gem "minitest", :platforms => :rbx gem "html2haml" gem "rails", "~> 5.2.0" -gemspec :path => "../" +gemspec path: "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_6.beta2.gemfile new/gemfiles/rails_6.beta2.gemfile --- old/gemfiles/rails_6.beta2.gemfile 2019-05-18 23:15:11.000000000 +0200 +++ new/gemfiles/rails_6.beta2.gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -# This file was generated by Appraisal - -source "https://rubygems.org" - -gem "rubysl", "~> 2.0", :platforms => :rbx -gem "minitest", :platforms => :rbx -gem "html2haml" -gem "rails", "6.0.0.beta2" - -gemspec :path => "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_6_0.gemfile new/gemfiles/rails_6_0.gemfile --- old/gemfiles/rails_6_0.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails_6_0.gemfile 2022-09-24 20:09:16.000000000 +0200 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "html2haml" +gem "rails", "~> 6.0.0" + +gemspec path: "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_6_1.gemfile new/gemfiles/rails_6_1.gemfile --- old/gemfiles/rails_6_1.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails_6_1.gemfile 2022-09-24 20:09:16.000000000 +0200 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "html2haml" +gem "rails", "~> 6.1.0" + +gemspec path: "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gemfiles/rails_7_0.gemfile new/gemfiles/rails_7_0.gemfile --- old/gemfiles/rails_7_0.gemfile 1970-01-01 01:00:00.000000000 +0100 +++ new/gemfiles/rails_7_0.gemfile 2022-09-24 20:09:16.000000000 +0200 @@ -0,0 +1,8 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "html2haml" +gem "rails", "~> 7.0.0" + +gemspec path: "../" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/haml-rails.gemspec new/haml-rails.gemspec --- old/haml-rails.gemspec 2019-05-18 23:15:11.000000000 +0200 +++ new/haml-rails.gemspec 2022-09-24 20:09:16.000000000 +0200 @@ -7,25 +7,24 @@ s.platform = Gem::Platform::RUBY s.authors = ["Andr?? Arko"] s.email = ["[email protected]"] - s.homepage = "https://github.com/indirect/haml-rails" + s.homepage = "https://github.com/haml/haml-rails" s.summary = "let your Gemfile do the configuring" - s.description = "Haml-rails provides Haml generators for Rails 4. It also enables Haml as the templating engine for you, so you don't have to screw around in your own application.rb when your Gemfile already clearly indicated what templating engine you have installed. Hurrah." + s.description = "Haml-rails provides Haml generators for Rails 5. It also enables Haml as the templating engine for you, so you don't have to screw around in your own application.rb when your Gemfile already clearly indicated what templating engine you have installed. Hurrah." s.licenses = ["MIT"] - s.rubyforge_project = "haml-rails" s.required_rubygems_version = ">= 2.0.0" s.required_ruby_version = ">= 2.3.0" - s.add_dependency "haml", [">= 4.0.6", "< 6.0"] + s.add_dependency "haml", [">= 4.0.6"] s.add_dependency "activesupport", [">= 5.1"] s.add_dependency "actionpack", [">= 5.1"] s.add_dependency "railties", [">= 5.1"] - s.add_dependency "html2haml", [">= 1.0.1"] - + + s.add_development_dependency "html2haml", [">= 1.0.1"] s.add_development_dependency "rails", [">= 5.1"] - s.add_development_dependency "bundler", "~> 2.0" + s.add_development_dependency "bundler" s.add_development_dependency "rake" - s.add_development_dependency 'appraisal', '~> 1.0' + s.add_development_dependency 'appraisal' s.files = `git ls-files`.split("\n") s.executables = `git ls-files`.split("\n").select{|f| f =~ /^bin/} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/generators/haml/controller/controller_generator.rb new/lib/generators/haml/controller/controller_generator.rb --- old/lib/generators/haml/controller/controller_generator.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/lib/generators/haml/controller/controller_generator.rb 2022-09-24 20:09:16.000000000 +0200 @@ -5,12 +5,11 @@ class ControllerGenerator < Erb::Generators::ControllerGenerator source_root File.expand_path("../templates", __FILE__) - protected + private def handler :haml end - end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/generators/haml/mailer/mailer_generator.rb new/lib/generators/haml/mailer/mailer_generator.rb --- old/lib/generators/haml/mailer/mailer_generator.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/lib/generators/haml/mailer/mailer_generator.rb 2022-09-24 20:09:16.000000000 +0200 @@ -1,42 +1,14 @@ -require 'generators/haml/controller/controller_generator' +require 'rails/generators/erb/mailer/mailer_generator' module Haml module Generators - class MailerGenerator < ControllerGenerator + class MailerGenerator < Erb::Generators::MailerGenerator source_root File.expand_path("../templates", __FILE__) - def copy_view_files - if ::Rails.version.to_s >= "4.2.0" - view_base_path = File.join("app/views", class_path, file_name + "_mailer") - empty_directory view_base_path + private - if behavior == :invoke - formats.each do |format| - layout_path = File.join("app/views/layouts", class_path, filename_with_extensions("mailer", format)) - template filename_with_extensions(:layout, format), layout_path unless File.exist?(layout_path) - end - end - - actions.each do |action| - @action = action - - formats.each do |format| - @path = File.join(view_base_path, filename_with_extensions(action, format)) - template filename_with_extensions(:view, format), @path - end - end - else - super - end - end - - protected - def format - :text - end - - def formats - [:text, :html] + def handler + :haml end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/generators/haml/scaffold/scaffold_generator.rb new/lib/generators/haml/scaffold/scaffold_generator.rb --- old/lib/generators/haml/scaffold/scaffold_generator.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/lib/generators/haml/scaffold/scaffold_generator.rb 2022-09-24 20:09:16.000000000 +0200 @@ -21,7 +21,7 @@ end end - protected + private def available_views %w(index edit show new) @@ -30,7 +30,6 @@ def handler :haml end - end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/haml-rails/version.rb new/lib/haml-rails/version.rb --- old/lib/haml-rails/version.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/lib/haml-rails/version.rb 2022-09-24 20:09:16.000000000 +0200 @@ -1,5 +1,5 @@ module Haml module Rails - VERSION = "2.0.1" + VERSION = "2.1.0" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/haml-rails.rb new/lib/haml-rails.rb --- old/lib/haml-rails.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/lib/haml-rails.rb 2022-09-24 20:09:16.000000000 +0200 @@ -4,8 +4,6 @@ module Haml module Rails - class Engine < ::Rails::Engine - end class Railtie < ::Rails::Railtie config.app_generators.template_engine :haml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rails/generators/haml/application_layout/application_layout_generator.rb new/lib/rails/generators/haml/application_layout/application_layout_generator.rb --- old/lib/rails/generators/haml/application_layout/application_layout_generator.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/lib/rails/generators/haml/application_layout/application_layout_generator.rb 2022-09-24 20:09:16.000000000 +0200 @@ -4,7 +4,6 @@ module Haml module Generators class ApplicationLayoutGenerator < ::Rails::Generators::Base - HTML_LAYOUT_PATH = 'app/views/layouts/application.html.erb' HAML_LAYOUT_PATH = 'app/views/layouts/application.html.haml' @@ -27,9 +26,7 @@ else puts "Error! There is no file named app/views/layouts/application.html.erb." end - end - end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tasks/erb2haml.rake new/lib/tasks/erb2haml.rake --- old/lib/tasks/erb2haml.rake 2019-05-18 23:15:11.000000000 +0200 +++ new/lib/tasks/erb2haml.rake 2022-09-24 20:09:16.000000000 +0200 @@ -10,6 +10,8 @@ exit end + erb_files_to_convert = erb_files.dup + haml_files_w_out_ext = haml_files.map { |f| f.gsub(/\.haml\z/, '') } # Get a list of all those erb files that already seem to have .haml equivalents @@ -22,21 +24,24 @@ puts "Some of your .html.erb files seem to already have .haml equivalents:" already_existing.map { |f| puts "\t#{f}" } - # Ask the user whether he/she would like to overwrite them. - begin - puts "Would you like to overwrite these .haml files? (y/n)" - should_overwrite = STDIN.gets.chomp.downcase[0] - end until ['y', 'n'].include?(should_overwrite) + if ENV.has_key?("HAML_RAILS_OVERWRITE_HAML") && (ENV["HAML_RAILS_OVERWRITE_HAML"] == "false") + should_overwrite = 'n' + else + # Ask the user whether he/she would like to overwrite them. + begin + puts "Would you like to overwrite these .haml files? (y/n)" + should_overwrite = STDIN.gets.chomp.downcase[0] + end until ['y', 'n'].include?(should_overwrite) + end puts '-'*80 # If we are not overwriting, remove each already_existing from our erb_files list if should_overwrite == 'n' - erb_files = erb_files - already_existing + erb_files_to_convert = erb_files - already_existing - if erb_files.empty? + if erb_files_to_convert.empty? # It is possible no .erb files remain, after we remove already_existing - puts "No .erb files remain. Task will now exit." - return + puts "No .erb files to convert" end else # Delete the current .haml @@ -44,7 +49,7 @@ end end - erb_files.each do |file| + erb_files_to_convert.each do |file| puts "Generating HAML for #{file}..." `html2haml #{file} #{file.gsub(/\.erb\z/, '.haml')}` end @@ -52,20 +57,19 @@ puts '-'*80 puts "HAML generated for the following files:" - erb_files.each do |file| + erb_files_to_convert.each do |file| puts "\t#{file}" end puts '-'*80 - begin - if ENV.has_key?("HAML_RAILS_DELETE_ERB") - should_delete = ENV["HAML_RAILS_DELETE_ERB"] == "true" ? "y" : "n" - else + if ENV.has_key?("HAML_RAILS_DELETE_ERB") && (ENV["HAML_RAILS_DELETE_ERB"] == "true") + should_delete = 'y' + else + begin puts 'Would you like to delete the original .erb files? (This is not recommended unless you are under version control.) (y/n)' should_delete = STDIN.gets.chomp.downcase[0] - end - end until ['y', 'n'].include?(should_delete) - + end until ['y', 'n'].include?(should_delete) + end if should_delete == 'y' puts "Deleting original .erb files." File.delete(*erb_files) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-05-18 23:15:11.000000000 +0200 +++ new/metadata 2022-09-24 20:09:16.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: haml-rails version: !ruby/object:Gem::Version - version: 2.0.1 + version: 2.1.0 platform: ruby authors: - Andr?? Arko -autorequire: +autorequire: bindir: bin cert_chain: [] -date: 2019-05-18 00:00:00.000000000 Z +date: 2022-09-24 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: haml @@ -17,9 +17,6 @@ - - ">=" - !ruby/object:Gem::Version version: 4.0.6 - - - "<" - - !ruby/object:Gem::Version - version: '6.0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement @@ -27,9 +24,6 @@ - - ">=" - !ruby/object:Gem::Version version: 4.0.6 - - - "<" - - !ruby/object:Gem::Version - version: '6.0' - !ruby/object:Gem::Dependency name: activesupport requirement: !ruby/object:Gem::Requirement @@ -79,7 +73,7 @@ - - ">=" - !ruby/object:Gem::Version version: 1.0.1 - type: :runtime + type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: @@ -104,16 +98,16 @@ name: bundler requirement: !ruby/object:Gem::Requirement requirements: - - - "~>" + - - ">=" - !ruby/object:Gem::Version - version: '2.0' + version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - "~>" + - - ">=" - !ruby/object:Gem::Version - version: '2.0' + version: '0' - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement @@ -132,17 +126,17 @@ name: appraisal requirement: !ruby/object:Gem::Requirement requirements: - - - "~>" + - - ">=" - !ruby/object:Gem::Version - version: '1.0' + version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - - "~>" + - - ">=" - !ruby/object:Gem::Version - version: '1.0' -description: Haml-rails provides Haml generators for Rails 4. It also enables Haml + version: '0' +description: Haml-rails provides Haml generators for Rails 5. It also enables Haml as the templating engine for you, so you don't have to screw around in your own application.rb when your Gemfile already clearly indicated what templating engine you have installed. Hurrah. @@ -152,8 +146,8 @@ extensions: [] extra_rdoc_files: [] files: +- ".github/workflows/ruby.yml" - ".gitignore" -- ".travis.yml" - Appraisals - Gemfile - LICENSE @@ -161,7 +155,9 @@ - Rakefile - gemfiles/rails_5_1.gemfile - gemfiles/rails_5_2.gemfile -- gemfiles/rails_6.beta2.gemfile +- gemfiles/rails_6_0.gemfile +- gemfiles/rails_6_1.gemfile +- gemfiles/rails_7_0.gemfile - haml-rails.gemspec - lib/generators/haml/controller/controller_generator.rb - lib/generators/haml/controller/templates/view.html.haml @@ -184,13 +180,12 @@ - test/lib/generators/haml/controller_generator_test.rb - test/lib/generators/haml/mailer_generator_test.rb - test/lib/generators/haml/scaffold_generator_test.rb -- test/lib/generators/haml/testing_helper.rb - test/test_helper.rb -homepage: https://github.com/indirect/haml-rails +homepage: https://github.com/haml/haml-rails licenses: - MIT metadata: {} -post_install_message: +post_install_message: rdoc_options: [] require_paths: - lib @@ -205,8 +200,8 @@ - !ruby/object:Gem::Version version: 2.0.0 requirements: [] -rubygems_version: 3.0.3 -signing_key: +rubygems_version: 3.4.0.dev +signing_key: specification_version: 4 summary: let your Gemfile do the configuring test_files: [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/lib/generators/haml/controller_generator_test.rb new/test/lib/generators/haml/controller_generator_test.rb --- old/test/lib/generators/haml/controller_generator_test.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/test/lib/generators/haml/controller_generator_test.rb 2022-09-24 20:09:16.000000000 +0200 @@ -1,5 +1,6 @@ require 'test_helper' -require 'lib/generators/haml/testing_helper' +require 'rails/generators/rails/controller/controller_generator' +require 'generators/haml/controller/controller_generator' class Haml::Generators::ControllerGeneratorTest < Rails::Generators::TestCase destination Rails.root @@ -11,8 +12,8 @@ arguments %w(Account foo bar --template-engine haml) test "should invoke haml engine" do - run_generator + run_generator assert_file "app/views/account/foo.html.haml" assert_file "app/views/account/bar.html.haml" - end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/lib/generators/haml/mailer_generator_test.rb new/test/lib/generators/haml/mailer_generator_test.rb --- old/test/lib/generators/haml/mailer_generator_test.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/test/lib/generators/haml/mailer_generator_test.rb 2022-09-24 20:09:16.000000000 +0200 @@ -1,5 +1,6 @@ require 'test_helper' -require 'lib/generators/haml/testing_helper' +require 'rails/generators/mailer/mailer_generator' +require 'generators/haml/mailer/mailer_generator' class Haml::Generators::MailerGeneratorTest < Rails::Generators::TestCase destination File.join(Rails.root) @@ -64,4 +65,23 @@ end end end + + test 'suffix is not duplicated' do + if ::Rails.version.to_s >= '4.2' + run_generator ['notifier_mailer', 'foo', 'bar', '--template-engine', 'haml'] + + assert_no_file 'app/views/notifier_mailer_mailer/' + assert_file 'app/views/notifier_mailer/' + + assert_no_file 'app/views/notifier_mailer_mailer/foo.text.haml' + assert_file 'app/views/notifier_mailer/foo.text.haml' + assert_no_file 'app/views/notifier_mailer_mailer/foo.html.haml' + assert_file 'app/views/notifier_mailer/foo.html.haml' + + assert_no_file 'app/views/notifier_mailer_mailer/bar.text.haml' + assert_file 'app/views/notifier_mailer/bar.text.haml' + assert_no_file 'app/views/notifier_mailer_mailer/bar.html.haml' + assert_file 'app/views/notifier_mailer/bar.html.haml' + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/lib/generators/haml/scaffold_generator_test.rb new/test/lib/generators/haml/scaffold_generator_test.rb --- old/test/lib/generators/haml/scaffold_generator_test.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/test/lib/generators/haml/scaffold_generator_test.rb 2022-09-24 20:09:16.000000000 +0200 @@ -1,5 +1,6 @@ require 'test_helper' -require 'lib/generators/haml/testing_helper' +require 'rails/generators/rails/scaffold/scaffold_generator' +require 'generators/haml/scaffold/scaffold_generator' class Haml::Generators::ScaffoldGeneratorTest < Rails::Generators::TestCase destination File.join(Rails.root) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/lib/generators/haml/testing_helper.rb new/test/lib/generators/haml/testing_helper.rb --- old/test/lib/generators/haml/testing_helper.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/test/lib/generators/haml/testing_helper.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -require_generators :haml => ['scaffold', 'controller', 'mailer'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_helper.rb new/test/test_helper.rb --- old/test/test_helper.rb 2019-05-18 23:15:11.000000000 +0200 +++ new/test/test_helper.rb 2022-09-24 20:09:16.000000000 +0200 @@ -1,76 +1,44 @@ require 'rubygems' require 'minitest/autorun' -require 'rails/all' +require 'action_pack' +require 'action_controller' +require 'action_view' +require 'rails' require 'rails/generators' require 'rails/generators/test_case' +Bundler.require(:default) class TestApp < Rails::Application config.root = File.dirname(__FILE__) + config.eager_load = false end module Rails def self.root - @root ||= File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp', 'rails')) + @root ||= Pathname.new(File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp', 'rails'))) end end -# Call configure to load the settings from -# Rails.application.config.generators to Rails::Generators -Rails.application.load_generators +TestApp.initialize! Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} -def copy_routes - routes = File.join(File.dirname(__FILE__), 'fixtures', 'routes.rb') - destination = File.join(Rails.root, "config") - FileUtils.mkdir_p(destination) - FileUtils.cp File.expand_path(routes), File.expand_path(destination) -end - -# Asserts the given class exists in the given content. When a block is given, -# it yields the content of the class. -# -# assert_file "test/functional/accounts_controller_test.rb" do |controller_test| -# assert_class "AccountsControllerTest", controller_test do |klass| -# assert_match /context "index action"/, klass -# end -# end -# -def assert_class(klass, content) - assert content =~ /class #{klass}(\(.+\))?(.*?)\nend/m, "Expected to have class #{klass}" - yield $2.strip if block_given? -end - -def generator_list - { - :rails => ['scaffold', 'controller', 'mailer'], - :haml => ['scaffold', 'controller', 'mailer'] - } -end - -def path_prefix(name) - case name - when :rails - 'rails/generators' - else - 'generators' - end -end - -def require_generators(generator_list) - generator_list.each do |name, generators| - generators.each do |generator_name| - if name.to_s == 'rails' && generator_name.to_s == 'mailer' - require File.join(path_prefix(name), generator_name.to_s, "#{generator_name}_generator") - else - require File.join(path_prefix(name), name.to_s, generator_name.to_s, "#{generator_name}_generator") +module Haml + module Rails + module GeneratorTestHelpers + private + + def copy_routes + routes = File.join(File.dirname(__FILE__), 'fixtures', 'routes.rb') + destination = File.join(::Rails.root, "config") + FileUtils.mkdir_p(destination) + FileUtils.cp File.expand_path(routes), File.expand_path(destination) end end end end -alias :require_generator :require_generators -require_generators generator_list +::Rails::Generators::TestCase.include Haml::Rails::GeneratorTestHelpers # Remove tmp directory when test suite is completed MiniTest.after_run do
