tkh_toolbox 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in tkh_toolbox.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Swami Atma
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # TkhToolbox
2
+
3
+ This gem is part of the tkh_cms gem suite. In here we put lots of smallish utilities which can be used by different gems across the suite.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'tkh_toolbox'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Run the following command:
16
+
17
+ $ rake tkh_toolbox:setup
18
+
19
+
20
+ ## Usage
21
+
22
+ There are only general purpose locale files at this point. Look for them in the config/locales folder.
23
+
24
+ ## Contributing
25
+
26
+ 1. Fork it
27
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
28
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
29
+ 4. Push to the branch (`git push origin my-new-feature`)
30
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,16 @@
1
+ require 'rails/generators'
2
+
3
+ module TkhToolbox
4
+ module Generators
5
+ class CreateOrUpdateLocalesGenerator < ::Rails::Generators::Base
6
+ source_root File.expand_path('../templates', __FILE__)
7
+ desc "copying latest version of locale files"
8
+ def copy_locales
9
+ puts 'creating locale files'
10
+ I18n.available_locales.each do |l|
11
+ copy_file "#{l.to_s}.yml", "config/locales/tkh_toolbox.#{l.to_s}.yml"
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,6 @@
1
+ de:
2
+
3
+ colon: ':'
4
+ question_mark: '?'
5
+ question_mark_inverted: ''
6
+ view: 'view'
@@ -0,0 +1,6 @@
1
+ en:
2
+
3
+ colon: ':'
4
+ question_mark: '?'
5
+ question_mark_inverted: ''
6
+ view: 'view'
@@ -0,0 +1,6 @@
1
+ es:
2
+
3
+ colon: ':'
4
+ question_mark: '?'
5
+ question_mark_inverted: '¿'
6
+ view: 'ver'
@@ -0,0 +1,6 @@
1
+ fr:
2
+
3
+ colon: ' :'
4
+ question_mark: ' ?'
5
+ question_mark_inverted: ''
6
+ view: 'voir'
@@ -0,0 +1,6 @@
1
+ it:
2
+
3
+ colon: ':'
4
+ question_mark: '?'
5
+ question_mark_inverted: ''
6
+ view: 'view'
@@ -0,0 +1,12 @@
1
+ namespace :tkh_toolbox do
2
+
3
+ desc "Create locale files"
4
+ task :setup do
5
+ system 'rails g tkh_toolbox:create_or_update_locales -f'
6
+ end
7
+
8
+ desc "Update locale files"
9
+ task :update do
10
+ system 'rails g tkh_toolbox:create_or_update_locales -f'
11
+ end
12
+ end
@@ -0,0 +1,3 @@
1
+ module TkhToolbox
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,6 @@
1
+ require "tkh_toolbox/version"
2
+
3
+ module TkhToolbox
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'tkh_toolbox/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "tkh_toolbox"
8
+ gem.version = TkhToolbox::VERSION
9
+ gem.authors = ["Swami Atma"]
10
+ gem.email = ["swami@TenThousandHours.eu"]
11
+ gem.description = %q{Assortment of all-purpose utilities used by gems across the tkh_cms suite}
12
+ gem.summary = %q{Assortment of all-purpose utilities used by gems across the tkh_cms suite}
13
+ gem.homepage = ""
14
+
15
+ gem.files = `git ls-files`.split($/)
16
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
+ gem.require_paths = ["lib"]
19
+ end
metadata ADDED
@@ -0,0 +1,60 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tkh_toolbox
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Swami Atma
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-29 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Assortment of all-purpose utilities used by gems across the tkh_cms suite
15
+ email:
16
+ - swami@TenThousandHours.eu
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - .gitignore
22
+ - Gemfile
23
+ - LICENSE.txt
24
+ - README.md
25
+ - Rakefile
26
+ - lib/generators/tkh_toolbox/create_or_update_locales/create_or_update_locales_generator.rb
27
+ - lib/generators/tkh_toolbox/create_or_update_locales/templates/de.yml
28
+ - lib/generators/tkh_toolbox/create_or_update_locales/templates/en.yml
29
+ - lib/generators/tkh_toolbox/create_or_update_locales/templates/es.yml
30
+ - lib/generators/tkh_toolbox/create_or_update_locales/templates/fr.yml
31
+ - lib/generators/tkh_toolbox/create_or_update_locales/templates/it.yml
32
+ - lib/tasks/tkh_toolbox_tasks.rake
33
+ - lib/tkh_toolbox.rb
34
+ - lib/tkh_toolbox/version.rb
35
+ - tkh_toolbox.gemspec
36
+ homepage: ''
37
+ licenses: []
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirements: []
55
+ rubyforge_project:
56
+ rubygems_version: 1.8.24
57
+ signing_key:
58
+ specification_version: 3
59
+ summary: Assortment of all-purpose utilities used by gems across the tkh_cms suite
60
+ test_files: []