naranya_ecm-sdk 0.0.42 → 0.0.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.rspec +3 -0
  4. data/Gemfile +1 -2
  5. data/lib/aasm/persistence/rest_persistence.rb +11 -6
  6. data/lib/naranya_ecm-sdk.rb +4 -65
  7. data/lib/naranya_ecm-sdk/version.rb +1 -1
  8. data/lib/naranya_ecm/models/media_resource.rb +1 -1
  9. data/lib/naranya_ecm/models/notification.rb +2 -2
  10. data/lib/naranya_ecm/rest/errors.rb +16 -3
  11. data/lib/naranya_ecm/rest/finder_methods.rb +4 -4
  12. data/lib/naranya_ecm/rest/model.rb +87 -19
  13. data/lib/naranya_ecm/rest/persistence.rb +234 -46
  14. data/lib/naranya_ecm/rest/relation.rb +15 -5
  15. data/lib/naranya_ecm/search/results.rb +19 -17
  16. data/lib/ncontent-sdk-testing.rb +13 -0
  17. data/lib/ncontent-sdk.rb +85 -0
  18. data/lib/ncontent/sdk/config.rb +75 -0
  19. data/lib/ncontent/sdk/faraday_middleware.rb +4 -0
  20. data/lib/ncontent/sdk/faraday_middleware/required_response_format.rb +14 -0
  21. data/lib/ncontent/sdk/faraday_middleware/response_parser.rb +35 -0
  22. data/lib/ncontent/sdk/faraday_middleware/rest_api_call_benchmark.rb +49 -0
  23. data/lib/ncontent/sdk/railtie.rb +59 -0
  24. data/lib/ncontent/sdk/rest_client.rb +131 -0
  25. data/lib/ncontent/sdk/testing/server_mock.rb +316 -0
  26. data/naranya_ecm-sdk.gemspec +24 -10
  27. metadata +85 -68
  28. data/lib/naranya_ecm/rest/client.rb +0 -92
  29. data/spec/models/category_spec.rb +0 -16
  30. data/spec/models/content_spec.rb +0 -20
  31. data/spec/models/content_version_spec.rb +0 -7
  32. data/spec/models/download_authorization.rb +0 -7
  33. data/spec/models/media_spec.rb +0 -7
  34. data/spec/models/module_spec.rb +0 -18
  35. data/spec/spec_helper.rb +0 -47
  36. data/spec/support/naranya_ecms_shared_specs.rb +0 -21
@@ -1,7 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe NaranyaEcm::ContentVersion, vcr: true do
4
-
5
- it_behaves_like "a NaranyaEcm resource"
6
-
7
- end
@@ -1,7 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe NaranyaEcm::DownloadAuthorization, vcr: true do
4
-
5
- it_behaves_like "a NaranyaEcm resource"
6
-
7
- end
@@ -1,7 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe NaranyaEcm::MediaResource, vcr: true do
4
-
5
- it_behaves_like "a NaranyaEcm resource"
6
-
7
- end
@@ -1,18 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe NaranyaEcm, vcr: true do
4
-
5
- it "responds to #options" do
6
- expect(subject).to respond_to :options
7
- end
8
-
9
- describe "options" do
10
-
11
- subject { NaranyaEcm.options }
12
-
13
- it "responds to #site" do
14
- expect(subject).to respond_to :site
15
- end
16
- end
17
-
18
- end
@@ -1,47 +0,0 @@
1
- # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- ENV["RAILS_ENV"] ||= 'test'
3
- # require File.expand_path("../dummy/config/environment", __FILE__)
4
- # require 'rspec/rails'
5
- # require 'rspec/autorun'
6
-
7
- # Requires supporting ruby files with custom matchers and macros, etc, in
8
- # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
9
- # run as spec files by default. This means that files in spec/support that end
10
- # in _spec.rb will both be required and run as specs, causing the specs to be
11
- # run twice. It is recommended that you do not name files matching this glob to
12
- # end with _spec.rb. You can configure this pattern with with the --pattern
13
- # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
14
- Dir[File.expand_path("../support/**/*.rb", __FILE__)].each { |f| require f }
15
-
16
- # Checks for pending migrations before tests are run.
17
- # If you are not using ActiveRecord, you can remove this line.
18
- # ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
19
-
20
-
21
- require 'vcr'
22
- VCR.configure do |config|
23
- config.cassette_library_dir = 'spec/recorded_responses'
24
- config.hook_into :webmock #
25
- config.configure_rspec_metadata!
26
- config.default_cassette_options = { record: :new_episodes, erb: true }
27
- end
28
-
29
- require 'naranya_ecm-sdk'
30
-
31
- RSpec.configure do |config|
32
- # ## Mock Framework
33
- #
34
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
35
- #
36
- # config.mock_with :mocha
37
- # config.mock_with :flexmock
38
- # config.mock_with :rr
39
-
40
- # Run specs in random order to surface order dependencies. If you find an
41
- # order dependency and want to debug it, you can fix the order by providing
42
- # the seed, which is printed after each run.
43
- # --seed 1234
44
- config.order = "random"
45
-
46
- end
47
-
@@ -1,21 +0,0 @@
1
- require 'spec_helper'
2
-
3
- shared_examples "a NaranyaEcm resource" do
4
-
5
- describe "class" do
6
-
7
- subject { described_class }
8
-
9
- it "responds to #find" do
10
- expect(subject).to respond_to :find
11
- end
12
-
13
- end
14
-
15
- describe "instance" do
16
- it "responds to #id" do
17
- expect(subject).to respond_to :id
18
- end
19
- end
20
-
21
- end