simple_localizer 0.0.4 → 0.0.5

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 (85) hide show
  1. data/Gemfile +2 -0
  2. data/Gemfile.lock +73 -14
  3. data/Rakefile +71 -31
  4. data/VERSION +1 -1
  5. data/lib/generators/simple_localizer/create_migration_generator.rb +1 -1
  6. data/lib/generators/simple_localizer/templates/create_translations.rb +13 -8
  7. data/lib/simple_localizer.rb +15 -7
  8. data/simple_localizer.gemspec +80 -4
  9. data/spec/dummy/.gitignore +15 -0
  10. data/spec/dummy/Gemfile +40 -0
  11. data/spec/dummy/Gemfile.lock +120 -0
  12. data/spec/dummy/README.rdoc +261 -0
  13. data/spec/dummy/Rakefile +7 -0
  14. data/spec/dummy/app/assets/images/rails.png +0 -0
  15. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  16. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  17. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  18. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  19. data/spec/dummy/app/mailers/.gitkeep +0 -0
  20. data/spec/dummy/app/models/admin/catalog.rb +3 -0
  21. data/spec/dummy/app/models/admin.rb +5 -0
  22. data/spec/dummy/app/models/food/restaurant.rb +3 -0
  23. data/spec/dummy/app/models/food.rb +2 -0
  24. data/spec/dummy/app/models/legacy/service.rb +4 -0
  25. data/spec/dummy/app/models/legacy.rb +2 -0
  26. data/spec/dummy/app/models/product.rb +3 -0
  27. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  28. data/spec/dummy/config/application.rb +62 -0
  29. data/spec/dummy/config/boot.rb +6 -0
  30. data/spec/dummy/config/database.yml +25 -0
  31. data/spec/dummy/config/environment.rb +5 -0
  32. data/spec/dummy/config/environments/development.rb +37 -0
  33. data/spec/dummy/config/environments/production.rb +67 -0
  34. data/spec/dummy/config/environments/test.rb +37 -0
  35. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/spec/dummy/config/initializers/inflections.rb +15 -0
  37. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  38. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  39. data/spec/dummy/config/initializers/session_store.rb +8 -0
  40. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  41. data/spec/dummy/config/locales/en.yml +5 -0
  42. data/spec/dummy/config/routes.rb +58 -0
  43. data/spec/dummy/config.ru +4 -0
  44. data/spec/dummy/db/migrate/20130123145651_create_admin_catalogs.rb +8 -0
  45. data/spec/dummy/db/migrate/20130123151746_create_food_restaurants.rb +8 -0
  46. data/spec/dummy/db/migrate/20130123151803_create_legacy_services.rb +8 -0
  47. data/spec/dummy/db/migrate/20130123151814_create_products.rb +8 -0
  48. data/spec/dummy/db/migrate/20130123200420_create_admin_catalog_translations.rb +15 -0
  49. data/spec/dummy/db/migrate/20130123200525_create_food_restaurant_translations.rb +15 -0
  50. data/spec/dummy/db/migrate/20130123200536_create_legacy_service_translations.rb +15 -0
  51. data/spec/dummy/db/migrate/20130123200543_create_product_translations.rb +15 -0
  52. data/spec/dummy/db/schema.rb +84 -0
  53. data/spec/dummy/db/seeds.rb +7 -0
  54. data/spec/dummy/lib/assets/.gitkeep +0 -0
  55. data/spec/dummy/lib/tasks/.gitkeep +0 -0
  56. data/spec/dummy/log/.gitkeep +0 -0
  57. data/spec/dummy/public/404.html +26 -0
  58. data/spec/dummy/public/422.html +26 -0
  59. data/spec/dummy/public/500.html +25 -0
  60. data/spec/dummy/public/favicon.ico +0 -0
  61. data/spec/dummy/public/index.html +241 -0
  62. data/spec/dummy/public/robots.txt +5 -0
  63. data/spec/dummy/script/rails +6 -0
  64. data/spec/dummy/test/fixtures/.gitkeep +0 -0
  65. data/spec/dummy/test/fixtures/admin/catalogs.yml +11 -0
  66. data/spec/dummy/test/fixtures/food/restaurants.yml +11 -0
  67. data/spec/dummy/test/fixtures/legacy/services.yml +11 -0
  68. data/spec/dummy/test/fixtures/products.yml +11 -0
  69. data/spec/dummy/test/functional/.gitkeep +0 -0
  70. data/spec/dummy/test/integration/.gitkeep +0 -0
  71. data/spec/dummy/test/performance/browsing_test.rb +12 -0
  72. data/spec/dummy/test/test_helper.rb +13 -0
  73. data/spec/dummy/test/unit/.gitkeep +0 -0
  74. data/spec/dummy/test/unit/admin/catalog_test.rb +7 -0
  75. data/spec/dummy/test/unit/food/restaurant_test.rb +7 -0
  76. data/spec/dummy/test/unit/legacy/service_test.rb +7 -0
  77. data/spec/dummy/test/unit/product_test.rb +7 -0
  78. data/spec/dummy/vendor/assets/javascripts/.gitkeep +0 -0
  79. data/spec/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
  80. data/spec/dummy/vendor/plugins/.gitkeep +0 -0
  81. data/spec/simple_localizer_spec.rb +114 -46
  82. data/spec/spec_helper.rb +2 -6
  83. metadata +109 -17
  84. data/spec/database.yml +0 -4
  85. data/spec/db/test.sqlite3 +0 -0
