diff --git a/lib/administrate/base_dashboard.rb b/lib/administrate/base_dashboard.rb index a542b698ac..cf534d4b9d 100644 --- a/lib/administrate/base_dashboard.rb +++ b/lib/administrate/base_dashboard.rb @@ -1,14 +1,14 @@ -require "administrate/fields/belongs_to" -require "administrate/fields/boolean" -require "administrate/fields/date_time" -require "administrate/fields/email" -require "administrate/fields/has_many" -require "administrate/fields/has_one" -require "administrate/fields/image" -require "administrate/fields/number" -require "administrate/fields/polymorphic" -require "administrate/fields/string" -require "administrate/fields/text" +require "administrate/field/belongs_to" +require "administrate/field/boolean" +require "administrate/field/date_time" +require "administrate/field/email" +require "administrate/field/has_many" +require "administrate/field/has_one" +require "administrate/field/image" +require "administrate/field/number" +require "administrate/field/polymorphic" +require "administrate/field/string" +require "administrate/field/text" module Administrate class BaseDashboard diff --git a/lib/administrate/fields/associative.rb b/lib/administrate/field/associative.rb similarity index 100% rename from lib/administrate/fields/associative.rb rename to lib/administrate/field/associative.rb diff --git a/lib/administrate/fields/base.rb b/lib/administrate/field/base.rb similarity index 100% rename from lib/administrate/fields/base.rb rename to lib/administrate/field/base.rb diff --git a/lib/administrate/fields/belongs_to.rb b/lib/administrate/field/belongs_to.rb similarity index 100% rename from lib/administrate/fields/belongs_to.rb rename to lib/administrate/field/belongs_to.rb diff --git a/lib/administrate/fields/boolean.rb b/lib/administrate/field/boolean.rb similarity index 100% rename from lib/administrate/fields/boolean.rb rename to lib/administrate/field/boolean.rb diff --git a/lib/administrate/fields/date_time.rb b/lib/administrate/field/date_time.rb similarity index 100% rename from lib/administrate/fields/date_time.rb rename to lib/administrate/field/date_time.rb diff --git a/lib/administrate/fields/deferred.rb b/lib/administrate/field/deferred.rb similarity index 100% rename from lib/administrate/fields/deferred.rb rename to lib/administrate/field/deferred.rb diff --git a/lib/administrate/fields/email.rb b/lib/administrate/field/email.rb similarity index 100% rename from lib/administrate/fields/email.rb rename to lib/administrate/field/email.rb diff --git a/lib/administrate/fields/has_many.rb b/lib/administrate/field/has_many.rb similarity index 100% rename from lib/administrate/fields/has_many.rb rename to lib/administrate/field/has_many.rb diff --git a/lib/administrate/fields/has_one.rb b/lib/administrate/field/has_one.rb similarity index 100% rename from lib/administrate/fields/has_one.rb rename to lib/administrate/field/has_one.rb diff --git a/lib/administrate/fields/image.rb b/lib/administrate/field/image.rb similarity index 100% rename from lib/administrate/fields/image.rb rename to lib/administrate/field/image.rb diff --git a/lib/administrate/fields/number.rb b/lib/administrate/field/number.rb similarity index 100% rename from lib/administrate/fields/number.rb rename to lib/administrate/field/number.rb diff --git a/lib/administrate/fields/polymorphic.rb b/lib/administrate/field/polymorphic.rb similarity index 100% rename from lib/administrate/fields/polymorphic.rb rename to lib/administrate/field/polymorphic.rb diff --git a/lib/administrate/fields/string.rb b/lib/administrate/field/string.rb similarity index 100% rename from lib/administrate/fields/string.rb rename to lib/administrate/field/string.rb diff --git a/lib/administrate/fields/text.rb b/lib/administrate/field/text.rb similarity index 100% rename from lib/administrate/fields/text.rb rename to lib/administrate/field/text.rb diff --git a/lib/generators/administrate/field/templates/field_object.rb.erb b/lib/generators/administrate/field/templates/field_object.rb.erb index e233bcaa35..880919c209 100644 --- a/lib/generators/administrate/field/templates/field_object.rb.erb +++ b/lib/generators/administrate/field/templates/field_object.rb.erb @@ -1,4 +1,4 @@ -require "administrate/fields/base" +require "administrate/field/base" class <%= class_name %>Field < Administrate::Field::Base def to_s diff --git a/spec/administrate/views/fields/has_one/_form_spec.rb b/spec/administrate/views/fields/has_one/_form_spec.rb index cbae5cf276..b7515f816a 100644 --- a/spec/administrate/views/fields/has_one/_form_spec.rb +++ b/spec/administrate/views/fields/has_one/_form_spec.rb @@ -1,5 +1,5 @@ require "rails_helper" -require "administrate/fields/has_one" +require "administrate/field/has_one" describe "fields/has_one/_form", type: :view do it "displays the field name" do diff --git a/spec/administrate/views/fields/has_one/_show_spec.rb b/spec/administrate/views/fields/has_one/_show_spec.rb index 795bea3f01..139679a439 100644 --- a/spec/administrate/views/fields/has_one/_show_spec.rb +++ b/spec/administrate/views/fields/has_one/_show_spec.rb @@ -1,5 +1,5 @@ require "rails_helper" -require "administrate/fields/has_one" +require "administrate/field/has_one" describe "fields/has_one/_show", type: :view do context "without an associated record" do diff --git a/spec/administrate/views/fields/polymorphic/_show_spec.rb b/spec/administrate/views/fields/polymorphic/_show_spec.rb index 4f3d5f0f22..de081863cc 100644 --- a/spec/administrate/views/fields/polymorphic/_show_spec.rb +++ b/spec/administrate/views/fields/polymorphic/_show_spec.rb @@ -1,5 +1,5 @@ require "rails_helper" -require "administrate/fields/polymorphic" +require "administrate/field/polymorphic" describe "fields/polymorphic/_show", type: :view do context "without an associated records" do diff --git a/spec/lib/administrate/search_spec.rb b/spec/lib/administrate/search_spec.rb index ab3c589cdb..94c77ffed0 100644 --- a/spec/lib/administrate/search_spec.rb +++ b/spec/lib/administrate/search_spec.rb @@ -1,8 +1,8 @@ require "spec_helper" require "support/constant_helpers" -require "administrate/fields/string" -require "administrate/fields/email" -require "administrate/fields/number" +require "administrate/field/string" +require "administrate/field/email" +require "administrate/field/number" require "administrate/search" class MockDashboard diff --git a/spec/lib/fields/belongs_to_spec.rb b/spec/lib/fields/belongs_to_spec.rb index 5bffc73489..ee1eb2143d 100644 --- a/spec/lib/fields/belongs_to_spec.rb +++ b/spec/lib/fields/belongs_to_spec.rb @@ -1,4 +1,4 @@ -require "administrate/fields/belongs_to" +require "administrate/field/belongs_to" require "support/constant_helpers" require "support/field_matchers" diff --git a/spec/lib/fields/boolean_spec.rb b/spec/lib/fields/boolean_spec.rb index 023d9ca6a6..05d1d704ea 100644 --- a/spec/lib/fields/boolean_spec.rb +++ b/spec/lib/fields/boolean_spec.rb @@ -1,5 +1,5 @@ require "spec_helper" -require "administrate/fields/boolean" +require "administrate/field/boolean" require "support/field_matchers" describe Administrate::Field::Boolean do diff --git a/spec/lib/fields/date_time_spec.rb b/spec/lib/fields/date_time_spec.rb index 933d0b6b89..f571629eae 100644 --- a/spec/lib/fields/date_time_spec.rb +++ b/spec/lib/fields/date_time_spec.rb @@ -1,5 +1,5 @@ require "spec_helper" -require "administrate/fields/date_time" +require "administrate/field/date_time" require "support/field_matchers" describe Administrate::Field::DateTime do diff --git a/spec/lib/fields/deferred_spec.rb b/spec/lib/fields/deferred_spec.rb index 41d8d9ae6c..484153de4d 100644 --- a/spec/lib/fields/deferred_spec.rb +++ b/spec/lib/fields/deferred_spec.rb @@ -1,5 +1,5 @@ -require "administrate/fields/deferred" -require "administrate/fields/string" +require "administrate/field/deferred" +require "administrate/field/string" describe Administrate::Field::Deferred do describe "#permitted_attribute" do diff --git a/spec/lib/fields/email_spec.rb b/spec/lib/fields/email_spec.rb index 3936f1e68a..150001cb06 100644 --- a/spec/lib/fields/email_spec.rb +++ b/spec/lib/fields/email_spec.rb @@ -1,4 +1,4 @@ -require "administrate/fields/email" +require "administrate/field/email" describe Administrate::Field::Email do describe "#to_partial_path" do diff --git a/spec/lib/fields/has_many_spec.rb b/spec/lib/fields/has_many_spec.rb index c06d591133..1b635a893c 100644 --- a/spec/lib/fields/has_many_spec.rb +++ b/spec/lib/fields/has_many_spec.rb @@ -1,4 +1,4 @@ -require "administrate/fields/has_many" +require "administrate/field/has_many" require "support/constant_helpers" require "support/mock_relation" diff --git a/spec/lib/fields/has_one_spec.rb b/spec/lib/fields/has_one_spec.rb index c79ac7541a..c9d1c53d3d 100644 --- a/spec/lib/fields/has_one_spec.rb +++ b/spec/lib/fields/has_one_spec.rb @@ -1,4 +1,4 @@ -require "administrate/fields/has_one" +require "administrate/field/has_one" require "support/constant_helpers" describe Administrate::Field::HasOne do diff --git a/spec/lib/fields/image_spec.rb b/spec/lib/fields/image_spec.rb index bb33f9d8f1..52b79e39d6 100644 --- a/spec/lib/fields/image_spec.rb +++ b/spec/lib/fields/image_spec.rb @@ -1,4 +1,4 @@ -require "administrate/fields/image" +require "administrate/field/image" describe Administrate::Field::Image do describe "#to_partial_path" do diff --git a/spec/lib/fields/number_spec.rb b/spec/lib/fields/number_spec.rb index 937a1c135e..095f12750a 100644 --- a/spec/lib/fields/number_spec.rb +++ b/spec/lib/fields/number_spec.rb @@ -1,4 +1,4 @@ -require "administrate/fields/number" +require "administrate/field/number" require "support/field_matchers" describe Administrate::Field::Number do diff --git a/spec/lib/fields/polymorphic_spec.rb b/spec/lib/fields/polymorphic_spec.rb index ace84718ea..c0e27f7ae0 100644 --- a/spec/lib/fields/polymorphic_spec.rb +++ b/spec/lib/fields/polymorphic_spec.rb @@ -1,4 +1,4 @@ -require "administrate/fields/polymorphic" +require "administrate/field/polymorphic" require "support/constant_helpers" require "support/field_matchers" diff --git a/spec/lib/fields/string_spec.rb b/spec/lib/fields/string_spec.rb index 282a66c025..02518b12e6 100644 --- a/spec/lib/fields/string_spec.rb +++ b/spec/lib/fields/string_spec.rb @@ -1,4 +1,4 @@ -require "administrate/fields/string" +require "administrate/field/string" require "support/field_matchers" describe Administrate::Field::String do