padrino-localization 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem "padrino"
4
+ gem "i18n"
4
5
 
5
6
  group :development, :test do
6
7
  gem "test-spec"
@@ -14,6 +15,5 @@ group :development, :test do
14
15
  gem 'ruby-debug', :platform => :ruby_18
15
16
  gem "rcov", "~> 1.0.0", :platform => :ruby_18
16
17
 
17
- gem "i18n"
18
18
  gem "capybara"
19
19
  end
data/README.rdoc CHANGED
@@ -1,4 +1,5 @@
1
1
  = padrino-localization
2
+ {<img src="https://secure.travis-ci.org/kot-begemot/padrino-localization.png" />}[http://travis-ci.org/kot-begemot/padrino-localization]
2
3
 
3
4
  The gem that allows to localize your application.
4
5
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -27,13 +27,14 @@ module Padrino
27
27
  # url_for_with_locale(:posts, :new, :locale => 'se') # /se/posts/new
28
28
  #
29
29
  def url_with_locale *args
30
- locale_scope = (::I18n.locale == ::I18n.default_locale) ? {} : {locale: ::I18n.locale}
30
+ locale_scope = (::I18n.locale == ::I18n.default_locale) ? {} : {:locale => ::I18n.locale}
31
31
  if args.last.kind_of? Hash
32
32
  # should not overwrite provided locale
33
33
  args.last.merge!(locale_scope)
34
34
  url_without_locale *args
35
35
  else
36
- url_without_locale *args, locale_scope
36
+ args << locale_scope
37
+ url_without_locale *args
37
38
  end.gsub('//','/')
38
39
  end
39
40
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "padrino-localization"
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["kot-begemot"]
12
- s.date = "2012-08-05"
12
+ s.date = "2012-08-14"
13
13
  s.description = "This gem allows you to localalize your padrino application with ease"
14
14
  s.email = "max@studentify.nl"
15
15
  s.extra_rdoc_files = [
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".rvmrc",
22
+ ".travis.yml",
22
23
  "Gemfile",
23
24
  "Gemfile.lock",
24
25
  "LICENSE.txt",
@@ -51,6 +52,7 @@ Gem::Specification.new do |s|
51
52
 
52
53
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
54
  s.add_runtime_dependency(%q<padrino>, [">= 0"])
55
+ s.add_runtime_dependency(%q<i18n>, [">= 0"])
54
56
  s.add_development_dependency(%q<test-spec>, [">= 0"])
55
57
  s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
56
58
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -59,10 +61,10 @@ Gem::Specification.new do |s|
59
61
  s.add_development_dependency(%q<simplecov>, ["~> 0.6.4"])
60
62
  s.add_development_dependency(%q<ruby-debug>, [">= 0"])
61
63
  s.add_development_dependency(%q<rcov>, ["~> 1.0.0"])
62
- s.add_development_dependency(%q<i18n>, [">= 0"])
63
64
  s.add_development_dependency(%q<capybara>, [">= 0"])
64
65
  else
65
66
  s.add_dependency(%q<padrino>, [">= 0"])
67
+ s.add_dependency(%q<i18n>, [">= 0"])
66
68
  s.add_dependency(%q<test-spec>, [">= 0"])
67
69
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
68
70
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -71,11 +73,11 @@ Gem::Specification.new do |s|
71
73
  s.add_dependency(%q<simplecov>, ["~> 0.6.4"])
72
74
  s.add_dependency(%q<ruby-debug>, [">= 0"])
73
75
  s.add_dependency(%q<rcov>, ["~> 1.0.0"])
74
- s.add_dependency(%q<i18n>, [">= 0"])
75
76
  s.add_dependency(%q<capybara>, [">= 0"])
76
77
  end
77
78
  else
78
79
  s.add_dependency(%q<padrino>, [">= 0"])
80
+ s.add_dependency(%q<i18n>, [">= 0"])
79
81
  s.add_dependency(%q<test-spec>, [">= 0"])
80
82
  s.add_dependency(%q<yard>, ["~> 0.6.0"])
81
83
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -84,7 +86,6 @@ Gem::Specification.new do |s|
84
86
  s.add_dependency(%q<simplecov>, ["~> 0.6.4"])
85
87
  s.add_dependency(%q<ruby-debug>, [">= 0"])
86
88
  s.add_dependency(%q<rcov>, ["~> 1.0.0"])
87
- s.add_dependency(%q<i18n>, [">= 0"])
88
89
  s.add_dependency(%q<capybara>, [">= 0"])
89
90
  end
90
91
  end
@@ -1,12 +1,11 @@
1
1
  require 'bundler'
2
+ Bundler.setup(:default, :test)
3
+ require 'padrino'
4
+
2
5
  # Defines our constants
3
6
  PADRINO_ENV = ENV["PADRINO_ENV"] ||= ENV["RACK_ENV"] ||= "development" unless defined?(PADRINO_ENV)
4
7
  PADRINO_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
5
8
 
6
- # Only have default and environemtn gems
7
- Bundler.setup(:default, :test)
8
- # Only require default and environment gems
9
- Bundler.require(:default, :test)
10
9
 
11
10
  ##
12
11
  # Add here your before load hooks
data/test/test_helper.rb CHANGED
@@ -1,8 +1,12 @@
1
1
  require 'rubygems'
2
+ require 'test/unit'
2
3
  require 'capybara'
3
4
  require 'capybara/dsl'
4
- require 'test/unit'
5
- require 'debugger'
5
+ if RUBY_VERSION >= '1.9.0'
6
+ require "debugger"
7
+ else
8
+ require 'ruby-debug'
9
+ end
6
10
 
7
11
  $LOAD_PATH.unshift(File.dirname(__FILE__))
8
12
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: padrino-localization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-05 00:00:00.000000000Z
12
+ date: 2012-08-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: padrino
16
- requirement: &87211030 !ruby/object:Gem::Requirement
16
+ requirement: &81298470 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,21 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *87211030
24
+ version_requirements: *81298470
25
+ - !ruby/object:Gem::Dependency
26
+ name: i18n
27
+ requirement: &81298130 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: *81298130
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: test-spec
27
- requirement: &87210680 !ruby/object:Gem::Requirement
38
+ requirement: &81245390 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ! '>='
@@ -32,10 +43,10 @@ dependencies:
32
43
  version: '0'
33
44
  type: :development
34
45
  prerelease: false
35
- version_requirements: *87210680
46
+ version_requirements: *81245390
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: yard
38
- requirement: &87210340 !ruby/object:Gem::Requirement
49
+ requirement: &81244950 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ~>
@@ -43,10 +54,10 @@ dependencies:
43
54
  version: 0.6.0
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *87210340
57
+ version_requirements: *81244950
47
58
  - !ruby/object:Gem::Dependency
48
59
  name: bundler
49
- requirement: &87157680 !ruby/object:Gem::Requirement
60
+ requirement: &81244550 !ruby/object:Gem::Requirement
50
61
  none: false
51
62
  requirements:
52
63
  - - ~>
@@ -54,10 +65,10 @@ dependencies:
54
65
  version: 1.0.0
55
66
  type: :development
56
67
  prerelease: false
57
- version_requirements: *87157680
68
+ version_requirements: *81244550
58
69
  - !ruby/object:Gem::Dependency
59
70
  name: jeweler
60
- requirement: &87157280 !ruby/object:Gem::Requirement
71
+ requirement: &81244170 !ruby/object:Gem::Requirement
61
72
  none: false
62
73
  requirements:
63
74
  - - ~>
@@ -65,10 +76,10 @@ dependencies:
65
76
  version: 1.6.4
66
77
  type: :development
67
78
  prerelease: false
68
- version_requirements: *87157280
79
+ version_requirements: *81244170
69
80
  - !ruby/object:Gem::Dependency
70
81
  name: debugger
71
- requirement: &87156640 !ruby/object:Gem::Requirement
82
+ requirement: &81243710 !ruby/object:Gem::Requirement
72
83
  none: false
73
84
  requirements:
74
85
  - - ~>
@@ -76,10 +87,10 @@ dependencies:
76
87
  version: 1.1.3
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *87156640
90
+ version_requirements: *81243710
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: simplecov
82
- requirement: &87156130 !ruby/object:Gem::Requirement
93
+ requirement: &81243280 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - ~>
@@ -87,10 +98,10 @@ dependencies:
87
98
  version: 0.6.4
88
99
  type: :development
89
100
  prerelease: false
90
- version_requirements: *87156130
101
+ version_requirements: *81243280
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: ruby-debug
93
- requirement: &87155750 !ruby/object:Gem::Requirement
104
+ requirement: &81242850 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ! '>='
@@ -98,10 +109,10 @@ dependencies:
98
109
  version: '0'
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *87155750
112
+ version_requirements: *81242850
102
113
  - !ruby/object:Gem::Dependency
103
114
  name: rcov
104
- requirement: &87155330 !ruby/object:Gem::Requirement
115
+ requirement: &81242470 !ruby/object:Gem::Requirement
105
116
  none: false
106
117
  requirements:
107
118
  - - ~>
@@ -109,21 +120,10 @@ dependencies:
109
120
  version: 1.0.0
110
121
  type: :development
111
122
  prerelease: false
112
- version_requirements: *87155330
113
- - !ruby/object:Gem::Dependency
114
- name: i18n
115
- requirement: &87154890 !ruby/object:Gem::Requirement
116
- none: false
117
- requirements:
118
- - - ! '>='
119
- - !ruby/object:Gem::Version
120
- version: '0'
121
- type: :development
122
- prerelease: false
123
- version_requirements: *87154890
123
+ version_requirements: *81242470
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: capybara
126
- requirement: &87154520 !ruby/object:Gem::Requirement
126
+ requirement: &81242050 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,7 +131,7 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *87154520
134
+ version_requirements: *81242050
135
135
  description: This gem allows you to localalize your padrino application with ease
136
136
  email: max@studentify.nl
137
137
  executables: []
@@ -142,6 +142,7 @@ extra_rdoc_files:
142
142
  files:
143
143
  - .document
144
144
  - .rvmrc
145
+ - .travis.yml
145
146
  - Gemfile
146
147
  - Gemfile.lock
147
148
  - LICENSE.txt
@@ -177,7 +178,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
177
178
  version: '0'
178
179
  segments:
179
180
  - 0
180
- hash: -640946865
181
+ hash: -1063700397
181
182
  required_rubygems_version: !ruby/object:Gem::Requirement
182
183
  none: false
183
184
  requirements: