sinatra-r18n 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +52 -0
- data/Rakefile +46 -0
- data/sinatra-r18n.gemspec +41 -0
- data/spec/app/i18n/en.yml +1 -1
- data/spec/spec_helper.rb +12 -6
- metadata +157 -20
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--format documentation --colour
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sinatra-r18n (0.4.10)
|
5
|
+
r18n-core (= 0.4.10)
|
6
|
+
sinatra (>= 0.9)
|
7
|
+
|
8
|
+
PATH
|
9
|
+
remote: ../r18n-core/
|
10
|
+
specs:
|
11
|
+
r18n-core (0.4.10)
|
12
|
+
|
13
|
+
GEM
|
14
|
+
remote: http://rubygems.org/
|
15
|
+
specs:
|
16
|
+
diff-lcs (1.1.2)
|
17
|
+
haml (2.2.24)
|
18
|
+
hanna (0.1.12)
|
19
|
+
haml (~> 2.2.8)
|
20
|
+
rake (~> 0.8.2)
|
21
|
+
rdoc (~> 2.3.0)
|
22
|
+
psych (1.2.0)
|
23
|
+
rack (1.2.2)
|
24
|
+
rack-test (0.5.7)
|
25
|
+
rack (>= 1.0)
|
26
|
+
rake (0.8.7)
|
27
|
+
rcov (0.9.9)
|
28
|
+
rdoc (2.3.0)
|
29
|
+
rspec-core (2.5.1)
|
30
|
+
rspec-expectations (2.5.0)
|
31
|
+
diff-lcs (~> 1.1.2)
|
32
|
+
rspec-mocks (2.5.0)
|
33
|
+
sinatra (1.2.6)
|
34
|
+
rack (~> 1.1)
|
35
|
+
tilt (>= 1.2.2, < 2.0)
|
36
|
+
tilt (1.3)
|
37
|
+
|
38
|
+
PLATFORMS
|
39
|
+
ruby
|
40
|
+
|
41
|
+
DEPENDENCIES
|
42
|
+
bundler (>= 1.0.10)
|
43
|
+
hanna
|
44
|
+
psych
|
45
|
+
r18n-core!
|
46
|
+
rack-test
|
47
|
+
rake (>= 0, != 0.9.0)
|
48
|
+
rcov
|
49
|
+
rspec-core
|
50
|
+
rspec-expectations
|
51
|
+
rspec-mocks
|
52
|
+
sinatra-r18n!
|
data/Rakefile
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'bundler'
|
7
|
+
require 'bundler/setup'
|
8
|
+
Bundler::GemHelper.install_tasks
|
9
|
+
rescue LoadError
|
10
|
+
puts "Bundler not available. Install it with: gem install bundler"
|
11
|
+
end
|
12
|
+
|
13
|
+
begin
|
14
|
+
require 'hanna/rdoctask'
|
15
|
+
rescue LoadError
|
16
|
+
require 'rake/rdoctask'
|
17
|
+
end
|
18
|
+
|
19
|
+
PKG_NAME = 'sinatra-r18n'
|
20
|
+
require '../r18n-core/lib/r18n-core/version'
|
21
|
+
|
22
|
+
require 'rspec/core/rake_task'
|
23
|
+
|
24
|
+
RSpec::Core::RakeTask.new
|
25
|
+
|
26
|
+
RSpec::Core::RakeTask.new('rcov') do |t|
|
27
|
+
t.rcov = true
|
28
|
+
t.ruby_opts = '-w'
|
29
|
+
t.rcov_opts = ['--text-summary', '--charset UTF-8', '-x gem']
|
30
|
+
end
|
31
|
+
|
32
|
+
Rake::RDocTask.new do |rdoc|
|
33
|
+
rdoc.main = 'README.rdoc'
|
34
|
+
rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'lib/**/*.rb')
|
35
|
+
rdoc.title = "Sinatra R18n #{R18n::VERSION} Documentation"
|
36
|
+
rdoc.rdoc_dir = 'doc'
|
37
|
+
rdoc.options << '-c utf-8'
|
38
|
+
rdoc.options << '--all'
|
39
|
+
end
|
40
|
+
|
41
|
+
task :clobber_package do
|
42
|
+
rm_r 'pkg' rescue nil
|
43
|
+
end
|
44
|
+
task :clobber => [:clobber_package]
|
45
|
+
|
46
|
+
task :default => :spec
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require '../r18n-core/lib/r18n-core/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.platform = Gem::Platform::RUBY
|
5
|
+
s.name = 'sinatra-r18n'
|
6
|
+
s.version = R18n::VERSION.dup
|
7
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
8
|
+
s.summary = 'A Sinatra extension that provides i18n support to translate your
|
9
|
+
web application.'
|
10
|
+
s.description = <<-EOF
|
11
|
+
A Sinatra extension that provides i18n support to translate your web
|
12
|
+
application. It is just a wrapper for R18n core library.
|
13
|
+
It has nice Ruby-style syntax, filters, flexible locales, custom loaders,
|
14
|
+
translation support for any classes, time and number localization, several
|
15
|
+
user language support, agnostic core package with out-of-box support for
|
16
|
+
Rails, Sinatra, Merb and desktop applications.
|
17
|
+
EOF
|
18
|
+
|
19
|
+
s.files = `git ls-files`.split("\n")
|
20
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
21
|
+
s.extra_rdoc_files = ['README.rdoc', 'LICENSE']
|
22
|
+
s.require_path = 'lib'
|
23
|
+
s.has_rdoc = true
|
24
|
+
|
25
|
+
s.author = 'Andrey "A.I." Sitnik'
|
26
|
+
s.email = 'andrey@sitnik.ru'
|
27
|
+
s.homepage = 'http://r18n.rubyforge.org/'
|
28
|
+
s.rubyforge_project = 'sinatra-r18n'
|
29
|
+
|
30
|
+
s.add_dependency 'sinatra', [">= 0.9"]
|
31
|
+
s.add_dependency 'r18n-core', ["= #{R18n::VERSION}"]
|
32
|
+
|
33
|
+
s.add_development_dependency "bundler", [">= 1.0.10"]
|
34
|
+
s.add_development_dependency "hanna", [">= 0"]
|
35
|
+
s.add_development_dependency "rake", [">= 0", "!= 0.9.0"]
|
36
|
+
s.add_development_dependency "rack-test", [">= 0"]
|
37
|
+
s.add_development_dependency "rspec-core", [">= 0"]
|
38
|
+
s.add_development_dependency "rspec-expectations", [">= 0"]
|
39
|
+
s.add_development_dependency "rspec-mocks", [">= 0"]
|
40
|
+
s.add_development_dependency "rcov", [">= 0"]
|
41
|
+
end
|
data/spec/app/i18n/en.yml
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
+
|
3
|
+
ENV['RACK_ENV'] = 'test'
|
4
|
+
|
5
|
+
require 'bundler/setup'
|
2
6
|
require 'pp'
|
3
|
-
require 'rubygems'
|
4
|
-
gem 'sinatra'
|
5
7
|
|
6
8
|
require File.join(File.dirname(__FILE__), 'app/app')
|
7
9
|
|
8
|
-
require 'spec/interop/test'
|
9
|
-
gem 'rack-test'
|
10
10
|
require 'rack/test'
|
11
|
-
|
12
|
-
|
11
|
+
|
12
|
+
module RSpecMixinExample
|
13
|
+
include Rack::Test::Methods
|
14
|
+
def app(); Sinatra::Application; end
|
15
|
+
end
|
16
|
+
|
17
|
+
RSpec.configure { |c| c.include RSpecMixinExample }
|
13
18
|
|
14
19
|
set :environment, :test
|
20
|
+
set :root, File.join(File.dirname(__FILE__), 'app')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-r18n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 10
|
10
|
+
version: 0.4.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrey "A.I." Sitnik
|
@@ -15,25 +15,162 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-08 00:00:00 +04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name: r18n-core
|
23
22
|
prerelease: false
|
24
|
-
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 25
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 9
|
32
|
+
version: "0.9"
|
33
|
+
requirement: *id001
|
34
|
+
type: :runtime
|
35
|
+
name: sinatra
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
25
39
|
none: false
|
26
40
|
requirements:
|
27
41
|
- - "="
|
28
42
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
43
|
+
hash: 27
|
30
44
|
segments:
|
31
45
|
- 0
|
32
46
|
- 4
|
33
|
-
-
|
34
|
-
version: 0.4.
|
47
|
+
- 10
|
48
|
+
version: 0.4.10
|
49
|
+
requirement: *id002
|
35
50
|
type: :runtime
|
36
|
-
|
51
|
+
name: r18n-core
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
prerelease: false
|
54
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 1
|
62
|
+
- 0
|
63
|
+
- 10
|
64
|
+
version: 1.0.10
|
65
|
+
requirement: *id003
|
66
|
+
type: :development
|
67
|
+
name: bundler
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
hash: 3
|
76
|
+
segments:
|
77
|
+
- 0
|
78
|
+
version: "0"
|
79
|
+
requirement: *id004
|
80
|
+
type: :development
|
81
|
+
name: hanna
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
93
|
+
- - "!="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
hash: 59
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
- 9
|
99
|
+
- 0
|
100
|
+
version: 0.9.0
|
101
|
+
requirement: *id005
|
102
|
+
type: :development
|
103
|
+
name: rake
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
hash: 3
|
112
|
+
segments:
|
113
|
+
- 0
|
114
|
+
version: "0"
|
115
|
+
requirement: *id006
|
116
|
+
type: :development
|
117
|
+
name: rack-test
|
118
|
+
- !ruby/object:Gem::Dependency
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
hash: 3
|
126
|
+
segments:
|
127
|
+
- 0
|
128
|
+
version: "0"
|
129
|
+
requirement: *id007
|
130
|
+
type: :development
|
131
|
+
name: rspec-core
|
132
|
+
- !ruby/object:Gem::Dependency
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
hash: 3
|
140
|
+
segments:
|
141
|
+
- 0
|
142
|
+
version: "0"
|
143
|
+
requirement: *id008
|
144
|
+
type: :development
|
145
|
+
name: rspec-expectations
|
146
|
+
- !ruby/object:Gem::Dependency
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
hash: 3
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
version: "0"
|
157
|
+
requirement: *id009
|
158
|
+
type: :development
|
159
|
+
name: rspec-mocks
|
160
|
+
- !ruby/object:Gem::Dependency
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: &id010 !ruby/object:Gem::Requirement
|
163
|
+
none: false
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
hash: 3
|
168
|
+
segments:
|
169
|
+
- 0
|
170
|
+
version: "0"
|
171
|
+
requirement: *id010
|
172
|
+
type: :development
|
173
|
+
name: rcov
|
37
174
|
description: " A Sinatra extension that provides i18n support to translate your web\n application. It is just a wrapper for R18n core library.\n It has nice Ruby-style syntax, filters, flexible locales, custom loaders,\n translation support for any classes, time and number localization, several\n user language support, agnostic core package with out-of-box support for\n Rails, Sinatra, Merb and desktop applications.\n"
|
38
175
|
email: andrey@sitnik.ru
|
39
176
|
executables: []
|
@@ -44,15 +181,20 @@ extra_rdoc_files:
|
|
44
181
|
- README.rdoc
|
45
182
|
- LICENSE
|
46
183
|
files:
|
47
|
-
-
|
184
|
+
- .rspec
|
185
|
+
- Gemfile
|
186
|
+
- Gemfile.lock
|
48
187
|
- LICENSE
|
49
188
|
- README.rdoc
|
50
|
-
-
|
189
|
+
- Rakefile
|
190
|
+
- lib/sinatra/r18n.rb
|
191
|
+
- sinatra-r18n.gemspec
|
192
|
+
- spec/app/app.rb
|
51
193
|
- spec/app/i18n/en.yml
|
52
194
|
- spec/app/i18n/ru.yml
|
53
|
-
- spec/app/app.rb
|
54
195
|
- spec/app/views/post.erb
|
55
196
|
- spec/sinatra-r18n_spec.rb
|
197
|
+
- spec/spec_helper.rb
|
56
198
|
has_rdoc: true
|
57
199
|
homepage: http://r18n.rubyforge.org/
|
58
200
|
licenses: []
|
@@ -87,10 +229,5 @@ rubygems_version: 1.3.7
|
|
87
229
|
signing_key:
|
88
230
|
specification_version: 3
|
89
231
|
summary: A Sinatra extension that provides i18n support to translate your web application.
|
90
|
-
test_files:
|
91
|
-
|
92
|
-
- spec/app/i18n/en.yml
|
93
|
-
- spec/app/i18n/ru.yml
|
94
|
-
- spec/app/app.rb
|
95
|
-
- spec/app/views/post.erb
|
96
|
-
- spec/sinatra-r18n_spec.rb
|
232
|
+
test_files: []
|
233
|
+
|