address-io 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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 04ceaee83253da344ded9b3dd4385af34aac938d
4
+ data.tar.gz: b5f2a19a1a109607b5586f5471e12370483f8f05
5
+ SHA512:
6
+ metadata.gz: 67b5e61c7c8610e1858cec3987f02dbacd2f4b9eb65200118ea5196aa51bbf74d6af170d8efe643e9590235497c46460d092dfabfe07481c1d2c088d1ca01198
7
+ data.tar.gz: d37e5ccefc4d217c844d9a580cb517d9ad0c596c1fb0b6920777636e6f09f6a55ef7e4353437cf550b9f9496479fffaadb68c25e9826b8f3820114e5c02f7f36
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.idea/.name ADDED
@@ -0,0 +1 @@
1
+ address-io
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 address-io-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Build and install address-io-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install address-io-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push address-io-0.1.0.gem to Rubygems" fullCmd="release" taksId="release" /><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
@@ -0,0 +1,32 @@
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="" />
9
+ </configuration>
10
+ </facet>
11
+ </component>
12
+ <component name="NewModuleRootManager">
13
+ <content url="file://$MODULE_DIR$" />
14
+ <orderEntry type="jdk" jdkName="RVM: ruby-2.1.5 [global]" jdkType="RUBY_SDK" />
15
+ <orderEntry type="sourceFolder" forTests="false" />
16
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.10.6, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="domain_name (v0.5.24, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="http-cookie (v1.0.2, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="mime-types (v2.6.1, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="netrc (v0.10.3, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="rest-client (v1.8.0, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.3.0, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.3.2, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.3.1, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.3.2, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.3.0, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="unf (v0.1.4, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="unf_ext (v0.0.7.1, RVM: ruby-2.1.5 [global]) [gem]" level="application" />
31
+ </component>
32
+ </module>
@@ -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>
data/.idea/misc.xml ADDED
@@ -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="rbenv: 2.1.3" project-jdk-type="RUBY_SDK" />
4
+ </project>
data/.idea/modules.xml ADDED
@@ -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/address-io.iml" filepath="$PROJECT_DIR$/.idea/address-io.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>
data/.idea/vcs.xml ADDED
@@ -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,570 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="20b222dc-1965-4bcb-b2b7-6de2af88f7f0" name="Default" comment="">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/address-io.gemspec" afterPath="$PROJECT_DIR$/address-io.gemspec" />
6
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/address/io/version.rb" afterPath="$PROJECT_DIR$/lib/address/io/version.rb" />
7
+ </list>
8
+ <ignored path="address-io.iws" />
9
+ <ignored path=".idea/workspace.xml" />
10
+ <ignored path=".idea/dataSources.local.xml" />
11
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
12
+ <option name="TRACKING_ENABLED" value="true" />
13
+ <option name="SHOW_DIALOG" value="false" />
14
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
15
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
16
+ <option name="LAST_RESOLUTION" value="IGNORE" />
17
+ </component>
18
+ <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
19
+ <component name="CreatePatchCommitExecutor">
20
+ <option name="PATCH_PATH" value="" />
21
+ </component>
22
+ <component name="DaemonCodeAnalyzer">
23
+ <disable_hints />
24
+ </component>
25
+ <component name="FavoritesManager">
26
+ <favorites_list name="address-io" />
27
+ </component>
28
+ <component name="FileEditorManager">
29
+ <leaf>
30
+ <file leaf-file-name="address-io.gemspec" pinned="false" current-in-tab="false">
31
+ <entry file="file://$PROJECT_DIR$/address-io.gemspec">
32
+ <provider selected="true" editor-type-id="text-editor">
33
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="615">
34
+ <caret line="22" column="2" selection-start-line="22" selection-start-column="2" selection-end-line="22" selection-end-column="2" />
35
+ <folding />
36
+ </state>
37
+ </provider>
38
+ </entry>
39
+ </file>
40
+ <file leaf-file-name="version.rb" pinned="false" current-in-tab="true">
41
+ <entry file="file://$PROJECT_DIR$/lib/address/io/version.rb">
42
+ <provider selected="true" editor-type-id="text-editor">
43
+ <state vertical-scroll-proportion="0.04405286" vertical-offset="0" max-vertical-offset="681">
44
+ <caret line="2" column="16" selection-start-line="2" selection-start-column="16" selection-end-line="2" selection-end-column="16" />
45
+ <folding />
46
+ </state>
47
+ </provider>
48
+ </entry>
49
+ </file>
50
+ <file leaf-file-name="io_spec.rb" pinned="false" current-in-tab="false">
51
+ <entry file="file://$PROJECT_DIR$/spec/address/io_spec.rb">
52
+ <provider selected="true" editor-type-id="text-editor">
53
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1185">
54
+ <caret line="56" column="65" selection-start-line="56" selection-start-column="65" selection-end-line="56" selection-end-column="65" />
55
+ <folding />
56
+ </state>
57
+ </provider>
58
+ </entry>
59
+ </file>
60
+ <file leaf-file-name="api_resource.rb" pinned="false" current-in-tab="false">
61
+ <entry file="file://$PROJECT_DIR$/lib/address/io/api_resource.rb">
62
+ <provider selected="true" editor-type-id="text-editor">
63
+ <state vertical-scroll-proportion="0.0" vertical-offset="174" max-vertical-offset="960">
64
+ <caret line="34" column="8" selection-start-line="34" selection-start-column="8" selection-end-line="34" selection-end-column="8" />
65
+ <folding />
66
+ </state>
67
+ </provider>
68
+ </entry>
69
+ </file>
70
+ <file leaf-file-name="addresses.rb" pinned="false" current-in-tab="false">
71
+ <entry file="file://$PROJECT_DIR$/lib/address/io/addresses.rb">
72
+ <provider selected="true" editor-type-id="text-editor">
73
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="300">
74
+ <caret line="2" column="10" selection-start-line="2" selection-start-column="10" selection-end-line="2" selection-end-column="10" />
75
+ <folding />
76
+ </state>
77
+ </provider>
78
+ </entry>
79
+ </file>
80
+ <file leaf-file-name="retrieve.rb" pinned="false" current-in-tab="false">
81
+ <entry file="file://$PROJECT_DIR$/lib/address/io/api_operations/retrieve.rb">
82
+ <provider selected="true" editor-type-id="text-editor">
83
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="330">
84
+ <caret line="4" column="36" selection-start-line="4" selection-start-column="36" selection-end-line="4" selection-end-column="36" />
85
+ <folding />
86
+ </state>
87
+ </provider>
88
+ </entry>
89
+ </file>
90
+ <file leaf-file-name="city.rb" pinned="false" current-in-tab="false">
91
+ <entry file="file://$PROJECT_DIR$/lib/address/io/city.rb">
92
+ <provider selected="true" editor-type-id="text-editor">
93
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="420">
94
+ <caret line="18" column="11" selection-start-line="13" selection-start-column="8" selection-end-line="18" selection-end-column="11" />
95
+ <folding />
96
+ </state>
97
+ </provider>
98
+ </entry>
99
+ </file>
100
+ <file leaf-file-name="state.rb" pinned="false" current-in-tab="false">
101
+ <entry file="file://$PROJECT_DIR$/lib/address/io/state.rb">
102
+ <provider selected="true" editor-type-id="text-editor">
103
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="300">
104
+ <caret line="4" column="6" selection-start-line="4" selection-start-column="6" selection-end-line="4" selection-end-column="33" />
105
+ <folding />
106
+ </state>
107
+ </provider>
108
+ </entry>
109
+ </file>
110
+ <file leaf-file-name="io.rb" pinned="false" current-in-tab="false">
111
+ <entry file="file://$PROJECT_DIR$/lib/address/io.rb">
112
+ <provider selected="true" editor-type-id="text-editor">
113
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="450">
114
+ <caret line="4" column="33" selection-start-line="4" selection-start-column="33" selection-end-line="4" selection-end-column="33" />
115
+ <folding />
116
+ </state>
117
+ </provider>
118
+ </entry>
119
+ </file>
120
+ <file leaf-file-name="list.rb" pinned="false" current-in-tab="false">
121
+ <entry file="file://$PROJECT_DIR$/lib/address/io/api_operations/list.rb">
122
+ <provider selected="true" editor-type-id="text-editor">
123
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="330">
124
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="2" selection-end-column="24" />
125
+ <folding />
126
+ </state>
127
+ </provider>
128
+ </entry>
129
+ </file>
130
+ </leaf>
131
+ </component>
132
+ <component name="Git.Settings">
133
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
134
+ </component>
135
+ <component name="IdeDocumentHistory">
136
+ <option name="CHANGED_PATHS">
137
+ <list>
138
+ <option value="$PROJECT_DIR$/lib/address/io/api_operations/list.rb" />
139
+ <option value="$PROJECT_DIR$/lib/address/io/state.rb" />
140
+ <option value="$PROJECT_DIR$/lib/address/io/city.rb" />
141
+ <option value="$PROJECT_DIR$/lib/address/io/address.rb" />
142
+ <option value="$PROJECT_DIR$/lib/address/io/api_operations/retrieve.rb" />
143
+ <option value="$PROJECT_DIR$/lib/address/io/errors/address_io_error.rb" />
144
+ <option value="$PROJECT_DIR$/lib/address/io/api_resource.rb" />
145
+ <option value="$PROJECT_DIR$/lib/address/io.rb" />
146
+ <option value="$PROJECT_DIR$/spec/address/io_spec.rb" />
147
+ <option value="$PROJECT_DIR$/address-io.gemspec" />
148
+ <option value="$PROJECT_DIR$/lib/address/io/version.rb" />
149
+ </list>
150
+ </option>
151
+ </component>
152
+ <component name="JsGulpfileManager">
153
+ <detection-done>true</detection-done>
154
+ </component>
155
+ <component name="ProjectFrameBounds">
156
+ <option name="y" value="23" />
157
+ <option name="width" value="1280" />
158
+ <option name="height" value="773" />
159
+ </component>
160
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true">
161
+ <OptionsSetting value="true" id="Add" />
162
+ <OptionsSetting value="true" id="Remove" />
163
+ <OptionsSetting value="true" id="Checkout" />
164
+ <OptionsSetting value="true" id="Update" />
165
+ <OptionsSetting value="true" id="Status" />
166
+ <OptionsSetting value="true" id="Edit" />
167
+ <ConfirmationsSetting value="0" id="Add" />
168
+ <ConfirmationsSetting value="0" id="Remove" />
169
+ </component>
170
+ <component name="ProjectView">
171
+ <navigator currentView="ProjectPane" proportions="" version="1">
172
+ <flattenPackages />
173
+ <showMembers />
174
+ <showModules />
175
+ <showLibraryContents />
176
+ <hideEmptyPackages />
177
+ <abbreviatePackageNames />
178
+ <autoscrollToSource />
179
+ <autoscrollFromSource />
180
+ <sortByType />
181
+ </navigator>
182
+ <panes>
183
+ <pane id="ProjectPane">
184
+ <subPane>
185
+ <PATH>
186
+ <PATH_ELEMENT>
187
+ <option name="myItemId" value="address-io" />
188
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
189
+ </PATH_ELEMENT>
190
+ </PATH>
191
+ <PATH>
192
+ <PATH_ELEMENT>
193
+ <option name="myItemId" value="address-io" />
194
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
195
+ </PATH_ELEMENT>
196
+ <PATH_ELEMENT>
197
+ <option name="myItemId" value="address-io" />
198
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
199
+ </PATH_ELEMENT>
200
+ </PATH>
201
+ <PATH>
202
+ <PATH_ELEMENT>
203
+ <option name="myItemId" value="address-io" />
204
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
205
+ </PATH_ELEMENT>
206
+ <PATH_ELEMENT>
207
+ <option name="myItemId" value="address-io" />
208
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
209
+ </PATH_ELEMENT>
210
+ <PATH_ELEMENT>
211
+ <option name="myItemId" value="spec" />
212
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
213
+ </PATH_ELEMENT>
214
+ </PATH>
215
+ <PATH>
216
+ <PATH_ELEMENT>
217
+ <option name="myItemId" value="address-io" />
218
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
219
+ </PATH_ELEMENT>
220
+ <PATH_ELEMENT>
221
+ <option name="myItemId" value="address-io" />
222
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
223
+ </PATH_ELEMENT>
224
+ <PATH_ELEMENT>
225
+ <option name="myItemId" value="spec" />
226
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
227
+ </PATH_ELEMENT>
228
+ <PATH_ELEMENT>
229
+ <option name="myItemId" value="address" />
230
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
231
+ </PATH_ELEMENT>
232
+ </PATH>
233
+ <PATH>
234
+ <PATH_ELEMENT>
235
+ <option name="myItemId" value="address-io" />
236
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
237
+ </PATH_ELEMENT>
238
+ <PATH_ELEMENT>
239
+ <option name="myItemId" value="address-io" />
240
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
241
+ </PATH_ELEMENT>
242
+ <PATH_ELEMENT>
243
+ <option name="myItemId" value="lib" />
244
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
245
+ </PATH_ELEMENT>
246
+ <PATH_ELEMENT>
247
+ <option name="myItemId" value="address" />
248
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
249
+ </PATH_ELEMENT>
250
+ </PATH>
251
+ <PATH>
252
+ <PATH_ELEMENT>
253
+ <option name="myItemId" value="address-io" />
254
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
255
+ </PATH_ELEMENT>
256
+ <PATH_ELEMENT>
257
+ <option name="myItemId" value="address-io" />
258
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
259
+ </PATH_ELEMENT>
260
+ <PATH_ELEMENT>
261
+ <option name="myItemId" value="lib" />
262
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
263
+ </PATH_ELEMENT>
264
+ <PATH_ELEMENT>
265
+ <option name="myItemId" value="address" />
266
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
267
+ </PATH_ELEMENT>
268
+ <PATH_ELEMENT>
269
+ <option name="myItemId" value="io" />
270
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
271
+ </PATH_ELEMENT>
272
+ </PATH>
273
+ <PATH>
274
+ <PATH_ELEMENT>
275
+ <option name="myItemId" value="address-io" />
276
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
277
+ </PATH_ELEMENT>
278
+ <PATH_ELEMENT>
279
+ <option name="myItemId" value="address-io" />
280
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
281
+ </PATH_ELEMENT>
282
+ <PATH_ELEMENT>
283
+ <option name="myItemId" value="lib" />
284
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
285
+ </PATH_ELEMENT>
286
+ <PATH_ELEMENT>
287
+ <option name="myItemId" value="address" />
288
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
289
+ </PATH_ELEMENT>
290
+ <PATH_ELEMENT>
291
+ <option name="myItemId" value="io" />
292
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
293
+ </PATH_ELEMENT>
294
+ <PATH_ELEMENT>
295
+ <option name="myItemId" value="api_operations" />
296
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
297
+ </PATH_ELEMENT>
298
+ </PATH>
299
+ </subPane>
300
+ </pane>
301
+ <pane id="Scope" />
302
+ </panes>
303
+ </component>
304
+ <component name="PropertiesComponent">
305
+ <property name="WebServerToolWindowFactoryState" value="false" />
306
+ </component>
307
+ <component name="RunManager">
308
+ <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
309
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
310
+ <module name="" />
311
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
312
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
313
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
314
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
315
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
316
+ <envs />
317
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
318
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
319
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
320
+ <COVERAGE_PATTERN ENABLED="true">
321
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
322
+ </COVERAGE_PATTERN>
323
+ </EXTENSION>
324
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
325
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
326
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
327
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
328
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
329
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
330
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
331
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
332
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
333
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
334
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
335
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
336
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
337
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
338
+ <method />
339
+ </configuration>
340
+ <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
341
+ <module name="" />
342
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
343
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
344
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
345
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
346
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
347
+ <envs />
348
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
349
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
350
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
351
+ <COVERAGE_PATTERN ENABLED="true">
352
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
353
+ </COVERAGE_PATTERN>
354
+ </EXTENSION>
355
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
356
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
357
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
358
+ <method />
359
+ </configuration>
360
+ <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
361
+ <method />
362
+ </configuration>
363
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
364
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
365
+ <module name="" />
366
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
367
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
368
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
369
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
370
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
371
+ <envs />
372
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
373
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
374
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
375
+ <COVERAGE_PATTERN ENABLED="true">
376
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
377
+ </COVERAGE_PATTERN>
378
+ </EXTENSION>
379
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
380
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
381
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
382
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
383
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
384
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
385
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
386
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
387
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
388
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
389
+ <method />
390
+ </configuration>
391
+ <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
392
+ <node-options />
393
+ <gulpfile />
394
+ <tasks />
395
+ <pass-parent-envs>true</pass-parent-envs>
396
+ <envs />
397
+ <method />
398
+ </configuration>
399
+ <list size="0" />
400
+ </component>
401
+ <component name="ShelveChangesManager" show_recycled="false" />
402
+ <component name="TaskManager">
403
+ <task active="true" id="Default" summary="Default task">
404
+ <changelist id="20b222dc-1965-4bcb-b2b7-6de2af88f7f0" name="Default" comment="" />
405
+ <created>1441859818615</created>
406
+ <option name="number" value="Default" />
407
+ <updated>1441859818615</updated>
408
+ </task>
409
+ <servers />
410
+ </component>
411
+ <component name="ToolWindowManager">
412
+ <frame x="0" y="23" width="1280" height="773" extended-state="6" />
413
+ <editor active="true" />
414
+ <layout>
415
+ <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" />
416
+ <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" />
417
+ <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" />
418
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32863188" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
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" />
420
+ <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" />
421
+ <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" />
422
+ <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" />
423
+ <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" />
424
+ <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" />
425
+ <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" />
426
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2536349" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
427
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32956153" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
428
+ <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" />
429
+ <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" />
430
+ <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" />
431
+ <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" />
432
+ <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" />
433
+ <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" />
434
+ </layout>
435
+ </component>
436
+ <component name="Vcs.Log.UiProperties">
437
+ <option name="RECENTLY_FILTERED_USER_GROUPS">
438
+ <collection />
439
+ </option>
440
+ <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
441
+ <collection />
442
+ </option>
443
+ </component>
444
+ <component name="VcsContentAnnotationSettings">
445
+ <option name="myLimit" value="2678400000" />
446
+ </component>
447
+ <component name="VcsManagerConfiguration">
448
+ <option name="myTodoPanelSettings">
449
+ <TodoPanelSettings />
450
+ </option>
451
+ </component>
452
+ <component name="XDebuggerManager">
453
+ <breakpoint-manager />
454
+ <watches-manager />
455
+ </component>
456
+ <component name="editorHistoryManager">
457
+ <entry file="file://$PROJECT_DIR$/address-io.gemspec">
458
+ <provider selected="true" editor-type-id="text-editor">
459
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="585">
460
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
461
+ <folding />
462
+ </state>
463
+ </provider>
464
+ </entry>
465
+ <entry file="file://$PROJECT_DIR$/spec/address/io_spec.rb">
466
+ <provider selected="true" editor-type-id="text-editor">
467
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="630">
468
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
469
+ <folding />
470
+ </state>
471
+ </provider>
472
+ </entry>
473
+ <entry file="file://$PROJECT_DIR$/lib/address/io.rb">
474
+ <provider selected="true" editor-type-id="text-editor">
475
+ <state vertical-scroll-proportion="0.0" vertical-offset="45" max-vertical-offset="195">
476
+ <caret line="3" column="11" selection-start-line="3" selection-start-column="9" selection-end-line="3" selection-end-column="11" />
477
+ <folding />
478
+ </state>
479
+ </provider>
480
+ </entry>
481
+ <entry file="file://$PROJECT_DIR$/lib/address/io/api_resource.rb">
482
+ <provider selected="true" editor-type-id="text-editor">
483
+ <state vertical-scroll-proportion="0.0" vertical-offset="15" max-vertical-offset="825">
484
+ <caret line="1" column="11" selection-start-line="1" selection-start-column="11" selection-end-line="1" selection-end-column="11" />
485
+ <folding />
486
+ </state>
487
+ </provider>
488
+ </entry>
489
+ <entry file="file://$PROJECT_DIR$/lib/address/io/state.rb">
490
+ <provider selected="true" editor-type-id="text-editor">
491
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="300">
492
+ <caret line="4" column="6" selection-start-line="4" selection-start-column="6" selection-end-line="4" selection-end-column="33" />
493
+ <folding />
494
+ </state>
495
+ </provider>
496
+ </entry>
497
+ <entry file="file://$PROJECT_DIR$/lib/address/io/api_operations/list.rb">
498
+ <provider selected="true" editor-type-id="text-editor">
499
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="330">
500
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="2" selection-end-column="24" />
501
+ <folding />
502
+ </state>
503
+ </provider>
504
+ </entry>
505
+ <entry file="file://$PROJECT_DIR$/lib/address/io/city.rb">
506
+ <provider selected="true" editor-type-id="text-editor">
507
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="420">
508
+ <caret line="18" column="11" selection-start-line="13" selection-start-column="8" selection-end-line="18" selection-end-column="11" />
509
+ <folding />
510
+ </state>
511
+ </provider>
512
+ </entry>
513
+ <entry file="file://$PROJECT_DIR$/lib/address/io/addresses.rb">
514
+ <provider selected="true" editor-type-id="text-editor">
515
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="300">
516
+ <caret line="2" column="10" selection-start-line="2" selection-start-column="10" selection-end-line="2" selection-end-column="10" />
517
+ <folding />
518
+ </state>
519
+ </provider>
520
+ </entry>
521
+ <entry file="file://$PROJECT_DIR$/lib/address/io/api_operations/retrieve.rb">
522
+ <provider selected="true" editor-type-id="text-editor">
523
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="330">
524
+ <caret line="4" column="36" selection-start-line="4" selection-start-column="36" selection-end-line="4" selection-end-column="36" />
525
+ <folding />
526
+ </state>
527
+ </provider>
528
+ </entry>
529
+ <entry file="file://$PROJECT_DIR$/lib/address/io/api_resource.rb">
530
+ <provider selected="true" editor-type-id="text-editor">
531
+ <state vertical-scroll-proportion="0.0" vertical-offset="174" max-vertical-offset="960">
532
+ <caret line="34" column="8" selection-start-line="34" selection-start-column="8" selection-end-line="34" selection-end-column="8" />
533
+ <folding />
534
+ </state>
535
+ </provider>
536
+ </entry>
537
+ <entry file="file://$PROJECT_DIR$/lib/address/io.rb">
538
+ <provider selected="true" editor-type-id="text-editor">
539
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="450">
540
+ <caret line="4" column="33" selection-start-line="4" selection-start-column="33" selection-end-line="4" selection-end-column="33" />
541
+ <folding />
542
+ </state>
543
+ </provider>
544
+ </entry>
545
+ <entry file="file://$PROJECT_DIR$/spec/address/io_spec.rb">
546
+ <provider selected="true" editor-type-id="text-editor">
547
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1185">
548
+ <caret line="56" column="65" selection-start-line="56" selection-start-column="65" selection-end-line="56" selection-end-column="65" />
549
+ <folding />
550
+ </state>
551
+ </provider>
552
+ </entry>
553
+ <entry file="file://$PROJECT_DIR$/address-io.gemspec">
554
+ <provider selected="true" editor-type-id="text-editor">
555
+ <state vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="615">
556
+ <caret line="22" column="2" selection-start-line="22" selection-start-column="2" selection-end-line="22" selection-end-column="2" />
557
+ <folding />
558
+ </state>
559
+ </provider>
560
+ </entry>
561
+ <entry file="file://$PROJECT_DIR$/lib/address/io/version.rb">
562
+ <provider selected="true" editor-type-id="text-editor">
563
+ <state vertical-scroll-proportion="0.04405286" vertical-offset="0" max-vertical-offset="681">
564
+ <caret line="2" column="16" selection-start-line="2" selection-start-column="16" selection-end-line="2" selection-end-column="16" />
565
+ <folding />
566
+ </state>
567
+ </provider>
568
+ </entry>
569
+ </component>
570
+ </project>
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.5
4
+ before_install: gem install bundler -v 1.10.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in address-io.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Ricardo Caldeira
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Address::Io
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/address/io`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'address-io'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install address-io
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/address-io.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,35 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'address/io/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "address-io"
8
+ spec.version = Address::Io::VERSION
9
+ spec.authors = ["Ricardo Caldeira"]
10
+ spec.email = ["ricardo.nezz@gmail.com"]
11
+
12
+ spec.summary = %q{Nfe.io's Adresses gem}
13
+ spec.description = %q{Nfe.io's Adresses gem}
14
+ spec.homepage = "https://pluga.co/"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
18
+ # delete this section to allow pushing this gem to any host.
19
+ # if spec.respond_to?(:metadata)
20
+ # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
21
+ # else
22
+ # raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
23
+ # end
24
+
25
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_dependency "rest-client", "~> 1.8"
31
+
32
+ spec.add_development_dependency "bundler", "~> 1.10"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "rspec"
35
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "address/io"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
data/lib/address/io.rb ADDED
@@ -0,0 +1,24 @@
1
+ require "rest-client"
2
+ require "json"
3
+ require "address/io/version"
4
+
5
+ require "address/io/api_resource"
6
+ require "address/io/api_operations/list"
7
+ require "address/io/api_operations/retrieve"
8
+ require "address/io/state"
9
+ require "address/io/city"
10
+ require "address/io/addresses"
11
+
12
+ module Address
13
+ module Io
14
+ @@api_key = ''
15
+
16
+ def self.api_key(api_key)
17
+ @@api_key = api_key
18
+ end
19
+
20
+ def self.access_keys
21
+ "#{@@api_key}"
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,15 @@
1
+ module Address
2
+ module Io
3
+ class Addresses
4
+ include ApiResource
5
+ include ApiOperations::Retrieve
6
+ def self.url
7
+ "/v1/addresses"
8
+ end
9
+
10
+ def url
11
+ "#{self.class.url}/#{self.id}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ module Address
2
+ module Io
3
+ module ApiOperations
4
+ module List
5
+ include ApiResource
6
+
7
+ def list_all(params=nil)
8
+ api_request(url, :get, params)
9
+ end
10
+
11
+ def self.included(base)
12
+ base.extend(List)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ module Address
2
+ module Io
3
+ module ApiOperations
4
+ module Retrieve
5
+ def retrieve(postal_code=nil)
6
+ return nil unless postal_code
7
+ postal_code = "?postal_code=#{postal_code}" if postal_code.include? '@'
8
+ api_request("#{url}/#{postal_code}", :get)
9
+ end
10
+
11
+ def self.included(base)
12
+ base.extend(Retrieve)
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,59 @@
1
+ module Address
2
+ module Io
3
+ module ApiResource
4
+ BASE_URL = 'http://open.nfe.io'
5
+
6
+ def url_encode(key)
7
+ URI.escape(key.to_s, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
8
+ end
9
+
10
+ def encode(params)
11
+ params.map { |k,v| "#{k}=#{url_encode(v)}" }.join('&')
12
+ end
13
+
14
+ def api_request(url, method, params=nil)
15
+ url = "#{BASE_URL}#{url}"
16
+ api_key = Address::Io.access_keys
17
+
18
+ if method == :get && params
19
+ params_encoded = encode(params)
20
+ url = "#{url}?#{params_encoded}"
21
+ params = nil
22
+ end
23
+
24
+ begin
25
+ payload = params.to_json
26
+ response = RestClient::Request.new(method: method, url: url, payload: payload,
27
+ headers: {authorization: api_key,
28
+ content_type: 'application/json',
29
+ accept: '*/*'}).execute
30
+ rescue RestClient::ExceptionWithResponse => e
31
+ return e.http_body
32
+ rescue RestClient::Exception => e
33
+ raise e
34
+ end
35
+ response = JSON.parse(response.to_str)
36
+ recursive_symbolize_keys response
37
+ end
38
+
39
+ def recursive_symbolize_keys(h)
40
+ case h
41
+ when Hash
42
+ Hash[
43
+ h.map do |k, v|
44
+ [ k.respond_to?(:to_sym) ? k.to_sym : k, recursive_symbolize_keys(v) ]
45
+ end
46
+ ]
47
+ when Enumerable
48
+ h.map { |v| recursive_symbolize_keys(v) }
49
+ else
50
+ h
51
+ end
52
+ end
53
+
54
+ def self.included(base)
55
+ base.extend(ApiResource)
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,23 @@
1
+ module Address
2
+ module Io
3
+ class City
4
+ include ApiResource
5
+ def self.url
6
+ "/v1/states/#{@state}/cities"
7
+ end
8
+
9
+ def url
10
+ "#{self.class.url}/#{self.id}"
11
+ end
12
+
13
+ def self.list_all(params=nil)
14
+ if params && params[:state]
15
+ @state = params[:state]
16
+ api_request(url, :get, params)
17
+ else
18
+ nil
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,15 @@
1
+ module Address
2
+ module Io
3
+ class State
4
+ include ApiResource
5
+ include ApiOperations::List
6
+ def self.url
7
+ "/v1/states"
8
+ end
9
+
10
+ def url
11
+ "#{self.class.url}/#{self.id}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,5 @@
1
+ module Address
2
+ module Io
3
+ VERSION = "1.0"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,127 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: address-io
3
+ version: !ruby/object:Gem::Version
4
+ version: '1.0'
5
+ platform: ruby
6
+ authors:
7
+ - Ricardo Caldeira
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-09-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rest-client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.8'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.8'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: Nfe.io's Adresses gem
70
+ email:
71
+ - ricardo.nezz@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".idea/.name"
78
+ - ".idea/.rakeTasks"
79
+ - ".idea/address-io.iml"
80
+ - ".idea/encodings.xml"
81
+ - ".idea/misc.xml"
82
+ - ".idea/modules.xml"
83
+ - ".idea/scopes/scope_settings.xml"
84
+ - ".idea/vcs.xml"
85
+ - ".idea/workspace.xml"
86
+ - ".rspec"
87
+ - ".travis.yml"
88
+ - Gemfile
89
+ - LICENSE.txt
90
+ - README.md
91
+ - Rakefile
92
+ - address-io.gemspec
93
+ - bin/console
94
+ - bin/setup
95
+ - lib/address/io.rb
96
+ - lib/address/io/addresses.rb
97
+ - lib/address/io/api_operations/list.rb
98
+ - lib/address/io/api_operations/retrieve.rb
99
+ - lib/address/io/api_resource.rb
100
+ - lib/address/io/city.rb
101
+ - lib/address/io/state.rb
102
+ - lib/address/io/version.rb
103
+ homepage: https://pluga.co/
104
+ licenses:
105
+ - MIT
106
+ metadata: {}
107
+ post_install_message:
108
+ rdoc_options: []
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ requirements: []
122
+ rubyforge_project:
123
+ rubygems_version: 2.4.3
124
+ signing_key:
125
+ specification_version: 4
126
+ summary: Nfe.io's Adresses gem
127
+ test_files: []