commons_upload 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/commons_upload.rb +3 -2
- data/lib/commons_upload/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcf446d0a37edea9a1620bcd2acb63a10a579df016a254d50519e3180ba63c7a
|
4
|
+
data.tar.gz: 055d0085c5f40933571e7c5974dd0dbeb293e1544d5996b20006efa5998e7dc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1cb19d0047716111e181519ccb403fa10a2cca853fc6e1721e2c6526b8b47001abb256e4593ea75991518f1167e06baee77925d807fad4b40e165c22411f354
|
7
|
+
data.tar.gz: da80294e362097fda270069a147b04e8b56188505334b8112431a852be460b3d1127e8d993f9ad731a8780fb598428139e50458aef845256dc32ce05af95cc2e
|
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# commons_upload
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/amire80/commons_upload.svg?branch=master)](https://travis-ci.org/amire80/commons_upload)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/commons_upload.svg)](https://badge.fury.io/rb/commons_upload)
|
5
|
+
|
3
6
|
This is a gem for uploading images to Wikimedia Commons.
|
4
7
|
It uses the MediaWiki API and the mediawiki-api Ruby gem.
|
5
8
|
It is currently intended for uploading auto-translated
|
@@ -45,6 +48,3 @@ To run the upload, do
|
|
45
48
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
46
49
|
4. Push to the branch (`git push origin my-new-feature`)
|
47
50
|
5. Create new Pull Request
|
48
|
-
|
49
|
-
[![Build Status](https://travis-ci.org/amire80/commons_upload.svg?branch=master)](https://travis-ci.org/amire80/commons_upload)
|
50
|
-
[![Gem Version](https://badge.fury.io/rb/commons_upload.svg)](https://badge.fury.io/rb/commons_upload)
|
data/lib/commons_upload.rb
CHANGED
@@ -45,8 +45,9 @@ LICENSE
|
|
45
45
|
)
|
46
46
|
return 'OK'
|
47
47
|
rescue MediawikiApi::ApiError => mwerr
|
48
|
-
|
49
|
-
return '
|
48
|
+
return 'exists: fileexists-no-change' if mwerr.code == 'fileexists-no-change'
|
49
|
+
return 'exists: fileexists-shared-forbidden' if mwerr.code == 'fileexists-shared-forbidden'
|
50
|
+
return "error: #{mwerr}"
|
50
51
|
ensure
|
51
52
|
edit(file_name, client) # update page content
|
52
53
|
sleep 5 # Restriction in bot speed: https://commons.wikimedia.org/wiki/Commons:Bots#Bot_speed
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commons_upload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vikas Yaligar
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-03-
|
13
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mediawiki_api
|