mediawiki-gateway 0.6.2 → 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/COPYING +22 -0
- data/ChangeLog +16 -0
- data/README.md +80 -21
- data/Rakefile +28 -34
- data/bin/mediawiki-gateway +203 -0
- data/lib/media_wiki.rb +4 -9
- data/lib/media_wiki/exception.rb +11 -8
- data/lib/media_wiki/fake_wiki.rb +636 -0
- data/lib/media_wiki/gateway.rb +105 -940
- data/lib/media_wiki/gateway/files.rb +173 -0
- data/lib/media_wiki/gateway/pages.rb +400 -0
- data/lib/media_wiki/gateway/query.rb +98 -0
- data/lib/media_wiki/gateway/site.rb +101 -0
- data/lib/media_wiki/gateway/users.rb +182 -0
- data/lib/media_wiki/utils.rb +47 -13
- data/lib/media_wiki/version.rb +27 -0
- data/lib/mediawiki-gateway.rb +1 -0
- data/spec/{import-test-data.xml → data/import.xml} +0 -0
- data/spec/media_wiki/gateway/files_spec.rb +34 -0
- data/spec/media_wiki/gateway/pages_spec.rb +390 -0
- data/spec/media_wiki/gateway/query_spec.rb +84 -0
- data/spec/media_wiki/gateway/site_spec.rb +122 -0
- data/spec/media_wiki/gateway/users_spec.rb +171 -0
- data/spec/media_wiki/gateway_spec.rb +129 -0
- data/spec/{live_gateway_spec.rb → media_wiki/live_gateway_spec.rb} +31 -35
- data/spec/{utils_spec.rb → media_wiki/utils_spec.rb} +41 -39
- data/spec/spec_helper.rb +17 -16
- metadata +77 -135
- data/.ruby-version +0 -1
- data/.rvmrc +0 -34
- data/Gemfile +0 -19
- data/Gemfile.lock +0 -77
- data/LICENSE +0 -21
- data/config/hosts.yml +0 -17
- data/lib/media_wiki/config.rb +0 -69
- data/mediawiki-gateway.gemspec +0 -113
- data/samples/README +0 -18
- data/samples/create_page.rb +0 -13
- data/samples/delete_batch.rb +0 -14
- data/samples/download_batch.rb +0 -15
- data/samples/email_user.rb +0 -14
- data/samples/export_xml.rb +0 -14
- data/samples/get_page.rb +0 -11
- data/samples/import_xml.rb +0 -14
- data/samples/run_fake_media_wiki.rb +0 -8
- data/samples/search_content.rb +0 -12
- data/samples/semantic_query.rb +0 -17
- data/samples/upload_commons.rb +0 -45
- data/samples/upload_file.rb +0 -13
- data/spec/fake_media_wiki/api_pages.rb +0 -135
- data/spec/fake_media_wiki/app.rb +0 -360
- data/spec/fake_media_wiki/query_handling.rb +0 -136
- data/spec/gateway_spec.rb +0 -888
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
1
|
shared_examples 'live gateway' do
|
4
2
|
|
5
3
|
def reset(*args, &block)
|
@@ -280,11 +278,11 @@ shared_examples 'live gateway' do
|
|
280
278
|
it 'should create the page' do
|
281
279
|
page = @gateway.create(title = 'A New Page', 'Some content')
|
282
280
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
281
|
+
node = Nokogiri::XML::Document.parse(page.to_s).at('/api/edit')
|
282
|
+
node['new'].should == ''
|
283
|
+
node['title'].should == title
|
284
|
+
node['result'].should == 'Success'
|
285
|
+
node['newrevid'].to_i.should > node['oldrevid'].to_i
|
288
286
|
end
|
289
287
|
|
290
288
|
end
|
@@ -300,11 +298,11 @@ shared_examples 'live gateway' do
|
|
300
298
|
it 'should overwrite the existing page' do
|
301
299
|
page = @gateway.create(title = 'Main Page', 'Some new content', summary: 'The summary', overwrite: true)
|
302
300
|
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
301
|
+
node = Nokogiri::XML::Document.parse(page.to_s).at('/api/edit')
|
302
|
+
node['new'].should be_nil
|
303
|
+
node['title'].should == title
|
304
|
+
node['result'].should == 'Success'
|
305
|
+
node['newrevid'].to_i.should > node['oldrevid'].to_i
|
308
306
|
end
|
309
307
|
|
310
308
|
end
|
@@ -330,7 +328,7 @@ shared_examples 'live gateway' do
|
|
330
328
|
|
331
329
|
page = @gateway.edit('Main Page', 'Some new content')
|
332
330
|
|
333
|
-
|
331
|
+
expect(page.to_s).to be_equivalent_to(<<-EOT)
|
334
332
|
<api>
|
335
333
|
<edit result="Success" pageid="8" title="Main Page" oldrevid="1" newrevid="8"/>
|
336
334
|
</api>
|
@@ -359,7 +357,7 @@ shared_examples 'live gateway' do
|
|
359
357
|
end
|
360
358
|
|
361
359
|
it 'should upload the file' do
|
362
|
-
|
360
|
+
expect(@page.to_s).to be_equivalent_to(<<-EOT)
|
363
361
|
<api>
|
364
362
|
<upload result="Success" filename="sample_image.jpg"/>
|
365
363
|
</api>
|
@@ -375,7 +373,7 @@ shared_examples 'live gateway' do
|
|
375
373
|
def delete_page
|
376
374
|
title, content = 'Deletable Page', 'Some content'
|
377
375
|
|
378
|
-
@gateway.
|
376
|
+
@gateway.send_request(
|
379
377
|
'action' => 'edit',
|
380
378
|
'title' => title,
|
381
379
|
'text' => content,
|
@@ -391,11 +389,11 @@ shared_examples 'live gateway' do
|
|
391
389
|
|
392
390
|
describe 'and the page exists' do
|
393
391
|
|
394
|
-
it 'should delete the page' do
|
392
|
+
it 'should delete the page', skip: '(result differs)' do
|
395
393
|
@gateway.login(@user, @pass)
|
396
394
|
|
397
395
|
delete_page { |block|
|
398
|
-
|
396
|
+
expect(block.call.to_s).to be_equivalent_to(<<-EOT)
|
399
397
|
<api>
|
400
398
|
<delete title="Deletable Page" reason="Default reason"/>
|
401
399
|
</api>
|
@@ -593,15 +591,13 @@ shared_examples 'live gateway' do
|
|
593
591
|
|
594
592
|
describe '#import' do
|
595
593
|
|
596
|
-
|
597
|
-
@import_file = File.dirname(__FILE__) + '/import-test-data.xml'
|
598
|
-
end
|
594
|
+
let(:import_file) { data('import.xml') }
|
599
595
|
|
600
596
|
describe 'when not logged in' do
|
601
597
|
|
602
598
|
it 'should raise an error' do
|
603
599
|
lambda {
|
604
|
-
@gateway.import(
|
600
|
+
@gateway.import(import_file)
|
605
601
|
}.should raise_error(MediaWiki::APIError)
|
606
602
|
end
|
607
603
|
|
@@ -612,12 +608,12 @@ shared_examples 'live gateway' do
|
|
612
608
|
it 'should import content' do
|
613
609
|
@gateway.login(@user, @pass)
|
614
610
|
|
615
|
-
page = @gateway.import(
|
611
|
+
page = @gateway.import(import_file)
|
616
612
|
|
617
|
-
|
613
|
+
expect(page.to_s).to be_equivalent_to(<<-EOT)
|
618
614
|
<api>
|
619
615
|
<import>
|
620
|
-
<page title="Main Page" ns="0" revisions="
|
616
|
+
<page title="Main Page" ns="0" revisions="1"/>
|
621
617
|
<page title="Template:Header" ns="10" revisions="1"/>
|
622
618
|
</import>
|
623
619
|
</api>
|
@@ -633,10 +629,10 @@ shared_examples 'live gateway' do
|
|
633
629
|
it 'should return export data for the page' do
|
634
630
|
page = @gateway.export(title = 'Main Page')
|
635
631
|
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
632
|
+
node = Nokogiri::XML::Document.parse(page.to_s).at('/xmlns:mediawiki/xmlns:page')
|
633
|
+
node.at('./xmlns:id').text.should_not be_nil
|
634
|
+
node.at('./xmlns:title').text.should == title
|
635
|
+
node.at('./xmlns:revision').text.should_not be_nil
|
640
636
|
end
|
641
637
|
|
642
638
|
end
|
@@ -661,11 +657,11 @@ shared_examples 'live gateway' do
|
|
661
657
|
it 'should get expected result' do
|
662
658
|
page = @gateway.create_account('name' => name = 'FooBar', 'password' => 'BarBaz')
|
663
659
|
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
660
|
+
node = Nokogiri::XML::Document.parse(page.to_s).at('/api/createaccount')
|
661
|
+
node['token'].should_not be_nil
|
662
|
+
node['userid'].should_not be_nil
|
663
|
+
node['result'].should == 'Success'
|
664
|
+
node['username'].should == name
|
669
665
|
end
|
670
666
|
|
671
667
|
end
|
@@ -692,7 +688,7 @@ shared_examples 'live gateway' do
|
|
692
688
|
end
|
693
689
|
|
694
690
|
it 'should return the expected response', skip: 'warning: Validation error for \'realname\': cannot be set by this module' do
|
695
|
-
|
691
|
+
expect(@gateway.options(realname: 'Bar Baz').to_s).to be_equivalent_to('<api options="success" />')
|
696
692
|
end
|
697
693
|
|
698
694
|
end
|
@@ -732,7 +728,7 @@ shared_examples 'live gateway' do
|
|
732
728
|
token = @gateway.send(:get_userrights_token, 'nonadmin')
|
733
729
|
result = @gateway.send(:userrights, 'nonadmin', token, 'newgroup', 'oldgroup', 'because I can')
|
734
730
|
|
735
|
-
|
731
|
+
expect(@result.to_s).to be_equivalent_to(<<-EOT)
|
736
732
|
<api>
|
737
733
|
<userrights user="nonadmin">
|
738
734
|
<removed>
|
@@ -1,107 +1,109 @@
|
|
1
|
-
|
2
|
-
# encoding: utf-8
|
1
|
+
describe MediaWiki::Utils do
|
3
2
|
|
4
|
-
|
3
|
+
describe '::get_path_to_subpage' do
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
describe '.get_path_to_subpage' do
|
9
|
-
it "should return the everything before the subpage if there are subpages" do
|
5
|
+
it 'should return the everything before the subpage if there are subpages' do
|
10
6
|
MediaWiki.get_path_to_subpage('namespace:base/base/subpage').should == 'namespace:base/base'
|
11
7
|
end
|
12
8
|
|
13
|
-
it
|
9
|
+
it 'should return nil if there is no subpage' do
|
14
10
|
MediaWiki.get_path_to_subpage('namespace:subpage').should be_nil
|
15
11
|
end
|
16
|
-
|
17
|
-
it
|
12
|
+
|
13
|
+
it 'should pass through nil' do
|
18
14
|
MediaWiki.get_path_to_subpage(nil).should be_nil
|
19
|
-
end
|
15
|
+
end
|
16
|
+
|
20
17
|
end
|
21
18
|
|
22
|
-
describe '
|
23
|
-
|
19
|
+
describe '::get_subpage' do
|
20
|
+
|
21
|
+
it 'should return subpage name if there are subpages' do
|
24
22
|
MediaWiki.get_subpage('namespace:base/base/subpage').should == 'subpage'
|
25
23
|
end
|
26
24
|
|
27
|
-
it
|
25
|
+
it 'should return entire name if there are no subpages' do
|
28
26
|
MediaWiki.get_subpage('namespace:subpage').should == 'namespace:subpage'
|
29
27
|
end
|
30
|
-
|
31
|
-
it
|
28
|
+
|
29
|
+
it 'should pass through nil' do
|
32
30
|
MediaWiki.get_subpage(nil).should be_nil
|
33
31
|
end
|
32
|
+
|
34
33
|
end
|
35
34
|
|
36
|
-
describe '
|
37
|
-
|
35
|
+
describe '::get_base_name' do
|
36
|
+
|
37
|
+
it 'should return page\'s base name if there are subpages' do
|
38
38
|
MediaWiki.get_base_name('namespace:root/path/subpage').should == 'namespace:root'
|
39
39
|
end
|
40
40
|
|
41
|
-
it
|
41
|
+
it 'should return entire name if there are no subpages' do
|
42
42
|
MediaWiki.get_base_name('namespace:root').should == 'namespace:root'
|
43
43
|
end
|
44
|
-
|
45
|
-
it
|
44
|
+
|
45
|
+
it 'should pass through nil' do
|
46
46
|
MediaWiki.get_base_name(nil).should be_nil
|
47
47
|
end
|
48
|
+
|
48
49
|
end
|
49
50
|
|
50
|
-
describe '
|
51
|
+
describe '::wiki_to_uri' do
|
51
52
|
|
52
|
-
it
|
53
|
+
it 'should underscore spaces' do
|
53
54
|
MediaWiki.wiki_to_uri('getting there').should == 'getting_there'
|
54
55
|
end
|
55
56
|
|
56
|
-
it
|
57
|
+
it 'should escape ampersands' do
|
57
58
|
MediaWiki.wiki_to_uri('getting there & away').should == 'getting_there_%26_away'
|
58
59
|
end
|
59
60
|
|
60
|
-
it
|
61
|
-
MediaWiki.wiki_to_uri('Phở').should == 'Ph%E1%BB%9F'
|
61
|
+
it 'should escape UTF-8' do
|
62
|
+
MediaWiki.wiki_to_uri('Phở').should == 'Ph%E1%BB%9F'
|
62
63
|
end
|
63
64
|
|
64
|
-
it
|
65
|
+
it 'should escape each path component but leave slashes and colons untouched' do
|
65
66
|
MediaWiki.wiki_to_uri('Zoo:Phở/B&r/B z').should == 'Zoo:Ph%E1%BB%9F/B%26r/B_z'
|
66
67
|
end
|
67
68
|
|
68
|
-
it
|
69
|
+
it 'should preserve any URL-encoded characters' do
|
69
70
|
MediaWiki.wiki_to_uri('Zoo:Ph%E1%BB%9F/B%26r/B_z').should == 'Zoo:Ph%E1%BB%9F/B%26r/B_z'
|
70
71
|
end
|
71
72
|
|
72
|
-
it
|
73
|
+
it 'should pass through nil' do
|
73
74
|
MediaWiki.wiki_to_uri(nil).should be_nil
|
74
75
|
end
|
75
|
-
|
76
|
+
|
76
77
|
end
|
77
78
|
|
78
|
-
describe '
|
79
|
+
describe '::uri_to_wiki' do
|
79
80
|
|
80
|
-
it
|
81
|
+
it 'should replace underscores with spaces' do
|
81
82
|
MediaWiki.uri_to_wiki('getting_there').should == 'Getting there'
|
82
83
|
end
|
83
84
|
|
84
|
-
it
|
85
|
+
it 'should unescape ampersands' do
|
85
86
|
MediaWiki.uri_to_wiki('getting_there_%26_away').should == 'Getting there & away'
|
86
87
|
end
|
87
88
|
|
88
|
-
it
|
89
|
+
it 'should decode escaped UTF-8' do
|
89
90
|
MediaWiki.uri_to_wiki('Ph%E1%BB%9F').should == 'Phở'
|
90
91
|
end
|
91
92
|
|
92
|
-
it
|
93
|
+
it 'should strip out illegal characters' do
|
93
94
|
MediaWiki.uri_to_wiki('A#B<C>D[E]F|G{H}I').should == 'ABCDEFGHI'
|
94
95
|
end
|
95
96
|
|
96
|
-
it
|
97
|
+
it 'should capitalize the first character, even if UTF-8', skip: described_class::NO_UNICODE_SUPPORT do
|
97
98
|
MediaWiki.uri_to_wiki('óboy').should == 'Óboy'
|
98
99
|
MediaWiki.uri_to_wiki('%C3%B3boy').should == 'Óboy'
|
99
100
|
MediaWiki.uri_to_wiki('%E1%BB%9Fboy').should == 'Ởboy'
|
100
101
|
end
|
101
|
-
|
102
|
-
it
|
102
|
+
|
103
|
+
it 'should pass through nil' do
|
103
104
|
MediaWiki.uri_to_wiki(nil).should be_nil
|
104
105
|
end
|
105
|
-
|
106
|
+
|
106
107
|
end
|
108
|
+
|
107
109
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,32 +1,33 @@
|
|
1
|
-
begin
|
2
|
-
require 'simplecov'
|
3
|
-
SimpleCov.start
|
4
|
-
rescue LoadError
|
5
|
-
warn 'SimpleCov not available. Install it with: gem install simplecov'
|
6
|
-
end
|
7
|
-
|
8
1
|
require 'media_wiki'
|
9
2
|
|
3
|
+
require 'nokogiri'
|
4
|
+
require 'equivalent-xml/rspec_matchers'
|
5
|
+
|
10
6
|
RSpec.configure { |config|
|
11
7
|
%w[expect mock].each { |what|
|
12
8
|
config.send("#{what}_with", :rspec) { |c| c.syntax = [:should, :expect] }
|
13
9
|
}
|
14
10
|
|
11
|
+
config.include(Module.new {
|
12
|
+
def data(file)
|
13
|
+
File.join(File.dirname(__FILE__), 'data', file)
|
14
|
+
end
|
15
|
+
})
|
16
|
+
|
17
|
+
config.alias_example_group_to :describe_fake, begin
|
18
|
+
require 'media_wiki/fake_wiki'
|
19
|
+
|
20
|
+
{ fake: true }.tap { |filter|
|
21
|
+
MediaWiki::FakeWiki::RSpecAdapter.enhance(config, filter) }
|
22
|
+
end
|
23
|
+
|
15
24
|
config.alias_example_group_to :describe_live, begin
|
16
25
|
require 'media_wiki/test_wiki/rspec_adapter'
|
17
26
|
rescue LoadError
|
18
27
|
{ skip: 'MediaWiki::TestWiki not available'.tap { |msg|
|
19
|
-
warn "#{msg}. Install
|
28
|
+
warn "#{msg}. Install the `mediawiki-testwiki' gem." } }
|
20
29
|
else
|
21
30
|
{ live: true }.tap { |filter|
|
22
31
|
MediaWiki::TestWiki::RSpecAdapter.enhance(config, filter) }
|
23
32
|
end
|
24
33
|
}
|
25
|
-
|
26
|
-
# :nodoc: Rails 2.3.x: Hash#to_xml is defined in active_support
|
27
|
-
# :nodoc: Rails 3: #to_xml is defined in ActiveModel::Serializers::Xml
|
28
|
-
require 'active_support'
|
29
|
-
unless Hash.method_defined? :to_xml
|
30
|
-
require 'active_model'
|
31
|
-
Hash.send(:include, ActiveModel::Serializers::Xml)
|
32
|
-
end
|
metadata
CHANGED
@@ -1,45 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mediawiki-gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jani Patokallio
|
8
|
+
- Jens Wille
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: rest-client
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 1.3.0
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 1.3.0
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: activesupport
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
18
|
+
- - "~>"
|
32
19
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
20
|
+
version: '1.7'
|
34
21
|
type: :runtime
|
35
22
|
prerelease: false
|
36
23
|
version_requirements: !ruby/object:Gem::Requirement
|
37
24
|
requirements:
|
38
|
-
- - "
|
25
|
+
- - "~>"
|
39
26
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
27
|
+
version: '1.7'
|
41
28
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
29
|
+
name: equivalent-xml
|
43
30
|
requirement: !ruby/object:Gem::Requirement
|
44
31
|
requirements:
|
45
32
|
- - ">="
|
@@ -53,7 +40,7 @@ dependencies:
|
|
53
40
|
- !ruby/object:Gem::Version
|
54
41
|
version: '0'
|
55
42
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
43
|
+
name: nokogiri
|
57
44
|
requirement: !ruby/object:Gem::Requirement
|
58
45
|
requirements:
|
59
46
|
- - ">="
|
@@ -81,21 +68,7 @@ dependencies:
|
|
81
68
|
- !ruby/object:Gem::Version
|
82
69
|
version: '0'
|
83
70
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: simplecov
|
71
|
+
name: sinatra
|
99
72
|
requirement: !ruby/object:Gem::Requirement
|
100
73
|
requirements:
|
101
74
|
- - ">="
|
@@ -109,77 +82,27 @@ dependencies:
|
|
109
82
|
- !ruby/object:Gem::Version
|
110
83
|
version: '0'
|
111
84
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
85
|
+
name: hen
|
113
86
|
requirement: !ruby/object:Gem::Requirement
|
114
87
|
requirements:
|
115
88
|
- - "~>"
|
116
89
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '1.3'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rspec-core
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: rspec-expectations
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
90
|
+
version: '0.7'
|
143
91
|
- - ">="
|
144
92
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
93
|
+
version: 0.7.1
|
146
94
|
type: :development
|
147
95
|
prerelease: false
|
148
96
|
version_requirements: !ruby/object:Gem::Requirement
|
149
97
|
requirements:
|
150
|
-
- - "
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: rspec-mocks
|
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
|
-
- - ">="
|
98
|
+
- - "~>"
|
165
99
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
167
|
-
- !ruby/object:Gem::Dependency
|
168
|
-
name: debugger
|
169
|
-
requirement: !ruby/object:Gem::Requirement
|
170
|
-
requirements:
|
100
|
+
version: '0.7'
|
171
101
|
- - ">="
|
172
102
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
174
|
-
type: :development
|
175
|
-
prerelease: false
|
176
|
-
version_requirements: !ruby/object:Gem::Requirement
|
177
|
-
requirements:
|
178
|
-
- - ">="
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
103
|
+
version: 0.7.1
|
181
104
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
105
|
+
name: rake
|
183
106
|
requirement: !ruby/object:Gem::Requirement
|
184
107
|
requirements:
|
185
108
|
- - ">="
|
@@ -193,7 +116,7 @@ dependencies:
|
|
193
116
|
- !ruby/object:Gem::Version
|
194
117
|
version: '0'
|
195
118
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
119
|
+
name: rspec
|
197
120
|
requirement: !ruby/object:Gem::Requirement
|
198
121
|
requirements:
|
199
122
|
- - ">="
|
@@ -206,70 +129,89 @@ dependencies:
|
|
206
129
|
- - ">="
|
207
130
|
- !ruby/object:Gem::Version
|
208
131
|
version: '0'
|
209
|
-
description:
|
210
|
-
email:
|
211
|
-
|
132
|
+
description: A Ruby framework for MediaWiki API manipulation.
|
133
|
+
email:
|
134
|
+
- jpatokal@iki.fi
|
135
|
+
- jens.wille@gmail.com
|
136
|
+
executables:
|
137
|
+
- mediawiki-gateway
|
212
138
|
extensions: []
|
213
139
|
extra_rdoc_files:
|
214
|
-
-
|
140
|
+
- COPYING
|
141
|
+
- ChangeLog
|
215
142
|
- README.md
|
216
143
|
files:
|
217
|
-
-
|
218
|
-
-
|
219
|
-
- Gemfile
|
220
|
-
- Gemfile.lock
|
221
|
-
- LICENSE
|
144
|
+
- COPYING
|
145
|
+
- ChangeLog
|
222
146
|
- README.md
|
223
147
|
- Rakefile
|
224
|
-
-
|
148
|
+
- bin/mediawiki-gateway
|
225
149
|
- lib/media_wiki.rb
|
226
|
-
- lib/media_wiki/config.rb
|
227
150
|
- lib/media_wiki/exception.rb
|
151
|
+
- lib/media_wiki/fake_wiki.rb
|
228
152
|
- lib/media_wiki/gateway.rb
|
153
|
+
- lib/media_wiki/gateway/files.rb
|
154
|
+
- lib/media_wiki/gateway/pages.rb
|
155
|
+
- lib/media_wiki/gateway/query.rb
|
156
|
+
- lib/media_wiki/gateway/site.rb
|
157
|
+
- lib/media_wiki/gateway/users.rb
|
229
158
|
- lib/media_wiki/utils.rb
|
230
|
-
-
|
231
|
-
-
|
232
|
-
-
|
233
|
-
-
|
234
|
-
-
|
235
|
-
-
|
236
|
-
-
|
237
|
-
-
|
238
|
-
-
|
239
|
-
-
|
240
|
-
-
|
241
|
-
- samples/semantic_query.rb
|
242
|
-
- samples/upload_commons.rb
|
243
|
-
- samples/upload_file.rb
|
244
|
-
- spec/fake_media_wiki/api_pages.rb
|
245
|
-
- spec/fake_media_wiki/app.rb
|
246
|
-
- spec/fake_media_wiki/query_handling.rb
|
247
|
-
- spec/gateway_spec.rb
|
248
|
-
- spec/import-test-data.xml
|
249
|
-
- spec/live_gateway_spec.rb
|
159
|
+
- lib/media_wiki/version.rb
|
160
|
+
- lib/mediawiki-gateway.rb
|
161
|
+
- spec/data/import.xml
|
162
|
+
- spec/media_wiki/gateway/files_spec.rb
|
163
|
+
- spec/media_wiki/gateway/pages_spec.rb
|
164
|
+
- spec/media_wiki/gateway/query_spec.rb
|
165
|
+
- spec/media_wiki/gateway/site_spec.rb
|
166
|
+
- spec/media_wiki/gateway/users_spec.rb
|
167
|
+
- spec/media_wiki/gateway_spec.rb
|
168
|
+
- spec/media_wiki/live_gateway_spec.rb
|
169
|
+
- spec/media_wiki/utils_spec.rb
|
250
170
|
- spec/spec_helper.rb
|
251
|
-
- spec/utils_spec.rb
|
252
171
|
homepage: http://github.com/jpatokal/mediawiki-gateway
|
253
|
-
licenses:
|
172
|
+
licenses:
|
173
|
+
- MIT
|
254
174
|
metadata: {}
|
255
|
-
post_install_message:
|
256
|
-
|
175
|
+
post_install_message: |2+
|
176
|
+
|
177
|
+
mediawiki-gateway-1.0.0 [unreleased]:
|
178
|
+
|
179
|
+
* <b>Required Ruby version is now 1.9.3 or higher.</b>
|
180
|
+
* For better Unicode support, install the +unicode+ or +activesupport+ gem.
|
181
|
+
* API methods are grouped into submodules of MediaWiki::Gateway.
|
182
|
+
* MediaWiki::Gateway#send_request allows generic API requests.
|
183
|
+
* MediaWiki::Gateway::new learned +user_agent+ option.
|
184
|
+
* MediaWiki::Gateway::Query#custom_query is now public.
|
185
|
+
* MediaWiki::Gateway#wiki_url attribute is now exposed.
|
186
|
+
* Added +mediawiki-gateway+ command-line client.
|
187
|
+
* Changed or removed some of the dependencies.
|
188
|
+
* Housekeeping and internal refactoring.
|
189
|
+
|
190
|
+
rdoc_options:
|
191
|
+
- "--title"
|
192
|
+
- mediawiki-gateway Application documentation (v1.0.0.rc1)
|
193
|
+
- "--charset"
|
194
|
+
- UTF-8
|
195
|
+
- "--line-numbers"
|
196
|
+
- "--all"
|
197
|
+
- "--main"
|
198
|
+
- README.md
|
257
199
|
require_paths:
|
258
200
|
- lib
|
259
201
|
required_ruby_version: !ruby/object:Gem::Requirement
|
260
202
|
requirements:
|
261
203
|
- - ">="
|
262
204
|
- !ruby/object:Gem::Version
|
263
|
-
version:
|
205
|
+
version: 1.9.3
|
264
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
207
|
requirements:
|
266
|
-
- - "
|
208
|
+
- - ">"
|
267
209
|
- !ruby/object:Gem::Version
|
268
|
-
version:
|
210
|
+
version: 1.3.1
|
269
211
|
requirements: []
|
270
212
|
rubyforge_project:
|
271
|
-
rubygems_version: 2.4.
|
213
|
+
rubygems_version: 2.4.2
|
272
214
|
signing_key:
|
273
215
|
specification_version: 4
|
274
|
-
summary: Connect to the
|
216
|
+
summary: Connect to the MediaWiki API.
|
275
217
|
test_files: []
|