Upload language screenshot files using commons_upload Ruby gem

Use the latest version of commons_upload. Delete no longer needed files
from previous Ruby implementation.

Bug: T143563
Change-Id: I7c0ca64aeea54501c51eb56a950143d5af251cf7
This commit is contained in:
Željko Filipin 2016-08-23 17:06:02 +02:00 committed by Zfilipin
parent 6eded3baa0
commit 2fb5c18ced
7 changed files with 4 additions and 53 deletions

View file

@ -1,7 +1,6 @@
source 'https://rubygems.org'
gem 'commons_upload', '~> 0.0.4'
gem 'commons_upload', '~> 1.0'
gem 'mediawiki_selenium', '~> 1.7', '>= 1.7.2'
gem 'rake', '~> 10.4', '>= 10.4.2'
gem 'rubocop', '~> 0.32.1', require: false
gem 'screenshot', '~> 0.0.7'

View file

@ -7,9 +7,8 @@ GEM
builder (3.2.2)
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
chunky_png (1.3.6)
commons_upload (0.0.4)
mediawiki_api (~> 0.4, >= 0.4.1)
commons_upload (1.0.0)
mediawiki_api (~> 0.7.0)
cucumber (1.3.20)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
@ -85,8 +84,6 @@ GEM
ruby-progressbar (~> 1.4)
ruby-progressbar (1.8.1)
rubyzip (1.2.0)
screenshot (0.0.7)
chunky_png (~> 1.3.3)
selenium-webdriver (2.53.4)
childprocess (~> 0.5)
rubyzip (~> 1.0)
@ -105,11 +102,10 @@ PLATFORMS
ruby
DEPENDENCIES
commons_upload (~> 0.0.4)
commons_upload (~> 1.0)
mediawiki_selenium (~> 1.7, >= 1.7.2)
rake (~> 10.4, >= 10.4.2)
rubocop (~> 0.32.1)
screenshot (~> 0.0.7)
BUNDLED WITH
1.12.5

View file

@ -2,8 +2,6 @@ require 'mediawiki_selenium/cucumber'
require 'mediawiki_selenium/pages'
require 'mediawiki_selenium/step_definitions'
require 'screenshot'
require_relative 'hooks'
require_relative 'visual_editor_helper'

View file

@ -1,3 +0,0 @@
Before('@language_screenshot') do |scenario|
@scenario = scenario
end

View file

@ -1,19 +0,0 @@
#
# Shared helper for VE browser test step definitions
#
module VisualEditorHelper
def translate(string)
file = File.read i18n_file
json = JSON.parse(file)
json["visualeditor-languagescreenshot-#{string.downcase.gsub(' ', '-')}-text"] || ''
end
def i18n_file
language = lookup(:language_screenshot_code)
file_name = File.expand_path("../../i18n/#{language}.json", __dir__)
unless File.exist?(file_name)
file_name = File.expand_path('../../i18n/en.json', __dir__)
end
file_name
end
end

View file

@ -1,10 +0,0 @@
{
"@metadata": {
"authors": [
"Kumkumuk"
]
},
"visualeditor-languagescreenshot-hello-world-text": "Merhaba, Dınya",
"visualeditor-languagescreenshot-world-text": "Dınya",
"visualeditor-languagescreenshot-category-earth-text": "Kategori:Erd"
}

View file

@ -1,10 +0,0 @@
{
"@metadata": {
"authors": [
"Muhammad Shuaib"
]
},
"visualeditor-languagescreenshot-hello-world-text": "اہل دنیا کو خوش آمدید!",
"visualeditor-languagescreenshot-world-text": "دنیا",
"visualeditor-languagescreenshot-category-earth-text": "زمرہ:زمین"
}