locale_kit 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/Rakefile +1 -0
- data/app/controllers/locale_kit/application_controller.rb +1 -0
- data/app/helpers/locale_kit/application_helper.rb +1 -0
- data/config/routes.rb +1 -0
- data/lib/generators/locale_kit.rb +1 -1
- data/lib/generators/locale_kit/controller/controller_generator.rb +1 -1
- data/lib/generators/locale_kit/controller/templates/controller.yml +2 -2
- data/lib/generators/locale_kit/controller/templates/view.yml +2 -2
- data/lib/generators/locale_kit/install/install_generator.rb +1 -1
- data/lib/generators/locale_kit/mailer/mailer_generator.rb +1 -1
- data/lib/generators/locale_kit/mailer/templates/locale.yml +2 -2
- data/lib/generators/locale_kit/model/model_generator.rb +0 -8
- data/lib/locale_kit.rb +1 -0
- data/lib/locale_kit/engine.rb +1 -0
- data/lib/locale_kit/version.rb +2 -1
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfdb2ddeace448d58ee288a648bd5f1bbda7dcdb
|
4
|
+
data.tar.gz: 32c390fb94e4d3b4784c2c6fc7ae08e76ff62470
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 938dfe4f452cf90ea49527b4a485ce2ee61b3fdb414cdf41cb522bab5c4c9bbb559b7a1b37349f3a3953b800df48411736c4f1d7e2f5fdc85de346af921150b0
|
7
|
+
data.tar.gz: 1398f3df4d9f0709284848766719e8ea2752212b427b49d79b8c87194847d52fc886b01d86deeee1a9d60d4dd4f5ffc529f484793c11aa7f0814b823798adbe2
|
data/README.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# LocaleKit
|
2
2
|
|
3
|
+
[![Gem](https://img.shields.io/gem/v/locale_kit.svg)](https://rubygems.org/gems/locale_kit)
|
4
|
+
[![Downloads](https://img.shields.io/gem/dt/locale_kit.svg)](https://rubygems.org/gems/locale_kit)
|
5
|
+
[![CircleCI](https://img.shields.io/circleci/project/github/space-pirates-llc/locale_kit.svg)](https://circleci.com/gh/space-pirates-llc/locale_kit)
|
6
|
+
[![Coveralls](https://img.shields.io/coveralls/space-pirates-llc/locale_kit.svg)](https://coveralls.io/github/space-pirates-llc/locale_kit)
|
7
|
+
|
3
8
|
Provides new convention of locales and useful generators for Rails components.
|
4
9
|
|
5
10
|
## Installation
|
@@ -24,7 +29,7 @@ $ ./bin/rails locale_kit:install
|
|
24
29
|
|
25
30
|
## Contributing
|
26
31
|
|
27
|
-
1. Fork it ( https://github.com/space-pirates/locale_kit/fork )
|
32
|
+
1. Fork it ( https://github.com/space-pirates-llc/locale_kit/fork )
|
28
33
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
34
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
35
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/Rakefile
CHANGED
data/config/routes.rb
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
<% if action_names.empty? -%>
|
4
4
|
<%= " " * (namespaces.size + 1) %>action_name:
|
5
5
|
<%= " " * (namespaces.size + 2) %>key: "value"
|
6
|
-
|
6
|
+
<% else -%>
|
7
7
|
<% action_names.each do |action_name| -%>
|
8
8
|
<%= " " * (namespaces.size + 1) %><%= action_name %>:
|
9
9
|
<%= " " * (namespaces.size + 2) %>key: "value"
|
10
10
|
<% end -%>
|
11
|
-
|
11
|
+
<% end -%>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<% if action_names.empty? -%>
|
4
4
|
<%= " " * (namespaces.size + 1) %>view_name:
|
5
5
|
<%= " " * (namespaces.size + 2) %>key: "value"
|
6
|
-
|
6
|
+
<% else -%>
|
7
7
|
<% action_names.each do |action_name| -%>
|
8
8
|
<%= " " * (namespaces.size + 1) %><%= action_name %>:
|
9
9
|
<%= " " * (namespaces.size + 2) %>title: "<%= action_name.classify %>"
|
10
10
|
<% end -%>
|
11
|
-
|
11
|
+
<% end -%>
|
@@ -3,9 +3,9 @@
|
|
3
3
|
<% if action_names.empty? -%>
|
4
4
|
<%= " " * (namespaces.size + 1) %>action_name:
|
5
5
|
<%= " " * (namespaces.size + 2) %>subject: "Subject"
|
6
|
-
|
6
|
+
<% else -%>
|
7
7
|
<% action_names.each do |action_name| -%>
|
8
8
|
<%= " " * (namespaces.size + 1) %><%= action_name %>:
|
9
9
|
<%= " " * (namespaces.size + 2) %>subject: "<%= action_name.classify %>"
|
10
10
|
<% end -%>
|
11
|
-
|
11
|
+
<% end -%>
|
@@ -20,14 +20,6 @@ class LocaleKit::Generators::ModelGenerator < LocaleKit::Generators::Base
|
|
20
20
|
defined?(ActiveRecord) ? :activerecord : :activemodel
|
21
21
|
end
|
22
22
|
|
23
|
-
def namespaces
|
24
|
-
(class_path + [file_name])
|
25
|
-
end
|
26
|
-
|
27
|
-
def locale_namespace
|
28
|
-
namespaces.map.with_index(1) { |name, idx| (' ' * idx) + name + ':' }.join("\n")
|
29
|
-
end
|
30
|
-
|
31
23
|
def model_name
|
32
24
|
(class_path + [file_name]).join('/')
|
33
25
|
end
|
data/lib/locale_kit.rb
CHANGED
data/lib/locale_kit/engine.rb
CHANGED
data/lib/locale_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: locale_kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Kusano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coveralls
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: Improve locales convention of Rails
|
84
98
|
email:
|
85
99
|
- sho-kusano@space-pirates.jp
|
@@ -118,7 +132,7 @@ files:
|
|
118
132
|
- lib/locale_kit/engine.rb
|
119
133
|
- lib/locale_kit/version.rb
|
120
134
|
- lib/tasks/locale_kit_tasks.rake
|
121
|
-
homepage: https://github.com/space-
|
135
|
+
homepage: https://github.com/space-pirates-llc/locale_kit
|
122
136
|
licenses:
|
123
137
|
- MIT
|
124
138
|
metadata: {}
|