cancan-rest-links 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,14 +2,13 @@ source :rubygems
2
2
  source 'http://gems.github.com/'
3
3
 
4
4
  group :default do
5
- gem "cancan", "~> 1.4.0"
6
-
5
+ gem "cancan", ">= 1.4.1"
7
6
  gem 'require_all', "~> 1.2.0"
8
- gem 'sugar-high', "~> 0.3.0"
7
+ gem 'sugar-high', "~> 0.3.1"
9
8
  gem 'r3_plugin_toolbox', "~> 0.4.0"
10
9
  end
11
10
 
12
11
  group :test do
13
- gem "rspec", ">= 2.0.0"
14
- gem "rspec-action_view", "~> 0.3.1"
12
+ gem "rspec", ">= 2.0.1"
13
+ gem "rspec-action_view", "~> 0.3.4"
15
14
  end
data/Rakefile CHANGED
@@ -7,13 +7,13 @@ begin
7
7
  gem.email = "kmandrup@gmail.com"
8
8
  gem.homepage = "http://github.com/kristianmandrup/cancan-rest-links"
9
9
  gem.authors = ["Kristian Mandrup"]
10
- gem.add_development_dependency "rspec", ">= 2.0.0"
10
+ gem.add_development_dependency "rspec", ">= 2.0.1"
11
11
  gem.add_development_dependency "rspec-action_view", ">= 0.3.4"
12
12
  gem.add_development_dependency 'generator-spec', ">= 0.7.0"
13
13
 
14
- gem.add_dependency 'cancan', "~> 1.4.0"
14
+ gem.add_dependency 'cancan', ">= 1.4.1"
15
15
  gem.add_dependency 'require_all', "~> 1.2.0"
16
- gem.add_dependency 'sugar-high', "~> 0.3.0"
16
+ gem.add_dependency 'sugar-high', "~> 0.3.1"
17
17
  gem.add_dependency 'r3_plugin_toolbox', ">= 0.4.0"
18
18
  end
19
19
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cancan-rest-links}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kristian Mandrup"]
12
- s.date = %q{2010-12-23}
12
+ s.date = %q{2011-01-10}
13
13
  s.description = %q{Guard your links with permissions}
