devise_views_translated 0.4.1

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.
Files changed (37) hide show
  1. data/.document +5 -0
  2. data/.idea/.name +1 -0
  3. data/.idea/.rakeTasks +7 -0
  4. data/.idea/devise_views_translated.iml +27 -0
  5. data/.idea/encodings.xml +5 -0
  6. data/.idea/misc.xml +36 -0
  7. data/.idea/modules.xml +9 -0
  8. data/.idea/scopes/scope_settings.xml +5 -0
  9. data/.idea/vcs.xml +7 -0
  10. data/.idea/workspace.xml +735 -0
  11. data/Gemfile +13 -0
  12. data/LICENSE.txt +20 -0
  13. data/README.rdoc +19 -0
  14. data/Rakefile +46 -0
  15. data/VERSION +1 -0
  16. data/devise_views_translated.gemspec +81 -0
  17. data/lib/app/views/devise/confirmations/new.html.haml +9 -0
  18. data/lib/app/views/devise/mailer/confirmation_instructions.fr.html.haml +4 -0
  19. data/lib/app/views/devise/mailer/confirmation_instructions.html.haml +4 -0
  20. data/lib/app/views/devise/mailer/reset_password_instructions.fr.html.haml +6 -0
  21. data/lib/app/views/devise/mailer/reset_password_instructions.html.haml +6 -0
  22. data/lib/app/views/devise/mailer/unlock_instructions.fr.html.haml +5 -0
  23. data/lib/app/views/devise/mailer/unlock_instructions.html.haml +5 -0
  24. data/lib/app/views/devise/passwords/edit.html.haml +14 -0
  25. data/lib/app/views/devise/passwords/new.html.haml +25 -0
  26. data/lib/app/views/devise/registrations/edit.html.haml +27 -0
  27. data/lib/app/views/devise/registrations/new.html.haml +20 -0
  28. data/lib/app/views/devise/sessions/new.html.haml +40 -0
  29. data/lib/app/views/devise/shared/_links.haml +37 -0
  30. data/lib/app/views/devise/unlocks/new.html.haml +23 -0
  31. data/lib/config/locales/devise.fr.yml +94 -0
  32. data/lib/devise_views_translated.rb +12 -0
  33. data/lib/railtie.rb +12 -0
  34. data/lib/tasks/devise_views_translated_tasks.rake +42 -0
  35. data/test/helper.rb +18 -0
  36. data/test/test_devise_views_translated.rb +7 -0
  37. metadata +131 -0
@@ -0,0 +1,12 @@
1
+ #module DeviseViewsTranslated
2
+ # require 'railtie'
3
+ #end
4
+ module DeviseViewsTranslated
5
+
6
+ class Railtie < Rails::Railtie
7
+ rake_tasks do
8
+
9
+ load "tasks/devise_views_translated_tasks.rake"
10
+ end
11
+ end
12
+ end
data/lib/railtie.rb ADDED
@@ -0,0 +1,12 @@
1
+ #require 'devise_views_translated'
2
+ #require 'rails'
3
+
4
+ module DeviseViewsTranslated
5
+
6
+ class Railtie < Rails::Railtie
7
+ rake_tasks do
8
+
9
+ load "tasks/devise_views_translated_tasks.rake"
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,42 @@
1
+
2
+
3
+ namespace :devise_views_translated do
4
+
5
+ desc "install"
6
+ task :install => [
7
+ 'devise_views_translated:install_views',
8
+ 'devise_views_translated:install_locales'
9
+ ]
10
+
11
+ desc "Copies views... to proper application directories"
12
+ task :install_views do
13
+ ASSETS = File.join(File.dirname(__FILE__), '..','app','views','devise')
14
+
15
+ Dir.glob("#{ASSETS}/*").each do |folder|
16
+ if File.directory?(folder)
17
+ folder_name = folder.gsub(/\/.+\//, '')
18
+ destination = File.join(Rails.root,'app','views','devise', folder_name)
19
+
20
+ FileUtils.mkpath(destination) unless File.directory?(destination)
21
+
22
+ Dir[File.join(folder, '/*')].select { |a| File.file?(a) }.each do |asset|
23
+ file_to_copy = File.join(destination, '/', File.basename(asset))
24
+ puts " - copying %s to %s" % [File.basename(asset), destination.gsub(/Rails.root/, '')]
25
+ FileUtils.cp asset, destination
26
+ end
27
+ end
28
+ end
29
+ end
30
+
31
+ desc "Copies locales"
32
+ task :install_locales do
33
+ ASSETS = File.join(File.dirname(__FILE__), '..','config','locales')
34
+
35
+ destination = File.join(Rails.root,'config','locales')
36
+ Dir[File.join(ASSETS, '/*')].select { |a| File.file?(a) }.each do |asset|
37
+ puts " - copying %s to %s" % [File.basename(asset), destination.gsub(/Rails.root/, '')]
38
+ FileUtils.cp asset, destination
39
+ end
40
+ end
41
+
42
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'devise_views_translated'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestDeviseViewsTranslated < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: devise_views_translated
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - aslon
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-04-09 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: shoulda
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: bundler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 1.0.0
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.0.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: jeweler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.6.0
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.6.0
62
+ description: rake tasks to install translated views for devise
63
+ email: contact@aslon.fr
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files:
67
+ - LICENSE.txt
68
+ - README.rdoc
69
+ files:
70
+ - .document
71
+ - .idea/.name
72
+ - .idea/.rakeTasks
73
+ - .idea/devise_views_translated.iml
74
+ - .idea/encodings.xml
75
+ - .idea/misc.xml
76
+ - .idea/modules.xml
77
+ - .idea/scopes/scope_settings.xml
78
+ - .idea/vcs.xml
79
+ - .idea/workspace.xml
80
+ - Gemfile
81
+ - LICENSE.txt
82
+ - README.rdoc
83
+ - Rakefile
84
+ - VERSION
85
+ - devise_views_translated.gemspec
86
+ - lib/app/views/devise/confirmations/new.html.haml
87
+ - lib/app/views/devise/mailer/confirmation_instructions.fr.html.haml
88
+ - lib/app/views/devise/mailer/confirmation_instructions.html.haml
89
+ - lib/app/views/devise/mailer/reset_password_instructions.fr.html.haml
90
+ - lib/app/views/devise/mailer/reset_password_instructions.html.haml
91
+ - lib/app/views/devise/mailer/unlock_instructions.fr.html.haml
92
+ - lib/app/views/devise/mailer/unlock_instructions.html.haml
93
+ - lib/app/views/devise/passwords/edit.html.haml
94
+ - lib/app/views/devise/passwords/new.html.haml
95
+ - lib/app/views/devise/registrations/edit.html.haml
96
+ - lib/app/views/devise/registrations/new.html.haml
97
+ - lib/app/views/devise/sessions/new.html.haml
98
+ - lib/app/views/devise/shared/_links.haml
99
+ - lib/app/views/devise/unlocks/new.html.haml
100
+ - lib/config/locales/devise.fr.yml
101
+ - lib/devise_views_translated.rb
102
+ - lib/railtie.rb
103
+ - lib/tasks/devise_views_translated_tasks.rake
104
+ - test/helper.rb
105
+ - test/test_devise_views_translated.rb
106
+ homepage: http://github.com/aslon/devise_views_translated
107
+ licenses:
108
+ - MIT
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
120
+ none: false
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 1.8.25
128
+ signing_key:
129
+ specification_version: 3
130
+ summary: rake tasks to install translated views for devise
131
+ test_files: []