File tree Expand file tree Collapse file tree 11 files changed +80
-20
lines changed
Expand file tree Collapse file tree 11 files changed +80
-20
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ jobs:
1414
1515 steps :
1616 - uses : actions/checkout@v3
17- - name : Set up Ruby 2.6
17+ - name : Set up Ruby 2.7
1818 uses : actions/setup-ruby@v1
1919 with :
20- ruby-version : 2.6 .x
20+ ruby-version : 2.7 .x
2121
2222 - name : Publish to RubyGems
2323 run : |
Original file line number Diff line number Diff line change 11## CHANGELOG
22
3+ ## Version 0.6.4
4+ ### Date: 17th-Apr-2023
5+ ### Enhancement
6+ - Include metadata support for Asset, Entry and Query,
7+ - Region support for Azure-EU added
8+
9+ ------------------------------------------------
10+
11+ ## Version 0.6.3.1
12+ ### Date: 17th-Mar-2023
13+ ### Package Update
14+ - Activesupport gem version limit removed (for supporting ruby v3.0 and above) .
15+
16+ ------------------------------------------------
17+
318## Version 0.6.3
419### Date: 16th-Mar-2023
520 ### Package Update
Original file line number Diff line number Diff line change 11PATH
22 remote: .
33 specs:
4- contentstack (0.6.3 )
5- activesupport (~> 3.2 )
4+ contentstack (0.6.4 )
5+ activesupport (>= 3.2 )
66 contentstack_utils (~> 1.0 )
77
88GEM
99 remote: https://rubygems.org/
1010 specs:
11- activesupport (3.2.22.5 )
12- i18n (~> 0.6 , >= 0.6.4 )
13- multi_json (~> 1.0 )
14- addressable (2.8.1 )
11+ activesupport (7.0.4.3 )
12+ concurrent-ruby (~> 1.0 , >= 1.0.2 )
13+ i18n (>= 1.6 , < 2 )
14+ minitest (>= 5.1 )
15+ tzinfo (~> 2.0 )
16+ addressable (2.8.4 )
1517 public_suffix (>= 2.0.2 , < 6.0 )
1618 concurrent-ruby (1.2.2 )
17- contentstack_utils (1.1.2 )
18- activesupport (>= 3.2 , < 7.0.4 )
19- nokogiri (~> 1.11 , >= 1.11.0 )
19+ contentstack_utils (1.1.3. 2 )
20+ activesupport (>= 3.2 )
21+ nokogiri (~> 1.11 )
2022 crack (0.4.5 )
2123 rexml
2224 diff-lcs (1.5.0 )
2325 docile (1.4.0 )
2426 hashdiff (1.0.1 )
25- i18n (0.9.5 )
27+ i18n (1.12.0 )
2628 concurrent-ruby (~> 1.0 )
2729 mini_portile2 (2.8.1 )
28- multi_json ( 1.15 .0 )
29- nokogiri (1.13.10 )
30+ minitest ( 5.18 .0 )
31+ nokogiri (1.14.3 )
3032 mini_portile2 (~> 2.8.0 )
3133 racc (~> 1.4 )
32- nokogiri (1.13.10 -x64-mingw32 )
34+ nokogiri (1.14.3 -x64-mingw32 )
3335 racc (~> 1.4 )
3436 public_suffix (5.0.1 )
3537 racc (1.6.2 )
5355 simplecov_json_formatter (~> 0.1 )
5456 simplecov-html (0.12.3 )
5557 simplecov_json_formatter (0.1.4 )
58+ tzinfo (2.0.6 )
59+ concurrent-ruby (~> 1.0 )
5660 webmock (3.11.3 )
5761 addressable (>= 2.3.6 )
5862 crack (>= 0.3.2 )
5963 hashdiff (>= 0.4.0 , < 2.0.0 )
60- webrick (1.7.0 )
61- yard (0.9.28 )
62- webrick (~> 1.7.0 )
64+ yard (0.9.34 )
6365
6466PLATFORMS
6567 ruby
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020 s . files = `git ls-files` . split ( "\n " )
2121 s . require_paths = [ "lib" ]
2222
23- s . add_dependency 'activesupport' , '~> 3.2'
23+ s . add_dependency 'activesupport' , '>= 3.2'
2424 s . add_dependency 'contentstack_utils' , '~> 1.0'
2525
2626 s . add_development_dependency 'rspec' , '~> 3.10.0'
Original file line number Diff line number Diff line change @@ -80,11 +80,16 @@ def sync(params)
8080
8181 private
8282 def get_default_region_hosts ( region = 'us' )
83+ host = "https://cdn.contentstack.io"
8384 case region
8485 when "us"
8586 host = "https://cdn.contentstack.io"
8687 when "eu"
8788 host = "https://eu-cdn.contentstack.com"
89+ when "azure-na"
90+ host = "https://azure-na-cdn.contentstack.com"
91+ when "azure-eu"
92+ host = "https://azure-eu-cdn.contentstack.com"
8893 end
8994 host
9095 end
Original file line number Diff line number Diff line change @@ -167,6 +167,20 @@ def include_branch(flag=true)
167167 self
168168 end
169169
170+ # Include the metadata for publish content.
171+ #
172+ # Example
173+ #
174+ # @entry = @stack.content_type('product').entry(entry_uid)
175+ # @entry.include_metadata
176+ #
177+ # @return [Contentstack::Entry]
178+ def include_metadata ( flag = true )
179+ @query [ :include_metadata ] = flag
180+ self
181+ end
182+
183+
170184 # Include Embedded Objects (Entries and Assets) along with entry/entries details.
171185 #
172186 # Example
Original file line number Diff line number Diff line change @@ -348,6 +348,18 @@ def include_count(flag=true)
348348 self
349349 end
350350
351+ # Retrieve count and data of objects in result.
352+ #
353+ # Example
354+ # @query = @stack.content_type('category').query
355+ # @query.include_metadata
356+ #
357+ # @return [Contentstack::Query]
358+ def include_metadata ( flag = true )
359+ @query [ :include_metadata ] = flag
360+ self
361+ end
362+
351363 # Sort the results in ascending order with the given key.
352364 # Sort the returned entries in ascending order of the provided key.
353365 #
Original file line number Diff line number Diff line change @@ -2,5 +2,7 @@ module Contentstack
22 class Region
33 EU = 'eu'
44 US = 'us'
5+ AZURE_NA = 'azure-na'
6+ AZURE_EU = 'azure-eu'
57 end
68end
Original file line number Diff line number Diff line change 11module Contentstack
2- VERSION = "0.6.3 "
2+ VERSION = "0.6.4 "
33end
Original file line number Diff line number Diff line change 8787 data = category . include_content_type . fetch
8888 expect ( data . content_type ) . not_to be nil
8989 end
90+
91+ it "should get data using `include_metadata` method" do
92+ data = category . include_metadata . fetch
93+ expect ( data . content_type ) . not_to be nil
94+ end
9095
9196 it "should get data using `include_reference` method" do
9297 data = product . include_reference ( 'categories' ) . fetch
You can’t perform that action at this time.
0 commit comments