data/Gemfile CHANGED
@@ -8,4 +8,6 @@ group :development do
8
8
  gem "jeweler", "~> 1.8.4"
9
9
  gem 'database_cleaner'
10
10
  gem 'sqlite3'
11
+ gem 'rails', '3.2.10'
12
+ gem 'rack', '1.4.1'
11
13
  end
data/Gemfile.lock CHANGED
@@ -1,31 +1,78 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activemodel (3.2.7)
5
- activesupport (= 3.2.7)
4
+ actionmailer (3.2.10)
5
+ actionpack (= 3.2.10)
6
+ mail (~> 2.4.4)
7
+ actionpack (3.2.10)
8
+ activemodel (= 3.2.10)
9
+ activesupport (= 3.2.10)
6
10
  builder (~> 3.0.0)
7
- activerecord (3.2.7)
8
- activemodel (= 3.2.7)
9
- activesupport (= 3.2.7)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.4)
13
+ rack (~> 1.4.0)
14
+ rack-cache (~> 1.2)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.2.1)
17
+ activemodel (3.2.10)
18
+ activesupport (= 3.2.10)
19
+ builder (~> 3.0.0)
20
+ activerecord (3.2.10)
21
+ activemodel (= 3.2.10)
22
+ activesupport (= 3.2.10)
10
23
  arel (~> 3.0.2)
11
24
  tzinfo (~> 0.3.29)
12
- activesupport (3.2.7)
25
+ activeresource (3.2.10)
26
+ activemodel (= 3.2.10)
27
+ activesupport (= 3.2.10)
28
+ activesupport (3.2.10)
13
29
  i18n (~> 0.6)
14
30
  multi_json (~> 1.0)
15
31
  arel (3.0.2)
16
- builder (3.0.0)
17
- database_cleaner (0.8.0)
32
+ builder (3.0.4)
33
+ database_cleaner (0.9.1)
18
34
  diff-lcs (1.1.3)
35
+ erubis (2.7.0)
19
36
  git (1.2.5)
20
- i18n (0.6.0)
37
+ hike (1.2.1)
38
+ i18n (0.6.1)
21
39
  jeweler (1.8.4)
22
40
  bundler (~> 1.0)
23
41
  git (>= 1.2.5)
24
42
  rake
25
43
  rdoc
26
- json (1.7.4)
27
- multi_json (1.3.6)
28
- rake (0.9.2.2)
44
+ journey (1.0.4)
45
+ json (1.7.6)
46
+ mail (2.4.4)
47
+ i18n (>= 0.4.0)
48
+ mime-types (~> 1.16)
49
+ treetop (~> 1.4.8)
50
+ mime-types (1.19)
51
+ multi_json (1.5.0)
52
+ polyglot (0.3.3)
53
+ rack (1.4.1)
54
+ rack-cache (1.2)
55
+ rack (>= 0.4)
56
+ rack-ssl (1.3.2)
57
+ rack
58
+ rack-test (0.6.2)
59
+ rack (>= 1.0)
60
+ rails (3.2.10)
61
+ actionmailer (= 3.2.10)
62
+ actionpack (= 3.2.10)
63
+ activerecord (= 3.2.10)
64
+ activeresource (= 3.2.10)
65
+ activesupport (= 3.2.10)
66
+ bundler (~> 1.0)
67
+ railties (= 3.2.10)
68
+ railties (3.2.10)
69
+ actionpack (= 3.2.10)
70
+ activesupport (= 3.2.10)
71
+ rack-ssl (~> 1.3.2)
72
+ rake (>= 0.8.7)
73
+ rdoc (~> 3.4)
74
+ thor (>= 0.14.6, < 2.0)
75
+ rake (10.0.3)
29
76
  rdoc (3.12)
30
77
  json (~> 1.4)
31
78
  rspec (2.8.0)
@@ -36,8 +83,18 @@ GEM
36
83
  rspec-expectations (2.8.0)
37
84
  diff-lcs (~> 1.1.2)
38
85
  rspec-mocks (2.8.0)
39
- sqlite3 (1.3.6)
40
- tzinfo (0.3.33)
86
+ sprockets (2.2.2)
87
+ hike (~> 1.2)
88
+ multi_json (~> 1.0)
89
+ rack (~> 1.0)
90
+ tilt (~> 1.1, != 1.3.0)
91
+ sqlite3 (1.3.7)
92
+ thor (0.16.0)
93
+ tilt (1.3.3)
94
+ treetop (1.4.12)
95
+ polyglot
96
+ polyglot (>= 0.3.1)
97
+ tzinfo (0.3.35)
41
98
 
42
99
  PLATFORMS
43
100
  ruby
@@ -47,5 +104,7 @@ DEPENDENCIES
47
104
  bundler (~> 1.0.0)
48
105
  database_cleaner
49
106
  jeweler (~> 1.8.4)
107
+ rack (= 1.4.1)
108
+ rails (= 3.2.10)
50
109
  rspec (~> 2.8.0)
51
110
  sqlite3
data/Rakefile CHANGED
@@ -10,6 +10,11 @@ rescue Bundler::BundlerError => e
10
10
  exit e.status_code
11
11
  end
12
12
  require 'rake'
13
+ require 'rspec/core/rake_task'
14
+ require File.expand_path('spec/dummy/config/application', File.dirname(__FILE__))
15
+
16
+ Dummy::Application.load_tasks
17
+
13
18
 
14
19
  require 'jeweler'
15
20
  Jeweler::Tasks.new do |gem|
@@ -23,36 +28,71 @@ Jeweler::Tasks.new do |gem|
23
28
  end
24
29
  Jeweler::RubygemsDotOrgTasks.new
25
30
 
31
+ RSpec::Core::RakeTask.new(:spec)
32
+
26
33
  task :default => :spec
27
34
 
28
- namespace :db do
29
- require 'active_record'
30
-
31
- config = YAML.load_file File.expand_path(File.join(File.dirname(__FILE__), 'spec', 'database.yml'))
32
- ActiveRecord::Base.establish_connection(config.merge('schema_search_path' => 'public'))
33
-
34
- desc 'Run migrations'
35
- task :migrate do
36
- ActiveRecord::Migration.create_table :admin_catalogs do |t|
37
- t.timestamps
38
- end
39
-
40
- ActiveRecord::Migration.create_table :admin_catalog_translations do |t|
41
- t.string :locale
42
- t.string :name
43
- t.integer :admin_catalog_id
44
- t.timestamps
45
- end
46
-
47
- ActiveRecord::Migration.create_table :products do |t|
48
- t.timestamps
49
- end
50
-
51
- ActiveRecord::Migration.create_table :product_translations do |t|
52
- t.string :locale
53
- t.string :name
54
- t.integer :product_id
55
- t.timestamps
56
- end
57
- end
58
- end
35
+ # namespace :db do
36
+ # require 'active_record'
37
+
38
+ # config = YAML.load_file File.expand_path(File.join(File.dirname(__FILE__), 'spec', 'database.yml'))
39
+ # ActiveRecord::Base.establish_connection(config.merge('schema_search_path' => 'public'))
40
+
41
+ # desc 'Drop database'
42
+ # task :drop do
43
+ # system('rm spec/db/test.sqlite3')
44
+ # end
45
+
46
+ # desc 'Drop database and run migrations'
47
+ # task :setup do
48
+ # Rake::Task["db:drop"].invoke
49
+ # Rake::Task["db:migrate"].invoke
50
+ # end
51
+
52
+ # desc 'Run migrations'
53
+ # task :migrate do
54
+ # ActiveRecord::Migration.create_table :admin_catalogs do |t|
55
+ # t.timestamps
56
+ # end
57
+
58
+ # ActiveRecord::Migration.create_table :admin_catalog_translations do |t|
59
+ # t.string :locale
60
+ # t.string :name
61
+ # t.integer :admin_catalog_id
62
+ # t.timestamps
63
+ # end
64
+
65
+ # ActiveRecord::Migration.create_table :restaurants do |t|
66
+ # t.timestamps
67
+ # end
68
+
69
+ # ActiveRecord::Migration.create_table :food_restaurant_translations do |t|
70
+ # t.string :locale
71
+ # t.string :name
72
+ # t.integer :food_restaurant_id
73
+ # t.timestamps
74
+ # end
75
+
76
+ # ActiveRecord::Migration.create_table :qweqweqwe do |t|
77
+ # t.timestamps
78
+ # end
79
+
80
+ # ActiveRecord::Migration.create_table :legacy_service_translations do |t|
81
+ # t.string :locale
82
+ # t.string :name
83
+ # t.integer :legacy_service_id
84
+ # t.timestamps
85
+ # end
86
+
87
+ # ActiveRecord::Migration.create_table :products do |t|
88
+ # t.timestamps
89
+ # end
90
+
91
+ # ActiveRecord::Migration.create_table :product_translations do |t|
92
+ # t.string :locale
93
+ # t.string :name
94
+ # t.integer :product_id
95
+ # t.timestamps
96
+ # end
97
+ # end
98
+ # end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.0.5
@@ -24,7 +24,7 @@ module SimpleLocalizer
24
24
  def create_migration
25
25
  migration_template(
26
26
  "create_translations.rb",
27
- "db/migrate/create_#{model_name.underscore}_translations",
27
+ "db/migrate/create_#{model_name.underscore.gsub("/", "_")}_translations",
28
28
  )
29
29
  end
30
30
  end
@@ -1,10 +1,11 @@
1
- <% table_name = ":#{model_name.underscore}_translations" -%>
2
- <% owner_id = ":#{model_name.underscore}_id" -%>
3
- class Create<%= model_name.camelcase -%>Translations < ActiveRecord::Migration
1
+ <% underscore_name = model_name.underscore.gsub("/", "_") -%>
2
+ <% table_name = ":#{underscore_name}_translations" -%>
3
+ <% foreign_key = ":#{underscore_name}_id" -%>
4
+ class Create<%= underscore_name.camelize -%>Translations < ActiveRecord::Migration
4
5
  def change
5
6
  create_table <%= table_name -%> do |t|
6
7
  t.string :locale, :null => false
7
- t.integer <%= owner_id -%>
8
+ t.integer <%= foreign_key -%>
8
9
  <% fields.each_pair do |column, type| %>
9
10
  t.<%= type %> <%= ":#{column}" -%>
10
11
  <% end %>
@@ -12,8 +13,12 @@ class Create<%= model_name.camelcase -%>Translations < ActiveRecord::Migration
12
13
  t.timestamps
13
14
  end
14
15
 
