elibri_xml_versions 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module ElibriXmlVersions
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
@@ -39,8 +39,8 @@ describe Elibri::XmlVersions do
39
39
  it "should return change in author on same basic elibri objects" do
40
40
  author = Elibri::XmlMocks::Examples.contributor_mock(:id => 2167055520)
41
41
  author_2 = Elibri::XmlMocks::Examples.contributor_mock(:last_name => 'Waza', :id => 2167055520)
42
- generated_product = onix_from_mock(:basic_product, :record_reference => 'fdb8fa072be774d97a97', :contributors => [author])
43
- generated_product_2 = onix_from_mock(:basic_product, :record_reference => 'fdb8fa072be774d97a97', :contributors => [author_2])
42
+ generated_product = onix_from_mock(:book_example, :record_reference => 'fdb8fa072be774d97a97', :contributors => [author])
43
+ generated_product_2 = onix_from_mock(:book_example, :record_reference => 'fdb8fa072be774d97a97', :contributors => [author_2])
44
44
  @elibri_xml_versions = Elibri::XmlVersions.new(generated_product.products.first, generated_product_2.products.first)
45
45
  diff = @elibri_xml_versions.diff
46
46
  diff[:deleted].should eq([])
@@ -73,8 +73,12 @@ describe Elibri::XmlVersions do
73
73
  end
74
74
 
75
75
  it "should return added element when new review is added" do
76
- generated_product = onix_from_mock(:book_example, RAW_EXTRAS.merge(:other_texts => [Elibri::XmlMocks::Examples.review_mock]))
77
- generated_product_2 = onix_from_mock(:book_example, RAW_EXTRAS.merge(:other_texts => [Elibri::XmlMocks::Examples.review_mock, Elibri::XmlMocks::Examples.review_mock(:text_author => "lobuz lobuzialski")]))
76
+ generated_product = onix_from_mock(:book_example, RAW_EXTRAS.merge(:other_texts => [Elibri::XmlMocks::Examples.review_mock(:id => 11111)]))
77
+ generated_product_2 = onix_from_mock(:book_example, RAW_EXTRAS.merge(:other_texts => [
78
+ Elibri::XmlMocks::Examples.review_mock(:id => 22222),
79
+ Elibri::XmlMocks::Examples.review_mock(:id => 33333, :text_author => "lobuz lobuzialski")
80
+ ]))
81
+
78
82
  @elibri_xml_versions = Elibri::XmlVersions.new(generated_product.products.first, generated_product_2.products.first)
79
83
  result = @elibri_xml_versions.diff
80
84
  (@elibri_xml_versions.convert_arr_to_hash result[:added])[:reviews].count.should eq(2)
@@ -104,7 +108,7 @@ describe Elibri::XmlVersions do
104
108
  ]
105
109
 
106
110
  TRAVERSE_VECTOR = {
107
- :or_title => :original_title,
111
+ :original_title => :original_title,
108
112
  :publisher_name => :publisher_name,
109
113
  :record_reference => :record_reference,
110
114
  :deletion_text => :deletion_text,
@@ -145,7 +149,7 @@ describe Elibri::XmlVersions do
145
149
  #strings
146
150
  [
147
151
  :publisher_name, :record_reference,
148
- :ean, :isbn_value, :deletion_text, :or_title,
152
+ :ean, :isbn_value, :deletion_text, :original_title,
149
153
  :trade_title, :pkwiu, :title, :subtitle,
150
154
  :edition_statement
151
155
  ].each do |symbol|
metadata CHANGED
@@ -1,105 +1,108 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: elibri_xml_versions
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 5
10
- version: 0.1.5
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Piotr Szmielew
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-06-07 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-13 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :development
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: rake
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
38
25
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rake
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
46
38
  type: :development
47
- version_requirements: *id002
48
- - !ruby/object:Gem::Dependency
49
- name: elibri_onix_mocks
50
39
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
52
41
  none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- hash: 3
57
- segments:
58
- - 0
59
- version: "0"
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: elibri_onix_mocks
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
60
54
  type: :development
61
- version_requirements: *id003
62
- - !ruby/object:Gem::Dependency
63
- name: elibri_api_client
64
55
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: elibri_api_client
64
+ requirement: !ruby/object:Gem::Requirement
66
65
  none: false
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- hash: 3
71
- segments:
72
- - 0
73
- version: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
74
70
  type: :runtime
75
- version_requirements: *id004
76
- - !ruby/object:Gem::Dependency
77
- name: elibri_onix_dict
78
71
  prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: elibri_onix_dict
80
+ requirement: !ruby/object:Gem::Requirement
80
81
  none: false
81
- requirements:
82
- - - ">="
83
- - !ruby/object:Gem::Version
84
- hash: 3
85
- segments:
86
- - 0
87
- version: "0"
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
88
86
  type: :runtime
89
- version_requirements: *id005
90
- description: |-
91
- Gem created for comparing eLibri xml objects. More info coming soon. Currently working and tested only on REE.
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ description: ! 'Gem created for comparing eLibri xml objects. More info coming soon.
95
+ Currently working and tested only on REE.
96
+
92
97
  Basic usage: Elibri::XmlVersions.new(product_ver1, product_ver2).diff
93
- it will return hash: {:added => [], :changes => [], :deleted => []}
94
- email:
98
+
99
+ it will return hash: {:added => [], :changes => [], :deleted => []}'
100
+ email:
95
101
  - p.szmielew@ava.waw.pl
96
102
  executables: []
97
-
98
103
  extensions: []
99
-
100
104
  extra_rdoc_files: []
101
-
102
- files:
105
+ files:
103
106
  - .gitignore
104
107
  - .travis.yml
105
108
  - Gemfile
@@ -110,39 +113,28 @@ files:
110
113
  - lib/elibri_xml_versions/version.rb
111
114
  - spec/elibri_xml_versions_spec.rb
112
115
  - spec/spec_helper.rb
113
- homepage: ""
116
+ homepage: ''
114
117
  licenses: []
115
-
116
118
  post_install_message:
117
119
  rdoc_options: []
118
-
119
- require_paths:
120
+ require_paths:
120
121
  - lib
121
- required_ruby_version: !ruby/object:Gem::Requirement
122
+ required_ruby_version: !ruby/object:Gem::Requirement
122
123
  none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
128
- - 0
129
- version: "0"
130
- required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ! '>='
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
129
  none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- hash: 3
136
- segments:
137
- - 0
138
- version: "0"
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
139
134
  requirements: []
140
-
141
135
  rubyforge_project: elibri_xml_versions
142
- rubygems_version: 1.8.21
136
+ rubygems_version: 1.8.19
143
137
  signing_key:
144
138
  specification_version: 3
145
139
  summary: Gem created for comparing eLibri xml objects.
146
- test_files:
147
- - spec/elibri_xml_versions_spec.rb
148
- - spec/spec_helper.rb
140
+ test_files: []