izi_json_ld 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +3 -0
- data/app/entities/aggregate_rating_entity.rb +5 -0
- data/app/entities/application_entity.rb +25 -0
- data/app/entities/offer_entity.rb +10 -0
- data/app/entities/product_entity.rb +14 -0
- data/app/entities/rating_entity.rb +9 -0
- data/app/entities/review_entity.rb +11 -0
- data/app/entities/service_entity.rb +10 -0
- data/app/helpers/critical_helper.rb +118 -0
- data/lib/izi_json_ld.rb +23 -0
- data/lib/izi_json_ld/engine.rb +11 -0
- data/lib/izi_json_ld/extentions/autoload_paths.rb +6 -0
- data/lib/izi_json_ld/types.rb +7 -0
- data/lib/izi_json_ld/version.rb +5 -0
- data/spec/dummy/Gemfile +14 -0
- data/spec/dummy/Gemfile.lock +229 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +0 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +15 -0
- data/spec/dummy/bin/_guard-core +29 -0
- data/spec/dummy/bin/guard +29 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/rspec +29 -0
- data/spec/dummy/bin/setup +33 -0
- data/spec/dummy/config.ru +6 -0
- data/spec/dummy/config/application.rb +14 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +76 -0
- data/spec/dummy/config/environments/production.rb +120 -0
- data/spec/dummy/config/environments/test.rb +59 -0
- data/spec/dummy/config/initializers/assets.rb +12 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +8 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +6 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/puma.rb +43 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +1249 -0
- data/spec/dummy/tmp/development_secret.txt +1 -0
- data/spec/entities/aggregate_rating_entity_spec.rb +34 -0
- data/spec/entities/offer_entity_spec.rb +45 -0
- data/spec/entities/product_entity_spec.rb +49 -0
- data/spec/entities/rating_entity_spec.rb +34 -0
- data/spec/entities/review_entity_spec.rb +44 -0
- data/spec/entities/service_entity_spec.rb +62 -0
- data/spec/rails_helper.rb +64 -0
- data/spec/spec_helper.rb +96 -0
- metadata +168 -0
@@ -0,0 +1 @@
|
|
1
|
+
8548eb803ff5d9a067a7707dfa7337e6480d4fa884e1acdb75cda63e9dfe11bad33760936b1848cdacbb291acb5085593d0656e68e0c020b8919d2fced9f1df9
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe AggregateRatingEntity do
|
4
|
+
let(:item) { described_class.new(ratingValue: 4) }
|
5
|
+
|
6
|
+
it 'should be searializable as hash' do
|
7
|
+
expect(item.as_json).to be_present
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should be searializable as string' do
|
11
|
+
expect(item.to_json).to be_present
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should return html_safe string' do
|
15
|
+
expect(item.to_json).to be_html_safe
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should have @type' do
|
19
|
+
expect(item.as_json).to have_key '@type'
|
20
|
+
expect(item.as_json['@type']).to be_present
|
21
|
+
expect(item.as_json['@type']).to eq 'AggregateRating'
|
22
|
+
end
|
23
|
+
|
24
|
+
[
|
25
|
+
['bestRating', 5],
|
26
|
+
['worstRating', 1]
|
27
|
+
].each do |(field, value)|
|
28
|
+
it "should have default #{field}" do
|
29
|
+
expect(item.as_json).to have_key field
|
30
|
+
expect(item.as_json[field]).to be_present
|
31
|
+
expect(item.as_json[field]).to eq value
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe OfferEntity do
|
4
|
+
let(:item) { described_class.new(url: 'http://example.com', price: 9.99) }
|
5
|
+
|
6
|
+
it 'should be searializable as hash' do
|
7
|
+
expect(item.as_json).to be_present
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should be searializable as string' do
|
11
|
+
expect(item.to_json).to be_present
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should return html_safe string' do
|
15
|
+
expect(item.to_json).to be_html_safe
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should have @type' do
|
19
|
+
expect(item.as_json).to have_key '@type'
|
20
|
+
expect(item.as_json['@type']).to be_present
|
21
|
+
expect(item.as_json['@type']).to eq 'Offer'
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should have default currency' do
|
25
|
+
expect(item.as_json).to have_key 'priceCurrency'
|
26
|
+
expect(item.as_json['priceCurrency']).to be_present
|
27
|
+
expect(item.as_json['priceCurrency']).to eq 'USD'
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should have default currency' do
|
31
|
+
expect(item.as_json).to have_key 'availability'
|
32
|
+
expect(item.as_json['availability']).to be_present
|
33
|
+
expect(item.as_json['availability']).to include('OnlineOnly')
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'allow to pass coercibles' do
|
37
|
+
i2 = nil
|
38
|
+
expect do
|
39
|
+
i2 = described_class.new(url: 'http://example.com', price: '9.99')
|
40
|
+
end.not_to raise_error
|
41
|
+
expect(item).to be_present
|
42
|
+
expect(item.as_json).to be_present
|
43
|
+
expect(item.as_json['price']).to eq 9.99
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe ProductEntity do
|
4
|
+
let(:item) { described_class.new(name: 'Test') }
|
5
|
+
|
6
|
+
it 'should be searializable as hash' do
|
7
|
+
expect(item.as_json).to be_present
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should be searializable as string' do
|
11
|
+
expect(item.to_json).to be_present
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should return html_safe string' do
|
15
|
+
expect(item.to_json).to be_html_safe
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should have @type' do
|
19
|
+
expect(item.as_json).to have_key '@type'
|
20
|
+
expect(item.as_json['@type']).to be_present
|
21
|
+
expect(item.as_json['@type']).to eq 'Product'
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should have @context' do
|
25
|
+
expect(item.as_json).to have_key '@context'
|
26
|
+
expect(item.as_json['@context']).to be_present
|
27
|
+
expect(item.as_json['@context']).to include 'schema.org'
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'with aggregateRating' do
|
31
|
+
let(:item) { described_class.new(name: 'Test', aggregateRating: { ratingValue: 4 }) }
|
32
|
+
|
33
|
+
it 'should have aggregateRating' do
|
34
|
+
expect(item.as_json).to have_key 'aggregateRating'
|
35
|
+
expect(item.as_json['aggregateRating']).to be_present
|
36
|
+
expect(item.as_json.dig('aggregateRating', 'ratingValue')).to eq 4
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
context 'with offers' do
|
41
|
+
let(:item) { described_class.new(name: 'Test', offers: { url: 'test', price: 0.9 }) }
|
42
|
+
|
43
|
+
it 'should have offers' do
|
44
|
+
expect(item.as_json).to have_key 'offers'
|
45
|
+
expect(item.as_json['offers']).to be_present
|
46
|
+
expect(item.as_json.dig('offers', 'url')).to eq 'test'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe RatingEntity do
|
4
|
+
let(:item) { described_class.new(ratingValue: 4) }
|
5
|
+
|
6
|
+
it 'should be searializable as hash' do
|
7
|
+
expect(item.as_json).to be_present
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should be searializable as string' do
|
11
|
+
expect(item.to_json).to be_present
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should return html_safe string' do
|
15
|
+
expect(item.to_json).to be_html_safe
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should have @type' do
|
19
|
+
expect(item.as_json).to have_key '@type'
|
20
|
+
expect(item.as_json['@type']).to be_present
|
21
|
+
expect(item.as_json['@type']).to eq 'Rating'
|
22
|
+
end
|
23
|
+
|
24
|
+
[
|
25
|
+
['bestRating', 5],
|
26
|
+
['worstRating', 1]
|
27
|
+
].each do |(field, value)|
|
28
|
+
it "should have default #{field}" do
|
29
|
+
expect(item.as_json).to have_key field
|
30
|
+
expect(item.as_json[field]).to be_present
|
31
|
+
expect(item.as_json[field]).to eq value
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe ReviewEntity do
|
4
|
+
let(:time) { 1.week.ago }
|
5
|
+
let(:item) do
|
6
|
+
described_class.new(
|
7
|
+
author: 'John',
|
8
|
+
description: 'TODO',
|
9
|
+
reviewRating: { ratingValue: 3 }
|
10
|
+
)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should be searializable as hash' do
|
14
|
+
expect(item.as_json).to be_present
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should be searializable as string' do
|
18
|
+
expect(item.to_json).to be_present
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should return html_safe string' do
|
22
|
+
expect(item.to_json).to be_html_safe
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have @type' do
|
26
|
+
expect(item.as_json).to have_key '@type'
|
27
|
+
expect(item.as_json['@type']).to be_present
|
28
|
+
expect(item.as_json['@type']).to eq 'Review'
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should allow set datePublished as datetime' do
|
32
|
+
i2 = described_class.new(datePublished: time)
|
33
|
+
obj = JSON.parse(i2.to_json)
|
34
|
+
newTime = Time.zone.parse(obj['datePublished'])
|
35
|
+
expect(newTime).to be_within(1.second).of(time)
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should allow set datePublished as iso8601' do
|
39
|
+
i2 = described_class.new(datePublished: time.iso8601)
|
40
|
+
obj = JSON.parse(i2.to_json)
|
41
|
+
newTime = Time.zone.parse(obj['datePublished'])
|
42
|
+
expect(newTime).to be_within(1.second).of(time)
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.describe ServiceEntity do
|
4
|
+
let(:item) { described_class.new(name: 'Test Name') }
|
5
|
+
|
6
|
+
it 'should be searializable as hash' do
|
7
|
+
expect(item.as_json).to be_present
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should be searializable as string' do
|
11
|
+
expect(item.to_json).to be_present
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should return html_safe string' do
|
15
|
+
expect(item.to_json).to be_html_safe
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should have @type' do
|
19
|
+
expect(item.as_json).to have_key '@type'
|
20
|
+
expect(item.as_json['@type']).to be_present
|
21
|
+
expect(item.as_json['@type']).to eq 'Service'
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should have @context' do
|
25
|
+
expect(item.as_json).to have_key '@context'
|
26
|
+
expect(item.as_json['@context']).to be_present
|
27
|
+
expect(item.as_json['@context']).to include 'schema.org'
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'with review' do
|
31
|
+
let(:item) { described_class.new(name: 'Test', review: { author: 'test', reviewRating: { ratingValue: 4 } }) }
|
32
|
+
|
33
|
+
it 'should have review' do
|
34
|
+
expect(item.as_json).to have_key 'review'
|
35
|
+
expect(item.as_json['review']).to be_present
|
36
|
+
expect(item.as_json.dig('review', 'author')).to eq 'test'
|
37
|
+
expect(item.as_json.dig('review', 'reviewRating', 'ratingValue')).to eq 4
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'with reviews' do
|
42
|
+
let(:item) do
|
43
|
+
described_class.new(
|
44
|
+
name: 'Test',
|
45
|
+
reviews: [
|
46
|
+
{ author: 'test1', reviewRating: { ratingValue: 2 } },
|
47
|
+
{ author: 'test2', reviewRating: { ratingValue: 3 } },
|
48
|
+
{ author: 'test3', reviewRating: { ratingValue: 4 } }
|
49
|
+
]
|
50
|
+
)
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'should have review' do
|
54
|
+
expect(item.as_json).not_to have_key 'review'
|
55
|
+
expect(item.as_json).to have_key 'reviews'
|
56
|
+
expect(item.as_json['reviews']).to be_present
|
57
|
+
expect(item.as_json['reviews'].size).to eq 3
|
58
|
+
expect(item.as_json.dig('reviews', 0, 'author')).to eq 'test1'
|
59
|
+
expect(item.as_json.dig('reviews', 0, 'reviewRating', 'ratingValue')).to eq 2
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
+
require 'spec_helper'
|
3
|
+
ENV['RAILS_ENV'] ||= 'test'
|
4
|
+
require File.expand_path('./dummy/config/environment', __dir__)
|
5
|
+
# Prevent database truncation if the environment is production
|
6
|
+
abort("The Rails environment is running in production mode!") if Rails.env.production?
|
7
|
+
require 'rspec/rails'
|
8
|
+
# Add additional requires below this line. Rails is not loaded until this point!
|
9
|
+
|
10
|
+
# Requires supporting ruby files with custom matchers and macros, etc, in
|
11
|
+
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
12
|
+
# run as spec files by default. This means that files in spec/support that end
|
13
|
+
# in _spec.rb will both be required and run as specs, causing the specs to be
|
14
|
+
# run twice. It is recommended that you do not name files matching this glob to
|
15
|
+
# end with _spec.rb. You can configure this pattern with the --pattern
|
16
|
+
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
17
|
+
#
|
18
|
+
# The following line is provided for convenience purposes. It has the downside
|
19
|
+
# of increasing the boot-up time by auto-requiring all files in the support
|
20
|
+
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
21
|
+
# require only the support files necessary.
|
22
|
+
#
|
23
|
+
# Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f }
|
24
|
+
|
25
|
+
# Checks for pending migrations and applies them before tests are run.
|
26
|
+
# If you are not using ActiveRecord, you can remove these lines.
|
27
|
+
begin
|
28
|
+
ActiveRecord::Migration.maintain_test_schema!
|
29
|
+
rescue ActiveRecord::PendingMigrationError => e
|
30
|
+
puts e.to_s.strip
|
31
|
+
exit 1
|
32
|
+
end
|
33
|
+
RSpec.configure do |config|
|
34
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
35
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
36
|
+
|
37
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
38
|
+
# examples within a transaction, remove the following line or assign false
|
39
|
+
# instead of true.
|
40
|
+
config.use_transactional_fixtures = true
|
41
|
+
|
42
|
+
# You can uncomment this line to turn off ActiveRecord support entirely.
|
43
|
+
# config.use_active_record = false
|
44
|
+
|
45
|
+
# RSpec Rails can automatically mix in different behaviours to your tests
|
46
|
+
# based on their file location, for example enabling you to call `get` and
|
47
|
+
# `post` in specs under `spec/controllers`.
|
48
|
+
#
|
49
|
+
# You can disable this behaviour by removing the line below, and instead
|
50
|
+
# explicitly tag your specs with their type, e.g.:
|
51
|
+
#
|
52
|
+
# RSpec.describe UsersController, type: :controller do
|
53
|
+
# # ...
|
54
|
+
# end
|
55
|
+
#
|
56
|
+
# The different available types are documented in the features, such as in
|
57
|
+
# https://relishapp.com/rspec/rspec-rails/docs
|
58
|
+
config.infer_spec_type_from_file_location!
|
59
|
+
|
60
|
+
# Filter lines from Rails gems in backtraces.
|
61
|
+
config.filter_rails_from_backtrace!
|
62
|
+
# arbitrary gems may also be filtered via:
|
63
|
+
# config.filter_gems_from_backtrace("gem name")
|
64
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
4
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
5
|
+
# files.
|
6
|
+
#
|
7
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
8
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
9
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
10
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
11
|
+
# a separate helper file that requires the additional dependencies and performs
|
12
|
+
# the additional setup, and require it from the spec files that actually need
|
13
|
+
# it.
|
14
|
+
#
|
15
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
16
|
+
RSpec.configure do |config|
|
17
|
+
# rspec-expectations config goes here. You can use an alternate
|
18
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
19
|
+
# assertions if you prefer.
|
20
|
+
config.expect_with :rspec do |expectations|
|
21
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
22
|
+
# and `failure_message` of custom matchers include text for helper methods
|
23
|
+
# defined using `chain`, e.g.:
|
24
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
25
|
+
# # => "be bigger than 2 and smaller than 4"
|
26
|
+
# ...rather than:
|
27
|
+
# # => "be bigger than 2"
|
28
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
29
|
+
end
|
30
|
+
|
31
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
32
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
33
|
+
config.mock_with :rspec do |mocks|
|
34
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
35
|
+
# a real object. This is generally recommended, and will default to
|
36
|
+
# `true` in RSpec 4.
|
37
|
+
mocks.verify_partial_doubles = true
|
38
|
+
end
|
39
|
+
|
40
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
41
|
+
# have no way to turn it off -- the option exists only for backwards
|
42
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
43
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
44
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
45
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
46
|
+
|
47
|
+
# The settings below are suggested to provide a good initial experience
|
48
|
+
# with RSpec, but feel free to customize to your heart's content.
|
49
|
+
=begin
|
50
|
+
# This allows you to limit a spec run to individual examples or groups
|
51
|
+
# you care about by tagging them with `:focus` metadata. When nothing
|
52
|
+
# is tagged with `:focus`, all examples get run. RSpec also provides
|
53
|
+
# aliases for `it`, `describe`, and `context` that include `:focus`
|
54
|
+
# metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
55
|
+
config.filter_run_when_matching :focus
|
56
|
+
|
57
|
+
# Allows RSpec to persist some state between runs in order to support
|
58
|
+
# the `--only-failures` and `--next-failure` CLI options. We recommend
|
59
|
+
# you configure your source control system to ignore this file.
|
60
|
+
config.example_status_persistence_file_path = "spec/examples.txt"
|
61
|
+
|
62
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
63
|
+
# recommended. For more details, see:
|
64
|
+
# - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
65
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
66
|
+
# - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
67
|
+
config.disable_monkey_patching!
|
68
|
+
|
69
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
70
|
+
# file, and it's useful to allow more verbose output when running an
|
71
|
+
# individual spec file.
|
72
|
+
if config.files_to_run.one?
|
73
|
+
# Use the documentation formatter for detailed output,
|
74
|
+
# unless a formatter has already been configured
|
75
|
+
# (e.g. via a command-line flag).
|
76
|
+
config.default_formatter = "doc"
|
77
|
+
end
|
78
|
+
|
79
|
+
# Print the 10 slowest examples and example groups at the
|
80
|
+
# end of the spec run, to help surface which specs are running
|
81
|
+
# particularly slow.
|
82
|
+
config.profile_examples = 10
|
83
|
+
|
84
|
+
# Run specs in random order to surface order dependencies. If you find an
|
85
|
+
# order dependency and want to debug it, you can fix the order by providing
|
86
|
+
# the seed, which is printed after each run.
|
87
|
+
# --seed 1234
|
88
|
+
config.order = :random
|
89
|
+
|
90
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
91
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
92
|
+
# test failures related to randomization by passing the same `--seed` value
|
93
|
+
# as the one that triggered the failure.
|
94
|
+
Kernel.srand config.seed
|
95
|
+
=end
|
96
|
+
end
|
metadata
ADDED
@@ -0,0 +1,168 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: izi_json_ld
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- IzikAJ
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-03-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: dry-struct
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: |-
|
42
|
+
Utils to speed up page load by using critical css &
|
43
|
+
deferred scripts initialization
|
44
|
+
email: izikaj@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- README.rdoc
|
50
|
+
- app/entities/aggregate_rating_entity.rb
|
51
|
+
- app/entities/application_entity.rb
|
52
|
+
- app/entities/offer_entity.rb
|
53
|
+
- app/entities/product_entity.rb
|
54
|
+
- app/entities/rating_entity.rb
|
55
|
+
- app/entities/review_entity.rb
|
56
|
+
- app/entities/service_entity.rb
|
57
|
+
- app/helpers/critical_helper.rb
|
58
|
+
- lib/izi_json_ld.rb
|
59
|
+
- lib/izi_json_ld/engine.rb
|
60
|
+
- lib/izi_json_ld/extentions/autoload_paths.rb
|
61
|
+
- lib/izi_json_ld/types.rb
|
62
|
+
- lib/izi_json_ld/version.rb
|
63
|
+
- spec/dummy/Gemfile
|
64
|
+
- spec/dummy/Gemfile.lock
|
65
|
+
- spec/dummy/Rakefile
|
66
|
+
- spec/dummy/app/assets/config/manifest.js
|
67
|
+
- spec/dummy/app/controllers/application_controller.rb
|
68
|
+
- spec/dummy/app/helpers/application_helper.rb
|
69
|
+
- spec/dummy/app/models/application_record.rb
|
70
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
71
|
+
- spec/dummy/bin/_guard-core
|
72
|
+
- spec/dummy/bin/guard
|
73
|
+
- spec/dummy/bin/rails
|
74
|
+
- spec/dummy/bin/rake
|
75
|
+
- spec/dummy/bin/rspec
|
76
|
+
- spec/dummy/bin/setup
|
77
|
+
- spec/dummy/config.ru
|
78
|
+
- spec/dummy/config/application.rb
|
79
|
+
- spec/dummy/config/boot.rb
|
80
|
+
- spec/dummy/config/database.yml
|
81
|
+
- spec/dummy/config/environment.rb
|
82
|
+
- spec/dummy/config/environments/development.rb
|
83
|
+
- spec/dummy/config/environments/production.rb
|
84
|
+
- spec/dummy/config/environments/test.rb
|
85
|
+
- spec/dummy/config/initializers/assets.rb
|
86
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
87
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
88
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
89
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
90
|
+
- spec/dummy/config/puma.rb
|
91
|
+
- spec/dummy/config/routes.rb
|
92
|
+
- spec/dummy/db/test.sqlite3
|
93
|
+
- spec/dummy/log/development.log
|
94
|
+
- spec/dummy/log/test.log
|
95
|
+
- spec/dummy/tmp/development_secret.txt
|
96
|
+
- spec/entities/aggregate_rating_entity_spec.rb
|
97
|
+
- spec/entities/offer_entity_spec.rb
|
98
|
+
- spec/entities/product_entity_spec.rb
|
99
|
+
- spec/entities/rating_entity_spec.rb
|
100
|
+
- spec/entities/review_entity_spec.rb
|
101
|
+
- spec/entities/service_entity_spec.rb
|
102
|
+
- spec/rails_helper.rb
|
103
|
+
- spec/spec_helper.rb
|
104
|
+
homepage: https://bitbucket.org/netfixllc/izi_json_ld
|
105
|
+
licenses:
|
106
|
+
- MIT
|
107
|
+
metadata: {}
|
108
|
+
post_install_message:
|
109
|
+
rdoc_options: []
|
110
|
+
require_paths:
|
111
|
+
- lib
|
112
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
requirements: []
|
123
|
+
rubygems_version: 3.1.2
|
124
|
+
signing_key:
|
125
|
+
specification_version: 4
|
126
|
+
summary: Izi Lightup
|
127
|
+
test_files:
|
128
|
+
- spec/spec_helper.rb
|
129
|
+
- spec/dummy/app/models/application_record.rb
|
130
|
+
- spec/dummy/app/controllers/application_controller.rb
|
131
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
132
|
+
- spec/dummy/app/assets/config/manifest.js
|
133
|
+
- spec/dummy/app/helpers/application_helper.rb
|
134
|
+
- spec/dummy/bin/rake
|
135
|
+
- spec/dummy/bin/setup
|
136
|
+
- spec/dummy/bin/_guard-core
|
137
|
+
- spec/dummy/bin/guard
|
138
|
+
- spec/dummy/bin/rspec
|
139
|
+
- spec/dummy/bin/rails
|
140
|
+
- spec/dummy/config/routes.rb
|
141
|
+
- spec/dummy/config/environments/production.rb
|
142
|
+
- spec/dummy/config/environments/development.rb
|
143
|
+
- spec/dummy/config/environments/test.rb
|
144
|
+
- spec/dummy/config/environment.rb
|
145
|
+
- spec/dummy/config/application.rb
|
146
|
+
- spec/dummy/config/puma.rb
|
147
|
+
- spec/dummy/config/database.yml
|
148
|
+
- spec/dummy/config/boot.rb
|
149
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
150
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
151
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
152
|
+
- spec/dummy/config/initializers/assets.rb
|
153
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
154
|
+
- spec/dummy/config.ru
|
155
|
+
- spec/dummy/Rakefile
|
156
|
+
- spec/dummy/db/test.sqlite3
|
157
|
+
- spec/dummy/Gemfile
|
158
|
+
- spec/dummy/log/test.log
|
159
|
+
- spec/dummy/log/development.log
|
160
|
+
- spec/dummy/Gemfile.lock
|
161
|
+
- spec/dummy/tmp/development_secret.txt
|
162
|
+
- spec/rails_helper.rb
|
163
|
+
- spec/entities/aggregate_rating_entity_spec.rb
|
164
|
+
- spec/entities/service_entity_spec.rb
|
165
|
+
- spec/entities/review_entity_spec.rb
|
166
|
+
- spec/entities/rating_entity_spec.rb
|
167
|
+
- spec/entities/offer_entity_spec.rb
|
168
|
+
- spec/entities/product_entity_spec.rb
|