ProtectedConstructor 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.idea/ProtectedConstructor.iml +5 -1
- data/.idea/workspace.xml +98 -35
- data/README.md +2 -1
- data/lib/ProtectedConstructor/version.rb +1 -1
- data/projectFilesBackup/.idea/ProtectedConstructor.iml +11 -0
- metadata +2 -1
@@ -2,7 +2,11 @@
|
|
2
2
|
<module type="RUBY_MODULE" version="4">
|
3
3
|
<component name="FacetManager">
|
4
4
|
<facet type="gem" name="Gem">
|
5
|
-
<configuration
|
5
|
+
<configuration>
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="" />
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="" />
|
9
|
+
</configuration>
|
6
10
|
</facet>
|
7
11
|
</component>
|
8
12
|
<component name="NewModuleRootManager">
|
data/.idea/workspace.xml
CHANGED
@@ -2,14 +2,17 @@
|
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
4
|
<list default="true" id="d8942c7f-4ad1-4925-b73d-25c4ef52dd1d" name="Default" comment="">
|
5
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/ProtectedConstructor.iml" afterPath="$PROJECT_DIR$/.idea/ProtectedConstructor.iml" />
|
5
6
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/.rakeTasks" afterPath="$PROJECT_DIR$/.idea/.rakeTasks" />
|
7
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
|
6
8
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/Rakefile" afterPath="$PROJECT_DIR$/Rakefile" />
|
9
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/ProtectedConstructor/version.rb" afterPath="$PROJECT_DIR$/lib/ProtectedConstructor/version.rb" />
|
7
10
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
8
11
|
</list>
|
9
12
|
<ignored path="ProtectedConstructor.iws" />
|
10
13
|
<ignored path=".idea/workspace.xml" />
|
11
|
-
<file path="/Dummy.txt" changelist="d8942c7f-4ad1-4925-b73d-25c4ef52dd1d" time="
|
12
|
-
<file path="/README.md" changelist="d8942c7f-4ad1-4925-b73d-25c4ef52dd1d" time="
|
14
|
+
<file path="/Dummy.txt" changelist="d8942c7f-4ad1-4925-b73d-25c4ef52dd1d" time="1373302834255" ignored="false" />
|
15
|
+
<file path="/README.md" changelist="d8942c7f-4ad1-4925-b73d-25c4ef52dd1d" time="1373303171166" ignored="false" />
|
13
16
|
<file path="/LICENSE.txt" changelist="d8942c7f-4ad1-4925-b73d-25c4ef52dd1d" time="1373293800369" ignored="false" />
|
14
17
|
<file path="/spec_helper.rb" changelist="d8942c7f-4ad1-4925-b73d-25c4ef52dd1d" time="1373297633742" ignored="false" />
|
15
18
|
<file path="/protected_constructor_spec.rb" changelist="d8942c7f-4ad1-4925-b73d-25c4ef52dd1d" time="1373298674255" ignored="false" />
|
@@ -38,7 +41,16 @@
|
|
38
41
|
<file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
|
39
42
|
<entry file="file://$PROJECT_DIR$/README.md">
|
40
43
|
<provider selected="true" editor-type-id="text-editor">
|
41
|
-
<state line="
|
44
|
+
<state line="4" column="72" selection-start="312" selection-end="312" vertical-scroll-proportion="0.0">
|
45
|
+
<folding />
|
46
|
+
</state>
|
47
|
+
</provider>
|
48
|
+
</entry>
|
49
|
+
</file>
|
50
|
+
<file leaf-file-name="version.rb" pinned="false" current="true" current-in-tab="true">
|
51
|
+
<entry file="file://$PROJECT_DIR$/lib/ProtectedConstructor/version.rb">
|
52
|
+
<provider selected="true" editor-type-id="text-editor">
|
53
|
+
<state line="1" column="18" selection-start="46" selection-end="46" vertical-scroll-proportion="0.03131524">
|
42
54
|
<folding />
|
43
55
|
</state>
|
44
56
|
</provider>
|
@@ -62,10 +74,10 @@
|
|
62
74
|
</provider>
|
63
75
|
</entry>
|
64
76
|
</file>
|
65
|
-
<file leaf-file-name="Rakefile" pinned="false" current="
|
77
|
+
<file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
|
66
78
|
<entry file="file://$PROJECT_DIR$/Rakefile">
|
67
79
|
<provider selected="true" editor-type-id="text-editor">
|
68
|
-
<state line="13" column="0" selection-start="271" selection-end="271" vertical-scroll-proportion="0.
|
80
|
+
<state line="13" column="0" selection-start="271" selection-end="271" vertical-scroll-proportion="0.0">
|
69
81
|
<folding />
|
70
82
|
</state>
|
71
83
|
</provider>
|
@@ -109,7 +121,6 @@
|
|
109
121
|
<list>
|
110
122
|
<option value="$PROJECT_DIR$/ProtectedConstructor/README.md" />
|
111
123
|
<option value="$PROJECT_DIR$/LICENSE.txt" />
|
112
|
-
<option value="$PROJECT_DIR$/lib/ProtectedConstructor/version.rb" />
|
113
124
|
<option value="$PROJECT_DIR$/Gemfile" />
|
114
125
|
<option value="$PROJECT_DIR$/spec/checker/protected_constructor_spec.rb" />
|
115
126
|
<option value="$PROJECT_DIR$/spec/klass.rb" />
|
@@ -118,8 +129,9 @@
|
|
118
129
|
<option value="$PROJECT_DIR$/spec/ProtectedConstructor/protected_constructor_spec.rb" />
|
119
130
|
<option value="$PROJECT_DIR$/ProtectedConstructor.gemspec" />
|
120
131
|
<option value="$PROJECT_DIR$/lib/ProtectedConstructor.rb" />
|
121
|
-
<option value="$PROJECT_DIR$/README.md" />
|
122
132
|
<option value="$PROJECT_DIR$/Rakefile" />
|
133
|
+
<option value="$PROJECT_DIR$/README.md" />
|
134
|
+
<option value="$PROJECT_DIR$/lib/ProtectedConstructor/version.rb" />
|
123
135
|
</list>
|
124
136
|
</option>
|
125
137
|
</component>
|
@@ -176,6 +188,38 @@
|
|
176
188
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
177
189
|
</PATH_ELEMENT>
|
178
190
|
</PATH>
|
191
|
+
<PATH>
|
192
|
+
<PATH_ELEMENT>
|
193
|
+
<option name="myItemId" value="ProtectedConstructor" />
|
194
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
195
|
+
</PATH_ELEMENT>
|
196
|
+
<PATH_ELEMENT>
|
197
|
+
<option name="myItemId" value="ProtectedConstructor" />
|
198
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
199
|
+
</PATH_ELEMENT>
|
200
|
+
<PATH_ELEMENT>
|
201
|
+
<option name="myItemId" value="lib" />
|
202
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
203
|
+
</PATH_ELEMENT>
|
204
|
+
</PATH>
|
205
|
+
<PATH>
|
206
|
+
<PATH_ELEMENT>
|
207
|
+
<option name="myItemId" value="ProtectedConstructor" />
|
208
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
209
|
+
</PATH_ELEMENT>
|
210
|
+
<PATH_ELEMENT>
|
211
|
+
<option name="myItemId" value="ProtectedConstructor" />
|
212
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
213
|
+
</PATH_ELEMENT>
|
214
|
+
<PATH_ELEMENT>
|
215
|
+
<option name="myItemId" value="lib" />
|
216
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
217
|
+
</PATH_ELEMENT>
|
218
|
+
<PATH_ELEMENT>
|
219
|
+
<option name="myItemId" value="ProtectedConstructor" />
|
220
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
221
|
+
</PATH_ELEMENT>
|
222
|
+
</PATH>
|
179
223
|
</subPane>
|
180
224
|
</pane>
|
181
225
|
<pane id="Scope" />
|
@@ -184,12 +228,12 @@
|
|
184
228
|
<component name="PropertiesComponent">
|
185
229
|
<property name="options.splitter.main.proportions" value="0.3" />
|
186
230
|
<property name="WebServerToolWindowFactoryState" value="false" />
|
187
|
-
<property name="recentsLimit" value="5" />
|
188
231
|
<property name="options.lastSelected" value="project.propVCSSupport.Mappings" />
|
189
|
-
<property name="
|
232
|
+
<property name="recentsLimit" value="5" />
|
190
233
|
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
191
|
-
<property name="
|
234
|
+
<property name="restartRequiresConfirmation" value="true" />
|
192
235
|
<property name="options.splitter.details.proportions" value="0.2" />
|
236
|
+
<property name="options.searchVisible" value="true" />
|
193
237
|
</component>
|
194
238
|
<component name="RecentsManager">
|
195
239
|
<key name="CopyFile.RECENT_KEYS">
|
@@ -367,23 +411,23 @@
|
|
367
411
|
<frame x="0" y="22" width="1440" height="874" extended-state="0" />
|
368
412
|
<editor active="true" />
|
369
413
|
<layout>
|
370
|
-
<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="
|
414
|
+
<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="7" side_tool="false" content_ui="tabs" />
|
371
415
|
<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="6" side_tool="false" content_ui="tabs" />
|
372
|
-
<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="
|
416
|
+
<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="3" side_tool="false" content_ui="tabs" />
|
373
417
|
<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="1" side_tool="false" content_ui="tabs" />
|
374
|
-
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.
|
418
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25322813" sideWeight="0.6706349" order="0" side_tool="false" content_ui="combo" />
|
375
419
|
<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="3" side_tool="false" content_ui="tabs" />
|
376
|
-
<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="
|
377
|
-
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="
|
378
|
-
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="
|
379
|
-
<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="
|
420
|
+
<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="2" side_tool="true" content_ui="tabs" />
|
421
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
422
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32936507" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
423
|
+
<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="7" side_tool="false" content_ui="tabs" />
|
380
424
|
<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="4" side_tool="false" content_ui="tabs" />
|
381
425
|
<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="0" side_tool="false" content_ui="tabs" />
|
382
|
-
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
383
426
|
<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="1" side_tool="false" content_ui="tabs" />
|
427
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
384
428
|
<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="0" side_tool="false" content_ui="tabs" />
|
385
|
-
<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="5" side_tool="false" content_ui="tabs" />
|
386
429
|
<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="2" side_tool="false" content_ui="combo" />
|
430
|
+
<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="5" side_tool="false" content_ui="tabs" />
|
387
431
|
</layout>
|
388
432
|
</component>
|
389
433
|
<component name="VcsContentAnnotationSettings">
|
@@ -447,26 +491,38 @@
|
|
447
491
|
<breakpoint-manager />
|
448
492
|
</component>
|
449
493
|
<component name="editorHistoryManager">
|
450
|
-
<entry file="file://$PROJECT_DIR
|
494
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
451
495
|
<provider selected="true" editor-type-id="text-editor">
|
452
|
-
<state line="
|
496
|
+
<state line="13" column="0" selection-start="271" selection-end="271" vertical-scroll-proportion="0.0">
|
453
497
|
<folding />
|
454
498
|
</state>
|
455
499
|
</provider>
|
456
500
|
</entry>
|
457
|
-
<entry file="file://$PROJECT_DIR$/
|
458
|
-
<provider editor-type-id="
|
459
|
-
<state
|
501
|
+
<entry file="file://$PROJECT_DIR$/lib/ProtectedConstructor.rb">
|
502
|
+
<provider selected="true" editor-type-id="text-editor">
|
503
|
+
<state line="33" column="36" selection-start="40" selection-end="647" vertical-scroll-proportion="0.0">
|
504
|
+
<folding />
|
505
|
+
</state>
|
460
506
|
</provider>
|
507
|
+
</entry>
|
508
|
+
<entry file="file://$PROJECT_DIR$/spec/ProtectedConstructor/protected_constructor_spec.rb">
|
461
509
|
<provider selected="true" editor-type-id="text-editor">
|
462
|
-
<state line="
|
510
|
+
<state line="15" column="37" selection-start="541" selection-end="565" vertical-scroll-proportion="0.0">
|
463
511
|
<folding />
|
464
512
|
</state>
|
465
513
|
</provider>
|
466
514
|
</entry>
|
467
|
-
<entry file="file://$PROJECT_DIR
|
515
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
516
|
+
<provider selected="true" editor-type-id="text-editor">
|
517
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
|
518
|
+
</provider>
|
519
|
+
</entry>
|
520
|
+
<entry file="file://$PROJECT_DIR$/LICENSE.txt">
|
521
|
+
<provider editor-type-id="com.intellij.persistence.database.editor.CsvTableFileEditorProvider">
|
522
|
+
<state />
|
523
|
+
</provider>
|
468
524
|
<provider selected="true" editor-type-id="text-editor">
|
469
|
-
<state line="
|
525
|
+
<state line="5" column="24" selection-start="147" selection-end="147" vertical-scroll-proportion="-2.7777777">
|
470
526
|
<folding />
|
471
527
|
</state>
|
472
528
|
</provider>
|
@@ -513,13 +569,6 @@
|
|
513
569
|
</state>
|
514
570
|
</provider>
|
515
571
|
</entry>
|
516
|
-
<entry file="file://$PROJECT_DIR$/README.md">
|
517
|
-
<provider selected="true" editor-type-id="text-editor">
|
518
|
-
<state line="23" column="27" selection-start="452" selection-end="452" vertical-scroll-proportion="0.0">
|
519
|
-
<folding />
|
520
|
-
</state>
|
521
|
-
</provider>
|
522
|
-
</entry>
|
523
572
|
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
524
573
|
<provider selected="true" editor-type-id="text-editor">
|
525
574
|
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
@@ -536,7 +585,21 @@
|
|
536
585
|
</entry>
|
537
586
|
<entry file="file://$PROJECT_DIR$/Rakefile">
|
538
587
|
<provider selected="true" editor-type-id="text-editor">
|
539
|
-
<state line="13" column="0" selection-start="271" selection-end="271" vertical-scroll-proportion="0.
|
588
|
+
<state line="13" column="0" selection-start="271" selection-end="271" vertical-scroll-proportion="0.0">
|
589
|
+
<folding />
|
590
|
+
</state>
|
591
|
+
</provider>
|
592
|
+
</entry>
|
593
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
594
|
+
<provider selected="true" editor-type-id="text-editor">
|
595
|
+
<state line="4" column="72" selection-start="312" selection-end="312" vertical-scroll-proportion="0.0">
|
596
|
+
<folding />
|
597
|
+
</state>
|
598
|
+
</provider>
|
599
|
+
</entry>
|
600
|
+
<entry file="file://$PROJECT_DIR$/lib/ProtectedConstructor/version.rb">
|
601
|
+
<provider selected="true" editor-type-id="text-editor">
|
602
|
+
<state line="1" column="18" selection-start="46" selection-end="46" vertical-scroll-proportion="0.03131524">
|
540
603
|
<folding />
|
541
604
|
</state>
|
542
605
|
</provider>
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# ProtectedConstructor
|
2
2
|
|
3
3
|
Provides a module that may be included in a Ruby class, that protects the constructor; good for enforcing
|
4
|
-
instantiation of classes using, for instance, a class factory.
|
4
|
+
instantiation of classes using, for instance, a class factory. The code itself is not mine, I just wrapped it
|
5
|
+
in a gem; sorry, I don't remember the origin of the code to give credit.
|
5
6
|
|
6
7
|
## Installation
|
7
8
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
3
|
+
<component name="NewModuleRootManager">
|
4
|
+
<content url="file://$MODULE_DIR$" />
|
5
|
+
<orderEntry type="inheritedJdk" />
|
6
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
7
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.3.5, rbenv: 1.9.3-p0) [gem]" level="application" />
|
8
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v0.9.2.2, rbenv: 1.9.3-p0) [gem]" level="application" />
|
9
|
+
</component>
|
10
|
+
</module>
|
11
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ProtectedConstructor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- Rakefile
|
70
70
|
- lib/ProtectedConstructor.rb
|
71
71
|
- lib/ProtectedConstructor/version.rb
|
72
|
+
- projectFilesBackup/.idea/ProtectedConstructor.iml
|
72
73
|
- spec/ProtectedConstructor/protected_constructor_spec.rb
|
73
74
|
- spec/klass.rb
|
74
75
|
- spec/klass_factory.rb
|