frodo 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: c450b1b8b973887c68afbcac4aa71b3adf58a92aeb4f5e85df13487c534709cf
4
- data.tar.gz: 4ac726bbffccab55106a9fc9825b4c2f2c4d0c96b8106fc1452236f1cb63d3d8
2
+ SHA1:
3
+ metadata.gz: 5fa07ab3ac2e97a2c07ffa65fd59b63066b309b7
4
+ data.tar.gz: e64aba8de072ec0a13da684d5f5a30ca73aca7dc
5
5
  SHA512:
6
- metadata.gz: e4ccd11d628aae7f69bc9a3bd0237451f6158849533c9366e3604b803a38e71105fcf5dde60956b36e1ea9de9165c7c3bef2cb69cf65bb8faf1d0f398fbf8e0a
7
- data.tar.gz: c8e7948d55791d0f226f1bae3409fcbd9c45dc80514669b10355966bc0f6eb9ad5d0338f600c5039679cacafcf646d4f7dc4803da4e2512ddc1e3c1deccd3ba5
6
+ metadata.gz: 71e653d0e903b35949cf8408cfe4d5140c3cde2672e5545d6b0a5d0233b78622ddd277438463cf98a9395ffddadcb2c753862e15348391422486f0ee7ba8cd57
7
+ data.tar.gz: cee12775fc21f07ec59a4502198b23ef11a2cc99c7a7f1c24fb1f81cf65e57e1495a96fb3f33a6d4da6b3a6a776a2da8925c2cca49868e7540a4c0dcfd4b4f19
data/lib/frodo/config.rb CHANGED
@@ -136,6 +136,9 @@ module Frodo
136
136
  # Set a log level for logging when Frodo.log is set to true, defaulting to :debug
137
137
  option :log_level, default: :debug
138
138
 
139
+ # Optionally set the navigation properties to improve performance of the client
140
+ option :navigation_properties
141
+
139
142
  def options
140
143
  self.class.options
141
144
  end
data/lib/frodo/schema.rb CHANGED
@@ -12,9 +12,10 @@ module Frodo
12
12
  #
13
13
  # @param schema_definition [Nokogiri::XML] The schema's XML definition
14
14
  # @param service [Frodo::Service] The schema's parent service
15
- def initialize(schema_definition, service)
15
+ def initialize(schema_definition, service, navigation_properties=nil)
16
16
  @metadata = schema_definition
17
17
  @service = service
18
+ @navigation_properties = navigation_properties
18
19
  end
19
20
 
20
21
  # Returns the schema's `Namespace` attribute (mandatory).
data/lib/frodo/service.rb CHANGED
@@ -48,7 +48,7 @@ module Frodo
48
48
  @schemas ||= metadata.xpath('//Schema').map do |schema_xml|
49
49
  [
50
50
  schema_xml.attributes['Namespace'].value,
51
- Schema.new(schema_xml, self)
51
+ Schema.new(schema_xml, self, options[:navigation_properties])
52
52
  ]
53
53
  end.to_h
54
54
  end
data/lib/frodo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Frodo
2
- VERSION = '0.11.0'
2
+ VERSION = '0.12.0'
3
3
  end
@@ -74,6 +74,12 @@ describe Frodo::Schema do
74
74
  it { expect(subject.navigation_properties['email']['activitypointer_activity_parties']).to be_a(Frodo::NavigationProperty) }
75
75
  end
76
76
 
77
+ context "with navigation properties provided during initialization" do
78
+ let(:navigation_properties) { { key: "value" } }
79
+ let(:subject) { Frodo::Schema.new(schema_xml, service, navigation_properties) }
80
+
81
+ it { expect(subject.navigation_properties).to eq(navigation_properties) }
82
+ end
77
83
  end
78
84
 
79
85
  describe '#referential_constraints_for_entity' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frodo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emmanuel Pinault
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-24 00:00:00.000000000 Z
11
+ date: 2019-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -404,7 +404,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
404
404
  version: '0'
405
405
  requirements: []
406
406
  rubyforge_project:
407
- rubygems_version: 2.7.6.2
407
+ rubygems_version: 2.5.1
408
408
  signing_key:
409
409
  specification_version: 4
410
410
  summary: Simple OData library