egalite 1.5.9 → 1.5.10
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.
- checksums.yaml +7 -7
- data/.gitignore +17 -17
- data/Gemfile +4 -4
- data/LICENSE.txt +22 -22
- data/Rakefile +1 -1
- data/egalite.gemspec +24 -24
- data/lib/egalite/m17n.rb +1 -1
- data/lib/egalite/sendmail.rb +6 -4
- data/lib/egalite/version.rb +1 -1
- data/test/test_m17n.rb +6 -0
- metadata +50 -59
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
|
4
|
-
|
5
|
-
SHA512:
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
data.tar.gz: d1683c49eae5f123718e22d6788bd2cb8eb59ebd
|
4
|
+
metadata.gz: c0f4c711963b0949bf533f7c405fbe4bd7b42ccc
|
5
|
+
SHA512:
|
6
|
+
data.tar.gz: 03bff990f7b259d76d79dbd4a4c4e785335b930eb3a44a805ba239cf992f34b288bb8cc6e0d8cd601204dff88ca479bc02e460091fcff94bc53dde61530f6dea
|
7
|
+
metadata.gz: 1c98ec9cac4a5d7dd67e6d3026a19bafc357d5bc41aecd04c08892e10d737a602868ee5ae5e18e76858ca50f9a5572fe3e6202f569f22c81a52a06836ca98488
|
data/.gitignore
CHANGED
@@ -1,17 +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
|
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
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in egalite.gemspec
|
4
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in egalite.gemspec
|
4
|
+
gemspec
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
Copyright (c) 2013 Shunichi Arai
|
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.
|
1
|
+
Copyright (c) 2013 Shunichi Arai
|
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/Rakefile
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
1
|
+
require "bundler/gem_tasks"
|
data/egalite.gemspec
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'egalite/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "egalite"
|
8
|
-
spec.version = Egalite::VERSION
|
9
|
-
spec.authors = ["Shunichi Arai"]
|
10
|
-
spec.email = ["arai@mellowtone.co.jp"]
|
11
|
-
spec.description = %q{Egalite - yet another web application framework. see description at https://github.com/araipiyo/egalite}
|
12
|
-
spec.summary = %q{Egalite - yet another web application framework.}
|
13
|
-
spec.homepage = "https://github.com/araipiyo/egalite"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files`.split($/)
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
-
spec.add_development_dependency "rake"
|
23
|
-
spec.add_dependency "rack"
|
24
|
-
end
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'egalite/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "egalite"
|
8
|
+
spec.version = Egalite::VERSION
|
9
|
+
spec.authors = ["Shunichi Arai"]
|
10
|
+
spec.email = ["arai@mellowtone.co.jp"]
|
11
|
+
spec.description = %q{Egalite - yet another web application framework. see description at https://github.com/araipiyo/egalite}
|
12
|
+
spec.summary = %q{Egalite - yet another web application framework.}
|
13
|
+
spec.homepage = "https://github.com/araipiyo/egalite"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
spec.add_dependency "rack"
|
24
|
+
end
|
data/lib/egalite/m17n.rb
CHANGED
@@ -162,7 +162,7 @@ module Egalite
|
|
162
162
|
@langcode == lang or @aliases.include?(lang)
|
163
163
|
end
|
164
164
|
def partialmatch?(lang)
|
165
|
-
fullmatch?(lang.to_s.split(
|
165
|
+
fullmatch?(lang.to_s.split(/(-|_)/).first)
|
166
166
|
end
|
167
167
|
def translate_html(path, html)
|
168
168
|
return html unless @data
|
data/lib/egalite/sendmail.rb
CHANGED
@@ -257,10 +257,12 @@ module Sendmail
|
|
257
257
|
files = [files].flatten
|
258
258
|
parts = [mime_part(body)]
|
259
259
|
parts += files.map { |f|
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
260
|
+
File.open(f[:tempfile].path, "r") {|tf|
|
261
|
+
binary = tf.read
|
262
|
+
sum_size += binary.size
|
263
|
+
raise AttachmentsTooLarge if sum_size >= 25 * 1000 * 1000
|
264
|
+
mime_part(binary, f[:type], f[:filename])
|
265
|
+
}
|
264
266
|
}
|
265
267
|
send_multipart(parts, params, host)
|
266
268
|
end
|
data/lib/egalite/version.rb
CHANGED
data/test/test_m17n.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
$LOAD_PATH << File.join(File.dirname(__FILE__), '../lib/')
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'test/unit'
|
3
5
|
require 'egalite'
|
@@ -109,6 +111,10 @@ class T_Translation < Test::Unit::TestCase
|
|
109
111
|
get "/french/dlg", {}, {'HTTP_ACCEPT_LANGUAGE' => 'fr-fr'}
|
110
112
|
assert_match /@@@Je suis un Francais\.@@@/, last_response.body
|
111
113
|
assert_no_match /I am an English man\./, last_response.body
|
114
|
+
|
115
|
+
get "/french/dlg", {}, {'HTTP_ACCEPT_LANGUAGE' => 'fr_fr'}
|
116
|
+
assert_match /@@@Je suis un Francais\.@@@/, last_response.body
|
117
|
+
assert_no_match /I am an English man\./, last_response.body
|
112
118
|
end
|
113
119
|
def test_langcode
|
114
120
|
get "/french/langcode"
|
metadata
CHANGED
@@ -1,65 +1,56 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: egalite
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.5.10
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Shunichi Arai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
|
12
|
+
date: 2016-03-11 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.3'
|
20
|
-
type: :development
|
21
16
|
prerelease: false
|
22
|
-
|
23
|
-
requirements:
|
24
|
-
- -
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: "1.3"
|
34
22
|
type: :development
|
23
|
+
version_requirements: *id001
|
24
|
+
- !ruby/object:Gem::Dependency
|
25
|
+
name: rake
|
35
26
|
prerelease: false
|
36
|
-
|
37
|
-
requirements:
|
38
|
-
-
|
39
|
-
-
|
40
|
-
|
41
|
-
|
27
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
|
+
requirements:
|
29
|
+
- &id003
|
30
|
+
- ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id002
|
35
|
+
- !ruby/object:Gem::Dependency
|
42
36
|
name: rack
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
37
|
prerelease: false
|
50
|
-
|
51
|
-
requirements:
|
52
|
-
-
|
53
|
-
|
54
|
-
|
38
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- *id003
|
41
|
+
type: :runtime
|
42
|
+
version_requirements: *id004
|
55
43
|
description: Egalite - yet another web application framework. see description at https://github.com/araipiyo/egalite
|
56
|
-
email:
|
44
|
+
email:
|
57
45
|
- arai@mellowtone.co.jp
|
58
46
|
executables: []
|
47
|
+
|
59
48
|
extensions: []
|
49
|
+
|
60
50
|
extra_rdoc_files: []
|
61
|
-
|
62
|
-
|
51
|
+
|
52
|
+
files:
|
53
|
+
- .gitignore
|
63
54
|
- Gemfile
|
64
55
|
- LICENSE.txt
|
65
56
|
- README.md
|
@@ -133,30 +124,29 @@ files:
|
|
133
124
|
- test/test_stringify_hash.rb
|
134
125
|
- test/test_template.rb
|
135
126
|
homepage: https://github.com/araipiyo/egalite
|
136
|
-
licenses:
|
127
|
+
licenses:
|
137
128
|
- MIT
|
138
129
|
metadata: {}
|
130
|
+
|
139
131
|
post_install_message:
|
140
132
|
rdoc_options: []
|
141
|
-
|
133
|
+
|
134
|
+
require_paths:
|
142
135
|
- lib
|
143
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
144
|
-
requirements:
|
145
|
-
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
136
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- *id003
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- *id003
|
153
142
|
requirements: []
|
143
|
+
|
154
144
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
145
|
+
rubygems_version: 2.4.3
|
156
146
|
signing_key:
|
157
147
|
specification_version: 4
|
158
148
|
summary: Egalite - yet another web application framework.
|
159
|
-
test_files:
|
149
|
+
test_files:
|
160
150
|
- test/cache.html
|
161
151
|
- test/cache_cache.html
|
162
152
|
- test/cache_nocache.html
|
@@ -185,3 +175,4 @@ test_files:
|
|
185
175
|
- test/test_session.rb
|
186
176
|
- test/test_stringify_hash.rb
|
187
177
|
- test/test_template.rb
|
178
|
+
has_rdoc:
|