gettext_simple_rails 0.0.17 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d4be0d0534b4a7a70ddca219372da837ab026fb
4
- data.tar.gz: efd0ed1bb47482868b5d519509bb97608d43bef1
3
+ metadata.gz: 09e4c971a0fcd00b1e4cd229fccf759dcd07f59c
4
+ data.tar.gz: 6a94d3c4de1cf7782fc9346de181466a069385aa
5
5
  SHA512:
6
- metadata.gz: e0c38d4c00a24e9153eced1556abbb8b48d6e5707cf3d391f8c896eb34acde02d200cf6b428201bebe6752851b85296d8aad7bdc8b502ddf77da188d15884756
7
- data.tar.gz: 43c029501fc3ca0bd3d68a7acc282bccad2177a365729822deaea7fd32d602b503e11beac0f666dbea0c0ea5c12c6f5752851e539303979a10ee0168c2decc7b
6
+ metadata.gz: 52364b9bec0b896ee10d95fa16d4385060aa365eb7b6268de751b4ee2741e1425b1017fe8dae2afad96235b54f2e7c9bbe404d21b9003993fffb68ff4a7e2f51
7
+ data.tar.gz: ab1a389efa6e4c67272fb5c368c081293959892ea98fe03f03ae38f56af6b3deabd63d3d3bd33c7d898b019a9e598bfcdda52879495bbbd8e05e204036552180
@@ -2,7 +2,7 @@ class GettextSimpleRails::Translators::ActiveRecordValidationsTranslator
2
2
  def detected?
3
3
  ::Kernel.const_defined?("ActiveRecord")
4
4
  end
5
-
5
+
6
6
  def translations
7
7
  @translations_hash = {
8
8
  "activerecord" => {
@@ -14,27 +14,28 @@ class GettextSimpleRails::Translators::ActiveRecordValidationsTranslator
14
14
  }
15
15
  }
16
16
  }
17
-
17
+
18
18
  scan_validation_errors
19
-
19
+ scan_relation_errors
20
+
20
21
  return @translations_hash
21
22
  end
22
-
23
+
23
24
  private
24
-
25
+
25
26
  def scan_validation_errors
26
27
  GettextSimpleRails::ModelInspector.model_classes do |inspector|
27
28
  clazz_snake_name = StringCases.camel_to_snake(inspector.clazz.name)
28
29
  @translations_hash["activerecord"]["errors"]["models"][clazz_snake_name] = {"attributes" => {}} unless @translations_hash["activerecord"]["errors"]["models"].key?(clazz_snake_name)
29
30
  attributes_hash = @translations_hash["activerecord"]["errors"]["models"][clazz_snake_name]["attributes"]
30
-
31
+
31
32
  inspector.clazz._validators.each do |attribute_name, validators|
32
33
  attribute_name = attribute_name.to_s
33
-
34
+
34
35
  validators.each do |validator|
35
36
  attributes_hash[attribute_name] = {} unless attributes_hash.key?(attribute_name)
36
37
  attribute_hash = attributes_hash[attribute_name]
37
-
38
+
38
39
  translations_for_length_validator(validator, attribute_hash) if validator.is_a?(ActiveModel::Validations::LengthValidator)
39
40
  translations_for_format_validator(validator, attribute_hash) if validator.is_a?(ActiveModel::Validations::FormatValidator)
40
41
  translations_for_uniqueness_validator(validator, attribute_hash) if validator.is_a?(ActiveRecord::Validations::UniquenessValidator)
@@ -44,33 +45,54 @@ private
44
45
  end
45
46
  end
46
47
  end
47
-
48
+
49
+ def scan_relation_errors
50
+ GettextSimpleRails::ModelInspector.model_classes do |inspector|
51
+ clazz_snake_name = StringCases.camel_to_snake(inspector.clazz.name)
52
+ @translations_hash["activerecord"]["errors"]["models"][clazz_snake_name] = {"attributes" => {}} unless @translations_hash["activerecord"]["errors"]["models"].key?(clazz_snake_name)
53
+ attributes_hash = @translations_hash["activerecord"]["errors"]["models"][clazz_snake_name]["attributes"]
54
+ base_hash = attributes_hash["base"] ||= {}
55
+
56
+ inspector.relationships do |name, reflection|
57
+ if reflection.options[:dependent] == :restrict_with_error || reflection.options[:dependent] == :restrict_with_exception
58
+ base_hash["restrict_dependent_destroy"] ||= {}
59
+
60
+ if reflection.macro == :has_many
61
+ base_hash["restrict_dependent_destroy"]["many"] ||= "Cannot delete record because dependent %{record} exist"
62
+ elsif reflection.macro == :has_one
63
+ base_hash["restrict_dependent_destroy"]["one"] ||= "Cannot delete record because a dependent %{record} exists"
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+
48
70
  def translations_for_length_validator(validator, attribute_hash)
49
71
  if validator.options[:minimum].present?
50
72
  attribute_hash["too_short"] = "is too short. The minimum is %{count}"
51
73
  end
52
-
74
+
53
75
  if validator.options[:maximum].present?
54
76
  attribute_hash["too_long"] = "is too long. The maximum is %{count}"
55
77
  end
56
-
78
+
57
79
  if validator.options[:is].present?
58
80
  attribute_hash["wrong_length"] = "is not the correct length: %{count}"
59
81
  end
60
82
  end
61
-
83
+
62
84
  def translations_for_format_validator(validator, attribute_hash)
63
85
  attribute_hash["invalid"] = "is invalid"
64
86
  end
65
-
87
+
66
88
  def translations_for_uniqueness_validator(validator, attribute_hash)
67
89
  attribute_hash["taken"] = "has already been taken"
68
90
  end
69
-
91
+
70
92
  def translations_for_presence_validator(validator, attribute_hash)
71
93
  attribute_hash["blank"] = "cannot be blank"
72
94
  end
73
-
95
+
74
96
  def translations_for_email_validator(validator, attribute_hash)
75
97
  attribute_hash["invalid"] = "is invalid"
76
98
  end
@@ -1,3 +1,3 @@
1
1
  module GettextSimpleRails
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.19"
3
3
  end
@@ -4,14 +4,14 @@ describe GettextSimpleRails::Translators::ActiveRecordValidationsTranslator do
4
4
  before do
5
5
  # Make it possible to call the Rake task.
6
6
  ::Dummy::Application.load_tasks
7
-
7
+
8
8
  # Clean up any existing translations.
9
9
  FileUtils.rm_r(GettextSimpleRails.translation_dir) if File.exists?(GettextSimpleRails.translation_dir)
10
-
10
+
11
11
  # Generate model translations so we can check them.
12
12
  ::Rake::Task["gettext_simple_rails:generate_translator_files"].execute
13
13
  end
14
-
14
+
15
15
  it "should generate translations for validations" do
16
16
  filepath = "#{GettextSimpleRails.translation_dir}/active_record_validations_translator_translations.rb"
17
17
  cont = File.read(filepath)
@@ -21,5 +21,6 @@ describe GettextSimpleRails::Translators::ActiveRecordValidationsTranslator do
21
21
  cont.should include "_('activerecord.errors.models.user.attributes.name.taken')"
22
22
  cont.should include "_('activerecord.errors.models.user.attributes.name.invalid')"
23
23
  cont.should include "_('activerecord.errors.models.user.attributes.email.invalid')"
24
+ cont.should include "_('activerecord.errors.models.user.attributes.base.restrict_dependent_destroy.many')"
24
25
  end
25
26
  end
@@ -2,9 +2,9 @@ require "email_validator"
2
2
 
3
3
  class User < ActiveRecord::Base
4
4
  translates :title
5
-
6
- has_many :roles
7
-
5
+
6
+ has_many :roles, dependent: :restrict_with_error
7
+
8
8
  validates :name, :length => {:in => 2..255}
9
9
  validates :name, :uniqueness => true, :presence => true
10
10
  validates :name, :format => {:with => /\A[A-z]+\Z/}
@@ -0,0 +1,6 @@
1
+ class AddEmailToUsers < ActiveRecord::Migration
2
+ def change
3
+ add_column :users, :email, :string
4
+ add_index :users, :email
5
+ end
6
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140515092420) do
14
+ ActiveRecord::Schema.define(version: 20140816124855) do
15
15
 
16
16
  create_table "roles", force: true do |t|
17
17
  t.string "role"
@@ -37,6 +37,9 @@ ActiveRecord::Schema.define(version: 20140515092420) do
37
37
  t.integer "age"
38
38
  t.datetime "created_at"
39
39
  t.datetime "updated_at"
40
+ t.string "email"
40
41
  end
41
42
 
43
+ add_index "users", ["email"], name: "index_users_on_email"
44
+
42
45
  end
Binary file
@@ -1,17 +1,5 @@
1
1
  class GettextSimpleRails::MonthNames
2
2
  def translations
3
- #. Default value: id
4
- _('activerecord.attributes.role.id')
5
- #. Default value: role
6
- _('activerecord.attributes.role.role')
7
- #. Default value: user_id
8
- _('activerecord.attributes.role.user_id')
9
- #. Default value: created_at
10
- _('activerecord.attributes.role.created_at')
11
- #. Default value: updated_at
12
- _('activerecord.attributes.role.updated_at')
13
- #. Default value: user
14
- _('activerecord.attributes.role.user')
15
3
  #. Default value: id
16
4
  _('activerecord.attributes.user.id')
17
5
  #. Default value: name
@@ -24,17 +12,31 @@ class GettextSimpleRails::MonthNames
24
12
  _('activerecord.attributes.user.created_at')
25
13
  #. Default value: updated_at
26
14
  _('activerecord.attributes.user.updated_at')
15
+ #. Default value: email
16
+ _('activerecord.attributes.user.email')
27
17
  #. Default value: translations
28
18
  _('activerecord.attributes.user.translations')
29
19
  #. Default value: roles
30
20
  _('activerecord.attributes.user.roles')
31
- #. Default value: Role
32
- _('activerecord.models.role.one')
33
- #. Default value: Role
34
- _('activerecord.models.role.other')
21
+ #. Default value: id
22
+ _('activerecord.attributes.role.id')
23
+ #. Default value: role
24
+ _('activerecord.attributes.role.role')
25
+ #. Default value: user_id
26
+ _('activerecord.attributes.role.user_id')
27
+ #. Default value: created_at
28
+ _('activerecord.attributes.role.created_at')
29
+ #. Default value: updated_at
30
+ _('activerecord.attributes.role.updated_at')
31
+ #. Default value: user
32
+ _('activerecord.attributes.role.user')
35
33
  #. Default value: User
36
34
  _('activerecord.models.user.one')
37
35
  #. Default value: User
38
36
  _('activerecord.models.user.other')
37
+ #. Default value: Role
38
+ _('activerecord.models.role.one')
39
+ #. Default value: Role
40
+ _('activerecord.models.role.other')
39
41
  end
40
42
  end
@@ -14,5 +14,7 @@ class GettextSimpleRails::MonthNames
14
14
  _('activerecord.errors.models.user.attributes.name.invalid')
15
15
  #. Default value: is invalid
16
16
  _('activerecord.errors.models.user.attributes.email.invalid')
17
+ #. Default value: Cannot delete record because dependent %{record} exist
18
+ _('activerecord.errors.models.user.attributes.base.restrict_dependent_destroy.many')
17
19
  end
18
20
  end
@@ -0,0 +1,28 @@
1
+  (27.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
2
+  (24.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to CreateUsers (20140410170418)
5
+  (0.1ms) begin transaction
6
+  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "birthday_at" date, "age" integer, "created_at" datetime, "updated_at" datetime) 
7
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140410170418"]]
8
+  (25.5ms) commit transaction
9
+ Migrating to CreateRoles (20140411112622)
10
+  (0.1ms) begin transaction
11
+  (0.3ms) CREATE TABLE "roles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "role" varchar(255), "user_id" integer, "created_at" datetime, "updated_at" datetime) 
12
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140411112622"]]
13
+  (23.7ms) commit transaction
14
+ Migrating to CreateUserTranslations (20140515092420)
15
+  (0.1ms) begin transaction
16
+  (0.3ms) CREATE TABLE "user_translations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer NOT NULL, "locale" varchar(255) NOT NULL, "created_at" datetime, "updated_at" datetime) 
17
+  (0.2ms) ALTER TABLE "user_translations" ADD "title" varchar(255)
18
+  (0.1ms) CREATE INDEX "index_user_translations_on_user_id" ON "user_translations" ("user_id")
19
+  (0.1ms) CREATE INDEX "index_user_translations_on_locale" ON "user_translations" ("locale")
20
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140515092420"]]
21
+  (21.7ms) commit transaction
22
+ Migrating to AddEmailToUsers (20140816124855)
23
+  (0.1ms) begin transaction
24
+  (0.3ms) ALTER TABLE "users" ADD "email" varchar(255)
25
+  (0.2ms) CREATE INDEX "index_users_on_email" ON "users" ("email")
26
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140816124855"]]
27
+  (27.2ms) commit transaction
28
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -1043,3 +1043,174 @@ Migrating to CreateUserTranslations (20140515092420)
1043
1043
   (0.1ms) rollback transaction
1044
1044
   (0.0ms) begin transaction
1045
1045
   (0.1ms) rollback transaction
1046
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1047
+  (0.1ms) begin transaction
1048
+  (0.0ms) rollback transaction
1049
+  (0.0ms) begin transaction
1050
+  (0.1ms) rollback transaction
1051
+  (0.0ms) begin transaction
1052
+  (0.1ms) rollback transaction
1053
+  (0.1ms) begin transaction
1054
+  (0.3ms) rollback transaction
1055
+  (0.1ms) begin transaction
1056
+  (0.1ms) rollback transaction
1057
+  (0.1ms) begin transaction
1058
+  (0.1ms) rollback transaction
1059
+  (0.1ms) begin transaction
1060
+  (0.1ms) rollback transaction
1061
+  (0.0ms) begin transaction
1062
+  (0.0ms) rollback transaction
1063
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1064
+  (0.1ms) begin transaction
1065
+  (0.1ms) rollback transaction
1066
+  (0.0ms) begin transaction
1067
+  (0.1ms) rollback transaction
1068
+  (0.0ms) begin transaction
1069
+  (0.1ms) rollback transaction
1070
+  (0.0ms) begin transaction
1071
+  (0.1ms) rollback transaction
1072
+  (0.0ms) begin transaction
1073
+  (0.1ms) rollback transaction
1074
+  (0.0ms) begin transaction
1075
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1076
+  (0.1ms) begin transaction
1077
+  (0.0ms) rollback transaction
1078
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1079
+  (0.1ms) begin transaction
1080
+  (0.0ms) rollback transaction
1081
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1082
+  (0.1ms) begin transaction
1083
+  (0.0ms) rollback transaction
1084
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1085
+  (0.1ms) begin transaction
1086
+  (0.0ms) rollback transaction
1087
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1088
+  (0.1ms) begin transaction
1089
+  (0.0ms) rollback transaction
1090
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1091
+  (0.1ms) begin transaction
1092
+  (0.0ms) rollback transaction
1093
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1094
+  (0.1ms) begin transaction
1095
+  (0.0ms) rollback transaction
1096
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1097
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1098
+  (0.1ms) begin transaction
1099
+  (0.0ms) rollback transaction
1100
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1101
+  (0.1ms) begin transaction
1102
+  (0.0ms) rollback transaction
1103
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1104
+ Migrating to AddEmailToUsers (20140816124855)
1105
+  (0.0ms) begin transaction
1106
+  (0.3ms) ALTER TABLE "users" ADD "email" varchar(255)
1107
+  (0.1ms) CREATE INDEX "index_users_on_email" ON "users" ("email")
1108
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20140816124855"]]
1109
+  (22.8ms) commit transaction
1110
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1111
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1112
+  (0.1ms) begin transaction
1113
+  (0.0ms) SAVEPOINT active_record_1
1114
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."name" = 'Eugene Anderson' LIMIT 1
1115
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1116
+  (0.0ms) rollback transaction
1117
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1118
+  (0.1ms) begin transaction
1119
+  (0.0ms) SAVEPOINT active_record_1
1120
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."name" = 'Shirley Mason' LIMIT 1
1121
+ SQL (2.1ms) INSERT INTO "users" ("created_at", "email", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:49:52 UTC +00:00], ["email", "jbishop@eire.info"], ["name", "Shirley Mason"], ["updated_at", Sat, 16 Aug 2014 12:49:52 UTC +00:00]]
1122
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1123
+  (0.0ms) SAVEPOINT active_record_1
1124
+ SQL (0.2ms) INSERT INTO "roles" ("created_at", "role", "updated_at", "user_id") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:49:52 UTC +00:00], ["role", "administrator"], ["updated_at", Sat, 16 Aug 2014 12:49:52 UTC +00:00], ["user_id", 1]]
1125
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1126
+  (0.0ms) SAVEPOINT active_record_1
1127
+ Role Exists (0.1ms) SELECT 1 AS one FROM "roles" WHERE "roles"."user_id" = ? LIMIT 1 [["user_id", 1]]
1128
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1129
+  (0.1ms) rollback transaction
1130
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1131
+  (0.1ms) begin transaction
1132
+  (0.0ms) SAVEPOINT active_record_1
1133
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."name" = 'Frances' LIMIT 1
1134
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "email", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:50:01 UTC +00:00], ["email", "ahenderson@buzzbean.com"], ["name", "Frances"], ["updated_at", Sat, 16 Aug 2014 12:50:01 UTC +00:00]]
1135
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1136
+  (0.0ms) SAVEPOINT active_record_1
1137
+ SQL (0.2ms) INSERT INTO "roles" ("created_at", "role", "updated_at", "user_id") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:50:01 UTC +00:00], ["role", "administrator"], ["updated_at", Sat, 16 Aug 2014 12:50:01 UTC +00:00], ["user_id", 1]]
1138
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1139
+  (0.0ms) SAVEPOINT active_record_1
1140
+ Role Exists (0.1ms) SELECT 1 AS one FROM "roles" WHERE "roles"."user_id" = ? LIMIT 1 [["user_id", 1]]
1141
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1142
+  (0.1ms) rollback transaction
1143
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1144
+  (0.1ms) begin transaction
1145
+  (0.0ms) SAVEPOINT active_record_1
1146
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."name" = 'Lori' LIMIT 1
1147
+ SQL (1.6ms) INSERT INTO "users" ("created_at", "email", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:50:18 UTC +00:00], ["email", "rstewart@linkbridge.org"], ["name", "Lori"], ["updated_at", Sat, 16 Aug 2014 12:50:18 UTC +00:00]]
1148
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1149
+  (0.0ms) SAVEPOINT active_record_1
1150
+ SQL (0.2ms) INSERT INTO "roles" ("created_at", "role", "updated_at", "user_id") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:50:18 UTC +00:00], ["role", "administrator"], ["updated_at", Sat, 16 Aug 2014 12:50:18 UTC +00:00], ["user_id", 1]]
1151
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1152
+  (0.0ms) SAVEPOINT active_record_1
1153
+ Role Exists (0.1ms) SELECT 1 AS one FROM "roles" WHERE "roles"."user_id" = ? LIMIT 1 [["user_id", 1]]
1154
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1155
+  (0.1ms) rollback transaction
1156
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1157
+  (0.1ms) begin transaction
1158
+  (0.0ms) SAVEPOINT active_record_1
1159
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."name" = 'Jennifer' LIMIT 1
1160
+ SQL (1.7ms) INSERT INTO "users" ("created_at", "email", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:50:28 UTC +00:00], ["email", "kperez@wikibox.edu"], ["name", "Jennifer"], ["updated_at", Sat, 16 Aug 2014 12:50:28 UTC +00:00]]
1161
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1162
+  (0.0ms) SAVEPOINT active_record_1
1163
+ SQL (0.2ms) INSERT INTO "roles" ("created_at", "role", "updated_at", "user_id") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:50:28 UTC +00:00], ["role", "administrator"], ["updated_at", Sat, 16 Aug 2014 12:50:28 UTC +00:00], ["user_id", 1]]
1164
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1165
+  (0.0ms) SAVEPOINT active_record_1
1166
+ Role Exists (0.1ms) SELECT 1 AS one FROM "roles" WHERE "roles"."user_id" = ? LIMIT 1 [["user_id", 1]]
1167
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1168
+  (0.1ms) rollback transaction
1169
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1170
+  (0.1ms) begin transaction
1171
+  (0.0ms) rollback transaction
1172
+  (0.0ms) begin transaction
1173
+  (0.0ms) SAVEPOINT active_record_1
1174
+ User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."name" = 'Jean' LIMIT 1
1175
+ SQL (1.8ms) INSERT INTO "users" ("created_at", "email", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:51:13 UTC +00:00], ["email", "lbailey@skiptube.info"], ["name", "Jean"], ["updated_at", Sat, 16 Aug 2014 12:51:13 UTC +00:00]]
1176
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1177
+  (0.0ms) SAVEPOINT active_record_1
1178
+ SQL (0.2ms) INSERT INTO "roles" ("created_at", "role", "updated_at", "user_id") VALUES (?, ?, ?, ?) [["created_at", Sat, 16 Aug 2014 12:51:13 UTC +00:00], ["role", "administrator"], ["updated_at", Sat, 16 Aug 2014 12:51:13 UTC +00:00], ["user_id", 1]]
1179
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1180
+  (0.0ms) SAVEPOINT active_record_1
1181
+ Role Exists (0.1ms) SELECT 1 AS one FROM "roles" WHERE "roles"."user_id" = ? LIMIT 1 [["user_id", 1]]
1182
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1183
+  (0.1ms) rollback transaction
1184
+  (0.0ms) begin transaction
1185
+  (0.1ms) rollback transaction
1186
+  (0.0ms) begin transaction
1187
+  (0.1ms) rollback transaction
1188
+  (0.0ms) begin transaction
1189
+  (0.1ms) rollback transaction
1190
+  (0.1ms) begin transaction
1191
+  (0.1ms) rollback transaction
1192
+  (0.0ms) begin transaction
1193
+  (0.0ms) rollback transaction
1194
+  (0.0ms) begin transaction
1195
+  (0.0ms) rollback transaction
1196
+  (0.0ms) begin transaction
1197
+  (0.2ms) rollback transaction
1198
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1199
+  (0.1ms) begin transaction
1200
+  (0.0ms) rollback transaction
1201
+  (0.0ms) begin transaction
1202
+  (0.1ms) rollback transaction
1203
+  (0.0ms) begin transaction
1204
+  (0.0ms) rollback transaction
1205
+  (0.0ms) begin transaction
1206
+  (0.1ms) rollback transaction
1207
+  (0.0ms) begin transaction
1208
+  (0.1ms) rollback transaction
1209
+  (0.0ms) begin transaction
1210
+  (0.0ms) rollback transaction
1211
+  (0.0ms) begin transaction
1212
+  (0.0ms) rollback transaction
1213
+  (0.0ms) begin transaction
1214
+  (0.3ms) rollback transaction
1215
+  (0.3ms) begin transaction
1216
+  (0.1ms) rollback transaction
@@ -0,0 +1,6 @@
1
+ FactoryGirl.define do
2
+ factory :role do
3
+ role "administrator"
4
+ association :user, factory: :user
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ FactoryGirl.define do
2
+ factory :user do
3
+ name { Forgery::Name.first_name }
4
+ email { Forgery::Internet.email_address }
5
+ end
6
+ end
@@ -0,0 +1,13 @@
1
+ require "spec_helper"
2
+
3
+ describe User do
4
+ let!(:user){ create :user }
5
+ let(:role){ create :role, user: user }
6
+
7
+ it "#destroy" do
8
+ role
9
+ user.destroy
10
+ user.errors.any?.should eq true
11
+ user.errors[:base].should eq ["Cannot delete record because dependent roles exist"]
12
+ end
13
+ end
@@ -4,6 +4,8 @@ require File.expand_path("../dummy/config/environment.rb", __FILE__)
4
4
  require 'rspec/rails'
5
5
  require 'rspec/autorun'
6
6
  require "rails/test_help"
7
+ require 'factory_girl_rails'
8
+ require 'forgery'
7
9
 
8
10
  Rails.backtrace_cleaner.remove_silencers!
9
11
 
@@ -24,8 +26,7 @@ RSpec.configure do |config|
24
26
  # config.mock_with :flexmock
25
27
  # config.mock_with :rr
26
28
 
27
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
28
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
29
+ config.include FactoryGirl::Syntax::Methods
29
30
 
30
31
  # If you're not using ActiveRecord, or you'd prefer not to run each of your
31
32
  # examples within a transaction, remove the following line or assign false
metadata CHANGED
@@ -1,111 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext_simple_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Johansen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-11 00:00:00.000000000 Z
11
+ date: 2014-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.4
19
+ version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.4
26
+ version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: gettext_simple
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.0.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.0.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: string-cases
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-rails
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: email_validator
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: forgery
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: factory_girl_rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
95
123
  - !ruby/object:Gem::Version
96
124
  version: '0'
97
125
  - !ruby/object:Gem::Dependency
98
126
  name: globalize
99
127
  requirement: !ruby/object:Gem::Requirement
100
128
  requirements:
101
- - - ~>
129
+ - - "~>"
102
130
  - !ruby/object:Gem::Version
103
131
  version: 4.0.1
104
132
  type: :development
105
133
  prerelease: false
106
134
  version_requirements: !ruby/object:Gem::Requirement
107
135
  requirements:
108
- - - ~>
136
+ - - "~>"
109
137
  - !ruby/object:Gem::Version
110
138
  version: 4.0.1
111
139
  description: Inspects models and other modules to easily generate .po-files and translate
@@ -116,95 +144,101 @@ executables: []
116
144
  extensions: []
117
145
  extra_rdoc_files: []
118
146
  files:
119
- - app/assets/stylesheets/gettext_simple_rails/application.css
147
+ - MIT-LICENSE
148
+ - Rakefile
120
149
  - app/assets/javascripts/gettext_simple_rails/application.js
121
- - app/helpers/gettext_simple_rails/application_helper.rb
150
+ - app/assets/stylesheets/gettext_simple_rails/application.css
122
151
  - app/controllers/gettext_simple_rails/application_controller.rb
152
+ - app/helpers/gettext_simple_rails/application_helper.rb
123
153
  - app/views/layouts/gettext_simple_rails/application.html.erb
154
+ - config/default.po
124
155
  - config/poedit_ruby_parser.conf
125
156
  - config/routes.rb
126
- - config/default.po
127
157
  - lib/gettext_simple_rails.rb
128
- - lib/tasks/gettext_simple_rails_tasks.rake
158
+ - lib/gettext_simple_rails/cache_handler.rb
159
+ - lib/gettext_simple_rails/engine.rb
160
+ - lib/gettext_simple_rails/i18n_injector.rb
161
+ - lib/gettext_simple_rails/model_inspector.rb
162
+ - lib/gettext_simple_rails/setup_helper.rb
163
+ - lib/gettext_simple_rails/translators/active_admin_translator.rb
129
164
  - lib/gettext_simple_rails/translators/active_record_attributes_translator.rb
130
165
  - lib/gettext_simple_rails/translators/active_record_validations_translator.rb
131
- - lib/gettext_simple_rails/translators/number_translator.rb
132
- - lib/gettext_simple_rails/translators/simple_form_translator.rb
133
166
  - lib/gettext_simple_rails/translators/date_translator.rb
134
- - lib/gettext_simple_rails/translators/globalize_translator.rb
135
167
  - lib/gettext_simple_rails/translators/devise_translator.rb
136
- - lib/gettext_simple_rails/translators/active_admin_translator.rb
137
- - lib/gettext_simple_rails/engine.rb
138
- - lib/gettext_simple_rails/cache_handler.rb
139
- - lib/gettext_simple_rails/setup_helper.rb
140
- - lib/gettext_simple_rails/i18n_injector.rb
168
+ - lib/gettext_simple_rails/translators/globalize_translator.rb
169
+ - lib/gettext_simple_rails/translators/number_translator.rb
170
+ - lib/gettext_simple_rails/translators/simple_form_translator.rb
141
171
  - lib/gettext_simple_rails/version.rb
142
- - lib/gettext_simple_rails/model_inspector.rb
143
- - MIT-LICENSE
144
- - Rakefile
145
- - spec/poedit_config_with_ruby.conf
146
- - spec/poedit_config_without_ruby.conf
147
- - spec/spec_helper.rb
148
- - spec/date_translator_spec.rb
172
+ - lib/tasks/gettext_simple_rails_tasks.rake
149
173
  - spec/active_record_validations_spec.rb
150
174
  - spec/cache_handler_spec.rb
151
- - spec/dummy/Rakefile
152
- - spec/dummy/lib/gettext_simple_rails/number_translator_translations.rb
153
- - spec/dummy/lib/gettext_simple_rails/globalize_translator_translations.rb
154
- - spec/dummy/lib/gettext_simple_rails/active_record_validations_translator_translations.rb
155
- - spec/dummy/lib/gettext_simple_rails/active_record_attributes_translator_translations.rb
156
- - spec/dummy/lib/gettext_simple_rails/date_translator_translations.rb
157
- - spec/dummy/log/test.log
175
+ - spec/date_translator_spec.rb
158
176
  - spec/dummy/README.rdoc
159
- - spec/dummy/public/422.html
160
- - spec/dummy/public/favicon.ico
161
- - spec/dummy/public/500.html
162
- - spec/dummy/public/404.html
163
- - spec/dummy/test/models/user_test.rb
164
- - spec/dummy/test/models/role_test.rb
165
- - spec/dummy/test/fixtures/roles.yml
166
- - spec/dummy/test/fixtures/users.yml
177
+ - spec/dummy/Rakefile
178
+ - spec/dummy/app/assets/javascripts/application.js
179
+ - spec/dummy/app/assets/stylesheets/application.css
180
+ - spec/dummy/app/controllers/application_controller.rb
181
+ - spec/dummy/app/helpers/application_helper.rb
182
+ - spec/dummy/app/models/role.rb
183
+ - spec/dummy/app/models/user.rb
184
+ - spec/dummy/app/views/layouts/application.html.erb
185
+ - spec/dummy/bin/bundle
186
+ - spec/dummy/bin/rails
187
+ - spec/dummy/bin/rake
188
+ - spec/dummy/config.ru
189
+ - spec/dummy/config/application.rb
167
190
  - spec/dummy/config/boot.rb
168
- - spec/dummy/config/secrets.yml
169
- - spec/dummy/config/environments/test.rb
170
- - spec/dummy/config/environments/production.rb
171
- - spec/dummy/config/environments/development.rb
172
191
  - spec/dummy/config/database.yml
173
- - spec/dummy/config/initializers/filter_parameter_logging.rb
192
+ - spec/dummy/config/environment.rb
193
+ - spec/dummy/config/environments/development.rb
194
+ - spec/dummy/config/environments/production.rb
195
+ - spec/dummy/config/environments/test.rb
196
+ - spec/dummy/config/initializers/backtrace_silencers.rb
174
197
  - spec/dummy/config/initializers/cookies_serializer.rb
175
- - spec/dummy/config/initializers/wrap_parameters.rb
176
- - spec/dummy/config/initializers/mime_types.rb
198
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
177
199
  - spec/dummy/config/initializers/inflections.rb
178
- - spec/dummy/config/initializers/backtrace_silencers.rb
200
+ - spec/dummy/config/initializers/mime_types.rb
179
201
  - spec/dummy/config/initializers/session_store.rb
180
- - spec/dummy/config/environment.rb
181
- - spec/dummy/config/locales/en.yml
202
+ - spec/dummy/config/initializers/wrap_parameters.rb
182
203
  - spec/dummy/config/locales/da.yml
183
- - spec/dummy/config/application.rb
184
- - spec/dummy/config/locales_gettext/static_translation_file.json
204
+ - spec/dummy/config/locales/en.yml
185
205
  - spec/dummy/config/locales_gettext/da/LC_MESSAGES/default.mo
186
206
  - spec/dummy/config/locales_gettext/da/LC_MESSAGES/default.po
187
207
  - spec/dummy/config/locales_gettext/en/LC_MESSAGES/default.po
208
+ - spec/dummy/config/locales_gettext/static_translation_file.json
188
209
  - spec/dummy/config/routes.rb
189
- - spec/dummy/app/models/role.rb
190
- - spec/dummy/app/models/user.rb
191
- - spec/dummy/app/assets/stylesheets/application.css
192
- - spec/dummy/app/assets/javascripts/application.js
193
- - spec/dummy/app/helpers/application_helper.rb
194
- - spec/dummy/app/controllers/application_controller.rb
195
- - spec/dummy/app/views/layouts/application.html.erb
210
+ - spec/dummy/config/secrets.yml
211
+ - spec/dummy/db/development.sqlite3
196
212
  - spec/dummy/db/migrate/20140410170418_create_users.rb
197
- - spec/dummy/db/migrate/20140515092420_create_user_translations.rb
198
213
  - spec/dummy/db/migrate/20140411112622_create_roles.rb
199
- - spec/dummy/db/test.sqlite3
214
+ - spec/dummy/db/migrate/20140515092420_create_user_translations.rb
215
+ - spec/dummy/db/migrate/20140816124855_add_email_to_users.rb
200
216
  - spec/dummy/db/schema.rb
201
- - spec/dummy/config.ru
202
- - spec/dummy/bin/bundle
203
- - spec/dummy/bin/rake
204
- - spec/dummy/bin/rails
217
+ - spec/dummy/db/test.sqlite3
218
+ - spec/dummy/lib/gettext_simple_rails/active_record_attributes_translator_translations.rb
219
+ - spec/dummy/lib/gettext_simple_rails/active_record_validations_translator_translations.rb
220
+ - spec/dummy/lib/gettext_simple_rails/date_translator_translations.rb
221
+ - spec/dummy/lib/gettext_simple_rails/globalize_translator_translations.rb
222
+ - spec/dummy/lib/gettext_simple_rails/number_translator_translations.rb
223
+ - spec/dummy/log/development.log
224
+ - spec/dummy/log/test.log
225
+ - spec/dummy/public/404.html
226
+ - spec/dummy/public/422.html
227
+ - spec/dummy/public/500.html
228
+ - spec/dummy/public/favicon.ico
229
+ - spec/dummy/test/fixtures/roles.yml
230
+ - spec/dummy/test/fixtures/users.yml
231
+ - spec/dummy/test/models/role_test.rb
232
+ - spec/dummy/test/models/user_test.rb
233
+ - spec/factories/role.rb
234
+ - spec/factories/user.rb
235
+ - spec/gettext_simple_rails_spec.rb
205
236
  - spec/globalize_translator_spec.rb
237
+ - spec/models/user_spec.rb
238
+ - spec/poedit_config_with_ruby.conf
239
+ - spec/poedit_config_without_ruby.conf
206
240
  - spec/setup_helper_spec.rb
207
- - spec/gettext_simple_rails_spec.rb
241
+ - spec/spec_helper.rb
208
242
  homepage: http://www.github.com/kaspernj/gettext_simple_rails
209
243
  licenses:
210
244
  - MIT
@@ -215,81 +249,87 @@ require_paths:
215
249
  - lib
216
250
  required_ruby_version: !ruby/object:Gem::Requirement
217
251
  requirements:
218
- - - '>='
252
+ - - ">="
219
253
  - !ruby/object:Gem::Version
220
254
  version: '0'
221
255
  required_rubygems_version: !ruby/object:Gem::Requirement
222
256
  requirements:
223
- - - '>='
257
+ - - ">="
224
258
  - !ruby/object:Gem::Version
225
259
  version: '0'
226
260
  requirements: []
227
261
  rubyforge_project:
228
- rubygems_version: 2.0.14
262
+ rubygems_version: 2.4.0
229
263
  signing_key:
230
264
  specification_version: 4
231
265
  summary: Helpers for translating a Rails app with Gettext and POEdit.
232
266
  test_files:
233
- - spec/poedit_config_with_ruby.conf
234
- - spec/poedit_config_without_ruby.conf
235
- - spec/spec_helper.rb
236
- - spec/date_translator_spec.rb
237
267
  - spec/active_record_validations_spec.rb
238
- - spec/cache_handler_spec.rb
239
- - spec/dummy/Rakefile
240
- - spec/dummy/lib/gettext_simple_rails/number_translator_translations.rb
268
+ - spec/globalize_translator_spec.rb
269
+ - spec/setup_helper_spec.rb
270
+ - spec/models/user_spec.rb
271
+ - spec/factories/role.rb
272
+ - spec/factories/user.rb
273
+ - spec/date_translator_spec.rb
274
+ - spec/dummy/README.rdoc
241
275
  - spec/dummy/lib/gettext_simple_rails/globalize_translator_translations.rb
276
+ - spec/dummy/lib/gettext_simple_rails/date_translator_translations.rb
277
+ - spec/dummy/lib/gettext_simple_rails/number_translator_translations.rb
242
278
  - spec/dummy/lib/gettext_simple_rails/active_record_validations_translator_translations.rb
243
279
  - spec/dummy/lib/gettext_simple_rails/active_record_attributes_translator_translations.rb
244
- - spec/dummy/lib/gettext_simple_rails/date_translator_translations.rb
245
- - spec/dummy/log/test.log
246
- - spec/dummy/README.rdoc
247
- - spec/dummy/public/422.html
248
- - spec/dummy/public/favicon.ico
249
- - spec/dummy/public/500.html
250
- - spec/dummy/public/404.html
251
- - spec/dummy/test/models/user_test.rb
280
+ - spec/dummy/app/controllers/application_controller.rb
281
+ - spec/dummy/app/models/role.rb
282
+ - spec/dummy/app/models/user.rb
283
+ - spec/dummy/app/views/layouts/application.html.erb
284
+ - spec/dummy/app/assets/javascripts/application.js
285
+ - spec/dummy/app/assets/stylesheets/application.css
286
+ - spec/dummy/app/helpers/application_helper.rb
252
287
  - spec/dummy/test/models/role_test.rb
288
+ - spec/dummy/test/models/user_test.rb
253
289
  - spec/dummy/test/fixtures/roles.yml
254
290
  - spec/dummy/test/fixtures/users.yml
255
- - spec/dummy/config/boot.rb
256
- - spec/dummy/config/secrets.yml
257
- - spec/dummy/config/environments/test.rb
258
- - spec/dummy/config/environments/production.rb
259
- - spec/dummy/config/environments/development.rb
260
- - spec/dummy/config/database.yml
261
- - spec/dummy/config/initializers/filter_parameter_logging.rb
262
- - spec/dummy/config/initializers/cookies_serializer.rb
291
+ - spec/dummy/public/500.html
292
+ - spec/dummy/public/422.html
293
+ - spec/dummy/public/404.html
294
+ - spec/dummy/public/favicon.ico
295
+ - spec/dummy/log/development.log
296
+ - spec/dummy/log/test.log
297
+ - spec/dummy/bin/rake
298
+ - spec/dummy/bin/rails
299
+ - spec/dummy/bin/bundle
300
+ - spec/dummy/db/schema.rb
301
+ - spec/dummy/db/test.sqlite3
302
+ - spec/dummy/db/migrate/20140515092420_create_user_translations.rb
303
+ - spec/dummy/db/migrate/20140816124855_add_email_to_users.rb
304
+ - spec/dummy/db/migrate/20140411112622_create_roles.rb
305
+ - spec/dummy/db/migrate/20140410170418_create_users.rb
306
+ - spec/dummy/db/development.sqlite3
307
+ - spec/dummy/Rakefile
308
+ - spec/dummy/config.ru
263
309
  - spec/dummy/config/initializers/wrap_parameters.rb
264
- - spec/dummy/config/initializers/mime_types.rb
310
+ - spec/dummy/config/initializers/session_store.rb
265
311
  - spec/dummy/config/initializers/inflections.rb
312
+ - spec/dummy/config/initializers/mime_types.rb
313
+ - spec/dummy/config/initializers/cookies_serializer.rb
266
314
  - spec/dummy/config/initializers/backtrace_silencers.rb
267
- - spec/dummy/config/initializers/session_store.rb
268
- - spec/dummy/config/environment.rb
269
- - spec/dummy/config/locales/en.yml
270
- - spec/dummy/config/locales/da.yml
271
- - spec/dummy/config/application.rb
315
+ - spec/dummy/config/initializers/filter_parameter_logging.rb
272
316
  - spec/dummy/config/locales_gettext/static_translation_file.json
273
- - spec/dummy/config/locales_gettext/da/LC_MESSAGES/default.mo
274
- - spec/dummy/config/locales_gettext/da/LC_MESSAGES/default.po
275
317
  - spec/dummy/config/locales_gettext/en/LC_MESSAGES/default.po
318
+ - spec/dummy/config/locales_gettext/da/LC_MESSAGES/default.po
319
+ - spec/dummy/config/locales_gettext/da/LC_MESSAGES/default.mo
320
+ - spec/dummy/config/environments/production.rb
321
+ - spec/dummy/config/environments/test.rb
322
+ - spec/dummy/config/environments/development.rb
323
+ - spec/dummy/config/application.rb
324
+ - spec/dummy/config/environment.rb
325
+ - spec/dummy/config/secrets.yml
326
+ - spec/dummy/config/boot.rb
327
+ - spec/dummy/config/locales/da.yml
328
+ - spec/dummy/config/locales/en.yml
329
+ - spec/dummy/config/database.yml
276
330
  - spec/dummy/config/routes.rb
277
- - spec/dummy/app/models/role.rb
278
- - spec/dummy/app/models/user.rb
279
- - spec/dummy/app/assets/stylesheets/application.css
280
- - spec/dummy/app/assets/javascripts/application.js
281
- - spec/dummy/app/helpers/application_helper.rb
282
- - spec/dummy/app/controllers/application_controller.rb
283
- - spec/dummy/app/views/layouts/application.html.erb
284
- - spec/dummy/db/migrate/20140410170418_create_users.rb
285
- - spec/dummy/db/migrate/20140515092420_create_user_translations.rb
286
- - spec/dummy/db/migrate/20140411112622_create_roles.rb
287
- - spec/dummy/db/test.sqlite3
288
- - spec/dummy/db/schema.rb
289
- - spec/dummy/config.ru
290
- - spec/dummy/bin/bundle
291
- - spec/dummy/bin/rake
292
- - spec/dummy/bin/rails
293
- - spec/globalize_translator_spec.rb
294
- - spec/setup_helper_spec.rb
331
+ - spec/poedit_config_with_ruby.conf
332
+ - spec/cache_handler_spec.rb
333
+ - spec/spec_helper.rb
334
+ - spec/poedit_config_without_ruby.conf
295
335
  - spec/gettext_simple_rails_spec.rb