14
14
  s.email = %q{kmandrup@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -33,6 +33,7 @@ Gem::Specification.new do |s|
33
33
  "lib/cancan-rest-links/rails/configure.rb",
34
34
  "lib/cancan-rest-links/rest_links.rb",
35
35
  "lib/generators/cancan/restlinks/restlinks_generator.rb",
36
+ "lib/generators/cancan/restlinks/templates/restlinks.da.yml",
36
37
  "lib/generators/cancan/restlinks/templates/restlinks.en.yml",
37
38
  "log/development.log",
38
39
  "sandbox/link_with_cream_spec.rb",
@@ -61,41 +62,41 @@ Gem::Specification.new do |s|
61
62
  s.specification_version = 3
62
63
 
63
64
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
64
- s.add_runtime_dependency(%q<cancan>, ["~> 1.4.0"])
65
+ s.add_runtime_dependency(%q<cancan>, [">= 1.4.1"])
65
66
  s.add_runtime_dependency(%q<require_all>, ["~> 1.2.0"])
66
- s.add_runtime_dependency(%q<sugar-high>, ["~> 0.3.0"])
67
+ s.add_runtime_dependency(%q<sugar-high>, ["~> 0.3.1"])
67
68
  s.add_runtime_dependency(%q<r3_plugin_toolbox>, ["~> 0.4.0"])
68
- s.add_development_dependency(%q<rspec>, [">= 2.0.0"])
69
+ s.add_development_dependency(%q<rspec>, [">= 2.0.1"])
69
70
  s.add_development_dependency(%q<rspec-action_view>, [">= 0.3.4"])
70
71
  s.add_development_dependency(%q<generator-spec>, [">= 0.7.0"])
71
- s.add_runtime_dependency(%q<cancan>, ["~> 1.4.0"])
72
+ s.add_runtime_dependency(%q<cancan>, [">= 1.4.1"])
72
73
  s.add_runtime_dependency(%q<require_all>, ["~> 1.2.0"])
73
- s.add_runtime_dependency(%q<sugar-high>, ["~> 0.3.0"])
74
+ s.add_runtime_dependency(%q<sugar-high>, ["~> 0.3.1"])
74
75
  s.add_runtime_dependency(%q<r3_plugin_toolbox>, [">= 0.4.0"])
75
76
  else
76
- s.add_dependency(%q<cancan>, ["~> 1.4.0"])
77
+ s.add_dependency(%q<cancan>, [">= 1.4.1"])
77
78
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
78
- s.add_dependency(%q<sugar-high>, ["~> 0.3.0"])
79
+ s.add_dependency(%q<sugar-high>, ["~> 0.3.1"])
79
80
  s.add_dependency(%q<r3_plugin_toolbox>, ["~> 0.4.0"])
80
- s.add_dependency(%q<rspec>, [">= 2.0.0"])
81
+ s.add_dependency(%q<rspec>, [">= 2.0.1"])
81
82
  s.add_dependency(%q<rspec-action_view>, [">= 0.3.4"])
82
83
  s.add_dependency(%q<generator-spec>, [">= 0.7.0"])
83
- s.add_dependency(%q<cancan>, ["~> 1.4.0"])
84
+ s.add_dependency(%q<cancan>, [">= 1.4.1"])
84
85
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
85
- s.add_dependency(%q<sugar-high>, ["~> 0.3.0"])
86
+ s.add_dependency(%q<sugar-high>, ["~> 0.3.1"])
86
87
  s.add_dependency(%q<r3_plugin_toolbox>, [">= 0.4.0"])
87
88
  end
88
89
  else
89
- s.add_dependency(%q<cancan>, ["~> 1.4.0"])
90
+ s.add_dependency(%q<cancan>, [">= 1.4.1"])
90
91
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
91
- s.add_dependency(%q<sugar-high>, ["~> 0.3.0"])
92
+ s.add_dependency(%q<sugar-high>, ["~> 0.3.1"])
92
93
  s.add_dependency(%q<r3_plugin_toolbox>, ["~> 0.4.0"])
93
- s.add_dependency(%q<rspec>, [">= 2.0.0"])
94
+ s.add_dependency(%q<rspec>, [">= 2.0.1"])
94
95
  s.add_dependency(%q<rspec-action_view>, [">= 0.3.4"])
95
96
  s.add_dependency(%q<generator-spec>, [">= 0.7.0"])
96
- s.add_dependency(%q<cancan>, ["~> 1.4.0"])
97
+ s.add_dependency(%q<cancan>, [">= 1.4.1"])
97
98
  s.add_dependency(%q<require_all>, ["~> 1.2.0"])
98
- s.add_dependency(%q<sugar-high>, ["~> 0.3.0"])
99
+ s.add_dependency(%q<sugar-high>, ["~> 0.3.1"])
99
100
  s.add_dependency(%q<r3_plugin_toolbox>, [">= 0.4.0"])
100
101
  end
101
102
  end
@@ -11,17 +11,30 @@ module Cancan
11
11
 
12
12
  source_root File.dirname(__FILE__) + '/templates'
13
13
 
14
+ class_option :locales, :type => :array, :default => ['all'], :desc => 'locales to generate for'
15
+
14
16
  def main_flow
15
- copy_locale
17
+ copy_locales
16
18
  end
17
19
 
18
20
  protected
19
21
 
20
22
  include Rails3::Assist::BasicLogger
21
23
  # extend Rails3::Assist::UseMacro
24
+
25
+ def supported_locales
26
+ [:en, :da]
27
+ end
28
+
29
+ def locales
30
+ return supported_locales if options[:locales].include? 'all'
31
+ options[:locales].map(&:to_sym) & supported_locales
32
+ end
22
33
 
23
- def copy_locale
24
- template "restlinks.en.yml", "config/locales/cream.en.yml"
34
+ def copy_locales
35
+ locales.each do |locale|
36
+ template "restlinks.#{locale}.yml", "config/locales/cream.#{locale}.yml"
37
+ end
25
38
  end
26
39
  end
27
40
  end
@@ -0,0 +1,10 @@
1
+ en:
2
+ cream:
3
+ confirm: 'Er du sikker?'
4
+ actions:
5
+ rest:
6
+ index: "Indeks"
7
+ new: "Ny"
8
+ edit: "Rediger"
9
+ delete: "Slet"
10
+ show: "Vis"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 1
9
- version: 0.2.1
8
+ - 2
9
+ version: 0.2.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristian Mandrup
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-23 00:00:00 +01:00
17
+ date: 2011-01-10 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -22,13 +22,13 @@ dependencies:
22
22
  requirement: &id001 !ruby/object:Gem::Requirement
23
23
  none: false
24
24
  requirements:
25
- - - ~>
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  segments:
28
28
  - 1
29
29
  - 4
30
- - 0
31
- version: 1.4.0
30
+ - 1
31
+ version: 1.4.1
32
32
  type: :runtime
33
33
  prerelease: false
34
34
  version_requirements: *id001
@@ -57,8 +57,8 @@ dependencies:
57
57
  segments:
58
58
  - 0
59
59
  - 3
60
- - 0
61
- version: 0.3.0
60
+ - 1
61
+ version: 0.3.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: *id003
@@ -87,8 +87,8 @@ dependencies:
87
87
  segments:
88
88
  - 2
89
89
  - 0
90
- - 0
91
- version: 2.0.0
90
+ - 1
91
+ version: 2.0.1
92
92
  type: :development
93
93
  prerelease: false
94
94
  version_requirements: *id005
@@ -127,13 +127,13 @@ dependencies:
127
127
  requirement: &id008 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
- - - ~>
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  segments:
133
133
  - 1
134
134
  - 4
135
- - 0
136
- version: 1.4.0
135
+ - 1
136
+ version: 1.4.1
137
137
  type: :runtime
138
138
  prerelease: false
139
139
  version_requirements: *id008
@@ -162,8 +162,8 @@ dependencies:
162
162
  segments:
163
163
  - 0
164
164
  - 3
165
- - 0
166
- version: 0.3.0
165
+ - 1
166
+ version: 0.3.1
167
167
  type: :runtime
168
168
  prerelease: false
169
169
  version_requirements: *id010
@@ -208,6 +208,7 @@ files:
208
208
  - lib/cancan-rest-links/rails/configure.rb
209
209
  - lib/cancan-rest-links/rest_links.rb
210
210
  - lib/generators/cancan/restlinks/restlinks_generator.rb
211
+ - lib/generators/cancan/restlinks/templates/restlinks.da.yml
211
212
  - lib/generators/cancan/restlinks/templates/restlinks.en.yml
212
213
  - log/development.log
213
214
  - sandbox/link_with_cream_spec.rb