Skip to content

0.7.2.1 Release (Urgent Image Component Bug Fix Release) #160

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

Merged
merged 8 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## v0.7.2.1

[Merged PRs](https://github.com/basemate/matestack-ui-core/milestone/5?closed=1)

### Security Fixes

- Dependency version bump (nokogiri) by dependabot

### Bugfixes

- Fixed image component 157 #158 by jonasjabari

## v0.7.2

[Merged PRs](https://github.com/basemate/matestack-ui-core/milestone/4?closed=1)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ GEM
mini_portile2 (2.4.0)
minitest (5.11.3)
nio4r (2.4.0)
nokogiri (1.10.3)
nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
pipetree (0.1.1)
poltergeist (1.18.1)
Expand Down
2 changes: 1 addition & 1 deletion app/concepts/matestack/ui/core/img/img.haml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
= image_tag(@tag_attributes, ActionController::Base.helpers.asset_path(options[:path]), height: options[:height], width: options[:width], alt: options[:alt]])
%img{@tag_attributes}
9 changes: 9 additions & 0 deletions app/concepts/matestack/ui/core/img/img.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
module Matestack::Ui::Core::Img
class Img < Matestack::Ui::Core::Component::Static

def setup
@tag_attributes.merge!({
src: ActionController::Base.helpers.asset_path(options[:path]),
height: options[:height],
width: options[:width],
alt: options[:alt]
})
end

end
end
2 changes: 1 addition & 1 deletion lib/matestack/ui/core/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Matestack
module Ui
module Core
VERSION = '0.7.2'
VERSION = '0.7.2.1'
end
end
end
Binary file added spec/dummy/app/assets/images/matestack-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions spec/usage/components/img_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require_relative '../../support/utils'
include Utils

describe 'Img Component', type: :feature, js: true do

it 'Renders an image tag on the page' do

class ExamplePage < Matestack::Ui::Page
def response
components {
img path: 'matestack-logo.png', width: 500, height: 300, alt: "logo"
}
end
end

visit '/example'

expect(page).to have_xpath("//img[contains(@src,'matestack-logo') and @alt='logo' and @width='500' and @height='300']")
end
end