Permalink
Browse files

init

  • Loading branch information...
0 parents commit f91e6a29cbe8d2e4eb4d687203f65efeffb03260 @vkill committed Nov 30, 2011
Showing with 130 additions and 0 deletions.
  1. +17 −0 .gitignore
  2. 0 CHANGELOG
  3. +4 −0 Gemfile
  4. +22 −0 Guardfile
  5. +43 −0 README.markdown
  6. +2 −0 Rakefile
  7. +5 −0 lib/youdao_fanyi.rb
  8. +4 −0 lib/youdao_fanyi/version.rb
  9. +7 −0 spec/spec_helper.rb
  10. +26 −0 youdao_fanyi.gemspec
@@ -0,0 +1,17 @@
+*.gem
+*.rbc
+.bundle
+.config
+.yardoc
+Gemfile.lock
+InstalledFiles
+_yardoc
+coverage
+doc/
+lib/bundler/man
+pkg
+rdoc
+spec/reports
+test/tmp
+test/version_tmp
+tmp
No changes.
@@ -0,0 +1,4 @@
+source 'http://rubygems.org'
+
+# Specify your gem's dependencies in youdao_fanyi.gemspec
+gemspec
@@ -0,0 +1,22 @@
+# A sample Guardfile
+# More info at https://github.com/guard/guard#readme
+
+guard 'rspec', :version => 2 do
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch('spec/spec_helper.rb') { "spec" }
+
+ # Rails example
+ watch(%r{^spec/.+_spec\.rb$})
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
+ watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
+ watch('spec/spec_helper.rb') { "spec" }
+ watch('config/routes.rb') { "spec/routing" }
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
+ # Capybara request specs
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
+end
+
@@ -0,0 +1,43 @@
+#YoudaoFanyi
+
+YoudaoFanyi is a http://fanyi.youdao.com api library for Ruby and Rails3.
+
+* https://github.com/vkill/youdao_fanyi
+
+##Supported versions
+
+* Ruby 1.8.7, 1.9.2, 1.9.3
+
+* Rails 3.0.x, 3.1
+
+
+##Installation
+
+In your app's `Gemfile`, add:
+
+ gem "youdao_fanyi", :group => [:development]
+
+Then run:
+
+ > bundle
+ > rails generate youdao_fanyi:install
+
+Configure your http://fanyi.youdao.com api keys, edit `config/initializers/youdao_fanyi.rb`
+
+
+##Uninstallation
+
+Run:
+
+ > rails destroy youdao_fanyi:install
+
+
+##Usage Example
+
+When your want translate models attributes, please use [i18n_attributes][https://github.com/vkill/i18n_attributes], it auto use this gem.
+
+
+##Copyright
+
+Copyright (c) 2011 vkill.net .
+
@@ -0,0 +1,2 @@
+#!/usr/bin/env rake
+require "bundler/gem_tasks"
@@ -0,0 +1,5 @@
+require "youdao_fanyi/version"
+
+module YoudaoFanyi
+end
+
@@ -0,0 +1,4 @@
+module YoudaoFanyi
+ VERSION = "0.1.0"
+end
+
@@ -0,0 +1,7 @@
+#encoding: utf-8
+require "rubygems"
+require "bundler/setup"
+require "pry"
+
+require "youdao_fanyi"
+
@@ -0,0 +1,26 @@
+# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/youdao_fanyi/version', __FILE__)
+
+Gem::Specification.new do |gem|
+ gem.authors = ["vkill"]
+ gem.email = ["vkill.net@gmail.com"]
+ gem.description = "A http://fanyi.youdao.com api library for Ruby."
+ gem.summary = "A http://fanyi.youdao.com api library for Ruby."
+ gem.homepage = "https://github.com/vkill/youdao_fanyi"
+
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ gem.files = `git ls-files`.split("\n")
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ gem.name = "youdao_fanyi"
+ gem.require_paths = ["lib"]
+ gem.version = YoudaoFanyi::VERSION
+
+ gem.add_development_dependency 'bundler'
+ gem.add_development_dependency "rake"
+ gem.add_development_dependency "rspec"
+ gem.add_development_dependency "guard-rspec"
+ gem.add_development_dependency "pry"
+
+ gem.add_dependency "httparty", "~> 0.8.1"
+end
+

0 comments on commit f91e6a2

Please sign in to comment.