infoboxer 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37db410a52fa9f9755b70ff3a1284c6a427509b8
4
- data.tar.gz: cd9952485ffffb6b3eb3d3cb69cb771aa2c9610a
3
+ metadata.gz: a5a17a6d6f41265ad44880c496d4564e7e880e62
4
+ data.tar.gz: 2d59483e4fe44b2d3ff9911e7b9d797f6fcf0c72
5
5
  SHA512:
6
- metadata.gz: 2800426e4a055f838a89b50bd9388364f7a2499d2736816c686a5d9bb2cc727d2bbdfe485565835d844cefe75c8d56f510f2fd2823411e4b7a37c4d0fd3122bf
7
- data.tar.gz: 6dc878f4957c468051ecff57eee57ca66ac2ed19e157cb6f62f993113ba2c8bd220f87926eda4f51aa5917d097ca2e8c13d94e2acd9dff8b8f82036412845245
6
+ metadata.gz: 25380c15bbbaa50206874e52ce200bf43aeeb0a13400814f89dc511d57a8a9afc2fdea4587e19fb8f40a433ff0de28b8f4b74d8455b1219cc8e54b6eda542d56
7
+ data.tar.gz: 01c72b97e94f5993e5f7a2c9387688a096b51b2a14b66c715aeaad5bd1690a2b632b73094e3cf81b2f85c3f3fbe89abdb9bc228d2972af9ef433d2900d59ad63
data/.codeclimate.yml ADDED
@@ -0,0 +1,2 @@
1
+ exclude_paths:
2
+ - lib/infoboxer/definitions/en.wikipedia.org.rb # I know, ok?
data/CHANGELOG.md CHANGED
@@ -1,11 +1,20 @@
1
1
  # Infoboxer's change log
2
2
 
3
+ ## 0.1.2 (2015-08-18)
4
+
5
+ Aaaaand, rrrrrelease it into the wilde!
6
+
7
+ * `ImageCaption` class added;
8
+ * Smallest refactorings;
9
+ * More documentation fixes.
10
+
11
+
3
12
  ## 0.1.1 (2015-08-11)
4
13
 
5
14
  Basically, preparing for wider release!
6
15
 
7
16
  * Small refactorings;
8
- * Documentation fixes;
17
+ * Documentation fixes.
9
18
 
10
19
  ## 0.1.0 (2015-08-07)
