timeywimey 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9c7bc481cf34bf706054cb3dc8e4e46f177e3cd9
4
+ data.tar.gz: 14b28ad2d57bae5b10bd5a7ff2d1edb6babd9d74
5
+ SHA512:
6
+ metadata.gz: 8e90dd6eb148308c2aa2bd6968bca9b6f0112184c2a57762ac9a82ac59b90d9bea4bae424573a7fd40256e4f61808c21ab206f8348bf9fb9e2509fb3f3f08f67
7
+ data.tar.gz: b246c8397bde33f968ed32ece76f0b293e28d4c61886deb810593655f6886264f867d3ff08b97f04423a13a4784f5546769c51973998bf2c094339547a413cb6
@@ -0,0 +1,23 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
23
+ vendor/bundle
@@ -0,0 +1 @@
1
+ timeywimey
@@ -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 timeywimey-0.0.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install timeywimey-0.0.1.gem into system gems" fullCmd="install" taksId="install" /><RakeTask description="Create tag v0.0.1 and build and push timeywimey-0.0.1.gem to Rubygems" fullCmd="release" taksId="release" /></RakeGroup></Settings>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
+ </project>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.1.2" project-jdk-type="RUBY_SDK" />
4
+ </project>
@@ -0,0 +1,8 @@
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/timeywimey.iml" filepath="$PROJECT_DIR$/.idea/timeywimey.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,5 @@
1
+ <component name="DependencyValidationManager">
2
+ <state>
3
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
+ </state>
5
+ </component>
@@ -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="Ruby 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="activesupport (v4.1.9, RVM: ruby-2.1.2) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.6.2, RVM: ruby-2.1.2) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="pry (v0.10.0, RVM: ruby-2.1.2) [gem]" level="application" />
19
+ </component>
20
+ </module>
@@ -0,0 +1,6 @@
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>
@@ -0,0 +1,325 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="1f336681-3f7b-4e20-bbaa-c868fa78fc9c" name="Default" comment="" />
5
+ <ignored path="timeywimey.iws" />
6
+ <ignored path=".idea/workspace.xml" />
7
+ <ignored path=".idea/dataSources.local.xml" />
8
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
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="timeywimey" />
25
+ </component>
26
+ <component name="FileEditorManager">
27
+ <leaf>
28
+ <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
29
+ <entry file="file://$PROJECT_DIR$/README.md">
30
+ <provider selected="true" editor-type-id="text-editor">
31
+ <state vertical-scroll-proportion="-16.5" vertical-offset="0" max-vertical-offset="585">
32
+ <caret line="33" column="0" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
33
+ <folding />
34
+ </state>
35
+ </provider>
36
+ <provider editor-type-id="MarkdownPreviewEditor">
37
+ <state />
38
+ </provider>
39
+ </entry>
40
+ </file>
41
+ <file leaf-file-name="timeywimey.rb" pinned="false" current-in-tab="true">
42
+ <entry file="file://$PROJECT_DIR$/lib/timeywimey.rb">
43
+ <provider selected="true" editor-type-id="text-editor">
44
+ <state vertical-scroll-proportion="0.4861111" vertical-offset="0" max-vertical-offset="2880">
45
+ <caret line="28" column="72" selection-start-line="28" selection-start-column="72" selection-end-line="28" selection-end-column="72" />
46
+ <folding />
47
+ </state>
48
+ </provider>
49
+ </entry>
50
+ </file>
51
+ </leaf>
52
+ </component>
53
+ <component name="Git.Settings">
54
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
55
+ </component>
56
+ <component name="IdeDocumentHistory">
57
+ <option name="CHANGED_PATHS">
58
+ <list>
59
+ <option value="$PROJECT_DIR$/lib/timeywimey/locale/en.yml" />
60
+ <option value="$PROJECT_DIR$/timeywimey.gemspec" />
61
+ <option value="$PROJECT_DIR$/README.md" />
62
+ <option value="$PROJECT_DIR$/lib/timeywimey.rb" />
63
+ </list>
64
+ </option>
65
+ </component>
66
+ <component name="JsGulpfileManager">
67
+ <detection-done>true</detection-done>
68
+ </component>
69
+ <component name="ProjectFrameBounds">
70
+ <option name="x" value="4" />
71
+ <option name="y" value="23" />
72
+ <option name="width" value="1381" />
73
+ <option name="height" value="987" />
74
+ </component>
75
+ <component name="ProjectLevelVcsManager" settingsEditedManually="false">
76
+ <OptionsSetting value="true" id="Add" />
77
+ <OptionsSetting value="true" id="Remove" />
78
+ <OptionsSetting value="true" id="Checkout" />
79
+ <OptionsSetting value="true" id="Update" />
80
+ <OptionsSetting value="true" id="Status" />
81
+ <OptionsSetting value="true" id="Edit" />
82
+ <ConfirmationsSetting value="0" id="Add" />
83
+ <ConfirmationsSetting value="0" id="Remove" />
84
+ </component>
85
+ <component name="ProjectView">
86
+ <navigator currentView="ProjectPane" proportions="" version="1">
87
+ <flattenPackages />
88
+ <showMembers />
89
+ <showModules />
90
+ <showLibraryContents />
91
+ <hideEmptyPackages />
92
+ <abbreviatePackageNames />
93
+ <autoscrollToSource />
94
+ <autoscrollFromSource />
95
+ <sortByType />
96
+ </navigator>
97
+ <panes>
98
+ <pane id="Scope" />
99
+ <pane id="ProjectPane">
100
+ <subPane>
101
+ <PATH>
102
+ <PATH_ELEMENT>
103
+ <option name="myItemId" value="timeywimey" />
104
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
105
+ </PATH_ELEMENT>
106
+ </PATH>
107
+ <PATH>
108
+ <PATH_ELEMENT>
109
+ <option name="myItemId" value="timeywimey" />
110
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
111
+ </PATH_ELEMENT>
112
+ <PATH_ELEMENT>
113
+ <option name="myItemId" value="timeywimey" />
114
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
115
+ </PATH_ELEMENT>
116
+ </PATH>
117
+ <PATH>
118
+ <PATH_ELEMENT>
119
+ <option name="myItemId" value="timeywimey" />
120
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
121
+ </PATH_ELEMENT>
122
+ <PATH_ELEMENT>
123
+ <option name="myItemId" value="timeywimey" />
124
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
125
+ </PATH_ELEMENT>
126
+ <PATH_ELEMENT>
127
+ <option name="myItemId" value="lib" />
128
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
129
+ </PATH_ELEMENT>
130
+ </PATH>
131
+ </subPane>
132
+ </pane>
133
+ </panes>
134
+ </component>
135
+ <component name="PropertiesComponent">
136
+ <property name="WebServerToolWindowFactoryState" value="false" />
137
+ <property name="last_opened_file_path" value="$PROJECT_DIR$" />
138
+ <property name="HbShouldOpenHtmlAsHb" value="" />
139
+ </component>
140
+ <component name="RunManager">
141
+ <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
142
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
143
+ <module name="" />
144
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
145
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
146
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
147
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
148
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
149
+ <envs />
150
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
151
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
152
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
153
+ <COVERAGE_PATTERN ENABLED="true">
154
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
155
+ </COVERAGE_PATTERN>
156
+ </EXTENSION>
157
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
158
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
159
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
160
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
161
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
162
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
163
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
164
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
165
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
166
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
167
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
168
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
169
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
170
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
171
+ <method />
172
+ </configuration>
173
+ <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
174
+ <method />
175
+ </configuration>
176
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
177
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
178
+ <module name="" />
179
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
180
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
181
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
182
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
183
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
184
+ <envs />
185
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
186
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
187
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
188
+ <COVERAGE_PATTERN ENABLED="true">
189
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
190
+ </COVERAGE_PATTERN>
191
+ </EXTENSION>
192
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
193
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
194
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
195
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
196
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
197
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
198
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
199
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
200
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
201
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
202
+ <method />
203
+ </configuration>
204
+ <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
205
+ <node-options />
206
+ <gulpfile />
207
+ <tasks />
208
+ <pass-parent-envs>true</pass-parent-envs>
209
+ <envs />
210
+ <method />
211
+ </configuration>
212
+ <list size="0" />
213
+ </component>
214
+ <component name="ShelveChangesManager" show_recycled="false" />
215
+ <component name="TaskManager">
216
+ <task active="true" id="Default" summary="Default task">
217
+ <changelist id="1f336681-3f7b-4e20-bbaa-c868fa78fc9c" name="Default" comment="" />
218
+ <created>1423787622130</created>
219
+ <option name="number" value="Default" />
220
+ <updated>1423787622130</updated>
221
+ </task>
222
+ <servers />
223
+ </component>
224
+ <component name="ToolWindowManager">
225
+ <frame x="4" y="23" width="1381" height="987" extended-state="0" />
226
+ <editor active="true" />
227
+ <layout>
228
+ <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" />
229
+ <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="7" side_tool="false" content_ui="tabs" />
230
+ <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" />
231
+ <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" />
232
+ <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" />
233
+ <window_info id="Application Servers" 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" />
234
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24981897" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
235
+ <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" />
236
+ <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" />
237
+ <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" />
238
+ <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" />
239
+ <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" />
240
+ <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" />
241
+ <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" />
242
+ <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" />
243
+ <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" />
244
+ <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" />
245
+ <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" />
246
+ <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" />
247
+ </layout>
248
+ </component>
249
+ <component name="Vcs.Log.UiProperties">
250
+ <option name="RECENTLY_FILTERED_USER_GROUPS">
251
+ <collection />
252
+ </option>
253
+ <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
254
+ <collection />
255
+ </option>
256
+ </component>
257
+ <component name="VcsContentAnnotationSettings">
258
+ <option name="myLimit" value="2678400000" />
259
+ </component>
260
+ <component name="VcsManagerConfiguration">
261
+ <option name="myTodoPanelSettings">
262
+ <TodoPanelSettings />
263
+ </option>
264
+ </component>
265
+ <component name="XDebuggerManager">
266
+ <breakpoint-manager />
267
+ <watches-manager />
268
+ </component>
269
+ <component name="editorHistoryManager">
270
+ <entry file="file://$PROJECT_DIR$/timeywimey.gemspec">
271
+ <provider selected="true" editor-type-id="text-editor">
272
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="465">
273
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
274
+ <folding />
275
+ </state>
276
+ </provider>
277
+ </entry>
278
+ <entry file="file://$PROJECT_DIR$/README.md">
279
+ <provider selected="true" editor-type-id="text-editor">
280
+ <state vertical-scroll-proportion="0.0" vertical-offset="495" max-vertical-offset="585">
281
+ <caret line="33" column="0" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
282
+ <folding />
283
+ </state>
284
+ </provider>
285
+ <provider editor-type-id="MarkdownPreviewEditor">
286
+ <state />
287
+ </provider>
288
+ </entry>
289
+ <entry file="file://$PROJECT_DIR$/lib/timeywimey/locale/en.yml">
290
+ <provider selected="true" editor-type-id="text-editor">
291
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="915">
292
+ <caret line="0" column="1" selection-start-line="0" selection-start-column="1" selection-end-line="0" selection-end-column="1" />
293
+ <folding />
294
+ </state>
295
+ </provider>
296
+ </entry>
297
+ <entry file="file://$PROJECT_DIR$/timeywimey.gemspec">
298
+ <provider selected="true" editor-type-id="text-editor">
299
+ <state vertical-scroll-proportion="0.19097222" vertical-offset="0" max-vertical-offset="864">
300
+ <caret line="11" column="174" selection-start-line="11" selection-start-column="26" selection-end-line="11" selection-end-column="174" />
301
+ <folding />
302
+ </state>
303
+ </provider>
304
+ </entry>
305
+ <entry file="file://$PROJECT_DIR$/README.md">
306
+ <provider selected="true" editor-type-id="text-editor">
307
+ <state vertical-scroll-proportion="-16.5" vertical-offset="0" max-vertical-offset="585">
308
+ <caret line="33" column="0" selection-start-line="33" selection-start-column="0" selection-end-line="33" selection-end-column="0" />
309
+ <folding />
310
+ </state>
311
+ </provider>
312
+ <provider editor-type-id="MarkdownPreviewEditor">
313
+ <state />
314
+ </provider>
315
+ </entry>
316
+ <entry file="file://$PROJECT_DIR$/lib/timeywimey.rb">
317
+ <provider selected="true" editor-type-id="text-editor">
318
+ <state vertical-scroll-proportion="0.4861111" vertical-offset="0" max-vertical-offset="2880">
319
+ <caret line="28" column="72" selection-start-line="28" selection-start-column="72" selection-end-line="28" selection-end-column="72" />
320
+ <folding />
321
+ </state>
322
+ </provider>
323
+ </entry>
324
+ </component>
325
+ </project>
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in timeywimey.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Ryan Canty
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.
@@ -0,0 +1,33 @@
1
+ # Timeywimey
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'timeywimey'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install timeywimey
18
+
19
+ ## Usage
20
+
21
+ require 'timeywimey'
22
+
23
+ from_time = Time.now - 3.days - 4.hours
24
+ Tw.time_ago_in_words from_time
25
+ #=> "3 days"
26
+
27
+ ## Contributing
28
+
29
+ 1. Fork it ( https://github.com/onetwopunch/timeywimey/fork )
30
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
31
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
32
+ 4. Push to the branch (`git push origin my-new-feature`)
33
+ 5. Create a new Pull Request
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
@@ -0,0 +1,17 @@
1
+ #!/bin/sh
2
+ # Run a Ruby REPL.
3
+
4
+ set -e
5
+
6
+ cd $(dirname "$0")/..
7
+ PRY_PATH=$(which pry)
8
+
9
+ if [ -x $PRY_PATH ]
10
+ then
11
+ exec bundle exec ruby $PRY_PATH -Ilib -r timeywimey -r timeywimey/console
12
+ else
13
+ red='\033[0;31m'
14
+ NC='\033[0m'
15
+ echo "${red}Pry was not found or not executable. Make sure \`which pry\` returns an executable.${NC}"
16
+
17
+ fi
@@ -0,0 +1,186 @@
1
+ require "timeywimey/version"
2
+ require 'active_support/dependencies/autoload'
3
+ require 'active_support/core_ext/numeric'
4
+ require 'active_support/core_ext/date'
5
+ require 'active_support/core_ext/array/extract_options'
6
+ require 'active_support/core_ext/date/conversions'
7
+ require 'active_support/core_ext/hash/slice'
8
+ require 'active_support/core_ext/object/with_options'
9
+
10
+ module Tw
11
+ MINUTES_IN_YEAR = 525600
12
+ MINUTES_IN_QUARTER_YEAR = 131400
13
+ MINUTES_IN_THREE_QUARTERS_YEAR = 394200
14
+
15
+ def self.root
16
+ File.absolute_path File.join(__FILE__, '../..')
17
+ end
18
+
19
+ def self.distance_of_time_in_words(from_time, to_time = 0, options = {})
20
+ options = {
21
+ scope: :'datetime.distance_in_words'
22
+ }.merge!(options)
23
+
24
+ from_time = from_time.to_time if from_time.respond_to?(:to_time)
25
+ to_time = to_time.to_time if to_time.respond_to?(:to_time)
26
+ from_time, to_time = to_time, from_time if from_time > to_time
27
+ distance_in_minutes = ((to_time - from_time)/60.0).round
28
+ distance_in_seconds = (to_time - from_time).round
29
+ I18n.load_path << File.join(Tw.root, "lib/timeywimey/locale/en.yml")
30
+ I18n.with_options :locale => options[:locale], :scope => options[:scope] do |locale|
31
+ case distance_in_minutes
32
+ when 0..1
33
+ return distance_in_minutes == 0 ?
34
+ locale.t(:less_than_x_minutes, :count => 1) :
35
+ locale.t(:x_minutes, :count => distance_in_minutes) unless options[:include_seconds]
36
+
37
+ case distance_in_seconds
38
+ when 0..4 then locale.t :less_than_x_seconds, :count => 5
39
+ when 5..9 then locale.t :less_than_x_seconds, :count => 10
40
+ when 10..19 then locale.t :less_than_x_seconds, :count => 20
41
+ when 20..39 then locale.t :half_a_minute
42
+ when 40..59 then locale.t :less_than_x_minutes, :count => 1
43
+ else locale.t :x_minutes, :count => 1
44
+ end
45
+
46
+ when 2...45 then locale.t :x_minutes, :count => distance_in_minutes
47
+ when 45...90 then locale.t :about_x_hours, :count => 1
48
+ # 90 mins up to 24 hours
49
+ when 90...1440 then locale.t :about_x_hours, :count => (distance_in_minutes.to_f / 60.0).round
50
+ # 24 hours up to 42 hours
51
+ when 1440...2520 then locale.t :x_days, :count => 1
52
+ # 42 hours up to 30 days
53
+ when 2520...43200 then locale.t :x_days, :count => (distance_in_minutes.to_f / 1440.0).round
54
+ # 30 days up to 60 days
55
+ when 43200...86400 then locale.t :about_x_months, :count => (distance_in_minutes.to_f / 43200.0).round
56
+ # 60 days up to 365 days
57
+ when 86400...525600 then locale.t :x_months, :count => (distance_in_minutes.to_f / 43200.0).round
58
+ else
59
+ if from_time.acts_like?(:time) && to_time.acts_like?(:time)
60
+ fyear = from_time.year
61
+ fyear += 1 if from_time.month >= 3
62
+ tyear = to_time.year
63
+ tyear -= 1 if to_time.month < 3
64
+ leap_years = (fyear > tyear) ? 0 : (fyear..tyear).count{|x| Date.leap?(x)}
65
+ minute_offset_for_leap_year = leap_years * 1440
66
+ # Discount the leap year days when calculating year distance.
67
+ # e.g. if there are 20 leap year days between 2 dates having the same day
68
+ # and month then the based on 365 days calculation
69
+ # the distance in years will come out to over 80 years when in written
70
+ # English it would read better as about 80 years.
71
+ minutes_with_offset = distance_in_minutes - minute_offset_for_leap_year
72
+ else
73
+ minutes_with_offset = distance_in_minutes
74
+ end
75
+ remainder = (minutes_with_offset % MINUTES_IN_YEAR)
76
+ distance_in_years = (minutes_with_offset.div MINUTES_IN_YEAR)
77
+ if remainder < MINUTES_IN_QUARTER_YEAR
78
+ locale.t(:about_x_years, :count => distance_in_years)
79
+ elsif remainder < MINUTES_IN_THREE_QUARTERS_YEAR
80
+ locale.t(:over_x_years, :count => distance_in_years)
81
+ else
82
+ locale.t(:almost_x_years, :count => distance_in_years + 1)
83
+ end
84
+ end
85
+ end
86
+ end
87
+
88
+ # Like <tt>distance_of_time_in_words</tt>, but where <tt>to_time</tt> is fixed to <tt>Time.now</tt>.
89
+ #
90
+ # time_ago_in_words(3.minutes.from_now) # => 3 minutes
91
+ # time_ago_in_words(3.minutes.ago) # => 3 minutes
92
+ # time_ago_in_words(Time.now - 15.hours) # => about 15 hours
93
+ # time_ago_in_words(Time.now) # => less than a minute
94
+ # time_ago_in_words(Time.now, include_seconds: true) # => less than 5 seconds
95
+ #
96
+ # from_time = Time.now - 3.days - 14.minutes - 25.seconds
97
+ # time_ago_in_words(from_time) # => 3 days
98
+ #
99
+ # from_time = (3.days + 14.minutes + 25.seconds).ago
100
+ # time_ago_in_words(from_time) # => 3 days
101
+ #
102
+ # Note that you cannot pass a <tt>Numeric</tt> value to <tt>time_ago_in_words</tt>.
103
+ #
104
+ def self.time_ago_in_words(from_time, options = {})
105
+ Tw.distance_of_time_in_words(from_time, Time.now, options)
106
+ end
107
+
108
+ private
109
+ %w( sec min hour day month year ).each do |method|
110
+ define_method(method) do
111
+ @datetime.kind_of?(Numeric) ? @datetime : @datetime.send(method) if @datetime
112
+ end
113
+ end
114
+
115
+ # If the day is hidden, the day should be set to the 1st so all month and year choices are
116
+ # valid. Otherwise, February 31st or February 29th, 2011 can be selected, which are invalid.
117
+ def set_day_if_discarded
118
+ if @datetime && @options[:discard_day]
119
+ @datetime = @datetime.change(:day => 1)
120
+ end
121
+ end
122
+
123
+ # Returns translated month names, but also ensures that a custom month
124
+ # name array has a leading nil element.
125
+ def month_names
126
+ @month_names ||= begin
127
+ month_names = @options[:use_month_names] || translated_month_names
128
+ month_names.unshift(nil) if month_names.size < 13
129
+ month_names
130
+ end
131
+ end
132
+
133
+ # Returns translated month names.
134
+ # => [nil, "January", "February", "March",
135
+ # "April", "May", "June", "July",
136
+ # "August", "September", "October",
137
+ # "November", "December"]
138
+ #
139
+ # If <tt>:use_short_month</tt> option is set
140
+ # => [nil, "Jan", "Feb", "Mar", "Apr", "May", "Jun",
141
+ # "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
142
+ def translated_month_names
143
+ key = @options[:use_short_month] ? :'date.abbr_month_names' : :'date.month_names'
144
+ I18n.translate(key, :locale => @options[:locale])
145
+ end
146
+
147
+ # Looks up month names by number (1-based):
148
+ #
149
+ # month_name(1) # => "January"
150
+ #
151
+ # If the <tt>:use_month_numbers</tt> option is passed:
152
+ #
153
+ # month_name(1) # => 1
154
+ #
155
+ # If the <tt>:use_two_month_numbers</tt> option is passed:
156
+ #
157
+ # month_name(1) # => '01'
158
+ #
159
+ # If the <tt>:add_month_numbers</tt> option is passed:
160
+ #
161
+ # month_name(1) # => "1 - January"
162
+ #
163
+ # If the <tt>:month_format_string</tt> option is passed:
164
+ #
165
+ # month_name(1) # => "January (01)"
166
+ #
167
+ # depending on the format string.
168
+ def month_name(number)
169
+ if @options[:use_month_numbers]
170
+ number
171
+ elsif @options[:use_two_digit_numbers]
172
+ '%02d' % number
173
+ elsif @options[:add_month_numbers]
174
+ "#{number} - #{month_names[number]}"
175
+ elsif format_string = @options[:month_format_string]
176
+ format_string % {number: number, name: month_names[number]}
177
+ else
178
+ month_names[number]
179
+ end
180
+ end
181
+
182
+ def date_order
183
+ @date_order ||= @options[:order] || translated_date_order
184
+ end
185
+
186
+ end
@@ -0,0 +1,3 @@
1
+ Pry.config.prompt = lambda do |context, nesting, pry|
2
+ "[timeywimey] #{context} > "
3
+ end
@@ -0,0 +1,56 @@
1
+ "en":
2
+ # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
3
+ datetime:
4
+ distance_in_words:
5
+ half_a_minute: "half a minute"
6
+ less_than_x_seconds:
7
+ one: "less than 1 second"
8
+ other: "less than %{count} seconds"
9
+ x_seconds:
10
+ one: "1 second"
11
+ other: "%{count} seconds"
12
+ less_than_x_minutes:
13
+ one: "less than a minute"
14
+ other: "less than %{count} minutes"
15
+ x_minutes:
16
+ one: "1 minute"
17
+ other: "%{count} minutes"
18
+ about_x_hours:
19
+ one: "about 1 hour"
20
+ other: "about %{count} hours"
21
+ x_days:
22
+ one: "1 day"
23
+ other: "%{count} days"
24
+ about_x_months:
25
+ one: "about 1 month"
26
+ other: "about %{count} months"
27
+ x_months:
28
+ one: "1 month"
29
+ other: "%{count} months"
30
+ about_x_years:
31
+ one: "about 1 year"
32
+ other: "about %{count} years"
33
+ over_x_years:
34
+ one: "over 1 year"
35
+ other: "over %{count} years"
36
+ almost_x_years:
37
+ one: "almost 1 year"
38
+ other: "almost %{count} years"
39
+ prompts:
40
+ year: "Year"
41
+ month: "Month"
42
+ day: "Day"
43
+ hour: "Hour"
44
+ minute: "Minute"
45
+ second: "Seconds"
46
+
47
+ helpers:
48
+ select:
49
+ # Default value for :prompt => true in FormOptionsHelper
50
+ prompt: "Please select"
51
+
52
+ # Default translation keys for submit and button FormHelper
53
+ submit:
54
+ create: 'Create %{model}'
55
+ update: 'Update %{model}'
56
+ submit: 'Save %{model}'
@@ -0,0 +1,3 @@
1
+ module Timeywimey
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'timeywimey/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "timeywimey"
8
+ spec.version = Timeywimey::VERSION
9
+ spec.authors = ["Ryan Canty"]
10
+ spec.email = ["rcanty@qti.qualcomm.com"]
11
+ spec.summary = %q{Wraps up time_ago_in_words to use outside of ActionView}
12
+ spec.description = %q{Timeywimey wraps up several active_support modules and gives you access to time_ago_in_words outside the ActionView context or in a native Ruby app.}
13
+ spec.homepage = ""
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.6"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "pry"
24
+ spec.add_runtime_dependency "activesupport"
25
+ end
metadata ADDED
@@ -0,0 +1,122 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: timeywimey
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ryan Canty
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-13 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.6'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.6'
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
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: activesupport
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Timeywimey wraps up several active_support modules and gives you access
70
+ to time_ago_in_words outside the ActionView context or in a native Ruby app.
71
+ email:
72
+ - rcanty@qti.qualcomm.com
73
+ executables:
74
+ - console
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - ".gitignore"
79
+ - ".idea/.name"
80
+ - ".idea/.rakeTasks"
81
+ - ".idea/encodings.xml"
82
+ - ".idea/misc.xml"
83
+ - ".idea/modules.xml"
84
+ - ".idea/scopes/scope_settings.xml"
85
+ - ".idea/timeywimey.iml"
86
+ - ".idea/vcs.xml"
87
+ - ".idea/workspace.xml"
88
+ - Gemfile
89
+ - LICENSE.txt
90
+ - README.md
91
+ - Rakefile
92
+ - bin/console
93
+ - lib/timeywimey.rb
94
+ - lib/timeywimey/console.rb
95
+ - lib/timeywimey/locale/en.yml
96
+ - lib/timeywimey/version.rb
97
+ - timeywimey.gemspec
98
+ homepage: ''
99
+ licenses:
100
+ - MIT
101
+ metadata: {}
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubyforge_project:
118
+ rubygems_version: 2.2.2
119
+ signing_key:
120
+ specification_version: 4
121
+ summary: Wraps up time_ago_in_words to use outside of ActionView
122
+ test_files: []