15
- add_index <%= table_name -%>, <%= owner_id %>
16
- add_index <%= table_name -%>, :locale
17
- add_index <%= table_name -%>, [:locale, <%= owner_id -%>], :unique => true
16
+ <%- random_string = proc { (0...20).map{ ('a'..'z').to_a[rand(26)] }.join } -%>
17
+ <%- options = ActiveRecord::Migration.index_name(table_name, foreign_key).size > 64 ? { :name => random_string.call } : {} -%>
18
+ add_index <%= table_name -%>, <%= foreign_key %>, <%= p(options) %>
19
+ <%- options = ActiveRecord::Migration.index_name(table_name, :locale).size > 64 ? { :name => random_string.call } : {} -%>
20
+ add_index <%= table_name -%>, :locale, <%= p(options) %>
21
+ <%- options = ActiveRecord::Migration.index_name(table_name, [:locale, foreign_key]).size > 64 ? { :name => random_string.call } : {} -%>
22
+ add_index <%= table_name -%>, [:locale, <%= foreign_key -%>], <%= p(options.merge(:unique => true)) %>
18
23
  end
19
- end
24
+ end
@@ -24,19 +24,27 @@ module SimpleLocalizer
24
24
 
25
25
  module ClassMethods
26
26
  def translates *columns
27
- underscore_name = name.underscore.gsub("/", "_")
27
+ underscore_name = name.underscore.gsub("/", "_").to_sym
28
+ foreign_key = "#{underscore_name}_id".to_sym
29
+
28
30
  translation_class = const_set(:Translation, Class.new(ActiveRecord::Base))
29
31
  translated_attribute_names = columns.map &:to_s
30
32
 
31
33
  translation_class.table_name = "#{underscore_name}_translations"
32
- translation_class.belongs_to underscore_name.to_sym # WORKAROUND Rails prefers association name to be symbol
34
+ translation_class.belongs_to(underscore_name, # WORKAROUND Rails prefers association name to be symbol
35
+ :class_name => self.name,
36
+ :foreign_key => foreign_key
37
+ )
33
38
  translation_class.validates :locale, :presence => true
34
- translation_class.validates :locale, :uniqueness => { :scope => ["#{underscore_name}_id"] }
39
+ translation_class.validates underscore_name, :presence => true
40
+ translation_class.validates :locale, :uniqueness => { :scope => foreign_key }
35
41
 
36
42
  has_many(:translations,
37
- :class_name => translation_class.name,
38
- :dependent => :destroy,
39
- :autosave => true
43
+ :dependent => :destroy,
44
+ :autosave => true,
45
+ :class_name => translation_class.name,
46
+ :inverse_of => underscore_name,
47
+ :foreign_key => foreign_key
40
48
  )
41
49
 
42
50
  translated_attribute_names.each do |attr|
@@ -62,7 +70,7 @@ module SimpleLocalizer
62
70
  if I18n.respond_to?(:fallbacks) && translation.try(attr).nil?
63
71
  fallbacks_locales = I18n.fallbacks[locale.to_sym]
64
72
  translation = translations.detect { |translation|
65
- fallbacks_locales.include? translation.locale.to_sym
73
+ fallbacks_locales.include?(translation.locale.to_sym) && translation.send(attr).present?
66
74
  }
67
75
  end
68
76
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "simple_localizer"
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["vad4msiu"]
12
- s.date = "2013-01-17"
12
+ s.date = "2013-01-23"
13
13
  s.description = "Simple localization your ActiveRecord fields without magic"
14
14
  s.email = "vad4msiu@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -27,8 +27,78 @@ Gem::Specification.new do |s|
27
27
  "lib/generators/simple_localizer/templates/create_translations.rb",
28
28
  "lib/simple_localizer.rb",
29
29
  "simple_localizer.gemspec",
30
- "spec/database.yml",
31
- "spec/db/test.sqlite3",
30
+ "spec/dummy/.gitignore",
31
+ "spec/dummy/Gemfile",
32
+ "spec/dummy/Gemfile.lock",
33
+ "spec/dummy/README.rdoc",
34
+ "spec/dummy/Rakefile",
35
+ "spec/dummy/app/assets/images/rails.png",
36
+ "spec/dummy/app/assets/javascripts/application.js",
37
+ "spec/dummy/app/assets/stylesheets/application.css",
38
+ "spec/dummy/app/controllers/application_controller.rb",
39
+ "spec/dummy/app/helpers/application_helper.rb",
40
+ "spec/dummy/app/mailers/.gitkeep",
41
+ "spec/dummy/app/models/admin.rb",
42
+ "spec/dummy/app/models/admin/catalog.rb",
43
+ "spec/dummy/app/models/food.rb",
44
+ "spec/dummy/app/models/food/restaurant.rb",
45
+ "spec/dummy/app/models/legacy.rb",
46
+ "spec/dummy/app/models/legacy/service.rb",
47
+ "spec/dummy/app/models/product.rb",
48
+ "spec/dummy/app/views/layouts/application.html.erb",
49
+ "spec/dummy/config.ru",
50
+ "spec/dummy/config/application.rb",
51
+ "spec/dummy/config/boot.rb",
52
+ "spec/dummy/config/database.yml",
53
+ "spec/dummy/config/environment.rb",
54
+ "spec/dummy/config/environments/development.rb",
55
+ "spec/dummy/config/environments/production.rb",
56
+ "spec/dummy/config/environments/test.rb",
57
+ "spec/dummy/config/initializers/backtrace_silencers.rb",
58
+ "spec/dummy/config/initializers/inflections.rb",
59
+ "spec/dummy/config/initializers/mime_types.rb",
60
+ "spec/dummy/config/initializers/secret_token.rb",
61
+ "spec/dummy/config/initializers/session_store.rb",
62
+ "spec/dummy/config/initializers/wrap_parameters.rb",
63
+ "spec/dummy/config/locales/en.yml",
64
+ "spec/dummy/config/routes.rb",
65
+ "spec/dummy/db/migrate/20130123145651_create_admin_catalogs.rb",
66
+ "spec/dummy/db/migrate/20130123151746_create_food_restaurants.rb",
67
+ "spec/dummy/db/migrate/20130123151803_create_legacy_services.rb",
68
+ "spec/dummy/db/migrate/20130123151814_create_products.rb",
69
+ "spec/dummy/db/migrate/20130123200420_create_admin_catalog_translations.rb",
70
+ "spec/dummy/db/migrate/20130123200525_create_food_restaurant_translations.rb",
71
+ "spec/dummy/db/migrate/20130123200536_create_legacy_service_translations.rb",
72
+ "spec/dummy/db/migrate/20130123200543_create_product_translations.rb",
73
+ "spec/dummy/db/schema.rb",
74
+ "spec/dummy/db/seeds.rb",
75
+ "spec/dummy/lib/assets/.gitkeep",
76
+ "spec/dummy/lib/tasks/.gitkeep",
77
+ "spec/dummy/log/.gitkeep",
78
+ "spec/dummy/public/404.html",
79
+ "spec/dummy/public/422.html",
80
+ "spec/dummy/public/500.html",
81
+ "spec/dummy/public/favicon.ico",
82
+ "spec/dummy/public/index.html",
83
+ "spec/dummy/public/robots.txt",
84
+ "spec/dummy/script/rails",
85
+ "spec/dummy/test/fixtures/.gitkeep",
86
+ "spec/dummy/test/fixtures/admin/catalogs.yml",
87
+ "spec/dummy/test/fixtures/food/restaurants.yml",
88
+ "spec/dummy/test/fixtures/legacy/services.yml",
89
+ "spec/dummy/test/fixtures/products.yml",
90
+ "spec/dummy/test/functional/.gitkeep",
91
+ "spec/dummy/test/integration/.gitkeep",
92
+ "spec/dummy/test/performance/browsing_test.rb",
93
+ "spec/dummy/test/test_helper.rb",
94
+ "spec/dummy/test/unit/.gitkeep",
95
+ "spec/dummy/test/unit/admin/catalog_test.rb",
96
+ "spec/dummy/test/unit/food/restaurant_test.rb",
97
+ "spec/dummy/test/unit/legacy/service_test.rb",
98
+ "spec/dummy/test/unit/product_test.rb",
99
+ "spec/dummy/vendor/assets/javascripts/.gitkeep",
100
+ "spec/dummy/vendor/assets/stylesheets/.gitkeep",
101
+ "spec/dummy/vendor/plugins/.gitkeep",
32
102
  "spec/simple_localizer_spec.rb",
33
103
  "spec/spec_helper.rb"
34
104
  ]
@@ -48,6 +118,8 @@ Gem::Specification.new do |s|
48
118
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
49
119
  s.add_development_dependency(%q<database_cleaner>, [">= 0"])
50
120
  s.add_development_dependency(%q<sqlite3>, [">= 0"])
121
+ s.add_development_dependency(%q<rails>, ["= 3.2.10"])
122
+ s.add_development_dependency(%q<rack>, ["= 1.4.1"])
51
123
  else
52
124
  s.add_dependency(%q<activerecord>, [">= 0"])
53
125
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
@@ -55,6 +127,8 @@ Gem::Specification.new do |s|
55
127
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
56
128
  s.add_dependency(%q<database_cleaner>, [">= 0"])
57
129
  s.add_dependency(%q<sqlite3>, [">= 0"])
130
+ s.add_dependency(%q<rails>, ["= 3.2.10"])
131
+ s.add_dependency(%q<rack>, ["= 1.4.1"])
58
132
  end
59
133
  else
60
134
  s.add_dependency(%q<activerecord>, [">= 0"])
@@ -63,6 +137,8 @@ Gem::Specification.new do |s|
63
137
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
64
138
  s.add_dependency(%q<database_cleaner>, [">= 0"])
65
139
  s.add_dependency(%q<sqlite3>, [">= 0"])
140
+ s.add_dependency(%q<rails>, ["= 3.2.10"])
141
+ s.add_dependency(%q<rack>, ["= 1.4.1"])
66
142
  end
67
143
  end
68
144
 
@@ -0,0 +1,15 @@
1
+ # See http://help.github.com/ignore-files/ for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile ~/.gitignore_global
6
+
7
+ # Ignore bundler config
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+
13
+ # Ignore all logfiles and tempfiles.
14
+ /log/*.log
15
+ /tmp
@@ -0,0 +1,40 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '3.2.10'
4
+ gem 'rack', '1.4.1'
5
+
6
+ # Bundle edge Rails instead:
7
+ # gem 'rails', :git => 'git://github.com/rails/rails.git'
8
+
9
+ gem 'sqlite3'
10
+
11
+ gem 'simple_localizer', :path => File.expand_path("../../../", __FILE__)
12
+
13
+ # Gems used only for assets and not required
14
+ # in production environments by default.
15
+ group :assets do
16
+ gem 'sass-rails', '~> 3.2.3'
17
+ gem 'coffee-rails', '~> 3.2.1'
18
+
19
+ # See https://github.com/sstephenson/execjs#readme for more supported runtimes
20
+ # gem 'therubyracer', :platforms => :ruby
21
+
22
+ gem 'uglifier', '>= 1.0.3'
23
+ end
24
+
25
+ gem 'jquery-rails'
26
+
27
+ # To use ActiveModel has_secure_password
28
+ # gem 'bcrypt-ruby', '~> 3.0.0'
29
+
30
+ # To use Jbuilder templates for JSON
31
+ # gem 'jbuilder'
32
+
33
+ # Use unicorn as the app server
34
+ # gem 'unicorn'
35
+
36
+ # Deploy with Capistrano
37
+ # gem 'capistrano'
38
+
39
+ # To use debugger
40
+ # gem 'debugger'
@@ -0,0 +1,120 @@
1
+ PATH
2
+ remote: /Users/vad4msiu/projects/github/simple_localizer
3
+ specs:
4
+ simple_localizer (0.0.4)
5
+ activerecord
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionmailer (3.2.10)
11
+ actionpack (= 3.2.10)
12
+ mail (~> 2.4.4)
13
+ actionpack (3.2.10)
14
+ activemodel (= 3.2.10)
15
+ activesupport (= 3.2.10)
16
+ builder (~> 3.0.0)
17
+ erubis (~> 2.7.0)
18
+ journey (~> 1.0.4)
19
+ rack (~> 1.4.0)
20
+ rack-cache (~> 1.2)
21
+ rack-test (~> 0.6.1)
22
+ sprockets (~> 2.2.1)
23
+ activemodel (3.2.10)
24
+ activesupport (= 3.2.10)
25
+ builder (~> 3.0.0)
26
+ activerecord (3.2.10)
27
+ activemodel (= 3.2.10)
28
+ activesupport (= 3.2.10)
29
+ arel (~> 3.0.2)
30
+ tzinfo (~> 0.3.29)
31
+ activeresource (3.2.10)
32
+ activemodel (= 3.2.10)
33
+ activesupport (= 3.2.10)
34
+ activesupport (3.2.10)
35
+ i18n (~> 0.6)
36
+ multi_json (~> 1.0)
37
+ arel (3.0.2)
38
+ builder (3.0.4)
39
+ coffee-rails (3.2.2)
40
+ coffee-script (>= 2.2.0)
41
+ railties (~> 3.2.0)
42
+ coffee-script (2.2.0)
43
+ coffee-script-source
44
+ execjs
45
+ coffee-script-source (1.4.0)
46
+ erubis (2.7.0)
47
+ execjs (1.4.0)
48
+ multi_json (~> 1.0)
49
+ hike (1.2.1)
50
+ i18n (0.6.1)
51
+ journey (1.0.4)
52
+ jquery-rails (2.2.0)
53
+ railties (>= 3.0, < 5.0)
54
+ thor (>= 0.14, < 2.0)
55
+ json (1.7.6)
56
+ mail (2.4.4)
57
+ i18n (>= 0.4.0)
58
+ mime-types (~> 1.16)
59
+ treetop (~> 1.4.8)
60
+ mime-types (1.19)
61
+ multi_json (1.5.0)
62
+ polyglot (0.3.3)
63
+ rack (1.4.1)
64
+ rack-cache (1.2)
65
+ rack (>= 0.4)
66
+ rack-ssl (1.3.2)
67
+ rack
68
+ rack-test (0.6.2)
69
+ rack (>= 1.0)
70
+ rails (3.2.10)
71
+ actionmailer (= 3.2.10)
72
+ actionpack (= 3.2.10)
73
+ activerecord (= 3.2.10)
74
+ activeresource (= 3.2.10)
75
+ activesupport (= 3.2.10)
76
+ bundler (~> 1.0)
77
+ railties (= 3.2.10)
78
+ railties (3.2.10)
79
+ actionpack (= 3.2.10)
80
+ activesupport (= 3.2.10)
81
+ rack-ssl (~> 1.3.2)
82
+ rake (>= 0.8.7)
83
+ rdoc (~> 3.4)
84
+ thor (>= 0.14.6, < 2.0)
85
+ rake (10.0.3)
86
+ rdoc (3.12)
87
+ json (~> 1.4)
88
+ sass (3.2.5)
89
+ sass-rails (3.2.6)
90
+ railties (~> 3.2.0)
91
+ sass (>= 3.1.10)
92
+ tilt (~> 1.3)
93
+ sprockets (2.2.2)
94
+ hike (~> 1.2)
95
+ multi_json (~> 1.0)
96
+ rack (~> 1.0)
97
+ tilt (~> 1.1, != 1.3.0)
98
+ sqlite3 (1.3.7)
99
+ thor (0.16.0)
100
+ tilt (1.3.3)
101
+ treetop (1.4.12)
102
+ polyglot
103
+ polyglot (>= 0.3.1)
104
+ tzinfo (0.3.35)
105
+ uglifier (1.3.0)
106
+ execjs (>= 0.3.0)
107
+ multi_json (~> 1.0, >= 1.0.2)
108
+
109
+ PLATFORMS
110
+ ruby
111
+
112
+ DEPENDENCIES
113
+ coffee-rails (~> 3.2.1)
114
+ jquery-rails
115
+ rack (= 1.4.1)
116
+ rails (= 3.2.10)
117
+ sass-rails (~> 3.2.3)
118
+ simple_localizer!
119
+ sqlite3
120
+ uglifier (>= 1.0.3)