oddb2xml 2.1.7 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +60 -54
- data/History.txt +9 -0
- data/README.md +3 -0
- data/lib/oddb2xml/builder.rb +278 -300
- data/lib/oddb2xml/cli.rb +45 -55
- data/lib/oddb2xml/downloader.rb +23 -19
- data/lib/oddb2xml/extractor.rb +19 -21
- data/lib/oddb2xml/util.rb +2 -1
- data/lib/oddb2xml/version.rb +1 -1
- data/lib/oddb2xml/xml_definitions.rb +29 -12
- data/oddb2xml.gemspec +14 -10
- data/spec/builder_spec.rb +318 -406
- data/spec/calc_spec.rb +7 -14
- data/spec/cli_spec.rb +119 -51
- data/spec/downloader_spec.rb +372 -115
- data/spec/extractor_spec.rb +126 -44
- data/spec/fixtures/vcr_cassettes/oddb2xml.json +1 -0
- data/spec/galenic_spec.rb +1 -3
- data/spec/options_spec.rb +0 -13
- data/spec/parslet_spec.rb +0 -6
- data/spec/spec_helper.rb +105 -240
- data/test_options.rb +7 -2
- metadata +92 -50
- data/spec/data/swissindex.xml +0 -56
- data/spec/data/swissindex_NonPharma_DE.xml +0 -65
- data/spec/data/swissindex_NonPharma_FR.xml +0 -65
- data/spec/data/swissindex_Pharma_DE.xml +0 -82
- data/spec/data/swissindex_Pharma_FR.xml +0 -82
- data/spec/data/swissindex_nonpharma.xml +0 -65
- data/spec/data/swissindex_pharma.xml +0 -82
- data/spec/data/swissmedic_package-galenic.xlsx +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b4d1220ec215310a049776d322b5d04679c3203
|
4
|
+
data.tar.gz: d4c68e29fc81cd6baeacfcdad1d204fffb45f87f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 221c3cde4e9c62fe4dcce4f16fe02b4a17d86b584624d0eb408637cf19e3da6a863fe7dedafd773f7e4653f4b94ba3c6c0554a6983fc3b88463ceb02604de41a
|
7
|
+
data.tar.gz: 307ba6cb900b573c6dbd5a65f48fba2a6337ce1093290228fd3b40d85f9c08cebd2654d159cdc99b48e344b47f18491339487758fdaace438e8bed253fc1a0e8
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,62 +1,62 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
oddb2xml (2.1.
|
5
|
-
archive-tar-minitar
|
6
|
-
mechanize
|
4
|
+
oddb2xml (2.1.8)
|
5
|
+
archive-tar-minitar
|
6
|
+
mechanize
|
7
|
+
multi_json
|
7
8
|
nokogiri
|
8
|
-
parslet
|
9
|
-
rubyXL
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
9
|
+
parslet
|
10
|
+
rubyXL
|
11
|
+
rubyntlm
|
12
|
+
rubyzip
|
13
|
+
savon
|
14
|
+
sax-machine
|
15
|
+
spreadsheet
|
14
16
|
|
15
17
|
GEM
|
16
18
|
remote: https://rubygems.org/
|
17
19
|
specs:
|
18
20
|
addressable (2.3.8)
|
19
|
-
akami (1.
|
21
|
+
akami (1.3.1)
|
20
22
|
gyoku (>= 0.4.0)
|
21
23
|
nokogiri
|
22
24
|
archive-tar-minitar (0.5.2)
|
23
25
|
blankslate (3.1.3)
|
24
26
|
builder (3.2.2)
|
27
|
+
byebug (4.0.5)
|
28
|
+
columnize (= 0.9.0)
|
25
29
|
coderay (1.1.0)
|
26
30
|
columnize (0.9.0)
|
27
31
|
crack (0.4.2)
|
28
32
|
safe_yaml (~> 1.0.0)
|
29
|
-
debugger (1.6.8)
|
30
|
-
columnize (>= 0.3.1)
|
31
|
-
debugger-linecache (~> 1.2.0)
|
32
|
-
debugger-ruby_core_source (~> 1.3.5)
|
33
|
-
debugger-linecache (1.2.0)
|
34
|
-
debugger-ruby_core_source (1.3.8)
|
35
33
|
diff-lcs (1.2.5)
|
36
34
|
domain_name (0.5.24)
|
37
35
|
unf (>= 0.0.5, < 1.0.0)
|
38
|
-
gyoku (1.
|
36
|
+
gyoku (1.3.1)
|
39
37
|
builder (>= 2.1.2)
|
40
|
-
|
38
|
+
http-cookie (1.0.2)
|
39
|
+
domain_name (~> 0.5)
|
40
|
+
httpi (2.4.1)
|
41
41
|
rack
|
42
|
-
|
43
|
-
json (1.8.2)
|
44
|
-
mechanize (2.5.1)
|
42
|
+
mechanize (2.7.3)
|
45
43
|
domain_name (~> 0.5, >= 0.5.1)
|
46
|
-
|
44
|
+
http-cookie (~> 1.0)
|
45
|
+
mime-types (~> 2.0)
|
47
46
|
net-http-digest_auth (~> 1.1, >= 1.1.1)
|
48
47
|
net-http-persistent (~> 2.5, >= 2.5.2)
|
49
48
|
nokogiri (~> 1.4)
|
50
49
|
ntlm-http (~> 0.1, >= 0.1.1)
|
51
|
-
webrobots (
|
50
|
+
webrobots (>= 0.0.9, < 0.2)
|
52
51
|
method_source (0.8.2)
|
53
|
-
mime-types (
|
52
|
+
mime-types (2.6.1)
|
54
53
|
mini_portile (0.6.2)
|
54
|
+
multi_json (1.11.1)
|
55
55
|
net-http-digest_auth (1.4)
|
56
56
|
net-http-persistent (2.9.4)
|
57
57
|
nokogiri (1.6.6.2)
|
58
58
|
mini_portile (~> 0.6.0)
|
59
|
-
nori (2.
|
59
|
+
nori (2.6.0)
|
60
60
|
ntlm-http (0.1.1)
|
61
61
|
parslet (1.7.0)
|
62
62
|
blankslate (>= 2.0, <= 4.0)
|
@@ -64,57 +64,60 @@ GEM
|
|
64
64
|
coderay (~> 1.1.0)
|
65
65
|
method_source (~> 0.8.1)
|
66
66
|
slop (~> 3.4)
|
67
|
-
pry-
|
68
|
-
|
69
|
-
pry (
|
70
|
-
|
67
|
+
pry-byebug (3.1.0)
|
68
|
+
byebug (~> 4.0)
|
69
|
+
pry (~> 0.10)
|
70
|
+
pry-doc (0.8.0)
|
71
|
+
pry (~> 0.9)
|
72
|
+
yard (~> 0.8)
|
73
|
+
rack (1.6.4)
|
71
74
|
rake (10.4.2)
|
72
75
|
rdoc (4.2.0)
|
73
|
-
|
74
|
-
|
75
|
-
rspec-
|
76
|
-
rspec-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
rspec-expectations (3.2.1)
|
76
|
+
rspec (3.3.0)
|
77
|
+
rspec-core (~> 3.3.0)
|
78
|
+
rspec-expectations (~> 3.3.0)
|
79
|
+
rspec-mocks (~> 3.3.0)
|
80
|
+
rspec-core (3.3.1)
|
81
|
+
rspec-support (~> 3.3.0)
|
82
|
+
rspec-expectations (3.3.0)
|
81
83
|
diff-lcs (>= 1.2.0, < 2.0)
|
82
|
-
rspec-support (~> 3.
|
83
|
-
rspec-mocks (3.
|
84
|
+
rspec-support (~> 3.3.0)
|
85
|
+
rspec-mocks (3.3.1)
|
84
86
|
diff-lcs (>= 1.2.0, < 2.0)
|
85
|
-
rspec-support (~> 3.
|
86
|
-
rspec-support (3.
|
87
|
+
rspec-support (~> 3.3.0)
|
88
|
+
rspec-support (3.3.0)
|
87
89
|
ruby-ole (1.2.11.8)
|
88
90
|
rubyXL (3.3.8)
|
89
91
|
nokogiri (>= 1.4.4)
|
90
92
|
rubyzip (>= 1.1.6)
|
91
|
-
rubyntlm (0.
|
93
|
+
rubyntlm (0.5.0)
|
92
94
|
rubyzip (1.1.7)
|
93
95
|
safe_yaml (1.0.4)
|
94
|
-
savon (2.
|
95
|
-
akami (~> 1.2
|
96
|
+
savon (2.11.1)
|
97
|
+
akami (~> 1.2)
|
96
98
|
builder (>= 2.1.2)
|
97
|
-
gyoku (~> 1.
|
98
|
-
httpi (~> 2.
|
99
|
+
gyoku (~> 1.2)
|
100
|
+
httpi (~> 2.3)
|
99
101
|
nokogiri (>= 1.4.0)
|
100
|
-
nori (~> 2.
|
101
|
-
wasabi (~> 3.
|
102
|
-
sax-machine (
|
103
|
-
nokogiri (> 0.0.0)
|
102
|
+
nori (~> 2.4)
|
103
|
+
wasabi (~> 3.4)
|
104
|
+
sax-machine (1.3.2)
|
104
105
|
slop (3.6.0)
|
105
106
|
spreadsheet (1.0.3)
|
106
107
|
ruby-ole (>= 1.0)
|
108
|
+
timecop (0.7.4)
|
107
109
|
unf (0.1.4)
|
108
110
|
unf_ext
|
109
111
|
unf_ext (0.0.7.1)
|
110
|
-
|
112
|
+
vcr (2.9.3)
|
113
|
+
wasabi (3.5.0)
|
111
114
|
httpi (~> 2.0)
|
112
|
-
|
113
|
-
nokogiri (>= 1.4.0)
|
115
|
+
nokogiri (>= 1.4.2)
|
114
116
|
webmock (1.21.0)
|
115
117
|
addressable (>= 2.3.6)
|
116
118
|
crack (>= 0.3.2)
|
117
119
|
webrobots (0.1.1)
|
120
|
+
yard (0.8.7.6)
|
118
121
|
|
119
122
|
PLATFORMS
|
120
123
|
ruby
|
@@ -122,10 +125,13 @@ PLATFORMS
|
|
122
125
|
DEPENDENCIES
|
123
126
|
bundler
|
124
127
|
oddb2xml!
|
125
|
-
pry-
|
128
|
+
pry-byebug
|
129
|
+
pry-doc
|
126
130
|
rake
|
127
131
|
rdoc
|
128
132
|
rspec
|
133
|
+
timecop
|
134
|
+
vcr
|
129
135
|
webmock
|
130
136
|
|
131
137
|
BUNDLED WITH
|
data/History.txt
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
=== 2.1.8 / 24.06.2015
|
2
|
+
|
3
|
+
* Adapt to download refdata information from new URL using WSDL
|
4
|
+
* Using GTIN instead of pharmacode as keys into the various exctracted information
|
5
|
+
* Renamed SwissIndex -> Refdata
|
6
|
+
* Some code cleanup
|
7
|
+
* Improved spec tests for oddb_articles/products, downloaders and extractros
|
8
|
+
* Use vcr to fake web traffic
|
9
|
+
|
1
10
|
=== 2.1.7 / 15.06.2015
|
2
11
|
|
3
12
|
* Fixed option -o which did not produce any meaningful oddb_fi.xml
|
data/README.md
CHANGED
@@ -282,3 +282,6 @@ for your currently open Terminal to download and set the Certificate.
|
|
282
282
|
|
283
283
|
* Calling rake spec runs spec tests.
|
284
284
|
* Calling rake test installs the gems and runs oddb2xml with the most commonly used combinations. All output is placed under under ausgabe/<timestamp>. These files should be manually compared to the ones generated by the last release to check for possible problems.
|
285
|
+
* we use the gem VCR to record real HTTP responses.
|
286
|
+
** Removing the directory fixtures and running @bundle exec rspec spec/downloader_spec.rb@ gets the actual content from the different servers
|
287
|
+
** To minimize the downloaded size we use several @before_record@ hooks to select the desired content, eg. only the 5 items from EPha.
|