omniauth-lexoffice 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a25d07bd58d2b435e6542561fda5d12b17d163a7
4
+ data.tar.gz: 880c32701dd9503ed1fc107c4ed063caa54a5558
5
+ SHA512:
6
+ metadata.gz: 7451a759f1fb3501b1f6cbb8916990c53d6ee8d8404c41d8307d8cf1a897a383a431a5c9c10106705d20d13a088feef69f05a3c4d9465fc279c1554306798858
7
+ data.tar.gz: cf5cea765f1b456d563dbca9821a6fc1db696c9cbd641bc1441b871d18cc181b887fab4030cb675012a56428cdb28b9bf030c3e31d07a3fdce08cfd7a42d6d14
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/
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding">
4
+ <file url="PROJECT" charset="UTF-8" />
5
+ </component>
6
+ </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="ruby-2.1.5-p273" 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/omniauth-lexoffice.iml" filepath="$PROJECT_DIR$/.idea/omniauth-lexoffice.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$" />
8
+ <orderEntry type="jdk" jdkName="ruby-2.2.6-p396" jdkType="RUBY_SDK" />
9
+ <orderEntry type="sourceFolder" forTests="false" />
10
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.16.2, ruby-2.2.6-p396) [gem]" level="application" />
11
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, ruby-2.2.6-p396) [gem]" level="application" />
12
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, ruby-2.2.6-p396) [gem]" level="application" />
13
+ </component>
14
+ </module>
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,337 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="8adaf675-8892-48b2-a209-f821a99ce6aa" name="Default" comment="">
5
+ <change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
6
+ <change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
7
+ <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
8
+ <change afterPath="$PROJECT_DIR$/.idea/omniauth-lexoffice.iml" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
10
+ <change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/omniauth-lexoffice.gemspec" beforeDir="false" afterPath="$PROJECT_DIR$/omniauth-lexoffice.gemspec" afterDir="false" />
12
+ </list>
13
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
14
+ <option name="SHOW_DIALOG" value="false" />
15
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
16
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
17
+ <option name="LAST_RESOLUTION" value="IGNORE" />
18
+ </component>
19
+ <component name="CoverageDataManager">
20
+ <SUITE FILE_PATH="coverage/omniauth_lexoffice@All_specs_in_omniauth_lexoffice__omniauth_lexoffice.rcov" NAME="All specs in omniauth-lexoffice: omniauth-lexoffice Coverage Results" MODIFIED="1536757606142" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="omniauth-lexoffice" />
21
+ </component>
22
+ <component name="FUSProjectUsageTrigger">
23
+ <session id="1925165635">
24
+ <usages-collector id="statistics.lifecycle.project">
25
+ <counts>
26
+ <entry key="project.closed" value="1" />
27
+ <entry key="project.open.time.0" value="2" />
28
+ <entry key="project.opened" value="2" />
29
+ </counts>
30
+ </usages-collector>
31
+ <usages-collector id="statistics.file.extensions.open">
32
+ <counts>
33
+ <entry key="gem" value="1" />
34
+ <entry key="gemspec" value="2" />
35
+ <entry key="md" value="1" />
36
+ <entry key="rb" value="2" />
37
+ </counts>
38
+ </usages-collector>
39
+ <usages-collector id="statistics.file.types.open">
40
+ <counts>
41
+ <entry key="Markdown" value="1" />
42
+ <entry key="PLAIN_TEXT" value="1" />
43
+ <entry key="Ruby" value="3" />
44
+ <entry key="Scratch" value="1" />
45
+ </counts>
46
+ </usages-collector>
47
+ <usages-collector id="statistics.file.extensions.edit">
48
+ <counts>
49
+ <entry key="gemspec" value="30" />
50
+ <entry key="txt" value="14" />
51
+ </counts>
52
+ </usages-collector>
53
+ <usages-collector id="statistics.file.types.edit">
54
+ <counts>
55
+ <entry key="PLAIN_TEXT" value="14" />
56
+ <entry key="Ruby" value="30" />
57
+ </counts>
58
+ </usages-collector>
59
+ </session>
60
+ </component>
61
+ <component name="FileEditorManager">
62
+ <leaf SIDE_TABS_SIZE_LIMIT_KEY="450">
63
+ <file pinned="false" current-in-tab="true">
64
+ <entry file="file://$PROJECT_DIR$/omniauth-lexoffice.gemspec">
65
+ <provider selected="true" editor-type-id="text-editor">
66
+ <state relative-caret-position="221">
67
+ <caret line="13" column="51" lean-forward="true" selection-start-line="13" selection-start-column="51" selection-end-line="13" selection-end-column="51" />
68
+ </state>
69
+ </provider>
70
+ </entry>
71
+ </file>
72
+ <file pinned="false" current-in-tab="false">
73
+ <entry file="file://$PROJECT_DIR$/test/omniauth/lexoffice_test.rb">
74
+ <provider selected="true" editor-type-id="text-editor">
75
+ <state relative-caret-position="136">
76
+ <caret line="8" column="16" lean-forward="true" selection-start-line="8" selection-start-column="16" selection-end-line="8" selection-end-column="16" />
77
+ </state>
78
+ </provider>
79
+ </entry>
80
+ </file>
81
+ </leaf>
82
+ </component>
83
+ <component name="Git.Settings">
84
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
85
+ </component>
86
+ <component name="IdeDocumentHistory">
87
+ <option name="CHANGED_PATHS">
88
+ <list>
89
+ <option value="$PROJECT_DIR$/lib/omniauth/lexoffice.rb" />
90
+ <option value="$PROJECT_DIR$/lib/omniauth/strategies/lexoffice.rb" />
91
+ <option value="$PROJECT_DIR$/omniauth-lexoffice.gemspec" />
92
+ </list>
93
+ </option>
94
+ </component>
95
+ <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
96
+ <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
97
+ <component name="JsGulpfileManager">
98
+ <detection-done>true</detection-done>
99
+ <sorting>DEFINITION_ORDER</sorting>
100
+ </component>
101
+ <component name="ProjectFrameBounds" extendedState="6">
102
+ <option name="x" value="-8" />
103
+ <option name="y" value="-8" />
104
+ <option name="width" value="3456" />
105
+ <option name="height" value="1416" />
106
+ </component>
107
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
108
+ <component name="ProjectView">
109
+ <navigator proportions="" version="1">
110
+ <foldersAlwaysOnTop value="true" />
111
+ </navigator>
112
+ <panes>
113
+ <pane id="Scope" />
114
+ <pane id="ProjectPane">
115
+ <subPane>
116
+ <expand>
117
+ <path>
118
+ <item name="omniauth-lexoffice" type="b2602c69:ProjectViewProjectNode" />
119
+ <item name="omniauth-lexoffice" type="462c0819:PsiDirectoryNode" />
120
+ </path>
121
+ <path>
122
+ <item name="omniauth-lexoffice" type="b2602c69:ProjectViewProjectNode" />
123
+ <item name="omniauth-lexoffice" type="462c0819:PsiDirectoryNode" />
124
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
125
+ </path>
126
+ <path>
127
+ <item name="omniauth-lexoffice" type="b2602c69:ProjectViewProjectNode" />
128
+ <item name="omniauth-lexoffice" type="462c0819:PsiDirectoryNode" />
129
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
130
+ <item name="omniauth" type="462c0819:PsiDirectoryNode" />
131
+ </path>
132
+ <path>
133
+ <item name="omniauth-lexoffice" type="b2602c69:ProjectViewProjectNode" />
134
+ <item name="omniauth-lexoffice" type="462c0819:PsiDirectoryNode" />
135
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
136
+ <item name="omniauth" type="462c0819:PsiDirectoryNode" />
137
+ <item name="lexoffice" type="462c0819:PsiDirectoryNode" />
138
+ </path>
139
+ <path>
140
+ <item name="omniauth-lexoffice" type="b2602c69:ProjectViewProjectNode" />
141
+ <item name="omniauth-lexoffice" type="462c0819:PsiDirectoryNode" />
142
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
143
+ <item name="omniauth" type="462c0819:PsiDirectoryNode" />
144
+ <item name="strategies" type="462c0819:PsiDirectoryNode" />
145
+ </path>
146
+ <path>
147
+ <item name="omniauth-lexoffice" type="b2602c69:ProjectViewProjectNode" />
148
+ <item name="omniauth-lexoffice" type="462c0819:PsiDirectoryNode" />
149
+ <item name="test" type="462c0819:PsiDirectoryNode" />
150
+ </path>
151
+ <path>
152
+ <item name="omniauth-lexoffice" type="b2602c69:ProjectViewProjectNode" />
153
+ <item name="omniauth-lexoffice" type="462c0819:PsiDirectoryNode" />
154
+ <item name="test" type="462c0819:PsiDirectoryNode" />
155
+ <item name="omniauth" type="462c0819:PsiDirectoryNode" />
156
+ </path>
157
+ </expand>
158
+ <select />
159
+ </subPane>
160
+ </pane>
161
+ </panes>
162
+ </component>
163
+ <component name="PropertiesComponent">
164
+ <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
165
+ <property name="settings.editor.splitter.proportion" value="0.2" />
166
+ <property name="WebServerToolWindowFactoryState" value="false" />
167
+ </component>
168
+ <component name="RunDashboard">
169
+ <option name="ruleStates">
170
+ <list>
171
+ <RuleState>
172
+ <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
173
+ </RuleState>
174
+ <RuleState>
175
+ <option name="name" value="StatusDashboardGroupingRule" />
176
+ </RuleState>
177
+ </list>
178
+ </option>
179
+ </component>
180
+ <component name="RunManager">
181
+ <configuration name="All specs in omniauth-lexoffice: omniauth-lexoffice" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
182
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
183
+ <module name="omniauth-lexoffice" />
184
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="" />
185
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
186
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
187
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
188
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
189
+ <envs>
190
+ <env name="JRUBY_OPTS" value="-X+O" />
191
+ </envs>
192
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
193
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
194
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" />
195
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="$MODULE_DIR$" />
196
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
197
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
198
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
199
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
200
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="ALL_IN_FOLDER" />
201
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
202
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
203
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
204
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
205
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
206
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
207
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
208
+ <method v="2" />
209
+ </configuration>
210
+ <recent_temporary>
211
+ <list>
212
+ <item itemvalue="RSpec.All specs in omniauth-lexoffice: omniauth-lexoffice" />
213
+ </list>
214
+ </recent_temporary>
215
+ </component>
216
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
217
+ <component name="SvnConfiguration">
218
+ <configuration />
219
+ </component>
220
+ <component name="TaskManager">
221
+ <task active="true" id="Default" summary="Default task">
222
+ <changelist id="8adaf675-8892-48b2-a209-f821a99ce6aa" name="Default" comment="" />
223
+ <created>1521204150475</created>
224
+ <option name="number" value="Default" />
225
+ <option name="presentableId" value="Default" />
226
+ <updated>1521204150475</updated>
227
+ <workItem from="1521204151709" duration="978000" />
228
+ <workItem from="1521450034327" duration="611000" />
229
+ <workItem from="1521716940733" duration="1209000" />
230
+ <workItem from="1536755709985" duration="1285000" />
231
+ <workItem from="1536757001760" duration="809000" />
232
+ </task>
233
+ <task id="LOCAL-00001" summary="initial commit">
234
+ <created>1536757055499</created>
235
+ <option name="number" value="00001" />
236
+ <option name="presentableId" value="LOCAL-00001" />
237
+ <option name="project" value="LOCAL" />
238
+ <updated>1536757055499</updated>
239
+ </task>
240
+ <option name="localTasksCounter" value="2" />
241
+ <servers />
242
+ </component>
243
+ <component name="TestHistory">
244
+ <history-entry file="All_specs_in_omniauth-lexoffice__omniauth-lexoffice - 2018.09.12 at 15h 06m 46s.xml">
245
+ <configuration name="All specs in omniauth-lexoffice: omniauth-lexoffice" configurationId="RSpecRunConfigurationType" />
246
+ </history-entry>
247
+ </component>
248
+ <component name="TimeTrackingManager">
249
+ <option name="totallyTimeSpent" value="4892000" />
250
+ </component>
251
+ <component name="ToolWindowManager">
252
+ <frame x="-8" y="-8" width="3456" height="1416" extended-state="6" />
253
+ <editor active="true" />
254
+ <layout>
255
+ <window_info active="true" id="Project" order="0" visible="true" weight="0.19081272" />
256
+ <window_info id="Structure" order="1" weight="0.25" />
257
+ <window_info id="Favorites" order="2" side_tool="true" />
258
+ <window_info anchor="bottom" id="Message" order="0" />
259
+ <window_info anchor="bottom" id="Find" order="1" />
260
+ <window_info anchor="bottom" id="Run" order="2" weight="0.32977098" />
261
+ <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
262
+ <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
263
+ <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
264
+ <window_info anchor="bottom" id="TODO" order="6" />
265
+ <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" />
266
+ <window_info anchor="bottom" id="Version Control" order="8" weight="0.32977098" />
267
+ <window_info anchor="bottom" id="Terminal" order="9" visible="true" weight="0.32977098" />
268
+ <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
269
+ <window_info anchor="bottom" id="Application Servers" order="11" />
270
+ <window_info anchor="bottom" id="Database Changes" order="12" show_stripe_button="false" />
271
+ <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
272
+ <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
273
+ <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
274
+ <window_info anchor="right" id="Database" order="3" />
275
+ </layout>
276
+ </component>
277
+ <component name="TypeScriptGeneratedFilesManager">
278
+ <option name="version" value="1" />
279
+ </component>
280
+ <component name="VcsContentAnnotationSettings">
281
+ <option name="myLimit" value="2678400000" />
282
+ </component>
283
+ <component name="VcsManagerConfiguration">
284
+ <MESSAGE value="initial commit" />
285
+ <option name="LAST_COMMIT_MESSAGE" value="initial commit" />
286
+ </component>
287
+ <component name="editorHistoryManager">
288
+ <entry file="file://$PROJECT_DIR$/Gemfile">
289
+ <provider selected="true" editor-type-id="text-editor" />
290
+ </entry>
291
+ <entry file="file://$APPLICATION_CONFIG_DIR$/scratches/scratch.rb">
292
+ <provider selected="true" editor-type-id="text-editor" />
293
+ </entry>
294
+ <entry file="file://$PROJECT_DIR$/lib/omniauth/lexoffice/version.rb">
295
+ <provider selected="true" editor-type-id="text-editor" />
296
+ </entry>
297
+ <entry file="file://$PROJECT_DIR$/lib/omniauth/lexoffice.rb">
298
+ <provider selected="true" editor-type-id="text-editor">
299
+ <state relative-caret-position="17">
300
+ <caret line="1" column="38" selection-start-line="1" selection-start-column="38" selection-end-line="1" selection-end-column="38" />
301
+ </state>
302
+ </provider>
303
+ </entry>
304
+ <entry file="file://$PROJECT_DIR$/lib/omniauth/strategies/lexoffice.rb">
305
+ <provider selected="true" editor-type-id="text-editor">
306
+ <state relative-caret-position="170">
307
+ <caret line="10" column="54" selection-start-line="10" selection-start-column="54" selection-end-line="10" selection-end-column="54" />
308
+ </state>
309
+ </provider>
310
+ </entry>
311
+ <entry file="file://$PROJECT_DIR$/omniauth-lexoffice-0.1.0.gem">
312
+ <provider selected="true" editor-type-id="text-editor" />
313
+ </entry>
314
+ <entry file="file://$PROJECT_DIR$/CODE_OF_CONDUCT.md">
315
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
316
+ <state split_layout="SPLIT">
317
+ <first_editor />
318
+ <second_editor />
319
+ </state>
320
+ </provider>
321
+ </entry>
322
+ <entry file="file://$PROJECT_DIR$/test/omniauth/lexoffice_test.rb">
323
+ <provider selected="true" editor-type-id="text-editor">
324
+ <state relative-caret-position="136">
325
+ <caret line="8" column="16" lean-forward="true" selection-start-line="8" selection-start-column="16" selection-end-line="8" selection-end-column="16" />
326
+ </state>
327
+ </provider>
328
+ </entry>
329
+ <entry file="file://$PROJECT_DIR$/omniauth-lexoffice.gemspec">
330
+ <provider selected="true" editor-type-id="text-editor">
331
+ <state relative-caret-position="221">
332
+ <caret line="13" column="51" lean-forward="true" selection-start-line="13" selection-start-column="51" selection-end-line="13" selection-end-column="51" />
333
+ </state>
334
+ </provider>
335
+ </entry>
336
+ </component>
337
+ </project>
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.6
5
+ before_install: gem install bundler -v 1.14.2
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at dave84c@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in omniauth-lexoffice.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Dave84c
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
+ # Omniauth::Lexoffice
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/omniauth/lexoffice`. 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 'omniauth-lexoffice'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install omniauth-lexoffice
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 test` 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/Dave84c/omniauth-lexoffice. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
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,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "omniauth/lexoffice"
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(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,2 @@
1
+ require "omniauth/lexoffice/version"
2
+ require "omniauth/strategies/lexoffice"
@@ -0,0 +1,5 @@
1
+ module Omniauth
2
+ module Lexoffice
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,80 @@
1
+ require 'omniauth/strategies/oauth2'
2
+ require 'net/http'
3
+
4
+ module OmniAuth
5
+ module Strategies
6
+ class Lexoffice < OmniAuth::Strategies::OAuth2
7
+ # Give your strategy a name.
8
+ option :name, "lexoffice"
9
+
10
+ # This is where you pass the options you would pass when
11
+ # initializing your consumer from the OAuth gem.
12
+ option :client_options, {:site => "https://lexoffice-sandbox.grld.eu",
13
+ :authorize_url => 'https://lexoffice-sandbox.grld.eu/api/oauth2/authorize',
14
+ :token_url => 'https://lexoffice-sandbox.grld.eu/api/oauth2/token',
15
+ :response_type => 'code'}
16
+
17
+ #option :iframe, true
18
+ #option :callback_path, "/auth/lexoffice/callback"
19
+
20
+ # These are called after authentication has succeeded. If
21
+ # possible, you should try to set the UID without making
22
+ # additional calls (if the user id is returned with the token
23
+ # or as a URI parameter). This may not be possible with all
24
+ # providers.
25
+
26
+
27
+
28
+
29
+
30
+
31
+ def setup_phase
32
+ super
33
+
34
+ end
35
+
36
+ def authorize_params
37
+ # params = super
38
+ params = {client_id: options.client_id, response_type:'code'}
39
+ params.merge!(super)
40
+ end
41
+
42
+ def token_params
43
+ options.token_params.merge!(:headers => {'Authorization' => basic_auth_header(options.client_id,options.client_secret), 'Accept' => 'application/json' })
44
+ end
45
+
46
+ def request_phase
47
+ #authorize call
48
+ redirect client.auth_code.authorize_url({:redirect_uri => callback_url}.merge(authorize_params))
49
+ end
50
+
51
+ def callback_url
52
+ full_host + script_name + callback_path
53
+ end
54
+
55
+ def redirect(uri)
56
+ r = Rack::Response.new
57
+ if options[:iframe]
58
+ r.write("<script type='text/javascript' charset='utf-8'>
59
+ window.setTimeout(function() {
60
+ window.open('#{uri}'); // this window will not open
61
+ }, 100);
62
+ </script>")
63
+ else
64
+ r.write("Redirecting to #{uri}...")
65
+ r.redirect(uri)
66
+ end
67
+
68
+ r.finish
69
+ end
70
+
71
+
72
+
73
+
74
+ def basic_auth_header(client_id, client_secret)
75
+ 'Basic ' + Base64.encode64(client_id + ':' + client_secret).delete("\n")
76
+ end
77
+
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,36 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'omniauth/lexoffice/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "omniauth-lexoffice"
8
+ spec.version = Omniauth::Lexoffice::VERSION
9
+ spec.authors = ["David Crowder"]
10
+ spec.email = ["dave@eshop-guide.de"]
11
+
12
+ spec.summary = "OAUTH2 Strategy for Lexoffice"
13
+ spec.description = ""
14
+ spec.homepage = "https://www.eshop-guide.de"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata['allowed_push_host'] = "https://rubygems.org"
21
+ else
22
+ raise "RubyGems 2.0 or newer is required to protect against " \
23
+ "public gem pushes."
24
+ end
25
+
26
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(test|spec|features)/})
28
+ end
29
+ spec.bindir = "exe"
30
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
31
+ spec.require_paths = ["lib"]
32
+
33
+ spec.add_development_dependency "bundler", "~> 1.14"
34
+ spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_development_dependency "minitest", "~> 5.0"
36
+ end
metadata ADDED
@@ -0,0 +1,106 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-lexoffice
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - David Crowder
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2018-09-12 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.14'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.14'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ description: ''
56
+ email:
57
+ - dave@eshop-guide.de
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".idea/encodings.xml"
64
+ - ".idea/misc.xml"
65
+ - ".idea/modules.xml"
66
+ - ".idea/omniauth-lexoffice.iml"
67
+ - ".idea/vcs.xml"
68
+ - ".idea/workspace.xml"
69
+ - ".travis.yml"
70
+ - CODE_OF_CONDUCT.md
71
+ - Gemfile
72
+ - LICENSE.txt
73
+ - README.md
74
+ - Rakefile
75
+ - bin/console
76
+ - bin/setup
77
+ - lib/omniauth/lexoffice.rb
78
+ - lib/omniauth/lexoffice/version.rb
79
+ - lib/omniauth/strategies/lexoffice.rb
80
+ - omniauth-lexoffice.gemspec
81
+ homepage: https://www.eshop-guide.de
82
+ licenses:
83
+ - MIT
84
+ metadata:
85
+ allowed_push_host: https://rubygems.org
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubyforge_project:
102
+ rubygems_version: 2.4.5.2
103
+ signing_key:
104
+ specification_version: 4
105
+ summary: OAUTH2 Strategy for Lexoffice
106
+ test_files: []