Skip to content

Commit 4fa1836

Browse files
authored
Merge pull request #160 from basemate/develop
0.7.2.1 Release (Urgent Image Component Bug Fix Release)
2 parents 866979d + 565e6ca commit 4fa1836

File tree

7 files changed

+44
-3
lines changed

7 files changed

+44
-3
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## v0.7.2.1
4+
5+
[Merged PRs](https://github.com/basemate/matestack-ui-core/milestone/5?closed=1)
6+
7+
### Security Fixes
8+
9+
- Dependency version bump (nokogiri) by dependabot
10+
11+
### Bugfixes
12+
13+
- Fixed image component 157 #158 by jonasjabari
14+
315
## v0.7.2
416

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

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ GEM
124124
mini_portile2 (2.4.0)
125125
minitest (5.11.3)
126126
nio4r (2.4.0)
127-
nokogiri (1.10.3)
127+
nokogiri (1.10.4)
128128
mini_portile2 (~> 2.4.0)
129129
pipetree (0.1.1)
130130
poltergeist (1.18.1)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
= image_tag(@tag_attributes, ActionController::Base.helpers.asset_path(options[:path]), height: options[:height], width: options[:width], alt: options[:alt]])
1+
%img{@tag_attributes}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
module Matestack::Ui::Core::Img
22
class Img < Matestack::Ui::Core::Component::Static
33

4+
def setup
5+
@tag_attributes.merge!({
6+
src: ActionController::Base.helpers.asset_path(options[:path]),
7+
height: options[:height],
8+
width: options[:width],
9+
alt: options[:alt]
10+
})
11+
end
12+
413
end
514
end

lib/matestack/ui/core/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Matestack
22
module Ui
33
module Core
4-
VERSION = '0.7.2'
4+
VERSION = '0.7.2.1'
55
end
66
end
77
end
Loading

spec/usage/components/img_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
require_relative '../../support/utils'
2+
include Utils
3+
4+
describe 'Img Component', type: :feature, js: true do
5+
6+
it 'Renders an image tag on the page' do
7+
8+
class ExamplePage < Matestack::Ui::Page
9+
def response
10+
components {
11+
img path: 'matestack-logo.png', width: 500, height: 300, alt: "logo"
12+
}
13+
end
14+
end
15+
16+
visit '/example'
17+
18+
expect(page).to have_xpath("//img[contains(@src,'matestack-logo') and @alt='logo' and @width='500' and @height='300']")
19+
end
20+
end

0 commit comments

Comments
 (0)