Skip to content
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.1.2](https://github.com/contentstack/contentstack-utils-ruby/tree/v1.1.2) (2023-02-27)
- Dependency gem updated (Activesupport gem)

## [1.1.1](https://github.com/contentstack/contentstack-utils-ruby/tree/v1.1.1) (2022-04-21)
- Json RTE image, link and frame source url issue resolved

## [1.1.0](https://github.com/contentstack/contentstack-utils-ruby/tree/v1.1.0) (2021-08-10)
- GQL Json rte to Html content support added

Expand Down
22 changes: 11 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@ PATH
remote: .
specs:
contentstack_utils (1.1.0)
activesupport (>= 3.2, < 6.2)
activesupport (>= 3.2, < 7.0.4)
nokogiri (~> 1.11, >= 1.11.0)

GEM
remote: https://rubygems.org/
specs:
activesupport (6.1.7)
activesupport (6.1.7.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.0)
crack (0.4.5)
rexml
diff-lcs (1.5.0)
docile (1.4.0)
hashdiff (1.0.1)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
mini_portile2 (2.8.0)
minitest (5.16.3)
nokogiri (1.13.9)
mini_portile2 (2.8.1)
minitest (5.17.0)
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.9-x64-mingw32)
nokogiri (1.13.10-x64-mingw32)
racc (~> 1.4)
public_suffix (5.0.0)
racc (1.6.0)
public_suffix (5.0.1)
racc (1.6.2)
rake (13.0.6)
rexml (3.2.5)
rspec (3.10.0)
Expand All @@ -54,7 +54,7 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
tzinfo (2.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
webmock (3.11.3)
addressable (>= 2.3.6)
Expand All @@ -63,7 +63,7 @@ GEM
webrick (1.7.0)
yard (0.9.28)
webrick (~> 1.7.0)
zeitwerk (2.6.6)
zeitwerk (2.6.7)

PLATFORMS
ruby
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2012-2022 Contentstack. All Rights Reserved
Copyright (c) 2012-2023 Contentstack. All Rights Reserved

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion contentstack_utils.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.test_files = s.files.grep(%r{^spec/})
s.require_paths = ["lib"]

s.add_dependency 'activesupport', '>= 3.2', '< 6.2'
s.add_dependency 'activesupport', '>= 3.2', '< 7.0.4'
s.add_dependency 'nokogiri', '~> 1.11', '>= 1.11.0'

s.add_development_dependency 'rake', '~> 13.0.3'
Expand Down
4 changes: 3 additions & 1 deletion lib/contentstack_utils/model/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ def render_node(node_type, node, inner_html)
renderString = "<code>#{inner_html}</code>"
when 'reference'
renderString = ""
when 'span'
renderString = "<span>#{inner_html}</span>"
end
renderString
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/contentstack_utils/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ContentstackUtils
VERSION = "1.1.0"
VERSION = "1.1.2"
end
9 changes: 8 additions & 1 deletion spec/lib/model/option_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,12 @@ def getMetadata(itemType=nil, styleType=nil, linkText=nil)
expect(result).to eq ""
end

it 'Should return span string for span node type' do
doc = getJson(BlankDocument)

result = subject.render_node('span', doc, linkText)
expect(result).to eq "<span>#{linkText}</span>"
end

end
end
end