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

Tests fail with jekyll-github-metadata 2.15.0 #98

Open
dleidert opened this issue Feb 18, 2023 · 1 comment
Open

Tests fail with jekyll-github-metadata 2.15.0 #98

dleidert opened this issue Feb 18, 2023 · 1 comment

Comments

@dleidert
Copy link

Describe the bug

I'm running the test with jekyll-github-metadata 2.15.0 and they fail. The issue seems to have been caused by this commit:
jekyll/github-metadata@a771d0d

This is the backtrace:

Randomized with seed 6998
...............................FFFFF............................      Remote Theme: {"foo"=>"bar"} is not a valid remote theme
.      Remote Theme: {"foo"=>"bar"} is not a valid remote theme
...To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
...........

Failures:

  1) Jekyll::RemoteTheme Integration the pages-themes/primer theme requires dependencies
     Failure/Error: let(:index_contents) { File.read(index_path) }
     
     Errno::ENOENT:
       No such file or directory @ rb_sysopen - /tmp/jekyll-remote-theme/tmp/dest/index.html
     # ./spec/jekyll-remote-theme/integration_spec.rb:31:in `read'
     # ./spec/jekyll-remote-theme/integration_spec.rb:31:in `block (2 levels) in <top (required)>'
     # ./spec/jekyll-remote-theme/integration_spec.rb:62:in `block (3 levels) in <top (required)>'
     # /var/lib/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

  2) Jekyll::RemoteTheme Integration the pages-themes/primer theme returns a zero exit code
     Failure/Error: expect(status.exitstatus).to eql(0), output
     
         Logging at level: debug
           Jekyll Version: 4.3.2
       Configuration file: /tmp/jekyll-remote-theme/spec/fixtures/site/_config.yml
                Requiring: jekyll-remote-theme
                   Source: /tmp/jekyll-remote-theme/spec/fixtures/site
              Destination: /tmp/jekyll-remote-theme/tmp/dest
        Incremental build: disabled. Enable with --incremental
             Generating... 
                    Theme: pages-themes/primer
             Theme source: /tmp/jekyll-remote-theme-20230217-346821-wuf3gy
             Remote Theme: Using theme pages-themes/primer
             Remote Theme: Downloading https://codeload.github.com/pages-themes/primer/zip/HEAD to /tmp/jekyll-remote-theme-20230217-346821-cgmxtx.zip
             Remote Theme: Unzipping /tmp/jekyll-remote-theme-20230217-346821-cgmxtx.zip to /tmp/jekyll-remote-theme-20230217-346821-wuf3gy
                Requiring: jekyll-github-metadata
       To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
       Dotenv not found. Skipping 
                Requiring: jekyll-seo-tag
                  Reading: /_layouts/default.html
                  Reading: /_layouts/home.html
                  Reading: /_layouts/page.html
                  Reading: /_layouts/post.html
              EntryFilter: excluded /.jekyll-cache
                  Reading: index.md
                  Reading: assets/css/style.scss
                           ------------------------------------------------
             Jekyll 4.3.2   Please append `--trace` to the `build` command 
                            for any additional information or backtrace. 
                           ------------------------------------------------
       /var/lib/gems/3.1.0/bundler/gems/github-metadata-388a7fe08aea/lib/jekyll-github-metadata/site_github_munger.rb:100:in `block in <module:GitHubMetadata>': undefined method `inject_metadata!' for nil:NilClass (NoMethodError)
     
             SiteGitHubMunger.global_munger.inject_metadata!(payload)
                                           ^^^^^^^^^^^^^^^^^
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:103:in `block in trigger'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:102:in `each'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/hooks.rb:102:in `trigger'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:208:in `render'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/site.rb:80:in `process'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:28:in `process_site'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:65:in `build'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:36:in `process'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `each'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
       	from /var/lib/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
       	from /var/lib/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
       	from /var/lib/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
       	from /var/lib/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
       	from /var/lib/gems/3.1.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
       	from /var/lib/gems/3.1.0/gems/jekyll-4.3.2/exe/jekyll:15:in `<top (required)>'
       	from /usr/local/bin/jekyll:25:in `load'
       	from /usr/local/bin/jekyll:25:in `<main>'
             Remote Theme: Cleaning up /tmp/jekyll-remote-theme-20230217-346821-wuf3gy
     # ./spec/jekyll-remote-theme/integration_spec.rb:40:in `block (3 levels) in <top (required)>'
     # /var/lib/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

  3) Jekyll::RemoteTheme Integration the pages-themes/primer theme uses the theme
     Failure/Error: let(:index_contents) { File.read(index_path) }
     
     Errno::ENOENT:
       No such file or directory @ rb_sysopen - /tmp/jekyll-remote-theme/tmp/dest/index.html
     # ./spec/jekyll-remote-theme/integration_spec.rb:31:in `read'
     # ./spec/jekyll-remote-theme/integration_spec.rb:31:in `block (2 levels) in <top (required)>'
     # ./spec/jekyll-remote-theme/integration_spec.rb:53:in `block (3 levels) in <top (required)>'
     # /var/lib/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

  4) Jekyll::RemoteTheme Integration the pages-themes/primer theme build the index
     Failure/Error: expect(index_path).to be_an_existing_file
       expected "/tmp/jekyll-remote-theme/tmp/dest/index.html" to be an existing file
     # ./spec/jekyll-remote-theme/integration_spec.rb:48:in `block (3 levels) in <top (required)>'
     # /var/lib/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

  5) Jekyll::RemoteTheme Integration the pages-themes/primer theme builds stylesheets
     Failure/Error: expect(stylesheet_path).to be_an_existing_file
       expected "/tmp/jekyll-remote-theme/tmp/dest/assets/css/style.css" to be an existing file
     # ./spec/jekyll-remote-theme/integration_spec.rb:57:in `block (3 levels) in <top (required)>'
     # /var/lib/gems/3.1.0/gems/webmock-3.18.1/lib/webmock/rspec.rb:37:in `block (2 levels) in <top (required)>'

Finished in 6.83 seconds (files took 0.47517 seconds to load)
79 examples, 5 failures

Failed examples:

rspec ./spec/jekyll-remote-theme/integration_spec.rb:60 # Jekyll::RemoteTheme Integration the pages-themes/primer theme requires dependencies
rspec ./spec/jekyll-remote-theme/integration_spec.rb:39 # Jekyll::RemoteTheme Integration the pages-themes/primer theme returns a zero exit code
rspec ./spec/jekyll-remote-theme/integration_spec.rb:51 # Jekyll::RemoteTheme Integration the pages-themes/primer theme uses the theme
rspec ./spec/jekyll-remote-theme/integration_spec.rb:47 # Jekyll::RemoteTheme Integration the pages-themes/primer theme build the index
rspec ./spec/jekyll-remote-theme/integration_spec.rb:56 # Jekyll::RemoteTheme Integration the pages-themes/primer theme builds stylesheets

Randomized with seed 6998

The tests run fine with version 2.13.0.

Steps to reproduce the behavior

Just run rspec with jekyll-github-metadata 2.15.0.

Expected behavior

The tests should succeed.

Screenshots

n/a

Additional context

n/a

@dleidert
Copy link
Author

@benbalter Do you see a chance to look at this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant