pdc 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.editorconfig +27 -0
- data/.gitignore +10 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +21 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +32 -0
- data/Guardfile +36 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +11 -0
- data/bin/console +11 -0
- data/bin/setup +11 -0
- data/docs/.gitignore +3 -0
- data/docs/LICENSE_sphinx_deployment +27 -0
- data/docs/Makefile +179 -0
- data/docs/source/conf.py +257 -0
- data/docs/source/example.rst +10 -0
- data/docs/source/index.rst +23 -0
- data/docs/sphinx_deployment.mk +117 -0
- data/examples/active_attr.rb +33 -0
- data/examples/http_failures.rb +18 -0
- data/examples/local_pdc_dev.rb +15 -0
- data/examples/logger.rb +50 -0
- data/examples/pdc_curb_access_token.rb +36 -0
- data/examples/pdc_resource_tests.rb +173 -0
- data/examples/pdc_test_cache.rb +48 -0
- data/examples/prod_failures.rb +26 -0
- data/examples/prod_pdc.rb +14 -0
- data/lib/pdc/base.rb +14 -0
- data/lib/pdc/config.rb +157 -0
- data/lib/pdc/errors.rb +8 -0
- data/lib/pdc/http/errors.rb +43 -0
- data/lib/pdc/http/request/append_slash.rb +19 -0
- data/lib/pdc/http/request.rb +12 -0
- data/lib/pdc/http/response/pagination.rb +43 -0
- data/lib/pdc/http/response/parser.rb +62 -0
- data/lib/pdc/http/response/raise_error.rb +13 -0
- data/lib/pdc/http/response.rb +3 -0
- data/lib/pdc/http/result.rb +28 -0
- data/lib/pdc/http.rb +12 -0
- data/lib/pdc/logger.rb +19 -0
- data/lib/pdc/resource/attribute_modifier.rb +43 -0
- data/lib/pdc/resource/attribute_store.rb +22 -0
- data/lib/pdc/resource/attributes.rb +144 -0
- data/lib/pdc/resource/errors.rb +3 -0
- data/lib/pdc/resource/identity.rb +75 -0
- data/lib/pdc/resource/path.rb +63 -0
- data/lib/pdc/resource/per_thread_registry.rb +54 -0
- data/lib/pdc/resource/relation/finder.rb +24 -0
- data/lib/pdc/resource/relation/pagination.rb +33 -0
- data/lib/pdc/resource/relation/query.rb +14 -0
- data/lib/pdc/resource/relation.rb +81 -0
- data/lib/pdc/resource/rest_api.rb +34 -0
- data/lib/pdc/resource/scope_registry.rb +19 -0
- data/lib/pdc/resource/scopes.rb +29 -0
- data/lib/pdc/resource/value_parser.rb +31 -0
- data/lib/pdc/resource/wip.rb +0 -0
- data/lib/pdc/resource.rb +12 -0
- data/lib/pdc/v1/arch.rb +6 -0
- data/lib/pdc/v1/product.rb +5 -0
- data/lib/pdc/v1/release.rb +18 -0
- data/lib/pdc/v1/release_variant.rb +17 -0
- data/lib/pdc/v1.rb +8 -0
- data/lib/pdc/version.rb +3 -0
- data/lib/pdc.rb +25 -0
- data/pdc.gemspec +38 -0
- data/spec/fixtures/vcr/_page_count_returns_total_count.yml +141 -0
- data/spec/fixtures/vcr/brew_can_be_nil.yml +61 -0
- data/spec/fixtures/vcr/brew_may_be_present.yml +50 -0
- data/spec/fixtures/vcr/caches_multiple_response.yml +173 -0
- data/spec/fixtures/vcr/caches_response_with_a_query.yml +64 -0
- data/spec/fixtures/vcr/caches_response_with_multiple_query.yml +64 -0
- data/spec/fixtures/vcr/caches_response_without_query.yml +61 -0
- data/spec/fixtures/vcr/can_iterate_using_each.yml +187 -0
- data/spec/fixtures/vcr/fetches_variants_of_a_release.yml +663 -0
- data/spec/fixtures/vcr/must_return_number_of_resources.yml +61 -0
- data/spec/fixtures/vcr/preserves_the_filters.yml +49 -0
- data/spec/fixtures/vcr/returns_resources_on_that_page.yml +49 -0
- data/spec/fixtures/vcr/returns_the_total_count_and_not_items_in_page.yml +135 -0
- data/spec/fixtures/vcr/should_not_be_in_the_list_of_attributes.yml +95 -0
- data/spec/fixtures/vcr/works_with_where.yml +49 -0
- data/spec/pdc/config_spec.rb +115 -0
- data/spec/pdc/http/errors_spec.rb +58 -0
- data/spec/pdc/resource/attributes_spec.rb +231 -0
- data/spec/pdc/resource/cache_spec.rb +88 -0
- data/spec/pdc/resource/count_spec.rb +45 -0
- data/spec/pdc/resource/identity_spec.rb +96 -0
- data/spec/pdc/resource/pagination_spec.rb +51 -0
- data/spec/pdc/resource/path_spec.rb +30 -0
- data/spec/pdc/resource/relation_spec.rb +94 -0
- data/spec/pdc/resource/rest_api_spec.rb +23 -0
- data/spec/pdc/resource/value_parser_spec.rb +15 -0
- data/spec/pdc/resource/wip_spec.rb +0 -0
- data/spec/pdc/v1/arch_spec.rb +34 -0
- data/spec/pdc/v1/release_spec.rb +54 -0
- data/spec/pdc/version_spec.rb +5 -0
- data/spec/spec_helper.rb +39 -0
- data/spec/support/fixtures.rb +116 -0
- data/spec/support/vcr.rb +10 -0
- data/spec/support/webmock.rb +34 -0
- metadata +295 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe PDC do
|
4
|
+
before do
|
5
|
+
VCR.insert_cassette fixture_name
|
6
|
+
end
|
7
|
+
|
8
|
+
after do
|
9
|
+
VCR.eject_cassette
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:arch) { PDC::V1::Arch }
|
13
|
+
|
14
|
+
it 'has an attribute name' do
|
15
|
+
arch.attributes.must_equal ['name']
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'returns the total count and not items in page' do
|
19
|
+
total_count = arch.count
|
20
|
+
page_count = arch.page(2).count
|
21
|
+
page_count.must_equal total_count
|
22
|
+
|
23
|
+
arch_in_page = arch.page(2).contents!
|
24
|
+
arch_in_page.length.must_be :<, page_count
|
25
|
+
end
|
26
|
+
|
27
|
+
it '.page.count returns total count' do
|
28
|
+
pg2 = arch.page(2)
|
29
|
+
pg2_count = pg2.all.length
|
30
|
+
|
31
|
+
arches_count = pg2.count # must return all arches count
|
32
|
+
arches_count.wont_equal pg2_count
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
#WebMock.disable! # enable to re-record
|
4
|
+
|
5
|
+
describe PDC::V1::Release do
|
6
|
+
before do
|
7
|
+
VCR.insert_cassette fixture_name
|
8
|
+
end
|
9
|
+
|
10
|
+
after do
|
11
|
+
VCR.eject_cassette
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:release) { PDC::V1::Release }
|
15
|
+
|
16
|
+
describe 'count' do
|
17
|
+
it 'must return number of resources' do
|
18
|
+
count = release.count
|
19
|
+
count.must_equal 54
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'works with where' do
|
23
|
+
count = release.where(active: false).count
|
24
|
+
count.must_equal 0
|
25
|
+
end
|
26
|
+
end # count
|
27
|
+
|
28
|
+
describe '#brew' do
|
29
|
+
it 'brew can be nil' do
|
30
|
+
first = release.first
|
31
|
+
first.brew?.must_equal false
|
32
|
+
first.brew.try(:default_target).must_be_nil
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'brew may be present' do
|
36
|
+
rhel_6_sat = release.find('satellite-6.2-updates@rhel-6')
|
37
|
+
rhel_6_sat.brew.wont_be_nil
|
38
|
+
rhel_6_sat.brew.default_target.must_be_nil
|
39
|
+
|
40
|
+
allowed_tags = rhel_6_sat.brew.allowed_tags
|
41
|
+
allowed_tags.first.must_equal 'satellite-6.2.0-rhel-6'
|
42
|
+
end
|
43
|
+
end # brew
|
44
|
+
|
45
|
+
describe '#variants' do
|
46
|
+
it 'fetches variants of a release' do
|
47
|
+
rhel7_1 = release.find('rhel-7.1')
|
48
|
+
variants = rhel7_1.variants.all
|
49
|
+
variants.length.must_equal 12
|
50
|
+
releases = variants.map {|v| v.release }
|
51
|
+
releases.must_equal [rhel7_1] * variants.length
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
+
|
3
|
+
require 'simplecov'
|
4
|
+
require 'coveralls'
|
5
|
+
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
|
6
|
+
SimpleCov.start { add_filter 'test' }
|
7
|
+
|
8
|
+
require 'ap'
|
9
|
+
require 'pry'
|
10
|
+
|
11
|
+
require 'minitest/autorun'
|
12
|
+
require 'minitest/reporters'
|
13
|
+
require 'minitest/focus'
|
14
|
+
require 'webmock/minitest'
|
15
|
+
|
16
|
+
require 'pdc'
|
17
|
+
|
18
|
+
reporter_options = {
|
19
|
+
:color => true,
|
20
|
+
:slow_count => 3
|
21
|
+
}
|
22
|
+
|
23
|
+
Minitest::Reporters.use! [
|
24
|
+
# Minitest::Reporters::DefaultReporter.new(reporter_options),
|
25
|
+
Minitest::Reporters::SpecReporter.new(reporter_options)
|
26
|
+
]
|
27
|
+
|
28
|
+
# require all support files
|
29
|
+
Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
|
30
|
+
|
31
|
+
PDC.configure do |config|
|
32
|
+
config.site = 'https://pdc.host.dev.eng.pek2.redhat.com/'
|
33
|
+
config.requires_token = false
|
34
|
+
config.disable_caching = true
|
35
|
+
### config.log_level = :debug # enable to see details log
|
36
|
+
end
|
37
|
+
|
38
|
+
# TODO: decide if this is okay to do
|
39
|
+
include Fixtures
|
@@ -0,0 +1,116 @@
|
|
1
|
+
module PDC
|
2
|
+
module Minitest
|
3
|
+
module FixtureExtentions
|
4
|
+
# it 'looks like this_and_that' -> 'looks_like_this_and_that'
|
5
|
+
def fixture_name
|
6
|
+
name.split('_').from(2).join('_').gsub(/\s+/, '_')
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class Minitest::Spec
|
13
|
+
include PDC::Minitest::FixtureExtentions
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
# fixtures for testing the PDC::Resource::Modules
|
18
|
+
module Fixtures
|
19
|
+
class EmptyModel
|
20
|
+
include ActiveModel::Naming
|
21
|
+
end
|
22
|
+
|
23
|
+
class ModelWithIdentity
|
24
|
+
extend ActiveModel::Naming
|
25
|
+
|
26
|
+
include PDC::Logging
|
27
|
+
include PDC::Resource::Attributes
|
28
|
+
include PDC::Resource::Identity
|
29
|
+
include PDC::Resource::Scopes
|
30
|
+
end
|
31
|
+
|
32
|
+
class CustomPrimaryKeyModel
|
33
|
+
extend ActiveModel::Naming
|
34
|
+
|
35
|
+
include PDC::Logging
|
36
|
+
include PDC::Resource::Attributes
|
37
|
+
include PDC::Resource::Identity
|
38
|
+
include PDC::Resource::Scopes
|
39
|
+
|
40
|
+
self.primary_key = :foobar
|
41
|
+
end
|
42
|
+
|
43
|
+
class ModelBase
|
44
|
+
extend ActiveModel::Naming
|
45
|
+
|
46
|
+
include PDC::Logging
|
47
|
+
include PDC::Resource::Identity
|
48
|
+
include PDC::Resource::Attributes
|
49
|
+
include PDC::Resource::Scopes
|
50
|
+
end
|
51
|
+
|
52
|
+
class Model < ModelBase; end
|
53
|
+
|
54
|
+
module V1
|
55
|
+
class Foobar
|
56
|
+
extend ActiveModel::Naming
|
57
|
+
|
58
|
+
include PDC::Logging
|
59
|
+
include PDC::Resource::Identity
|
60
|
+
include PDC::Resource::Attributes
|
61
|
+
include PDC::Resource::Scopes
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
|
67
|
+
# stub pdc
|
68
|
+
module Fixtures
|
69
|
+
class JSONParser < Faraday::Response::Middleware
|
70
|
+
def parse(body)
|
71
|
+
json = MultiJson.load(body, symbolize_keys: true)
|
72
|
+
{
|
73
|
+
data: json[:data],
|
74
|
+
metadata: json[:metadata],
|
75
|
+
errors: json[:errors]
|
76
|
+
}
|
77
|
+
rescue MultiJson::ParseError => exception
|
78
|
+
{ errors: { base: [ error: exception.message ] } }
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
class Base < PDC::Base
|
83
|
+
# stub the connection
|
84
|
+
SITE = 'http://pdc.eng.redhat.com'
|
85
|
+
self.connection = Faraday.new(url: SITE) do |faraday|
|
86
|
+
faraday.request :json
|
87
|
+
faraday.use JSONParser
|
88
|
+
faraday.adapter Faraday.default_adapter
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
class Product < Base
|
93
|
+
attributes :name, :description
|
94
|
+
end
|
95
|
+
|
96
|
+
class ProductVariant < Base
|
97
|
+
self.primary_key = :v_id
|
98
|
+
end
|
99
|
+
|
100
|
+
class NestedModel < Base
|
101
|
+
attributes :name, :description, :nested
|
102
|
+
# nested will be a hash
|
103
|
+
end
|
104
|
+
|
105
|
+
class FixNumParser
|
106
|
+
class << self
|
107
|
+
def parse(value)
|
108
|
+
value.to_i
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
class CustomParserModel < Base
|
113
|
+
attributes :name, :body, :age
|
114
|
+
attribute :age, parser: FixNumParser
|
115
|
+
end
|
116
|
+
end
|
data/spec/support/vcr.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'vcr'
|
2
|
+
|
3
|
+
VCR.configure do |c|
|
4
|
+
c.allow_http_connections_when_no_cassette = true
|
5
|
+
c.cassette_library_dir = File.dirname(__FILE__) + "/../fixtures/vcr"
|
6
|
+
c.hook_into :faraday, :webmock
|
7
|
+
|
8
|
+
# To enable debug logs
|
9
|
+
# c.debug_logger = File.open('tmp/vcr.log', 'w')
|
10
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'webmock/minitest'
|
2
|
+
|
3
|
+
class WebMock::RequestStub
|
4
|
+
def to_return_json(hash, options = {})
|
5
|
+
options[:body] = MultiJson.dump(hash)
|
6
|
+
to_return(options)
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
# Don't raise but report uncaught net connections
|
13
|
+
WebMock.allow_net_connect!
|
14
|
+
|
15
|
+
WebMock.stub_request(:any, /.*/).to_return do |request|
|
16
|
+
puts "UNSTUBBED REQUEST:".red + " #{request.method.upcase} #{request.uri}"
|
17
|
+
{ body: nil }
|
18
|
+
end
|
19
|
+
|
20
|
+
module PDC
|
21
|
+
module Minitest
|
22
|
+
module WebMockExtentions
|
23
|
+
def stub_get(path)
|
24
|
+
uri = URI.join(Fixtures::Base::SITE, 'fixtures/', path).to_s
|
25
|
+
puts " stubbing: #{uri.ai}"
|
26
|
+
stub_request(:get, uri)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class Minitest::Spec
|
33
|
+
include PDC::Minitest::WebMockExtentions
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,295 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pdc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sunil Thaha
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-08-18 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: 3.2.22.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.22.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activemodel
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 3.2.22.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 3.2.22.2
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: uri_template
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.7.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.7.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: multi_json
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.12.1
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.12.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: faraday
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.9.2
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.9.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: faraday_middleware
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.10.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.10.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: faraday-http-cache
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.3.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.3.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: curb
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.9.3
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.9.3
|
125
|
+
description: API for PDC
|
126
|
+
email:
|
127
|
+
- sthaha@redhat.com
|
128
|
+
executables:
|
129
|
+
- console
|
130
|
+
- setup
|
131
|
+
extensions: []
|
132
|
+
extra_rdoc_files: []
|
133
|
+
files:
|
134
|
+
- ".editorconfig"
|
135
|
+
- ".gitignore"
|
136
|
+
- ".ruby-gemset"
|
137
|
+
- ".ruby-version"
|
138
|
+
- ".travis.yml"
|
139
|
+
- CODE_OF_CONDUCT.md
|
140
|
+
- Gemfile
|
141
|
+
- Guardfile
|
142
|
+
- LICENSE
|
143
|
+
- LICENSE.txt
|
144
|
+
- README.md
|
145
|
+
- Rakefile
|
146
|
+
- bin/console
|
147
|
+
- bin/setup
|
148
|
+
- docs/.gitignore
|
149
|
+
- docs/LICENSE_sphinx_deployment
|
150
|
+
- docs/Makefile
|
151
|
+
- docs/source/conf.py
|
152
|
+
- docs/source/example.rst
|
153
|
+
- docs/source/index.rst
|
154
|
+
- docs/sphinx_deployment.mk
|
155
|
+
- examples/active_attr.rb
|
156
|
+
- examples/http_failures.rb
|
157
|
+
- examples/local_pdc_dev.rb
|
158
|
+
- examples/logger.rb
|
159
|
+
- examples/pdc_curb_access_token.rb
|
160
|
+
- examples/pdc_resource_tests.rb
|
161
|
+
- examples/pdc_test_cache.rb
|
162
|
+
- examples/prod_failures.rb
|
163
|
+
- examples/prod_pdc.rb
|
164
|
+
- lib/pdc.rb
|
165
|
+
- lib/pdc/base.rb
|
166
|
+
- lib/pdc/config.rb
|
167
|
+
- lib/pdc/errors.rb
|
168
|
+
- lib/pdc/http.rb
|
169
|
+
- lib/pdc/http/errors.rb
|
170
|
+
- lib/pdc/http/request.rb
|
171
|
+
- lib/pdc/http/request/append_slash.rb
|
172
|
+
- lib/pdc/http/response.rb
|
173
|
+
- lib/pdc/http/response/pagination.rb
|
174
|
+
- lib/pdc/http/response/parser.rb
|
175
|
+
- lib/pdc/http/response/raise_error.rb
|
176
|
+
- lib/pdc/http/result.rb
|
177
|
+
- lib/pdc/logger.rb
|
178
|
+
- lib/pdc/resource.rb
|
179
|
+
- lib/pdc/resource/attribute_modifier.rb
|
180
|
+
- lib/pdc/resource/attribute_store.rb
|
181
|
+
- lib/pdc/resource/attributes.rb
|
182
|
+
- lib/pdc/resource/errors.rb
|
183
|
+
- lib/pdc/resource/identity.rb
|
184
|
+
- lib/pdc/resource/path.rb
|
185
|
+
- lib/pdc/resource/per_thread_registry.rb
|
186
|
+
- lib/pdc/resource/relation.rb
|
187
|
+
- lib/pdc/resource/relation/finder.rb
|
188
|
+
- lib/pdc/resource/relation/pagination.rb
|
189
|
+
- lib/pdc/resource/relation/query.rb
|
190
|
+
- lib/pdc/resource/rest_api.rb
|
191
|
+
- lib/pdc/resource/scope_registry.rb
|
192
|
+
- lib/pdc/resource/scopes.rb
|
193
|
+
- lib/pdc/resource/value_parser.rb
|
194
|
+
- lib/pdc/resource/wip.rb
|
195
|
+
- lib/pdc/v1.rb
|
196
|
+
- lib/pdc/v1/arch.rb
|
197
|
+
- lib/pdc/v1/product.rb
|
198
|
+
- lib/pdc/v1/release.rb
|
199
|
+
- lib/pdc/v1/release_variant.rb
|
200
|
+
- lib/pdc/version.rb
|
201
|
+
- pdc.gemspec
|
202
|
+
- spec/fixtures/vcr/_page_count_returns_total_count.yml
|
203
|
+
- spec/fixtures/vcr/brew_can_be_nil.yml
|
204
|
+
- spec/fixtures/vcr/brew_may_be_present.yml
|
205
|
+
- spec/fixtures/vcr/caches_multiple_response.yml
|
206
|
+
- spec/fixtures/vcr/caches_response_with_a_query.yml
|
207
|
+
- spec/fixtures/vcr/caches_response_with_multiple_query.yml
|
208
|
+
- spec/fixtures/vcr/caches_response_without_query.yml
|
209
|
+
- spec/fixtures/vcr/can_iterate_using_each.yml
|
210
|
+
- spec/fixtures/vcr/fetches_variants_of_a_release.yml
|
211
|
+
- spec/fixtures/vcr/must_return_number_of_resources.yml
|
212
|
+
- spec/fixtures/vcr/preserves_the_filters.yml
|
213
|
+
- spec/fixtures/vcr/returns_resources_on_that_page.yml
|
214
|
+
- spec/fixtures/vcr/returns_the_total_count_and_not_items_in_page.yml
|
215
|
+
- spec/fixtures/vcr/should_not_be_in_the_list_of_attributes.yml
|
216
|
+
- spec/fixtures/vcr/works_with_where.yml
|
217
|
+
- spec/pdc/config_spec.rb
|
218
|
+
- spec/pdc/http/errors_spec.rb
|
219
|
+
- spec/pdc/resource/attributes_spec.rb
|
220
|
+
- spec/pdc/resource/cache_spec.rb
|
221
|
+
- spec/pdc/resource/count_spec.rb
|
222
|
+
- spec/pdc/resource/identity_spec.rb
|
223
|
+
- spec/pdc/resource/pagination_spec.rb
|
224
|
+
- spec/pdc/resource/path_spec.rb
|
225
|
+
- spec/pdc/resource/relation_spec.rb
|
226
|
+
- spec/pdc/resource/rest_api_spec.rb
|
227
|
+
- spec/pdc/resource/value_parser_spec.rb
|
228
|
+
- spec/pdc/resource/wip_spec.rb
|
229
|
+
- spec/pdc/v1/arch_spec.rb
|
230
|
+
- spec/pdc/v1/release_spec.rb
|
231
|
+
- spec/pdc/version_spec.rb
|
232
|
+
- spec/spec_helper.rb
|
233
|
+
- spec/support/fixtures.rb
|
234
|
+
- spec/support/vcr.rb
|
235
|
+
- spec/support/webmock.rb
|
236
|
+
homepage: https://github.com/product-definition-center/pdc-ruby-gem
|
237
|
+
licenses:
|
238
|
+
- MIT
|
239
|
+
metadata:
|
240
|
+
allowed_push_host: https://rubygems.org
|
241
|
+
post_install_message:
|
242
|
+
rdoc_options: []
|
243
|
+
require_paths:
|
244
|
+
- lib
|
245
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
246
|
+
requirements:
|
247
|
+
- - ">="
|
248
|
+
- !ruby/object:Gem::Version
|
249
|
+
version: '0'
|
250
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
|
+
requirements:
|
252
|
+
- - ">="
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: '0'
|
255
|
+
requirements: []
|
256
|
+
rubyforge_project:
|
257
|
+
rubygems_version: 2.6.6
|
258
|
+
signing_key:
|
259
|
+
specification_version: 4
|
260
|
+
summary: Ruby gem for use with Product-Definition-Center
|
261
|
+
test_files:
|
262
|
+
- spec/fixtures/vcr/_page_count_returns_total_count.yml
|
263
|
+
- spec/fixtures/vcr/brew_can_be_nil.yml
|
264
|
+
- spec/fixtures/vcr/brew_may_be_present.yml
|
265
|
+
- spec/fixtures/vcr/caches_multiple_response.yml
|
266
|
+
- spec/fixtures/vcr/caches_response_with_a_query.yml
|
267
|
+
- spec/fixtures/vcr/caches_response_with_multiple_query.yml
|
268
|
+
- spec/fixtures/vcr/caches_response_without_query.yml
|
269
|
+
- spec/fixtures/vcr/can_iterate_using_each.yml
|
270
|
+
- spec/fixtures/vcr/fetches_variants_of_a_release.yml
|
271
|
+
- spec/fixtures/vcr/must_return_number_of_resources.yml
|
272
|
+
- spec/fixtures/vcr/preserves_the_filters.yml
|
273
|
+
- spec/fixtures/vcr/returns_resources_on_that_page.yml
|
274
|
+
- spec/fixtures/vcr/returns_the_total_count_and_not_items_in_page.yml
|
275
|
+
- spec/fixtures/vcr/should_not_be_in_the_list_of_attributes.yml
|
276
|
+
- spec/fixtures/vcr/works_with_where.yml
|
277
|
+
- spec/pdc/config_spec.rb
|
278
|
+
- spec/pdc/http/errors_spec.rb
|
279
|
+
- spec/pdc/resource/attributes_spec.rb
|
280
|
+
- spec/pdc/resource/cache_spec.rb
|
281
|
+
- spec/pdc/resource/count_spec.rb
|
282
|
+
- spec/pdc/resource/identity_spec.rb
|
283
|
+
- spec/pdc/resource/pagination_spec.rb
|
284
|
+
- spec/pdc/resource/path_spec.rb
|
285
|
+
- spec/pdc/resource/relation_spec.rb
|
286
|
+
- spec/pdc/resource/rest_api_spec.rb
|
287
|
+
- spec/pdc/resource/value_parser_spec.rb
|
288
|
+
- spec/pdc/resource/wip_spec.rb
|
289
|
+
- spec/pdc/v1/arch_spec.rb
|
290
|
+
- spec/pdc/v1/release_spec.rb
|
291
|
+
- spec/pdc/version_spec.rb
|
292
|
+
- spec/spec_helper.rb
|
293
|
+
- spec/support/fixtures.rb
|
294
|
+
- spec/support/vcr.rb
|
295
|
+
- spec/support/webmock.rb
|