contentstack_utils 0.1.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ def getElement(xml, query)
2
+ xml_doc = Nokogiri::XML(xml)
3
+ xml_doc.xpath(query)
4
+ end
5
+
6
+ def appendFrame(string)
7
+ "<documentfragmentcontainer>#{string}</documentfragmentcontainer>"
8
+ end
9
+
10
+ def getHTML(xml)
11
+ xml_doc = Nokogiri::XML(appendFrame(xml))
12
+ xml_doc.xpath('//documentfragmentcontainer').inner_html
13
+ end
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: contentstack_utils
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0.pre.beta.1
5
+ platform: ruby
6
+ authors:
7
+ - Contentstack
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 6.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 6.1.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.11.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.11.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 13.0.3
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 13.0.3
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 3.10.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 3.10.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: webmock
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 3.11.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 3.11.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.21.1
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.21.1
97
+ - !ruby/object:Gem::Dependency
98
+ name: yard
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.9.26
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.9.26
111
+ description: Contentstack Ruby client for the Content Delivery API
112
+ email:
113
+ - support@contentstack.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".gitignore"
119
+ - ".ruby-version"
120
+ - ".yardopts"
121
+ - CHANGELOG.md
122
+ - Gemfile
123
+ - Gemfile.lock
124
+ - LICENSE
125
+ - README.md
126
+ - Rakefile
127
+ - contentstack_utils.gemspec
128
+ - lib/contentstack_utils.rb
129
+ - lib/contentstack_utils/interface/renderable.rb
130
+ - lib/contentstack_utils/model/metadata.rb
131
+ - lib/contentstack_utils/model/options.rb
132
+ - lib/contentstack_utils/support/helper.rb
133
+ - lib/contentstack_utils/utils.rb
134
+ - lib/contentstack_utils/version.rb
135
+ - spec/lib/model/metadata_spec.rb
136
+ - spec/lib/model/option_spec.rb
137
+ - spec/lib/utils_spec.rb
138
+ - spec/mock/constant_render_options.rb
139
+ - spec/mock/custom_render_option.rb
140
+ - spec/spec_helper.rb
141
+ - spec/support/constant.rb
142
+ - spec/support/xml_parse.rb
143
+ homepage: https://github.com/contentstack/contentstack-utils-ruby
144
+ licenses:
145
+ - MIT
146
+ metadata: {}
147
+ post_install_message:
148
+ rdoc_options: []
149
+ require_paths:
150
+ - lib
151
+ required_ruby_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: '2.0'
156
+ required_rubygems_version: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">"
159
+ - !ruby/object:Gem::Version
160
+ version: 1.3.1
161
+ requirements: []
162
+ rubygems_version: 3.0.3
163
+ signing_key:
164
+ specification_version: 4
165
+ summary: Contentstack Ruby Utils for
166
+ test_files:
167
+ - spec/lib/model/metadata_spec.rb
168
+ - spec/lib/model/option_spec.rb
169
+ - spec/lib/utils_spec.rb
170
+ - spec/mock/constant_render_options.rb
171
+ - spec/mock/custom_render_option.rb
172
+ - spec/spec_helper.rb
173
+ - spec/support/constant.rb
174
+ - spec/support/xml_parse.rb