youtube_search_thumbnail 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: ca0b6b6aabd0039cc3ba323c4b99d5745585e502
4
+ data.tar.gz: ee5bf91430c7f2e5144ef1159872433817baedf7
5
+ SHA512:
6
+ metadata.gz: 02f619bf053fd9ba9589e9f88c79a8af1738dbc335614b9d13413a8d7125263eff750fbdde1c6e3750c6753e5c9313022514e6b5f2664bd33d68df030bb040c2
7
+ data.tar.gz: 57b8e9b55d627a9992bc2daa237ce36221342064684e4c17afcb64bf9e2263e9c76b950aa9f414243a3fc0c53d5b225e4af89c210d590ee230c8b8bcde93a2a5
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /.idea/
11
+ /*.gem
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="PublishConfigData">
4
+ <serverData>
5
+ <paths name="dev_remote">
6
+ <serverdata>
7
+ <mappings>
8
+ <mapping local="$PROJECT_DIR$" web="/" />
9
+ </mappings>
10
+ </serverdata>
11
+ </paths>
12
+ <paths name="djinapps.msf4.scripts.meterpreter">
13
+ <serverdata>
14
+ <mappings>
15
+ <mapping local="$PROJECT_DIR$" web="/" />
16
+ </mappings>
17
+ </serverdata>
18
+ </paths>
19
+ <paths name="vps_install">
20
+ <serverdata>
21
+ <mappings>
22
+ <mapping local="$PROJECT_DIR$" web="/" />
23
+ </mappings>
24
+ </serverdata>
25
+ </paths>
26
+ </serverData>
27
+ </component>
28
+ </project>
@@ -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.7-p400" 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/youtube_search_thumbnail.iml" filepath="$PROJECT_DIR$/.idea/youtube_search_thumbnail.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
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,283 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="8ec480de-4364-4c9f-adfb-d85b4c197a92" name="Default" comment="">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" />
6
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
7
+ </list>
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="FileEditorManager">
16
+ <leaf>
17
+ <file leaf-file-name="youtube_search_thumbnail.rb" pinned="false" current-in-tab="false">
18
+ <entry file="file://$PROJECT_DIR$/lib/youtube_search_thumbnail.rb">
19
+ <provider selected="true" editor-type-id="text-editor">
20
+ <state relative-caret-position="162">
21
+ <caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
22
+ <folding />
23
+ </state>
24
+ </provider>
25
+ </entry>
26
+ </file>
27
+ <file leaf-file-name="youtube_search_thumbnail_test.rb" pinned="false" current-in-tab="false">
28
+ <entry file="file://$PROJECT_DIR$/test/youtube_search_thumbnail_test.rb">
29
+ <provider selected="true" editor-type-id="text-editor">
30
+ <state relative-caret-position="216">
31
+ <caret line="8" column="10" lean-forward="false" selection-start-line="8" selection-start-column="10" selection-end-line="8" selection-end-column="60" />
32
+ <folding />
33
+ </state>
34
+ </provider>
35
+ </entry>
36
+ </file>
37
+ <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
38
+ <entry file="file://$PROJECT_DIR$/README.md">
39
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
40
+ <state split_layout="SPLIT">
41
+ <first_editor relative-caret-position="572">
42
+ <caret line="45" column="84" lean-forward="false" selection-start-line="45" selection-start-column="84" selection-end-line="45" selection-end-column="84" />
43
+ <folding />
44
+ </first_editor>
45
+ <second_editor />
46
+ </state>
47
+ </provider>
48
+ </entry>
49
+ </file>
50
+ <file leaf-file-name="LICENSE.txt" pinned="false" current-in-tab="false">
51
+ <entry file="file://$PROJECT_DIR$/LICENSE.txt">
52
+ <provider selected="true" editor-type-id="text-editor">
53
+ <state relative-caret-position="297">
54
+ <caret line="11" column="39" lean-forward="true" selection-start-line="11" selection-start-column="39" selection-end-line="11" selection-end-column="39" />
55
+ <folding />
56
+ </state>
57
+ </provider>
58
+ </entry>
59
+ </file>
60
+ <file leaf-file-name="youtube_search_thumbnail.gemspec" pinned="false" current-in-tab="true">
61
+ <entry file="file://$PROJECT_DIR$/youtube_search_thumbnail.gemspec">
62
+ <provider selected="true" editor-type-id="text-editor">
63
+ <state relative-caret-position="467">
64
+ <caret line="29" column="42" lean-forward="false" selection-start-line="29" selection-start-column="42" selection-end-line="29" selection-end-column="42" />
65
+ <folding />
66
+ </state>
67
+ </provider>
68
+ </entry>
69
+ </file>
70
+ </leaf>
71
+ </component>
72
+ <component name="Git.Settings">
73
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
74
+ </component>
75
+ <component name="IdeDocumentHistory">
76
+ <option name="CHANGED_PATHS">
77
+ <list>
78
+ <option value="$PROJECT_DIR$/test/youtube_search_thumbnail_test.rb" />
79
+ <option value="$PROJECT_DIR$/LICENSE.txt" />
80
+ <option value="$PROJECT_DIR$/lib/youtube_search_thumbnail.rb" />
81
+ <option value="$PROJECT_DIR$/README.md" />
82
+ <option value="$PROJECT_DIR$/youtube_search_thumbnail.gemspec" />
83
+ <option value="$PROJECT_DIR$/.gitignore" />
84
+ </list>
85
+ </option>
86
+ </component>
87
+ <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
88
+ <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
89
+ <component name="JsGulpfileManager">
90
+ <detection-done>true</detection-done>
91
+ <sorting>DEFINITION_ORDER</sorting>
92
+ </component>
93
+ <component name="ProjectFrameBounds">
94
+ <option name="x" value="-8" />
95
+ <option name="y" value="-8" />
96
+ <option name="width" value="1936" />
97
+ <option name="height" value="1096" />
98
+ </component>
99
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
100
+ <component name="ProjectView">
101
+ <navigator currentView="ProjectPane" proportions="" version="1">
102
+ <flattenPackages />
103
+ <showMembers />
104
+ <showModules />
105
+ <showLibraryContents />
106
+ <hideEmptyPackages />
107
+ <abbreviatePackageNames />
108
+ <autoscrollToSource />
109
+ <autoscrollFromSource />
110
+ <sortByType />
111
+ <manualOrder />
112
+ <foldersAlwaysOnTop value="true" />
113
+ </navigator>
114
+ <panes>
115
+ <pane id="Scratches" />
116
+ <pane id="Scope" />
117
+ <pane id="ProjectPane">
118
+ <subPane>
119
+ <PATH>
120
+ <PATH_ELEMENT>
121
+ <option name="myItemId" value="youtube_search_thumbnail" />
122
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
123
+ </PATH_ELEMENT>
124
+ <PATH_ELEMENT>
125
+ <option name="myItemId" value="youtube_search_thumbnail" />
126
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
127
+ </PATH_ELEMENT>
128
+ </PATH>
129
+ <PATH>
130
+ <PATH_ELEMENT>
131
+ <option name="myItemId" value="youtube_search_thumbnail" />
132
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
133
+ </PATH_ELEMENT>
134
+ <PATH_ELEMENT>
135
+ <option name="myItemId" value="youtube_search_thumbnail" />
136
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
137
+ </PATH_ELEMENT>
138
+ <PATH_ELEMENT>
139
+ <option name="myItemId" value="test" />
140
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
141
+ </PATH_ELEMENT>
142
+ </PATH>
143
+ <PATH>
144
+ <PATH_ELEMENT>
145
+ <option name="myItemId" value="youtube_search_thumbnail" />
146
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
147
+ </PATH_ELEMENT>
148
+ <PATH_ELEMENT>
149
+ <option name="myItemId" value="youtube_search_thumbnail" />
150
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
151
+ </PATH_ELEMENT>
152
+ <PATH_ELEMENT>
153
+ <option name="myItemId" value="lib" />
154
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
155
+ </PATH_ELEMENT>
156
+ </PATH>
157
+ </subPane>
158
+ </pane>
159
+ </panes>
160
+ </component>
161
+ <component name="PropertiesComponent">
162
+ <property name="settings.editor.selected.configurable" value="org.jetbrains.plugins.ruby.settings.RubyActiveModuleSdkConfigurable" />
163
+ <property name="settings.editor.splitter.proportion" value="0.2" />
164
+ <property name="last_opened_file_path" value="C:/Ruby21-x64/bin/ruby.exe" />
165
+ <property name="WebServerToolWindowFactoryState" value="true" />
166
+ </component>
167
+ <component name="RunDashboard">
168
+ <option name="ruleStates">
169
+ <list>
170
+ <RuleState>
171
+ <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
172
+ </RuleState>
173
+ <RuleState>
174
+ <option name="name" value="StatusDashboardGroupingRule" />
175
+ </RuleState>
176
+ </list>
177
+ </option>
178
+ </component>
179
+ <component name="ShelveChangesManager" show_recycled="false">
180
+ <option name="remove_strategy" value="false" />
181
+ </component>
182
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
183
+ <component name="TaskManager">
184
+ <task active="true" id="Default" summary="Default task">
185
+ <changelist id="8ec480de-4364-4c9f-adfb-d85b4c197a92" name="Default" comment="" />
186
+ <created>1499864650691</created>
187
+ <option name="number" value="Default" />
188
+ <option name="presentableId" value="Default" />
189
+ <updated>1499864650691</updated>
190
+ <workItem from="1499864651921" duration="2432000" />
191
+ </task>
192
+ <servers />
193
+ </component>
194
+ <component name="TimeTrackingManager">
195
+ <option name="totallyTimeSpent" value="2432000" />
196
+ </component>
197
+ <component name="ToolWindowManager">
198
+ <frame x="-8" y="-8" width="1936" height="1096" extended-state="6" />
199
+ <layout>
200
+ <window_info id="Remote Host" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
201
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2497332" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
202
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
203
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
204
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
205
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
206
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3312946" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
207
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
208
+ <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32925585" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
209
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
210
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
211
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
212
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
213
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
214
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
215
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
216
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
217
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
218
+ </layout>
219
+ </component>
220
+ <component name="TypeScriptGeneratedFilesManager">
221
+ <option name="processedProjectFiles" value="true" />
222
+ </component>
223
+ <component name="VcsContentAnnotationSettings">
224
+ <option name="myLimit" value="2678400000" />
225
+ </component>
226
+ <component name="XDebuggerManager">
227
+ <breakpoint-manager />
228
+ <watches-manager />
229
+ </component>
230
+ <component name="editorHistoryManager">
231
+ <entry file="file://$PROJECT_DIR$/LICENSE.txt">
232
+ <provider selected="true" editor-type-id="text-editor">
233
+ <state relative-caret-position="297">
234
+ <caret line="11" column="39" lean-forward="true" selection-start-line="11" selection-start-column="39" selection-end-line="11" selection-end-column="39" />
235
+ <folding />
236
+ </state>
237
+ </provider>
238
+ </entry>
239
+ <entry file="file://$PROJECT_DIR$/test/youtube_search_thumbnail_test.rb">
240
+ <provider selected="true" editor-type-id="text-editor">
241
+ <state relative-caret-position="216">
242
+ <caret line="8" column="10" lean-forward="false" selection-start-line="8" selection-start-column="10" selection-end-line="8" selection-end-column="60" />
243
+ <folding />
244
+ </state>
245
+ </provider>
246
+ </entry>
247
+ <entry file="file://$PROJECT_DIR$/lib/youtube_search_thumbnail.rb">
248
+ <provider selected="true" editor-type-id="text-editor">
249
+ <state relative-caret-position="162">
250
+ <caret line="6" column="0" lean-forward="true" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
251
+ <folding />
252
+ </state>
253
+ </provider>
254
+ </entry>
255
+ <entry file="file://$PROJECT_DIR$/README.md">
256
+ <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
257
+ <state split_layout="SPLIT">
258
+ <first_editor relative-caret-position="572">
259
+ <caret line="45" column="84" lean-forward="false" selection-start-line="45" selection-start-column="84" selection-end-line="45" selection-end-column="84" />
260
+ <folding />
261
+ </first_editor>
262
+ <second_editor />
263
+ </state>
264
+ </provider>
265
+ </entry>
266
+ <entry file="file://$PROJECT_DIR$/.gitignore">
267
+ <provider selected="true" editor-type-id="text-editor">
268
+ <state relative-caret-position="270">
269
+ <caret line="10" column="6" lean-forward="false" selection-start-line="10" selection-start-column="6" selection-end-line="10" selection-end-column="6" />
270
+ <folding />
271
+ </state>
272
+ </provider>
273
+ </entry>
274
+ <entry file="file://$PROJECT_DIR$/youtube_search_thumbnail.gemspec">
275
+ <provider selected="true" editor-type-id="text-editor">
276
+ <state relative-caret-position="467">
277
+ <caret line="29" column="42" lean-forward="false" selection-start-line="29" selection-start-column="42" selection-end-line="29" selection-end-column="42" />
278
+ <folding />
279
+ </state>
280
+ </provider>
281
+ </entry>
282
+ </component>
283
+ </project>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ <local />
6
+ </component>
7
+ <component name="NewModuleRootManager">
8
+ <content url="file://$MODULE_DIR$" />
9
+ <orderEntry type="jdk" jdkName="ruby-2.2.4-p230" jdkType="RUBY_SDK" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.12.5, ruby-2.2.4-p230) [gem]" level="application" />
12
+ <orderEntry type="library" scope="PROVIDED" name="json (v2.1.0, ruby-2.2.4-p230) [gem]" level="application" />
13
+ <orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.2.0, ruby-2.2.4-p230) [gem]" level="application" />
14
+ <orderEntry type="library" scope="PROVIDED" name="minitest (v5.10.2, ruby-2.2.4-p230) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.8.0, ruby-2.2.4-p230) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.3.2, ruby-2.2.4-p230) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="video_thumb (v0.1.4, ruby-2.2.4-p230) [gem]" level="application" />
18
+ </component>
19
+ </module>
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.2.4
5
+ before_install: gem install bundler -v 1.12.5
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at butilities@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in youtube_search_thumbnail.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 ibm
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,52 @@
1
+ # YoutubeSearchThumbnail
2
+
3
+ Grab thumbnail from search page.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'youtube_search_thumbnail'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install youtube_search_thumbnail
20
+
21
+ ## Usage
22
+ # Youtube search url
23
+ url = "https://www.youtube.com/results?search_query=cat"
24
+ # Thumbnail number as listed on page [1-19]
25
+ number = 1
26
+ # default: small - 120x90
27
+ # mqdefault: medium - 320x180
28
+ # hqdefault: high - 480x360
29
+ # sddefault: 640x480
30
+ # maxresdefault: original
31
+ size = "small"
32
+ YoutubeSearchThumbnail.get(url,number,size)
33
+ It will return the link to the thumbnail
34
+
35
+ https://img.youtube.com/vi/5dsGWM5XGdg/default.jpg
36
+
37
+
38
+ ## Development
39
+
40
+ 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.
41
+
42
+ 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).
43
+
44
+ ## Contributing
45
+
46
+ Bug reports and pull requests are welcome on GitHub at https://github.com/butilities/youtube_search_thumbnail. 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.
47
+
48
+
49
+ ## License
50
+
51
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
52
+
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 "youtube_search_thumbnail"
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,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,3 @@
1
+ module YoutubeSearchThumbnail
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,22 @@
1
+ require "youtube_search_thumbnail/version"
2
+ require 'open-uri'
3
+ require 'nokogiri'
4
+ require 'video_thumb'
5
+
6
+ module YoutubeSearchThumbnail
7
+
8
+
9
+ def self.get(url,num=1,size="medium")
10
+ result=[]
11
+ element = ".yt-lockup-title a"
12
+ doc = Nokogiri::HTML(open(url))
13
+ doc.css(element).each do |s|
14
+ unless s.text.empty? then
15
+ result<< "https://www.youtube.com#{s['href']}"
16
+ # @songs.push(@stn.format_song(s.text.strip.sub(/^[0-9]./, '').titleize.strip))
17
+ end
18
+ end
19
+ result[num-1]
20
+ VideoThumb.get(result[num-1],size)
21
+ end
22
+ end
@@ -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 'youtube_search_thumbnail/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "youtube_search_thumbnail"
8
+ spec.version = YoutubeSearchThumbnail::VERSION
9
+ spec.authors = ["butilities"]
10
+ spec.email = ["butilities@gmail.com"]
11
+
12
+ spec.summary = %q{Get Youtube thumbnails from search query}
13
+ spec.homepage = "https://github.com/butilities/youtube_search_thumbnail.git"
14
+ spec.license = "MIT"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
22
+ end
23
+
24
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+
29
+ spec.add_dependency "nokogiri", "~> 1.8"
30
+ spec.add_dependency "video_thumb" , "~> 0.1.4"
31
+
32
+ spec.add_development_dependency "bundler", "~> 1.12"
33
+ spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "minitest", "~> 5.0"
35
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: youtube_search_thumbnail
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - butilities
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-07-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: nokogiri
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: video_thumb
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.4
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.1.4
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.12'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '5.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '5.0'
83
+ description:
84
+ email:
85
+ - butilities@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".idea/deployment.xml"
92
+ - ".idea/encodings.xml"
93
+ - ".idea/misc.xml"
94
+ - ".idea/modules.xml"
95
+ - ".idea/vcs.xml"
96
+ - ".idea/workspace.xml"
97
+ - ".idea/youtube_search_thumbnail.iml"
98
+ - ".travis.yml"
99
+ - CODE_OF_CONDUCT.md
100
+ - Gemfile
101
+ - LICENSE.txt
102
+ - README.md
103
+ - Rakefile
104
+ - bin/console
105
+ - bin/setup
106
+ - lib/youtube_search_thumbnail.rb
107
+ - lib/youtube_search_thumbnail/version.rb
108
+ - youtube_search_thumbnail.gemspec
109
+ homepage: https://github.com/butilities/youtube_search_thumbnail.git
110
+ licenses:
111
+ - MIT
112
+ metadata:
113
+ allowed_push_host: https://rubygems.org
114
+ post_install_message:
115
+ rdoc_options: []
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ required_rubygems_version: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - ">="
126
+ - !ruby/object:Gem::Version
127
+ version: '0'
128
+ requirements: []
129
+ rubyforge_project:
130
+ rubygems_version: 2.4.5.1
131
+ signing_key:
132
+ specification_version: 4
133
+ summary: Get Youtube thumbnails from search query
134
+ test_files: []
135
+ has_rdoc: