required_field_style 0.0.1 → 0.1.0

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.
data/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
+ .idea
6
7
  Gemfile.lock
7
8
  InstalledFiles
8
9
  _yardoc
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # RequiredFieldStyle
2
2
 
3
- This gem will automatically add asterisk after your form label for required field.
3
+ This gem will automatically add your configured css class to required field of standard FormBuilder label.
4
+ If you do not configure it, then it will automatically add red asterisk in front of your required field.
5
+ This gem only work for standard FormBuilder. If you use customise FormBuilder or you put your label manually,
6
+ then this gem will not work in that particular form.
4
7
 
5
8
  ## Installation
6
9
 
@@ -18,12 +21,22 @@ Or install it yourself as:
18
21
 
19
22
  ## Usage
20
23
 
21
- You do not need to do anything, after you install it and restart the server this gem will automatically do the job.
24
+ To configure this gem :
25
+ - create file config/initializers/required_field_style.rb
26
+ - paste this code:
27
+ RequiredFieldStyle.configure do |config|
28
+ config.css_class_name = '<required_style>'
29
+ end
30
+ - you can change <required_style> with your own css class.
31
+ - you must already has this css class in your assets.
32
+
33
+ If you do not configure it, then the default style will take place.
34
+ The default style is red asterisk after the label of required field.
22
35
 
23
36
  ## Contributing
24
37
 
25
- 1. Fork it ( http://github.com/<my-github-username>/active_authorisation/fork )
38
+ 1. Fork it ( http://github.com/<my-github-username>/required_field_style/fork )
26
39
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
40
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
41
  4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
42
+ 5. Create new Pull Request
@@ -1,4 +1,3 @@
1
- database.yml
2
1
  mongrel
3
2
  monit
4
3
  nginx
@@ -1,11 +1,13 @@
1
1
  require "required_field_style/version"
2
+ require "required_field_style/configuration"
3
+ require "required_field_style/validation_checker"
2
4
  require "validation_reflection"
3
5
 
4
6
  module RequiredFieldStyle
5
7
  class ActionView::Helpers::FormBuilder
6
8
  alias :orig_label :label
7
9
 
8
- # add a '*' after the field label if the field is required
10
+ # add a '*' after the field label if the field is required and no configuration
9
11
  def label(method, content_or_options = nil, options = nil, &block)
10
12
  if content_or_options && content_or_options.class == Hash
11
13
  options = content_or_options
@@ -13,20 +15,16 @@ module RequiredFieldStyle
13
15
  content = content_or_options
14
16
  end
15
17
 
16
- required_mark = ''
17
- required_mark = '<sup style="color:red">&nbsp;*</sup>'.html_safe if ValidationChecker.mandatory_field?(object.class, method)
18
-
19
- content ||= method.to_s.humanize
20
- content = content + required_mark
18
+ if ValidationChecker.mandatory_field?(object.class, method)
19
+ if RequiredFieldStyle.configuration.css_class_name.blank?
20
+ content ||= method.to_s.humanize
21
+ content = content + '<sup style="color:red">&nbsp;*</sup>'.html_safe
22
+ else
23
+ options = {:class => RequiredFieldStyle.configuration.css_class_name}
24
+ end
25
+ end
21
26
 
22
27
  self.orig_label(method, content, options || {}, &block)
23
28
  end
24
29
  end
25
-
26
- class ValidationChecker
27
- def self.mandatory_field?(klass, name)
28
- klass.reflect_on_validations_for(name).find { |f| f.macro.to_s == 'validates_presence_of' }
29
- end
30
- end
31
-
32
30
  end
@@ -1,3 +1,3 @@
1
1
  module RequiredFieldStyle
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -0,0 +1,55 @@
1
+ require 'spec_helper'
2
+
3
+ module RequiredFieldStyle
4
+
5
+ describe '/accounts/new.html.erb', :type => :view do
6
+ context 'with configuration' do
7
+ before{
8
+ @configured_class = 'required_field_style'
9
+ RequiredFieldStyle.configure do |config|
10
+ config.css_class_name = @configured_class
11
+ end
12
+ }
13
+
14
+ it 'should set configured_class for required field' do
15
+ required_field = 'Account no'
16
+ assigns[:account] = Account.new
17
+ render
18
+ response.body.to_s.should =~ /class=\"#{@configured_class}\" for=\"account_account_no\">#{required_field}/
19
+ end
20
+ end
21
+
22
+ context 'no configuration' do
23
+ before{
24
+ RequiredFieldStyle.configure do |config|
25
+ config.css_class_name = ''
26
+ end
27
+ }
28
+
29
+ it 'should render red_asterisk for required field' do
30
+ required_field = 'Account no'
31
+ red_asterisk = '<sup style=\"color:red\">&nbsp;*'
32
+ assigns[:account] = Account.new
33
+ render
34
+ response.body.to_s.should =~ /#{required_field}#{red_asterisk}/
35
+ end
36
+ end
37
+ end
38
+
39
+ describe 'ValidationChecker' do
40
+ it 'should return MacroReflection if field_name is mandatory fields' do
41
+ field_name = :account_no
42
+ result = ValidationChecker.mandatory_field?(Account, field_name)
43
+ result.instance_of?(ActiveRecord::Reflection::MacroReflection).should be true
44
+ result.macro.should == :validates_presence_of
45
+ result.name.should == field_name
46
+ end
47
+
48
+ it 'should return nil if field_name is not mandatory fields' do
49
+ field_name = :company_name
50
+ result = ValidationChecker.mandatory_field?(Account, field_name)
51
+ result.should be nil
52
+ end
53
+ end
54
+
55
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: required_field_style
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 0
9
8
  - 1
10
- version: 0.0.1
9
+ - 0
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Febrianto
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2014-08-17 00:00:00 Z
18
+ date: 2014-08-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -151,17 +151,6 @@ extra_rdoc_files: []
151
151
 
152
152
  files:
153
153
  - .gitignore
154
- - .idea/.name
155
- - .idea/.rakeTasks
156
- - .idea/dataSources.ids
157
- - .idea/dataSources.xml
158
- - .idea/encodings.xml
159
- - .idea/misc.xml
160
- - .idea/modules.xml
161
- - .idea/required_field_style.iml
162
- - .idea/scopes/scope_settings.xml
163
- - .idea/vcs.xml
164
- - .idea/workspace.xml
165
154
  - Gemfile
166
155
  - LICENSE.txt
167
156
  - README.md
@@ -180,7 +169,7 @@ files:
180
169
  - lib/required_field_style.rb
181
170
  - lib/required_field_style/version.rb
182
171
  - required_field_style.gemspec
183
- - spec/required_field_style.rb
172
+ - spec/required_field_style_spec.rb
184
173
  - spec/spec_helper.rb
185
174
  homepage: http://www.mfebrianto.com
186
175
  licenses:
@@ -216,6 +205,6 @@ signing_key:
216
205
  specification_version: 3
217
206
  summary: This gem will add asterisk after your required field label
218
207
  test_files:
219
- - spec/required_field_style.rb
208
+ - spec/required_field_style_spec.rb
220
209
  - spec/spec_helper.rb
221
210
  has_rdoc:
@@ -1 +0,0 @@
1
- required_field_style
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Settings><!--This file was automatically generated by Ruby plugin.
3
- You are allowed to:
4
- 1. Remove rake task
5
- 2. Add existing rake tasks
6
- To add existing rake tasks automatically delete this file and reload the project.
7
- --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build required_field_style-0.0.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install required_field_style-0.0.1.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v0.0.1 and build and push required_field_style-0.0.1.gem to Rubygems" fullCmd="release" taksId="release" /></RakeGroup></Settings>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <component name="dataSourceStorage">
3
- <data-source source="LOCAL" name="Rails required_field_style: test" uuid="eb432ab6-46c5-450c-9358-1c0bd35532c4">
4
- <database-info product="" version="" jdbc-version="" driver-name="" driver-version=""/>
5
- </data-source>
6
- </component>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="DataSourceManagerImpl" format="xml" hash="2781056629">
4
- <data-source source="LOCAL" name="Rails required_field_style: test" uuid="eb432ab6-46c5-450c-9358-1c0bd35532c4">
5
- <driver-ref>sqlite.xerial</driver-ref>
6
- <jdbc-driver>org.sqlite.JDBC</jdbc-driver>
7
- <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/db/test.sqlite3</jdbc-url>
8
- <libraries />
9
- </data-source>
10
- </component>
11
- </project>
12
-
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
- </project>
5
-
@@ -1,5 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p194 [casinoapp]" project-jdk-type="RUBY_SDK" />
4
- </project>
5
-
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/required_field_style.iml" filepath="$PROJECT_DIR$/.idea/required_field_style.iml" />
6
- </modules>
7
- </component>
8
- </project>
9
-
@@ -1,138 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="FacetManager">
4
- <facet type="RailsFacetType" name="Ruby on Rails">
5
- <configuration>
6
- <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_SUPPORT_REMOVED" VALUE="false" />
7
- <RAILS_FACET_CONFIG_ID NAME="RAILS_TESTS_SOURCES_PATCHED" VALUE="true" />
8
- <RAILS_FACET_CONFIG_ID NAME="RAILS_FACET_APPLICATION_ROOT" VALUE="$MODULE_DIR$" />
9
- </configuration>
10
- </facet>
11
- <facet type="gem" name="Gem">
12
- <configuration>
13
- <option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
14
- <option name="GEM_APP_TEST_PATH" value="" />
15
- <option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
16
- </configuration>
17
- </facet>
18
- </component>
19
- <component name="ModuleRunConfigurationManager">
20
- <configuration default="false" name="test: required_field_style" type="RakeRunConfigurationType" factoryName="Rake">
21
- <module name="required_field_style" />
22
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
23
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
24
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
25
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
26
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
27
- <envs>
28
- <env name="RAILS_ENV" value="test" />
29
- </envs>
30
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
31
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
32
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
33
- <COVERAGE_PATTERN ENABLED="true">
34
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
35
- </COVERAGE_PATTERN>
36
- </EXTENSION>
37
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
38
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
39
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
40
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
41
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
42
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
43
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
44
- <method />
45
- </configuration>
46
- <configuration default="false" name="spec: required_field_style" type="RakeRunConfigurationType" factoryName="Rake">
47
- <module name="required_field_style" />
48
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
49
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
50
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
51
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
52
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
53
- <envs />
54
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
55
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
56
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
57
- <COVERAGE_PATTERN ENABLED="true">
58
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
59
- </COVERAGE_PATTERN>
60
- </EXTENSION>
61
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
62
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
63
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
64
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
65
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
66
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
67
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
68
- <method />
69
- </configuration>
70
- <configuration default="false" name="Production: required_field_style" type="RailsRunConfigurationType" factoryName="Rails">
71
- <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
72
- <module name="required_field_style" />
73
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
74
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
75
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
76
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
77
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
78
- <envs />
79
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
80
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
81
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
82
- <COVERAGE_PATTERN ENABLED="true">
83
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
84
- </COVERAGE_PATTERN>
85
- </EXTENSION>
86
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
87
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
88
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
89
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
90
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
91
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
92
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
93
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
94
- <method />
95
- </configuration>
96
- <configuration default="false" name="Development: required_field_style" type="RailsRunConfigurationType" factoryName="Rails">
97
- <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
98
- <module name="required_field_style" />
99
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
100
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
101
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
102
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
103
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
104
- <envs />
105
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
106
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
107
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
108
- <COVERAGE_PATTERN ENABLED="true">
109
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
110
- </COVERAGE_PATTERN>
111
- </EXTENSION>
112
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
113
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
114
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
115
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
116
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
117
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
118
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
119
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
120
- <method />
121
- </configuration>
122
- </component>
123
- <component name="NewModuleRootManager">
124
- <content url="file://$MODULE_DIR$">
125
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
126
- </content>
127
- <orderEntry type="inheritedJdk" />
128
- <orderEntry type="sourceFolder" forTests="false" />
129
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.6.2, RVM: ruby-1.9.3-p194 [casinoapp]) [gem]" level="application" />
130
- <orderEntry type="library" scope="PROVIDED" name="rake (v10.1.1, RVM: ruby-1.9.3-p194 [casinoapp]) [gem]" level="application" />
131
- <orderEntry type="library" scope="PROVIDED" name="required_field_style (v0.0.1, /Users/mfebrianto/Dev/f2/my_gems/required_field_style) [path][gem]" level="application" />
132
- </component>
133
- <component name="RModuleSettingsStorage">
134
- <LOAD_PATH number="0" />
135
- <I18N_FOLDERS number="1" string0="$MODULE_DIR$/config/locales" />
136
- </component>
137
- </module>
138
-
@@ -1,5 +0,0 @@
1
- <component name="DependencyValidationManager">
2
- <state>
3
- <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
- </state>
5
- </component>
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
7
-
@@ -1,399 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ChangeListManager">
4
- <list default="true" id="1997d68b-76b4-45e2-affd-11fadf77c2a8" name="Default" comment="">
5
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/required_field_style.gemspec" afterPath="$PROJECT_DIR$/required_field_style.gemspec" />
6
- </list>
7
- <ignored path="required_field_style.iws" />
8
- <ignored path=".idea/workspace.xml" />
9
- <option name="TRACKING_ENABLED" value="true" />
10
- <option name="SHOW_DIALOG" value="false" />
11
- <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
- <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
- <option name="LAST_RESOLUTION" value="IGNORE" />
14
- </component>
15
- <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
16
- <component name="CreatePatchCommitExecutor">
17
- <option name="PATCH_PATH" value="" />
18
- </component>
19
- <component name="DaemonCodeAnalyzer">
20
- <disable_hints />
21
- </component>
22
- <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
23
- <component name="FavoritesManager">
24
- <favorites_list name="required_field_style" />
25
- </component>
26
- <component name="FileEditorManager">
27
- <leaf>
28
- <file leaf-file-name="Gemfile" pinned="false" current="false" current-in-tab="false">
29
- <entry file="file://$PROJECT_DIR$/Gemfile">
30
- <provider selected="true" editor-type-id="text-editor">
31
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="150">
32
- <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
33
- <folding />
34
- </state>
35
- </provider>
36
- </entry>
37
- </file>
38
- <file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
39
- <entry file="file://$PROJECT_DIR$/README.md">
40
- <provider selected="true" editor-type-id="text-editor">
41
- <state vertical-scroll-proportion="-2.84" vertical-offset="49" max-vertical-offset="510">
42
- <caret line="8" column="29" selection-start-line="8" selection-start-column="9" selection-end-line="8" selection-end-column="29" />
43
- <folding />
44
- </state>
45
- </provider>
46
- </entry>
47
- </file>
48
- <file leaf-file-name="LICENSE.txt" pinned="false" current="false" current-in-tab="false">
49
- <entry file="file://$PROJECT_DIR$/LICENSE.txt">
50
- <provider selected="true" editor-type-id="text-editor">
51
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="90">
52
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
53
- <folding />
54
- </state>
55
- </provider>
56
- </entry>
57
- </file>
58
- <file leaf-file-name="required_field_style.gemspec" pinned="false" current="true" current-in-tab="true">
59
- <entry file="file://$PROJECT_DIR$/required_field_style.gemspec">
60
- <provider selected="true" editor-type-id="text-editor">
61
- <state vertical-scroll-proportion="0.4225352" vertical-offset="0" max-vertical-offset="540">
62
- <caret line="12" column="35" selection-start-line="12" selection-start-column="35" selection-end-line="12" selection-end-column="35" />
63
- <folding />
64
- </state>
65
- </provider>
66
- </entry>
67
- </file>
68
- </leaf>
69
- </component>
70
- <component name="FindManager">
71
- <FindUsagesManager>
72
- <setting name="OPEN_NEW_TAB" value="true" />
73
- </FindUsagesManager>
74
- </component>
75
- <component name="Git.Settings">
76
- <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
77
- </component>
78
- <component name="IdeDocumentHistory">
79
- <option name="changedFiles">
80
- <list>
81
- <option value="$PROJECT_DIR$/Gemfile" />
82
- <option value="$PROJECT_DIR$/LICENSE.txt" />
83
- <option value="$PROJECT_DIR$/README.md" />
84
- <option value="$PROJECT_DIR$/required_field_style.gemspec" />
85
- </list>
86
- </option>
87
- </component>
88
- <component name="ProjectFrameBounds">
89
- <option name="y" value="22" />
90
- <option name="width" value="1440" />
91
- <option name="height" value="829" />
92
- </component>
93
- <component name="ProjectLevelVcsManager" settingsEditedManually="false">
94
- <OptionsSetting value="true" id="Add" />
95
- <OptionsSetting value="true" id="Remove" />
96
- <OptionsSetting value="true" id="Checkout" />
97
- <OptionsSetting value="true" id="Update" />
98
- <OptionsSetting value="true" id="Status" />
99
- <OptionsSetting value="true" id="Edit" />
100
- <ConfirmationsSetting value="0" id="Add" />
101
- <ConfirmationsSetting value="0" id="Remove" />
102
- </component>
103
- <component name="ProjectReloadState">
104
- <option name="STATE" value="0" />
105
- </component>
106
- <component name="ProjectView">
107
- <navigator currentView="ProjectPane" proportions="" version="1">
108
- <flattenPackages />
109
- <showMembers />
110
- <showModules />
111
- <showLibraryContents />
112
- <hideEmptyPackages />
113
- <abbreviatePackageNames />
114
- <autoscrollToSource />
115
- <autoscrollFromSource />
116
- <sortByType />
117
- </navigator>
118
- <panes>
119
- <pane id="ProjectPane">
120
- <subPane>
121
- <PATH>
122
- <PATH_ELEMENT>
123
- <option name="myItemId" value="required_field_style" />
124
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
125
- </PATH_ELEMENT>
126
- </PATH>
127
- <PATH>
128
- <PATH_ELEMENT>
129
- <option name="myItemId" value="required_field_style" />
130
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
131
- </PATH_ELEMENT>
132
- <PATH_ELEMENT>
133
- <option name="myItemId" value="required_field_style" />
134
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
135
- </PATH_ELEMENT>
136
- </PATH>
137
- </subPane>
138
- </pane>
139
- <pane id="Scope" />
140
- <pane id="RailsProjectView" />
141
- </panes>
142
- </component>
143
- <component name="PropertiesComponent">
144
- <property name="last_opened_file_path" value="$PROJECT_DIR$" />
145
- <property name="WebServerToolWindowFactoryState" value="false" />
146
- <property name="recentsLimit" value="5" />
147
- </component>
148
- <component name="RunManager" selected="Rails.Development: required_field_style">
149
- <configuration default="true" type="RakeRunConfigurationType" factoryName="Rake">
150
- <module name="" />
151
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
152
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
153
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
154
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
155
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
156
- <envs />
157
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
158
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
159
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
160
- <COVERAGE_PATTERN ENABLED="true">
161
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
162
- </COVERAGE_PATTERN>
163
- </EXTENSION>
164
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
165
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="" />
166
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
167
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE="" />
168
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
169
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
170
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
171
- <method />
172
- </configuration>
173
- <configuration default="true" type="RailsRunConfigurationType" factoryName="Rails">
174
- <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
175
- <module name="" />
176
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
177
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
178
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
179
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
180
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
181
- <envs />
182
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
183
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
184
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
185
- <COVERAGE_PATTERN ENABLED="true">
186
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
187
- </COVERAGE_PATTERN>
188
- </EXTENSION>
189
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
190
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
191
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
192
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
193
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
194
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
195
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
196
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
197
- <method />
198
- </configuration>
199
- <configuration default="false" name="test: required_field_style" type="RakeRunConfigurationType" factoryName="Rake">
200
- <module name="required_field_style" />
201
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
202
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
203
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
204
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
205
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
206
- <envs>
207
- <env name="RAILS_ENV" value="test" />
208
- </envs>
209
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
210
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
211
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
212
- <COVERAGE_PATTERN ENABLED="true">
213
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
214
- </COVERAGE_PATTERN>
215
- </EXTENSION>
216
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
217
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="test" />
218
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
219
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":test_unit " />
220
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
221
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
222
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
223
- <method />
224
- </configuration>
225
- <configuration default="false" name="spec: required_field_style" type="RakeRunConfigurationType" factoryName="Rake">
226
- <module name="required_field_style" />
227
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
228
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
229
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
230
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
231
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
232
- <envs />
233
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
234
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
235
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
236
- <COVERAGE_PATTERN ENABLED="true">
237
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
238
- </COVERAGE_PATTERN>
239
- </EXTENSION>
240
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
241
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_NAME" VALUE="spec" />
242
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ARGS" VALUE="" />
243
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_ATTACHED_TEST_FRAMEWORKS" VALUE=":rspec " />
244
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_TRACE" VALUE="false" />
245
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_DRYRUN" VALUE="false" />
246
- <RAKE_RUN_CONFIG_SETTINGS_ID NAME="RAKE_TASK_OPTION_PREREQS" VALUE="false" />
247
- <method />
248
- </configuration>
249
- <configuration default="false" name="Production: required_field_style" type="RailsRunConfigurationType" factoryName="Rails">
250
- <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
251
- <module name="required_field_style" />
252
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
253
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
254
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
255
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
256
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
257
- <envs />
258
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
259
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
260
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
261
- <COVERAGE_PATTERN ENABLED="true">
262
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
263
- </COVERAGE_PATTERN>
264
- </EXTENSION>
265
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
266
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
267
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
268
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
269
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
270
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
271
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="production" />
272
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
273
- <method />
274
- </configuration>
275
- <configuration default="false" name="Development: required_field_style" type="RailsRunConfigurationType" factoryName="Rails">
276
- <predefined_log_file id="RUBY_RAILS_SERVER" enabled="true" />
277
- <module name="required_field_style" />
278
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
279
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
280
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
281
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
282
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
283
- <envs />
284
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
285
- <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
286
- <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
287
- <COVERAGE_PATTERN ENABLED="true">
288
- <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
289
- </COVERAGE_PATTERN>
290
- </EXTENSION>
291
- <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
292
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="SCRIPT_ARGS" VALUE="" />
293
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="PORT" VALUE="3000" />
294
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="IP" VALUE="0.0.0.0" />
295
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="DUMMY_APP" VALUE="test/dummy" />
296
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="RAILS_SERVER_TYPE" VALUE="Default" />
297
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="ENVIRONMENT_TYPE" VALUE="development" />
298
- <RAILS_SERVER_CONFIG_SETTINGS_ID NAME="LAUNCH_JS" VALUE="false" />
299
- <method />
300
- </configuration>
301
- <list size="4">
302
- <item index="0" class="java.lang.String" itemvalue="Rake.test: required_field_style" />
303
- <item index="1" class="java.lang.String" itemvalue="Rake.spec: required_field_style" />
304
- <item index="2" class="java.lang.String" itemvalue="Rails.Production: required_field_style" />
305
- <item index="3" class="java.lang.String" itemvalue="Rails.Development: required_field_style" />
306
- </list>
307
- </component>
308
- <component name="ShelveChangesManager" show_recycled="false" />
309
- <component name="SvnConfiguration">
310
- <configuration />
311
- </component>
312
- <component name="TaskManager">
313
- <task active="true" id="Default" summary="Default task">
314
- <changelist id="1997d68b-76b4-45e2-affd-11fadf77c2a8" name="Default" comment="" />
315
- <created>1408272750256</created>
316
- <updated>1408272750256</updated>
317
- </task>
318
- <servers />
319
- </component>
320
- <component name="ToolWindowManager">
321
- <frame x="0" y="22" width="1440" height="829" extended-state="6" />
322
- <editor active="true" />
323
- <layout>
324
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
325
- <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
326
- <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
327
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.36146274" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
328
- <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
329
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
330
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.19670959" sideWeight="0.4731861" order="0" side_tool="false" content_ui="combo" />
331
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
332
- <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
333
- <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.22134387" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
334
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
335
- <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
336
- <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
337
- <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
338
- <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
339
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32674572" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
340
- <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
341
- <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
342
- <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="3" side_tool="false" content_ui="combo" />
343
- </layout>
344
- </component>
345
- <component name="Vcs.Log.UiProperties">
346
- <option name="RECENTLY_FILTERED_USER_GROUPS">
347
- <collection />
348
- </option>
349
- <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
350
- <collection />
351
- </option>
352
- </component>
353
- <component name="VcsContentAnnotationSettings">
354
- <option name="myLimit" value="2678400000" />
355
- </component>
356
- <component name="VcsManagerConfiguration">
357
- <option name="myTodoPanelSettings">
358
- <TodoPanelSettings />
359
- </option>
360
- </component>
361
- <component name="XDebuggerManager">
362
- <breakpoint-manager />
363
- </component>
364
- <component name="editorHistoryManager">
365
- <entry file="file://$PROJECT_DIR$/LICENSE.txt">
366
- <provider selected="true" editor-type-id="text-editor">
367
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="426">
368
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
369
- <folding />
370
- </state>
371
- </provider>
372
- </entry>
373
- <entry file="file://$PROJECT_DIR$/README.md">
374
- <provider selected="true" editor-type-id="text-editor">
375
- <state vertical-scroll-proportion="-2.84" vertical-offset="49" max-vertical-offset="510">
376
- <caret line="8" column="29" selection-start-line="8" selection-start-column="9" selection-end-line="8" selection-end-column="29" />
377
- <folding />
378
- </state>
379
- </provider>
380
- </entry>
381
- <entry file="file://$PROJECT_DIR$/Gemfile">
382
- <provider selected="true" editor-type-id="text-editor">
383
- <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="150">
384
- <caret line="4" column="0" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
385
- <folding />
386
- </state>
387
- </provider>
388
- </entry>
389
- <entry file="file://$PROJECT_DIR$/required_field_style.gemspec">
390
- <provider selected="true" editor-type-id="text-editor">
391
- <state vertical-scroll-proportion="0.4225352" vertical-offset="0" max-vertical-offset="540">
392
- <caret line="12" column="35" selection-start-line="12" selection-start-column="35" selection-end-line="12" selection-end-column="35" />
393
- <folding />
394
- </state>
395
- </provider>
396
- </entry>
397
- </component>
398
- </project>
399
-
@@ -1,31 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module RequiredFieldStyle
4
-
5
- describe '/accounts/new.html.erb', :type => :view do
6
- it 'should render mandatory style for required field' do
7
- required_field = 'Account no'
8
- mandatory_style = '<sup style=\"color:red\">&nbsp;*</sup>'
9
- assigns[:account] = Account.new
10
- render
11
- response.body.to_s =~ /#{required_field}#{mandatory_style}/
12
- end
13
- end
14
-
15
- describe 'ValidationChecker' do
16
- it 'should return MacroReflection if field_name is mandatory fields' do
17
- field_name = :account_no
18
- result = ValidationChecker.mandatory_field?(Account, field_name)
19
- result.instance_of?(ActiveRecord::Reflection::MacroReflection).should be true
20
- result.macro.should == :validates_presence_of
21
- result.name.should == field_name
22
- end
23
-
24
- it 'should return nil if field_name is not mandatory fields' do
25
- field_name = :company_name
26
- result = ValidationChecker.mandatory_field?(Account, field_name)
27
- result.should be nil
28
- end
29
- end
30
-
31
- end