delegate_id_to 0.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/delegate_id_to.iml +20 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +36 -0
- data/.idea/modules.xml +9 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +316 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +70 -0
- data/Rakefile +1 -0
- data/delegate_id_to.gemspec +23 -0
- data/lib/delegate_id_to/version.rb +3 -0
- data/lib/delegate_id_to.rb +18 -0
- metadata +90 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: ff26bd7e56556984f3c14312be47a91c5e9e2006
|
|
4
|
+
data.tar.gz: 9baa29628827d4248cf34ff16468a1a1672231d7
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: e1aa5dd155f0f7d4e20a852e86fb7a226f997c18915e4abcc6d46e6a9bc18813e5dba0736bc51b302cc6feb195a7b43f980c2386606320803d92d29a4f781be8
|
|
7
|
+
data.tar.gz: 7e57cf2caad4919c5b5d9e6cf4d4cf8f8b270c31a46df55df44272ca63263eae7609e93f292f329729bc4806db46de9affd6c711a26acba1af20f001a39fbe54
|
data/.gitignore
ADDED
data/.idea/.name
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
delegate_id_to
|
data/.idea/.rakeTasks
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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 delegate_id_to-0.0.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install delegate_id_to-0.0.1.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v0.0.1 and build and push delegate_id_to-0.0.1.gem to Rubygems" fullCmd="release" taksId="release" /></RakeGroup></Settings>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="RUBY_MODULE" version="4">
|
|
3
|
+
<component name="FacetManager">
|
|
4
|
+
<facet type="gem" name="Gem">
|
|
5
|
+
<configuration>
|
|
6
|
+
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
|
7
|
+
<option name="GEM_APP_TEST_PATH" value="" />
|
|
8
|
+
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
|
9
|
+
</configuration>
|
|
10
|
+
</facet>
|
|
11
|
+
</component>
|
|
12
|
+
<component name="NewModuleRootManager">
|
|
13
|
+
<content url="file://$MODULE_DIR$" />
|
|
14
|
+
<orderEntry type="inheritedJdk" />
|
|
15
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.5.3, rbenv: 2.0.0-p195) [gem]" level="application" />
|
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="rake (v10.3.2, rbenv: 2.0.0-p195) [gem]" level="application" />
|
|
18
|
+
</component>
|
|
19
|
+
</module>
|
|
20
|
+
|
data/.idea/encodings.xml
ADDED
data/.idea/misc.xml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectInspectionProfilesVisibleTreeState">
|
|
4
|
+
<entry key="Project Default">
|
|
5
|
+
<profile-state>
|
|
6
|
+
<expanded-state>
|
|
7
|
+
<State>
|
|
8
|
+
<id />
|
|
9
|
+
</State>
|
|
10
|
+
</expanded-state>
|
|
11
|
+
<selected-state>
|
|
12
|
+
<State>
|
|
13
|
+
<id>CoffeeScript</id>
|
|
14
|
+
</State>
|
|
15
|
+
</selected-state>
|
|
16
|
+
</profile-state>
|
|
17
|
+
</entry>
|
|
18
|
+
</component>
|
|
19
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 2.0.0-p195" project-jdk-type="RUBY_SDK" />
|
|
20
|
+
<component name="masterDetails">
|
|
21
|
+
<states>
|
|
22
|
+
<state key="ScopeChooserConfigurable.UI">
|
|
23
|
+
<settings>
|
|
24
|
+
<splitter-proportions>
|
|
25
|
+
<option name="proportions">
|
|
26
|
+
<list>
|
|
27
|
+
<option value="0.2" />
|
|
28
|
+
</list>
|
|
29
|
+
</option>
|
|
30
|
+
</splitter-proportions>
|
|
31
|
+
</settings>
|
|
32
|
+
</state>
|
|
33
|
+
</states>
|
|
34
|
+
</component>
|
|
35
|
+
</project>
|
|
36
|
+
|
data/.idea/modules.xml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
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/delegate_id_to.iml" filepath="$PROJECT_DIR$/.idea/delegate_id_to.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
9
|
+
|
data/.idea/vcs.xml
ADDED
data/.idea/workspace.xml
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ChangeListManager">
|
|
4
|
+
<list default="true" id="69aae08f-4095-42a0-9134-ccabf168251d" name="Default" comment="" />
|
|
5
|
+
<ignored path="delegate_id_to.iws" />
|
|
6
|
+
<ignored path=".idea/workspace.xml" />
|
|
7
|
+
<option name="TRACKING_ENABLED" value="true" />
|
|
8
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
9
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
10
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
11
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
12
|
+
</component>
|
|
13
|
+
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
|
14
|
+
<component name="CreatePatchCommitExecutor">
|
|
15
|
+
<option name="PATCH_PATH" value="" />
|
|
16
|
+
</component>
|
|
17
|
+
<component name="DaemonCodeAnalyzer">
|
|
18
|
+
<disable_hints />
|
|
19
|
+
</component>
|
|
20
|
+
<component name="FavoritesManager">
|
|
21
|
+
<favorites_list name="delegate_id_to" />
|
|
22
|
+
</component>
|
|
23
|
+
<component name="FileEditorManager">
|
|
24
|
+
<leaf>
|
|
25
|
+
<file leaf-file-name="README.md" pinned="false" current="true" current-in-tab="true">
|
|
26
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
|
27
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
28
|
+
<state line="2" column="0" selection-start="16" selection-end="85" vertical-scroll-proportion="0.05778491" vertical-offset="0" max-vertical-offset="1368">
|
|
29
|
+
<folding />
|
|
30
|
+
</state>
|
|
31
|
+
</provider>
|
|
32
|
+
</entry>
|
|
33
|
+
</file>
|
|
34
|
+
</leaf>
|
|
35
|
+
</component>
|
|
36
|
+
<component name="FindManager">
|
|
37
|
+
<FindUsagesManager>
|
|
38
|
+
<setting name="OPEN_NEW_TAB" value="false" />
|
|
39
|
+
</FindUsagesManager>
|
|
40
|
+
</component>
|
|
41
|
+
<component name="IdeDocumentHistory">
|
|
42
|
+
<option name="changedFiles">
|
|
43
|
+
<list>
|
|
44
|
+
<option value="$PROJECT_DIR$/lib/delegate_id_to/version.rb" />
|
|
45
|
+
<option value="$PROJECT_DIR$/lib/delegate_id_to.rb" />
|
|
46
|
+
<option value="$PROJECT_DIR$/delegate_id_to.gemspec" />
|
|
47
|
+
<option value="$PROJECT_DIR$/Rakefile" />
|
|
48
|
+
<option value="$PROJECT_DIR$/README.md" />
|
|
49
|
+
</list>
|
|
50
|
+
</option>
|
|
51
|
+
</component>
|
|
52
|
+
<component name="ProjectFrameBounds">
|
|
53
|
+
<option name="x" value="-1" />
|
|
54
|
+
<option name="y" value="22" />
|
|
55
|
+
<option name="width" value="1922" />
|
|
56
|
+
<option name="height" value="1059" />
|
|
57
|
+
</component>
|
|
58
|
+
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
|
59
|
+
<OptionsSetting value="true" id="Add" />
|
|
60
|
+
<OptionsSetting value="true" id="Remove" />
|
|
61
|
+
<OptionsSetting value="true" id="Checkout" />
|
|
62
|
+
<OptionsSetting value="true" id="Update" />
|
|
63
|
+
<OptionsSetting value="true" id="Status" />
|
|
64
|
+
<OptionsSetting value="true" id="Edit" />
|
|
65
|
+
<ConfirmationsSetting value="0" id="Add" />
|
|
66
|
+
<ConfirmationsSetting value="0" id="Remove" />
|
|
67
|
+
</component>
|
|
68
|
+
<component name="ProjectReloadState">
|
|
69
|
+
<option name="STATE" value="0" />
|
|
70
|
+
</component>
|
|
71
|
+
<component name="ProjectView">
|
|
72
|
+
<navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
|
|
73
|
+
<flattenPackages />
|
|
74
|
+
<showMembers />
|
|
75
|
+
<showModules />
|
|
76
|
+
<showLibraryContents />
|
|
77
|
+
<hideEmptyPackages />
|
|
78
|
+
<abbreviatePackageNames />
|
|
79
|
+
<autoscrollToSource />
|
|
80
|
+
<autoscrollFromSource />
|
|
81
|
+
<sortByType />
|
|
82
|
+
</navigator>
|
|
83
|
+
<panes>
|
|
84
|
+
<pane id="ProjectPane">
|
|
85
|
+
<subPane>
|
|
86
|
+
<PATH>
|
|
87
|
+
<PATH_ELEMENT>
|
|
88
|
+
<option name="myItemId" value="delegate_id_to" />
|
|
89
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
90
|
+
</PATH_ELEMENT>
|
|
91
|
+
</PATH>
|
|
92
|
+
<PATH>
|
|
93
|
+
<PATH_ELEMENT>
|
|
94
|
+
<option name="myItemId" value="delegate_id_to" />
|
|
95
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
|
96
|
+
</PATH_ELEMENT>
|
|
97
|
+
<PATH_ELEMENT>
|
|
98
|
+
<option name="myItemId" value="delegate_id_to" />
|
|
99
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
|
100
|
+
</PATH_ELEMENT>
|
|
101
|
+
</PATH>
|
|
102
|
+
</subPane>
|
|
103
|
+
</pane>
|
|
104
|
+
<pane id="Scope" />
|
|
105
|
+
</panes>
|
|
106
|
+
</component>
|
|
107
|
+
<component name="PropertiesComponent">
|
|
108
|
+
<property name="options.lastSelected" value="preferences.pluginManager" />
|
|
109
|
+
<property name="options.splitter.main.proportions" value="0.3" />
|
|
110
|
+
<property name="options.splitter.details.proportions" value="0.2" />
|
|
111
|
+
<property name="options.searchVisible" value="true" />
|
|
112
|
+
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
|
113
|
+
<property name="WebServerToolWindowFactoryState" value="false" />
|
|
114
|
+
</component>
|
|
115
|
+
<component name="RunManager">
|
|
116
|
+
<configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
|
|
117
|
+
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
|
118
|
+
<module name="" />
|
|
119
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
120
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
|
121
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
122
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
123
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
|
124
|
+
<envs />
|
|
125
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
126
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
|
127
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
|
128
|
+
<COVERAGE_PATTERN ENABLED="true">
|
|
129
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
130
|
+
</COVERAGE_PATTERN>
|
|
131
|
+
</EXTENSION>
|
|
132
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
133
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
|
134
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
|
135
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
|
136
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
|
137
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
|
138
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
|
139
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
|
140
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
|
141
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
|
142
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
|
143
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
|
144
|
+
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
|
145
|
+
<method />
|
|
146
|
+
</configuration>
|
|
147
|
+
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug" singleton="true">
|
|
148
|
+
<method />
|
|
149
|
+
</configuration>
|
|
150
|
+
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
|
|
151
|
+
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
|
152
|
+
<module name="" />
|
|
153
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
|
154
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
|
|
155
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
|
156
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
|
157
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
|
158
|
+
<envs />
|
|
159
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
|
160
|
+
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
|
161
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
|
162
|
+
<COVERAGE_PATTERN ENABLED="true">
|
|
163
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
|
164
|
+
</COVERAGE_PATTERN>
|
|
165
|
+
</EXTENSION>
|
|
166
|
+
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
|
167
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
|
168
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
|
|
169
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
|
|
170
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
|
|
171
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
|
172
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
|
173
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
|
174
|
+
<RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
|
|
175
|
+
<method />
|
|
176
|
+
</configuration>
|
|
177
|
+
<list size="0" />
|
|
178
|
+
</component>
|
|
179
|
+
<component name="ShelveChangesManager" show_recycled="false" />
|
|
180
|
+
<component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false" SSL_PROTOCOLS="all">
|
|
181
|
+
<option name="USER" value="" />
|
|
182
|
+
<option name="PASSWORD" value="" />
|
|
183
|
+
<option name="mySSHConnectionTimeout" value="30000" />
|
|
184
|
+
<option name="mySSHReadTimeout" value="30000" />
|
|
185
|
+
<option name="LAST_MERGED_REVISION" />
|
|
186
|
+
<option name="MERGE_DRY_RUN" value="false" />
|
|
187
|
+
<option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
|
|
188
|
+
<option name="UPDATE_LOCK_ON_DEMAND" value="false" />
|
|
189
|
+
<option name="IGNORE_SPACES_IN_MERGE" value="false" />
|
|
190
|
+
<option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
|
|
191
|
+
<option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
|
|
192
|
+
<option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
|
|
193
|
+
<option name="FORCE_UPDATE" value="false" />
|
|
194
|
+
<option name="IGNORE_EXTERNALS" value="false" />
|
|
195
|
+
<configuration useDefault="true">$USER_HOME$/.subversion</configuration>
|
|
196
|
+
<myIsUseDefaultProxy>false</myIsUseDefaultProxy>
|
|
197
|
+
</component>
|
|
198
|
+
<component name="TaskManager">
|
|
199
|
+
<task active="true" id="Default" summary="Default task">
|
|
200
|
+
<changelist id="69aae08f-4095-42a0-9134-ccabf168251d" name="Default" comment="" />
|
|
201
|
+
<created>1419591911781</created>
|
|
202
|
+
<updated>1419591911781</updated>
|
|
203
|
+
</task>
|
|
204
|
+
<servers />
|
|
205
|
+
</component>
|
|
206
|
+
<component name="ToolWindowManager">
|
|
207
|
+
<frame x="-1" y="22" width="1922" height="1059" extended-state="7" />
|
|
208
|
+
<editor active="true" />
|
|
209
|
+
<layout>
|
|
210
|
+
<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" />
|
|
211
|
+
<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="8" side_tool="false" content_ui="tabs" />
|
|
212
|
+
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32997987" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
|
213
|
+
<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" />
|
|
214
|
+
<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" />
|
|
215
|
+
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.18051118" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
|
216
|
+
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3993964" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
|
217
|
+
<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" />
|
|
218
|
+
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.33058703" sideWeight="0.5" order="9" side_tool="true" content_ui="tabs" />
|
|
219
|
+
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32897383" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
|
220
|
+
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3299075" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
|
|
221
|
+
<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" />
|
|
222
|
+
<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" />
|
|
223
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3279678" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
|
224
|
+
<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" />
|
|
225
|
+
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32997987" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
|
|
226
|
+
<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" />
|
|
227
|
+
<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" />
|
|
228
|
+
<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" />
|
|
229
|
+
</layout>
|
|
230
|
+
</component>
|
|
231
|
+
<component name="Vcs.Log.UiProperties">
|
|
232
|
+
<option name="RECENTLY_FILTERED_USER_GROUPS">
|
|
233
|
+
<collection />
|
|
234
|
+
</option>
|
|
235
|
+
</component>
|
|
236
|
+
<component name="VcsContentAnnotationSettings">
|
|
237
|
+
<option name="myLimit" value="2678400000" />
|
|
238
|
+
</component>
|
|
239
|
+
<component name="VcsManagerConfiguration">
|
|
240
|
+
<option name="myTodoPanelSettings">
|
|
241
|
+
<TodoPanelSettings />
|
|
242
|
+
</option>
|
|
243
|
+
</component>
|
|
244
|
+
<component name="XDebuggerManager">
|
|
245
|
+
<breakpoint-manager />
|
|
246
|
+
</component>
|
|
247
|
+
<component name="editorHistoryManager">
|
|
248
|
+
<entry file="file://$PROJECT_DIR$/.gitignore">
|
|
249
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
250
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="623">
|
|
251
|
+
<folding />
|
|
252
|
+
</state>
|
|
253
|
+
</provider>
|
|
254
|
+
</entry>
|
|
255
|
+
<entry file="file://$PROJECT_DIR$/lib/delegate_id_to/version.rb">
|
|
256
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
257
|
+
<state line="1" column="13" selection-start="33" selection-end="38" vertical-scroll-proportion="0.028892456" vertical-offset="0" max-vertical-offset="623">
|
|
258
|
+
<folding />
|
|
259
|
+
</state>
|
|
260
|
+
</provider>
|
|
261
|
+
</entry>
|
|
262
|
+
<entry file="file://$PROJECT_DIR$/delegate_id_to.gemspec">
|
|
263
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
264
|
+
<state line="19" column="0" selection-start="797" selection-end="797" vertical-scroll-proportion="0.54895663" vertical-offset="0" max-vertical-offset="623">
|
|
265
|
+
<folding />
|
|
266
|
+
</state>
|
|
267
|
+
</provider>
|
|
268
|
+
</entry>
|
|
269
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
|
270
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
271
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="623">
|
|
272
|
+
<folding />
|
|
273
|
+
</state>
|
|
274
|
+
</provider>
|
|
275
|
+
</entry>
|
|
276
|
+
<entry file="file://$PROJECT_DIR$/Gemfile.lock">
|
|
277
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
278
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="623">
|
|
279
|
+
<folding />
|
|
280
|
+
</state>
|
|
281
|
+
</provider>
|
|
282
|
+
</entry>
|
|
283
|
+
<entry file="file://$PROJECT_DIR$/LICENSE.txt">
|
|
284
|
+
<provider editor-type-id="com.intellij.persistence.database.editor.CsvTableFileEditorProvider">
|
|
285
|
+
<state />
|
|
286
|
+
</provider>
|
|
287
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
288
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="597">
|
|
289
|
+
<folding />
|
|
290
|
+
</state>
|
|
291
|
+
</provider>
|
|
292
|
+
</entry>
|
|
293
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
|
294
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
295
|
+
<state line="0" column="26" selection-start="9" selection-end="26" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="126">
|
|
296
|
+
<folding />
|
|
297
|
+
</state>
|
|
298
|
+
</provider>
|
|
299
|
+
</entry>
|
|
300
|
+
<entry file="file://$PROJECT_DIR$/lib/delegate_id_to.rb">
|
|
301
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
302
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="623">
|
|
303
|
+
<folding />
|
|
304
|
+
</state>
|
|
305
|
+
</provider>
|
|
306
|
+
</entry>
|
|
307
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
|
308
|
+
<provider selected="true" editor-type-id="text-editor">
|
|
309
|
+
<state line="2" column="0" selection-start="16" selection-end="85" vertical-scroll-proportion="0.05778491" vertical-offset="0" max-vertical-offset="1368">
|
|
310
|
+
<folding />
|
|
311
|
+
</state>
|
|
312
|
+
</provider>
|
|
313
|
+
</entry>
|
|
314
|
+
</component>
|
|
315
|
+
</project>
|
|
316
|
+
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2014 shipiev
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# DelegateIdTo
|
|
2
|
+
|
|
3
|
+
This gem provide two methods for access to id of has_one association.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add this line to your application's Gemfile:
|
|
8
|
+
|
|
9
|
+
gem 'delegate_id_to'
|
|
10
|
+
|
|
11
|
+
And then execute:
|
|
12
|
+
|
|
13
|
+
$ bundle
|
|
14
|
+
|
|
15
|
+
Or install it yourself as:
|
|
16
|
+
|
|
17
|
+
$ gem install delegate_id_to
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Without delegate_id_to
|
|
22
|
+
|
|
23
|
+
class Foo < ActiveRecord::Base
|
|
24
|
+
has_one :bar
|
|
25
|
+
has_one :user
|
|
26
|
+
|
|
27
|
+
delegate :id, to: :bar, allow_nil: true
|
|
28
|
+
delegate :id, to: :user, allow_nil: true
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
foo = Foo.last
|
|
32
|
+
foo.bar #=> nil
|
|
33
|
+
foo.bar_id #=> id deprecated for nil
|
|
34
|
+
foo.user_id #=> 42
|
|
35
|
+
|
|
36
|
+
### With delegate_id_to
|
|
37
|
+
|
|
38
|
+
class Foo < ActiveRecord::Base
|
|
39
|
+
has_one :bar
|
|
40
|
+
has_one :user
|
|
41
|
+
|
|
42
|
+
delegate_id_to :bar, :user
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
foo = Foo.last
|
|
46
|
+
foo.bar #=> nil
|
|
47
|
+
foo.bar_id #=> nil
|
|
48
|
+
foo.user_id #=> 42
|
|
49
|
+
|
|
50
|
+
### With delegate_id_to_singular_associations
|
|
51
|
+
|
|
52
|
+
class Foo < ActiveRecord::Base
|
|
53
|
+
has_one :bar
|
|
54
|
+
has_one :user
|
|
55
|
+
|
|
56
|
+
delegate_id_to_singular_associations
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
foo = Foo.last
|
|
60
|
+
foo.bar #=> nil
|
|
61
|
+
foo.bar_id #=> nil
|
|
62
|
+
foo.user_id #=> 42
|
|
63
|
+
|
|
64
|
+
## Contributing
|
|
65
|
+
|
|
66
|
+
1. Fork it ( http://github.com/<my-github-username>/delegate_id_to/fork )
|
|
67
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
68
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
69
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
70
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'delegate_id_to/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = 'delegate_id_to'
|
|
8
|
+
spec.version = DelegateIdTo::VERSION
|
|
9
|
+
spec.authors = ['shipiev']
|
|
10
|
+
spec.email = ['roman@shipiev.ru']
|
|
11
|
+
spec.summary = %q{Add delegate_to_id method to models}
|
|
12
|
+
spec.description = %q{It's delegating id for model methods}
|
|
13
|
+
spec.homepage = 'https://github.com/shipiev/delegate_id_to'
|
|
14
|
+
spec.license = 'MIT'
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ['lib']
|
|
20
|
+
|
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
|
22
|
+
spec.add_development_dependency 'rake'
|
|
23
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module DelegateIdTo
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
module ClassMethods
|
|
5
|
+
def delegate_id_to(*args)
|
|
6
|
+
args.each do |method_sym|
|
|
7
|
+
define_method(:"#{method_sym}_id") do
|
|
8
|
+
object = send(method_sym)
|
|
9
|
+
object && object.id
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def delegate_id_to_singular_associations
|
|
15
|
+
delegate_id_to *reflect_on_all_associations(:has_one).map(&:name)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: delegate_id_to
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- shipiev
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2014-12-28 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: bundler
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ~>
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '1.5'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ~>
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.5'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: rake
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - '>='
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - '>='
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
description: It's delegating id for model methods
|
|
42
|
+
email:
|
|
43
|
+
- roman@shipiev.ru
|
|
44
|
+
executables: []
|
|
45
|
+
extensions: []
|
|
46
|
+
extra_rdoc_files: []
|
|
47
|
+
files:
|
|
48
|
+
- .gitignore
|
|
49
|
+
- .idea/.name
|
|
50
|
+
- .idea/.rakeTasks
|
|
51
|
+
- .idea/delegate_id_to.iml
|
|
52
|
+
- .idea/encodings.xml
|
|
53
|
+
- .idea/misc.xml
|
|
54
|
+
- .idea/modules.xml
|
|
55
|
+
- .idea/scopes/scope_settings.xml
|
|
56
|
+
- .idea/vcs.xml
|
|
57
|
+
- .idea/workspace.xml
|
|
58
|
+
- Gemfile
|
|
59
|
+
- LICENSE.txt
|
|
60
|
+
- README.md
|
|
61
|
+
- Rakefile
|
|
62
|
+
- delegate_id_to.gemspec
|
|
63
|
+
- lib/delegate_id_to.rb
|
|
64
|
+
- lib/delegate_id_to/version.rb
|
|
65
|
+
homepage: https://github.com/shipiev/delegate_id_to
|
|
66
|
+
licenses:
|
|
67
|
+
- MIT
|
|
68
|
+
metadata: {}
|
|
69
|
+
post_install_message:
|
|
70
|
+
rdoc_options: []
|
|
71
|
+
require_paths:
|
|
72
|
+
- lib
|
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
74
|
+
requirements:
|
|
75
|
+
- - '>='
|
|
76
|
+
- !ruby/object:Gem::Version
|
|
77
|
+
version: '0'
|
|
78
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - '>='
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
requirements: []
|
|
84
|
+
rubyforge_project:
|
|
85
|
+
rubygems_version: 2.0.2
|
|
86
|
+
signing_key:
|
|
87
|
+
specification_version: 4
|
|
88
|
+
summary: Add delegate_to_id method to models
|
|
89
|
+
test_files: []
|
|
90
|
+
has_rdoc:
|