commons_upload 0.0.1 → 0.0.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: cae81aeb8399d8af09c70adf53565264b490b3e3
4
- data.tar.gz: 83fdf34f730820611a852d20d85641a26a57d67a
3
+ metadata.gz: 49f54cf8e7563157f096ce7534eae3f9ff9cd6ef
4
+ data.tar.gz: 3ddf3d8c44c68e7ec03d2699878f5d9b6a274470
5
5
  SHA512:
6
- metadata.gz: 17d336bad5f662f258f7cc63877371871f7bbb1400f8b974b78af85b5f26503d0184013626b3cffd61a181ea793627f28262b22856f3739889dc9fe9052b1158
7
- data.tar.gz: 05e7621ef1dac9950bf76c9bb905359479437fc6ee351f9db34593fd1bf6c947d830c19740eb0b507f50253ba8181888c23d7a0080bd27b20e050ccc9a7bb9a5
6
+ metadata.gz: 5e83ca21a0fd9979a619c2c29446de3d1149304489f67e6fe0ef7ae994ac26a74366c3e5c1f08faba7e71eb74892e0b691e6a8c2c1fd674f8bc5efc0f752c858
7
+ data.tar.gz: a337d2448e8975d0dbc45258a5a5a2598d28ad10c9a548dc37ad01b800126e1e9cf621fcec3e942c6cd8808ca2534ad538fbe9a991f403d72514da31e0a7aa52
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ # The default is 15, which is too tight
4
+ Metrics/AbcSize:
5
+ Max: 30
6
+
7
+ # The default is 10, which is too tight
8
+ Metrics/MethodLength:
9
+ Max: 20
10
+
11
+ # The default is 80, and MediaWiki standard is 100
12
+ Metrics/LineLength:
13
+ Max: 100
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,19 @@
1
+ # This configuration was generated by `rubocop --auto-gen-config`
2
+ # on 2015-02-19 13:40:14 +0200 using RuboCop version 0.29.1.
3
+ # The point is for the user to remove these configuration records
4
+ # one by one as the offenses are removed from the code base.
5
+ # Note that changes in the inspected code, or installation of new
6
+ # versions of RuboCop, may require this file to be generated again.
7
+
8
+ # Offense count: 2
9
+ Style/Documentation:
10
+ Enabled: false
11
+
12
+ # Offense count: 2
13
+ Style/RegexpLiteral:
14
+ MaxSlashes: 0
15
+
16
+ # Offense count: 1
17
+ # Cop supports --auto-correct.
18
+ Style/SpecialGlobalVars:
19
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.0
4
+ install: bundle install
5
+ script:
6
+ - bundle exec rubocop
data/README.md CHANGED
@@ -22,7 +22,8 @@ Or install it yourself as:
22
22
 
23
23
  ## Usage
24
24
 
25
- TODO: Write usage instructions here
25
+ To run the upload, do
26
+ ```bundle exec upload```
26
27
 
27
28
  ## Contributing
28
29
 
data/Rakefile CHANGED
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
data/bin/upload ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require 'commons_upload'
3
+
4
+ CommonsUpload.images
@@ -4,23 +4,25 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'commons_upload/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "commons_upload"
7
+ spec.name = 'commons_upload'
8
8
  spec.version = CommonsUpload::VERSION
9
9
  spec.authors = ['Vikas Yaligar', 'Željko Filipin', 'Amir E. Aharoni']
10
10
  spec.email = ['amir.aharoni@mail.huji.ac.il']
11
- spec.description = %q{Upload images to Wikimedia Commons. This is intended for uploading auto-translated screenshots for MediaWiki documentation.}
12
- spec.summary = %q{Upload images to Wikimedia Commons.}
13
- spec.homepage = "https://github.com/amire80/commons_upload"
14
- spec.license = "MIT"
11
+ spec.description = 'Upload images to Wikimedia Commons. '\
12
+ 'This is intended for uploading auto-translated screenshots for MediaWiki documentation.'
13
+ spec.summary = 'Upload images to Wikimedia Commons.'
14
+ spec.homepage = 'https://github.com/amire80/commons_upload'
15
+ spec.license = 'MIT'
15
16
 
16
17
  spec.files = `git ls-files`.split($/)
17
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
+ spec.require_paths = ['lib']
20
21
  spec.required_ruby_version = '~> 2.0'
21
22
 
22
23
  spec.add_runtime_dependency 'mediawiki_api', '~> 0.3.0'
23
24
 
24
- spec.add_development_dependency "bundler", "~> 1.3"
25
- spec.add_development_dependency "rake"
25
+ spec.add_development_dependency 'bundler', '~> 1.3'
26
+ spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'rubocop'
26
28
  end
@@ -1,7 +1,6 @@
1
- require "commons_upload/version"
1
+ require 'commons_upload/version'
2
2
 
3
3
  module CommonsUpload
4
-
5
4
  def self.license(language_code, file_name)
6
5
  require 'date'
7
6
  date = Date.today.to_s
@@ -41,5 +40,4 @@ module CommonsUpload
41
40
  image file_path, client
42
41
  end
43
42
  end
44
-
45
43
  end
@@ -1,3 +1,3 @@
1
1
  module CommonsUpload
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
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: 0.0.1
4
+ version: 0.0.2
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: 2015-02-19 00:00:00.000000000 Z
13
+ date: 2015-02-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mediawiki_api
@@ -54,19 +54,38 @@ dependencies:
54
54
  - - '>='
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: rubocop
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - '>='
62
+ - !ruby/object:Gem::Version
63
+ version: '0'
64
+ type: :development
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
57
71
  description: Upload images to Wikimedia Commons. This is intended for uploading auto-translated
58
72
  screenshots for MediaWiki documentation.
59
73
  email:
60
74
  - amir.aharoni@mail.huji.ac.il
61
- executables: []
75
+ executables:
76
+ - upload
62
77
  extensions: []
63
78
  extra_rdoc_files: []
64
79
  files:
65
80
  - .gitignore
81
+ - .rubocop.yml
82
+ - .rubocop_todo.yml
83
+ - .travis.yml
66
84
  - Gemfile
67
85
  - LICENSE.txt
68
86
  - README.md
69
87
  - Rakefile
88
+ - bin/upload
70
89
  - commons_upload.gemspec
71
90
  - lib/commons_upload.rb
72
91
  - lib/commons_upload/version.rb