Skip to content

Commit

Permalink
GoogleTranslateDiff
Browse files Browse the repository at this point in the history
  • Loading branch information
gzigzigzeo committed Mar 1, 2017
1 parent 111dfc4 commit 60ef7b5
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 27 deletions.
1 change: 0 additions & 1 deletion Gemfile
@@ -1,4 +1,3 @@
source "https://rubygems.org"

# Specify your gem's dependencies in google_translate_tricks.gemspec
gemspec
2 changes: 1 addition & 1 deletion bin/console
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "google_translate_tricks"
require "google_translate_diff"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
Expand Down
@@ -1,22 +1,24 @@
# coding: utf-8
lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "google_translate_tricks/version"
require "google_translate_diff/version"

# rubocop:disable Metrics/BlockLength
Gem::Specification.new do |spec|
spec.name = "google_translate_tricks"
spec.version = GoogleTranslateTricks::VERSION
spec.name = "google_translate_diff"
spec.version = GoogleTranslateDiff::VERSION
spec.authors = ["Victor Sokolov"]
spec.email = ["gzigzigzeo@evilmartians.com"]

spec.summary = %(
Google Translate API wrapper translates only changed parts of big texts.
Google Translate API wrapper translates only changed parts between revisions of
big texts.
)
spec.description = %(
Google Translate API wrapper translates only changed parts of big texts.
Google Translate API wrapper translates only changed parts between revisions of
big texts.
)
spec.homepage = "https://github.com/gzigzigzeo/google_translate_tricks"
spec.homepage = "https://github.com/gzigzigzeo/google_translate_diff"

if spec.respond_to?(:metadata)
spec.metadata["allowed_push_host"] = "https://rubygems.org"
Expand Down
8 changes: 8 additions & 0 deletions lib/google_translate_diff.rb
@@ -0,0 +1,8 @@
require "ox"
require "punkt-segmenter"

require "google_translate_diff/version"
require "google_translate_diff/tokenizer"

module GoogleTranslateDiff
end
@@ -1,4 +1,4 @@
class GoogleTranslateTricks::Tokenizer < ::Ox::Sax
class GoogleTranslateDiff::Tokenizer < ::Ox::Sax
def initialize(source)
@pos = nil
@prev = 1
Expand Down
@@ -1,3 +1,3 @@
module GoogleTranslateTricks
module GoogleTranslateDiff
VERSION = "0.1.0".freeze
end
8 changes: 0 additions & 8 deletions lib/google_translate_tricks.rb

This file was deleted.

7 changes: 7 additions & 0 deletions spec/google_translate_diff_spec.rb
@@ -0,0 +1,7 @@
require "spec_helper"

RSpec.describe GoogleTranslateDiff do
it "has a version number" do
expect(GoogleTranslateDiff::VERSION).not_to be nil
end
end
7 changes: 0 additions & 7 deletions spec/google_translate_tricks_spec.rb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/spec_helper.rb
@@ -1,5 +1,5 @@
require "bundler/setup"
require "google_translate_tricks"
require "google_translate_diff"

RSpec.configure do |config|
# Enable flags like --only-failures and --next-failure
Expand Down
2 changes: 1 addition & 1 deletion spec/tokenizer_spec.rb
@@ -1,6 +1,6 @@
require "spec_helper"

RSpec.describe GoogleTranslateTricks::Tokenizer do
RSpec.describe GoogleTranslateDiff::Tokenizer do
subject do
described_class.new(source).tap do |h|
Ox.sax_parse(h, StringIO.new(source))
Expand Down

0 comments on commit 60ef7b5

Please sign in to comment.