Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix plugin to work from gem #68

Open
wants to merge 10 commits into
base: rails-2.3.x
Choose a base branch
from
Open
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "http://www.rubygems.org"

gemspec
70 changes: 5 additions & 65 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,70 +1,10 @@
#--
# Copyright (c) 2010 Michael Berkovich, Geni Inc
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++

require(File.join(File.dirname(__FILE__), 'config', 'boot'))

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails'

begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "tr8n"
s.summary = %Q{Crowd-sourced translation for Rails.}
s.email = "michael@geni.com"
s.homepage = "http://github.com/berk/tr8n"
s.description = "Crowd-sourced translation and localization for Rails"
s.authors = ["Michael Berkovich"]
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler"
end
require 'bundler/gem_tasks'

Rake::TestTask.new do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end

Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'tr8n'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end

begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|
t.libs << 'test'
t.test_files = FileList['test/**/*_test.rb']
t.verbose = true
end
rescue LoadError
t.libs = ['lib', 'test']
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end

task :default => :test
task :default => :test
4 changes: 2 additions & 2 deletions app/helpers/tr8n/admin/base_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ def language_metric_chart(field = :user_count, limit = 20)
counts = counts.collect{|c| c/(max_count * 1.0) * 100}

chart_params = []
chart_params << "chxl=1:|#{labels.join('|')}|"
chart_params << "chxl=" + CGI.escape("1:|#{labels.join('|')}|")
chart_params << "chxp=#{label_positions.join(',')}"
chart_params << "chxr=0,0,#{limit}|0,0,#{max_count}"
chart_params << "chxr=" + CGI.escape("0,0,#{limit}|0,0,#{max_count}")
chart_params << "chxt=x,y"
chart_params << "chs=1000x300"
chart_params << "cht=bhs"
Expand Down
53 changes: 17 additions & 36 deletions tr8n.gemspec
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |s|
s.name = %q{tr8n}
s.version = "0.1.0"
Gem::Specification.new do |gem|
gem.name = "tr8n"
gem.version = IO.read('VERSION')
gem.authors = ["Michael Berkovich"]
gem.email = ["michael@geni.com"]
gem.description = %q{Crowd-sourced translation and localization for Rails}
gem.summary = gem.description
gem.homepage = "https://github.com/berk/tr8n"
gem.license = 'MIT'

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Michael Berkovich"]
s.date = %q{2010-05-05}
s.description = %q{Crowd-sourced translation and localization for Rails}
s.email = %q{michael@geni.com}
s.extra_rdoc_files = [
"README"
]
s.files = [
".project",
"README",
"Rakefile",
"VERSION"
]
s.homepage = %q{http://github.com/berk/tr8n}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.summary = %q{Crowd-sourced translation for Rails.}
gem.add_dependency 'rails', '~> 2.3.0'
gem.add_dependency 'will_filter', '~> 2.3.0'

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
else
end
else
end
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
end