11
20
 
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Infoboxer
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/infoboxer.svg)](http://badge.fury.io/rb/infoboxer)
4
+ [![Build Status](https://travis-ci.org/molybdenum-99/infoboxer.svg?branch=master)](https://travis-ci.org/molybdenum-99/infoboxer)
5
+ [![Coverage Status](https://coveralls.io/repos/molybdenum-99/infoboxer/badge.svg?branch=master&service=github)](https://coveralls.io/github/molybdenum-99/infoboxer?branch=master)
6
+ [![Code Climate](https://codeclimate.com/github/molybdenum-99/infoboxer/badges/gpa.svg)](https://codeclimate.com/github/molybdenum-99/infoboxer)
7
+
3
8
  **Infoboxer** is pure-Ruby Wikipedia (and generic MediaWiki) client and
4
9
  parser, targeting information extraction (hence the name).
5
10
 
@@ -94,19 +99,37 @@ To put it all in one piece, also take a look at [Data extraction tips and tricks
94
99
 
95
100
  ## Advanced topics
96
101
 
97
- * [Reasons](https://github.com/molybdenum-99/infoboxer/wiki/Reasons) for Infoboxer creation;
98
- * [Parsing quality](https://github.com/molybdenum-99/infoboxer/wiki/Parsing-quality) (TL;DR: very good, but not ideal);
99
- * [Performance](https://github.com/molybdenum-99/infoboxer/wiki/Performance) (TL;DR: 0.1-0.4 sec for parsing hugest pages);
100
- * [Localization](https://github.com/molybdenum-99/infoboxer/wiki/Localization) (TL;DR: For now, you'll need some work to use Infoboxer's
102
+ * [Reasons](https://github.com/molybdenum-99/infoboxer/wiki/Reasons) for
103
+ Infoboxer creation;
104
+ * [Parsing quality](https://github.com/molybdenum-99/infoboxer/wiki/Parsing-quality)
105
+ (TL;DR: very good, but not ideal);
106
+ * [Performance](https://github.com/molybdenum-99/infoboxer/wiki/Performance)
107
+ (TL;DR: 0.1-0.4 sec for parsing hugest pages);
108
+ * [Localization](https://github.com/molybdenum-99/infoboxer/wiki/Localization)
109
+ (TL;DR: For now, you'll need some work to use Infoboxer's
101
110
  most advanced features with non-English or non-WikiMedia wikis; basic
102
111
  and mid-level features work always);
103
112
  * If you plan to use Wikipedia or sister projects data in production,
104
113
  please consider [Wikipedia terms and conditions](https://github.com/molybdenum-99/infoboxer/wiki/Wikipedia-terms-and-conditions).
105
114
 
115
+ ## Compatibility
116
+
117
+ As of now, Infoboxer reported to be compatible with any MRI Ruby since 1.9.3.
118
+ In Travis-CI tests, JRuby is failing due to bug in old Java 7/Java 8 SSL
119
+ certificate support ([see here](https://github.com/jruby/jruby/issues/2599)),
120
+ and Rubinius failing 3 specs of 500 by mystery, which is uninvestigated yet.
121
+
122
+ Therefore, those Ruby versions are excluded from Travis config, though,
123
+ they may still work for you.
124
+
106
125
  ## Links
107
126
 
108
127
  * [Wiki](https://github.com/molybdenum-99/infoboxer/wiki)
109
128
  * [API Docs](http://www.rubydoc.info/gems/infoboxer)
129
+ * **NB**: ↑ this is "current version" link, but RubyDoc.info unfortunately
130
+ sometimes fails to update it to really _current_; in case you feel
131
+ something seriously underdocumented, please-please look at
132
+ [0.1.2 docs](http://www.rubydoc.info/gems/infoboxer/0.1.2).
110
133
  * [Contributing](https://github.com/molybdenum-99/infoboxer/wiki/Contributing)
111
134
  * [Roadmap](https://github.com/molybdenum-99/infoboxer/wiki/Roadmap)
112
135
 
data/infoboxer.gemspec CHANGED
@@ -33,12 +33,4 @@ Gem::Specification.new do |s|
33
33
  s.add_dependency 'addressable'
34
34
  s.add_dependency 'terminal-table'
35
35
  s.add_dependency 'backports'
36
-
37
- s.add_development_dependency 'rake'
38
- s.add_development_dependency 'rspec', '~> 3'
39
- s.add_development_dependency 'rspec-its', '~> 1'
40
- s.add_development_dependency 'ruby-prof'
41
- s.add_development_dependency 'vcr'
42
- s.add_development_dependency 'webmock'
43
- s.add_development_dependency 'inch'
44
36
  end
@@ -122,7 +122,9 @@ module Infoboxer
122
122
  end
123
123
 
124
124
  # As users accustomed to have only one infobox on a page
125
- alias_method :infobox, :infoboxes
125
+ def infobox
126
+ infoboxes.first
127
+ end
126
128
 
127
129
  private
128
130
 
@@ -48,10 +48,10 @@ module Infoboxer
48
48
  when /^alt=(.*)$/i
49
49
  {alt: $1}
50
50
  else # text-only caption
51
- {caption: nodes}
51
+ {caption: ImageCaption.new(nodes)}
52
52
  end
53
53
  else # it's caption, and can have inline markup!
54
- {caption: nodes}
54
+ {caption: ImageCaption.new(nodes)}
55
55
  end
56
56
  end
57
57
  end
@@ -14,7 +14,7 @@ module Infoboxer
14
14
  # is not most reasonable behavior for many formatting templates;
15
15
  # * allow you to define additional functionality for arbitrary templates;
16
16
  # many of them containing pretty complicated logic (see, for ex.,
17
- # [Template:Convert](https://en.wikipedia.org/wiki/Template:Convert),
17
+ # [Template:Convert](https://en.wikipedia.org/wiki/Template:Convert)),
18
18
  # and it seems reasonable to extend instances of such a template.
19
19
  #
20
20
  # Infoboxer allows you to define {Templates::Set} of template-specific
@@ -49,5 +49,9 @@ module Infoboxer
49
49
  end
50
50
  end
51
51
  end
52
+
53
+ # Represents image caption.
54
+ class ImageCaption < Compound
55
+ end
52
56
  end
53
57
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Infoboxer
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infoboxer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Shepelev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -94,104 +94,6 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: rake
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rspec
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '3'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '3'
125
- - !ruby/object:Gem::Dependency
126
- name: rspec-its
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '1'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '1'
139
- - !ruby/object:Gem::Dependency
140
- name: ruby-prof
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: vcr
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: webmock
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: inch
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
97
  description: |2
196
98
  Infoboxer is library targeting use of Wikipedia (or any other
197
99
  MediaWiki-based wiki) as a rich powerful data source.
@@ -200,6 +102,7 @@ executables: []
200
102
  extensions: []
201
103
  extra_rdoc_files: []
202
104
  files:
105
+ - ".codeclimate.yml"
203
106
  - ".dokaz"
204
107
  - ".yardopts"
205
108
  - CHANGELOG.md