go_translate_yourself 0.0.1

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.
data/Gemfile ADDED
@@ -0,0 +1,24 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "rails", "3.0.0"
4
+ gem "mongo", "1.1"
5
+ gem "bson_ext", ">=1.0.5"
6
+
7
+ if RUBY_VERSION < '1.9'
8
+ gem "ruby-debug", ">= 0.10.3"
9
+ end
10
+
11
+ gem "diff-lcs", "1.1.2", require: nil
12
+ gem "rspec-rails", :git => "git://github.com/rspec/rspec-rails.git"
13
+ gem "rspec", :git => "git://github.com/rspec/rspec.git"
14
+ gem "rspec-core", :git => "git://github.com/rspec/rspec-core.git"
15
+ gem "rspec-expectations", :git => "git://github.com/rspec/rspec-expectations.git"
16
+ gem "rspec-mocks", :git => "git://github.com/rspec/rspec-mocks.git"
17
+
18
+ gem "steak", git: "git://github.com/cavalle/steak.git"
19
+ gem "capybara", "0.3.9", require: nil
20
+ gem "timecop", "0.3.5"
21
+ gem "mongrel", "1.2.0.pre2"
22
+ gem "cgi_multipart_eof_fix"
23
+ gem "fastthread"
24
+
data/Gemfile.lock ADDED
@@ -0,0 +1,159 @@
1
+ GIT
2
+ remote: git://github.com/cavalle/steak.git
3
+ revision: 86331782937ee379e14e02a0d313774a0391dab4
4
+ specs:
5
+ steak (1.0.0.beta.2)
6
+ rspec
7
+
8
+ GIT
9
+ remote: git://github.com/rspec/rspec-core.git
10
+ revision: 792707bd88723c4e120ed0326979b23371074179
11
+ specs:
12
+ rspec-core (2.0.0.rc)
13
+
14
+ GIT
15
+ remote: git://github.com/rspec/rspec-expectations.git
16
+ revision: 6967fd6393a4c9a3aafc25045f64a54d17545834
17
+ specs:
18
+ rspec-expectations (2.0.0.rc)
19
+ diff-lcs (>= 1.1.2)
20
+
21
+ GIT
22
+ remote: git://github.com/rspec/rspec-mocks.git
23
+ revision: 361f31542f8ef4aa1a0cb8102893627022fcc88b
24
+ specs:
25
+ rspec-mocks (2.0.0.rc)
26
+ rspec-core (= 2.0.0.rc)
27
+ rspec-expectations (= 2.0.0.rc)
28
+
29
+ GIT
30
+ remote: git://github.com/rspec/rspec-rails.git
31
+ revision: b45d0936d77f3e532a08fc1b49f072be05873f94
32
+ specs:
33
+ rspec-rails (2.0.0.rc)
34
+ rspec (= 2.0.0.rc)
35
+
36
+ GIT
37
+ remote: git://github.com/rspec/rspec.git
38
+ revision: bf20df3f6652f15f014c7d6d546edd9456749196
39
+ specs:
40
+ rspec (2.0.0.rc)
41
+ rspec-core (= 2.0.0.rc)
42
+ rspec-expectations (= 2.0.0.rc)
43
+ rspec-mocks (= 2.0.0.rc)
44
+
45
+ GEM
46
+ remote: http://rubygems.org/
47
+ specs:
48
+ abstract (1.0.0)
49
+ actionmailer (3.0.0)
50
+ actionpack (= 3.0.0)
51
+ mail (~> 2.2.5)
52
+ actionpack (3.0.0)
53
+ activemodel (= 3.0.0)
54
+ activesupport (= 3.0.0)
55
+ builder (~> 2.1.2)
56
+ erubis (~> 2.6.6)
57
+ i18n (~> 0.4.1)
58
+ rack (~> 1.2.1)
59
+ rack-mount (~> 0.6.12)
60
+ rack-test (~> 0.5.4)
61
+ tzinfo (~> 0.3.23)
62
+ activemodel (3.0.0)
63
+ activesupport (= 3.0.0)
64
+ builder (~> 2.1.2)
65
+ i18n (~> 0.4.1)
66
+ activerecord (3.0.0)
67
+ activemodel (= 3.0.0)
68
+ activesupport (= 3.0.0)
69
+ arel (~> 1.0.0)
70
+ tzinfo (~> 0.3.23)
71
+ activeresource (3.0.0)
72
+ activemodel (= 3.0.0)
73
+ activesupport (= 3.0.0)
74
+ activesupport (3.0.0)
75
+ arel (1.0.1)
76
+ activesupport (~> 3.0.0)
77
+ bson (1.1)
78
+ bson_ext (1.1)
79
+ builder (2.1.2)
80
+ capybara (0.3.9)
81
+ culerity (>= 0.2.4)
82
+ mime-types (>= 1.16)
83
+ nokogiri (>= 1.3.3)
84
+ rack (>= 1.0.0)
85
+ rack-test (>= 0.5.4)
86
+ selenium-webdriver (>= 0.0.3)
87
+ cgi_multipart_eof_fix (2.5.0)
88
+ culerity (0.2.12)
89
+ daemons (1.0.10)
90
+ diff-lcs (1.1.2)
91
+ erubis (2.6.6)
92
+ abstract (>= 1.0.0)
93
+ fastthread (1.0.7)
94
+ ffi (0.6.3)
95
+ rake (>= 0.8.7)
96
+ gem_plugin (0.2.3)
97
+ i18n (0.4.1)
98
+ json_pure (1.4.6)
99
+ mail (2.2.6.1)
100
+ activesupport (>= 2.3.6)
101
+ mime-types
102
+ treetop (>= 1.4.5)
103
+ mime-types (1.16)
104
+ mongo (1.1)
105
+ bson (>= 1.0.5)
106
+ mongrel (1.2.0.pre2)
107
+ daemons (~> 1.0.10)
108
+ gem_plugin (~> 0.2.3)
109
+ nokogiri (1.4.3.1)
110
+ polyglot (0.3.1)
111
+ rack (1.2.1)
112
+ rack-mount (0.6.13)
113
+ rack (>= 1.0.0)
114
+ rack-test (0.5.6)
115
+ rack (>= 1.0)
116
+ rails (3.0.0)
117
+ actionmailer (= 3.0.0)
118
+ actionpack (= 3.0.0)
119
+ activerecord (= 3.0.0)
120
+ activeresource (= 3.0.0)
121
+ activesupport (= 3.0.0)
122
+ bundler (~> 1.0.0)
123
+ railties (= 3.0.0)
124
+ railties (3.0.0)
125
+ actionpack (= 3.0.0)
126
+ activesupport (= 3.0.0)
127
+ rake (>= 0.8.4)
128
+ thor (~> 0.14.0)
129
+ rake (0.8.7)
130
+ rubyzip (0.9.4)
131
+ selenium-webdriver (0.0.28)
132
+ ffi (>= 0.6.1)
133
+ json_pure
134
+ rubyzip
135
+ thor (0.14.2)
136
+ timecop (0.3.5)
137
+ treetop (1.4.8)
138
+ polyglot (>= 0.3.1)
139
+ tzinfo (0.3.23)
140
+
141
+ PLATFORMS
142
+ ruby
143
+
144
+ DEPENDENCIES
145
+ bson_ext (>= 1.0.5)
146
+ capybara (= 0.3.9)
147
+ cgi_multipart_eof_fix
148
+ diff-lcs (= 1.1.2)
149
+ fastthread
150
+ mongo (= 1.1)
151
+ mongrel (= 1.2.0.pre2)
152
+ rails (= 3.0.0)
153
+ rspec!
154
+ rspec-core!
155
+ rspec-expectations!
156
+ rspec-mocks!
157
+ rspec-rails!
158
+ steak!
159
+ timecop (= 0.3.5)
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2010 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,42 @@
1
+ = GoTranslateYourself
2
+
3
+ GoTranslateYouself is Rails engine, that allows your clients to do the dirty work of translating applications on their own. You don't have to do it yourself, let them have a piece of fun of their own!
4
+
5
+ This project is inspired by DHH's Tolk (http://github.com/dhh/told), however it has a bit differen UI, provides way to integrate with existing admin panel layout and is using key-value stores, with translation fallbacks.
6
+
7
+
8
+ == Installation
9
+ TODO: Write more info here.
10
+
11
+ == Usage
12
+
13
+ Create initializer in your Rails app, following this code:
14
+
15
+ conn = Mongo::Connection.new.db("go_translate_yourself_test").collection("translations")
16
+ GoTranslateYourself.current_store = GoTranslateYourself::MongoStore.new(conn)
17
+ GoTranslateYourself.locales = [:pl, :de]
18
+
19
+ I18n.backend = I18n::Backend::KeyValue.new GoTranslateYourself.current_store
20
+
21
+ GoTranslateYourself.auth_handler = proc {
22
+ authenticate_or_request_with_http_basic do |user_name, password|
23
+ user_name == 'some' && password == 'user'
24
+ end
25
+ }
26
+
27
+ GoTranslateYourself.layout_name = "dummy_admin"
28
+
29
+ Please note, that you can integrate auth_handler with your authentication solution (like Devise), or leave it blank for no authentication.
30
+
31
+ Visit http://localhost:3000/site_translations to see it working!
32
+
33
+ == Available stores
34
+
35
+ Currently only MongoDB is supported -- please feel free to add more stores (Riak would be nice!).
36
+
37
+ == Roadmap
38
+
39
+ * implement SQLStore for using SQL databases
40
+ * implement RiakStore for using Riak
41
+
42
+ This project rocks and uses MIT-LICENSE.
data/Rakefile ADDED
@@ -0,0 +1,35 @@
1
+ # encoding: UTF-8
2
+ require 'rake'
3
+ require 'rake/rdoctask'
4
+ require 'rake/gempackagetask'
5
+
6
+ require 'rspec/core'
7
+ require 'rspec/core/rake_task'
8
+
9
+ Rspec::Core::RakeTask.new(:spec)
10
+
11
+ task :default => :spec
12
+
13
+ Rake::RDocTask.new(:rdoc) do |rdoc|
14
+ rdoc.rdoc_dir = 'rdoc'
15
+ rdoc.title = 'GoTranslateYourself'
16
+ rdoc.options << '--line-numbers' << '--inline-source'
17
+ rdoc.rdoc_files.include('README.rdoc')
18
+ rdoc.rdoc_files.include('lib/**/*.rb')
19
+ end
20
+
21
+ spec = Gem::Specification.new do |s|
22
+ s.name = "go_translate_yourself"
23
+ s.summary = "Insert GoTranslateYourself summary."
24
+ s.description = "Insert GoTranslateYourself description."
25
+ s.files = FileList["[A-Z]*", "lib/**/*"]
26
+ s.version = "0.0.1"
27
+ end
28
+
29
+ Rake::GemPackageTask.new(spec) do |pkg|
30
+ end
31
+
32
+ desc "Install the gem #{spec.name}-#{spec.version}.gem"
33
+ task :install do
34
+ system("gem install pkg/#{spec.name}-#{spec.version}.gem --no-ri --no-rdoc")
35
+ end
@@ -0,0 +1,4 @@
1
+ module GoTranslateYourself
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,8 @@
1
+ require 'go_translate_yourself/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
2
+
3
+ module GoTranslateYourself
4
+ class << self
5
+ attr_accessor :layout_name, :locales, :auth_handler, :current_store
6
+ end
7
+ end
8
+
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: go_translate_yourself
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors: []
12
+
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-10-08 00:00:00 +02:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: Insert GoTranslateYourself description.
22
+ email:
23
+ executables: []
24
+
25
+ extensions: []
26
+
27
+ extra_rdoc_files: []
28
+
29
+ files:
30
+ - MIT-LICENSE
31
+ - Gemfile
32
+ - README.rdoc
33
+ - Gemfile.lock
34
+ - Rakefile
35
+ - lib/go_translate_yourself/engine.rb
36
+ - lib/go_translate_yourself.rb
37
+ has_rdoc: true
38
+ homepage:
39
+ licenses: []
40
+
41
+ post_install_message:
42
+ rdoc_options: []
43
+
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
53
+ version: "0"
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ requirements: []
63
+
64
+ rubyforge_project:
65
+ rubygems_version: 1.3.7
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: Insert GoTranslateYourself summary.
69
+ test_files: []
70
+