gpis 0.0.5 → 0.0.6
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.
- data/.idea/workspace.xml +69 -36
- data/gpis.gemspec +5 -0
- data/lib/gpis/gpis_app_info.rb +1 -2
- data/lib/gpis/gpis_scraper.rb +0 -3
- data/lib/gpis/version.rb +1 -1
- metadata +1 -1
data/.idea/workspace.xml
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
<component name="ChangeListManager">
|
4
4
|
<list default="true" id="5a7cce55-79e3-449d-ab1c-02d21d595272" name="Default" comment="">
|
5
5
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
6
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/gpis/gpis_scraper.rb" afterPath="$PROJECT_DIR$/lib/gpis/gpis_scraper.rb" />
|
6
7
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/gpis/version.rb" afterPath="$PROJECT_DIR$/lib/gpis/version.rb" />
|
7
8
|
</list>
|
8
9
|
<ignored path="gpis.iws" />
|
@@ -34,52 +35,52 @@
|
|
34
35
|
<file leaf-file-name="gpis_app_info.rb" pinned="false" current="false" current-in-tab="false">
|
35
36
|
<entry file="file://$PROJECT_DIR$/lib/gpis/gpis_app_info.rb">
|
36
37
|
<provider selected="true" editor-type-id="text-editor">
|
37
|
-
<state line="
|
38
|
+
<state line="62" column="51" selection-start="2103" selection-end="2103" vertical-scroll-proportion="0.0">
|
38
39
|
<folding />
|
39
40
|
</state>
|
40
41
|
</provider>
|
41
42
|
</entry>
|
42
43
|
</file>
|
43
|
-
<file leaf-file-name="
|
44
|
-
<entry file="file://$PROJECT_DIR$/
|
44
|
+
<file leaf-file-name="gpis.gemspec" pinned="false" current="true" current-in-tab="true">
|
45
|
+
<entry file="file://$PROJECT_DIR$/gpis.gemspec">
|
45
46
|
<provider selected="true" editor-type-id="text-editor">
|
46
|
-
<state line="
|
47
|
+
<state line="24" column="33" selection-start="1079" selection-end="1079" vertical-scroll-proportion="0.4590861">
|
47
48
|
<folding />
|
48
49
|
</state>
|
49
50
|
</provider>
|
50
51
|
</entry>
|
51
52
|
</file>
|
52
|
-
<file leaf-file-name="version.rb" pinned="false" current="
|
53
|
+
<file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
|
53
54
|
<entry file="file://$PROJECT_DIR$/lib/gpis/version.rb">
|
54
55
|
<provider selected="true" editor-type-id="text-editor">
|
55
|
-
<state line="1" column="18" selection-start="30" selection-end="30" vertical-scroll-proportion="0.
|
56
|
+
<state line="1" column="18" selection-start="30" selection-end="30" vertical-scroll-proportion="0.0">
|
56
57
|
<folding />
|
57
58
|
</state>
|
58
59
|
</provider>
|
59
60
|
</entry>
|
60
61
|
</file>
|
61
|
-
<file leaf-file-name="
|
62
|
-
<entry file="file://$PROJECT_DIR$/
|
62
|
+
<file leaf-file-name="Gemfile" pinned="false" current="false" current-in-tab="false">
|
63
|
+
<entry file="file://$PROJECT_DIR$/Gemfile">
|
63
64
|
<provider selected="true" editor-type-id="text-editor">
|
64
|
-
<state line="
|
65
|
+
<state line="3" column="4" selection-start="85" selection-end="85" vertical-scroll-proportion="0.0">
|
65
66
|
<folding />
|
66
67
|
</state>
|
67
68
|
</provider>
|
68
69
|
</entry>
|
69
70
|
</file>
|
70
|
-
<file leaf-file-name="
|
71
|
-
<entry file="file://$PROJECT_DIR$/
|
71
|
+
<file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
|
72
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
72
73
|
<provider selected="true" editor-type-id="text-editor">
|
73
|
-
<state line="
|
74
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
74
75
|
<folding />
|
75
76
|
</state>
|
76
77
|
</provider>
|
77
78
|
</entry>
|
78
79
|
</file>
|
79
|
-
<file leaf-file-name="
|
80
|
-
<entry file="file://$PROJECT_DIR$/
|
80
|
+
<file leaf-file-name="gpis_scraper.rb" pinned="false" current="false" current-in-tab="false">
|
81
|
+
<entry file="file://$PROJECT_DIR$/lib/gpis/gpis_scraper.rb">
|
81
82
|
<provider selected="true" editor-type-id="text-editor">
|
82
|
-
<state line="
|
83
|
+
<state line="20" column="18" selection-start="669" selection-end="669" vertical-scroll-proportion="0.0">
|
83
84
|
<folding />
|
84
85
|
</state>
|
85
86
|
</provider>
|
@@ -98,12 +99,12 @@
|
|
98
99
|
<component name="IdeDocumentHistory">
|
99
100
|
<option name="changedFiles">
|
100
101
|
<list>
|
101
|
-
<option value="$PROJECT_DIR$/gpis.gemspec" />
|
102
102
|
<option value="$PROJECT_DIR$/README.md" />
|
103
103
|
<option value="$PROJECT_DIR$/lib/gpis.rb" />
|
104
|
-
<option value="$PROJECT_DIR$/
|
104
|
+
<option value="$PROJECT_DIR$/gpis.gemspec" />
|
105
105
|
<option value="$PROJECT_DIR$/lib/gpis/gpis_app_info.rb" />
|
106
106
|
<option value="$PROJECT_DIR$/lib/gpis/version.rb" />
|
107
|
+
<option value="$PROJECT_DIR$/lib/gpis/gpis_scraper.rb" />
|
107
108
|
</list>
|
108
109
|
</option>
|
109
110
|
</component>
|
@@ -137,6 +138,7 @@
|
|
137
138
|
<sortByType />
|
138
139
|
</navigator>
|
139
140
|
<panes>
|
141
|
+
<pane id="Scope" />
|
140
142
|
<pane id="ProjectPane">
|
141
143
|
<subPane>
|
142
144
|
<PATH>
|
@@ -144,6 +146,10 @@
|
|
144
146
|
<option name="myItemId" value="gpis" />
|
145
147
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
146
148
|
</PATH_ELEMENT>
|
149
|
+
<PATH_ELEMENT>
|
150
|
+
<option name="myItemId" value="External Libraries" />
|
151
|
+
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
|
152
|
+
</PATH_ELEMENT>
|
147
153
|
</PATH>
|
148
154
|
<PATH>
|
149
155
|
<PATH_ELEMENT>
|
@@ -189,7 +195,6 @@
|
|
189
195
|
</PATH>
|
190
196
|
</subPane>
|
191
197
|
</pane>
|
192
|
-
<pane id="Scope" />
|
193
198
|
</panes>
|
194
199
|
</component>
|
195
200
|
<component name="PropertiesComponent">
|
@@ -230,6 +235,24 @@
|
|
230
235
|
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
231
236
|
<method />
|
232
237
|
</configuration>
|
238
|
+
<configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
|
239
|
+
<module name="" />
|
240
|
+
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
241
|
+
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
|
242
|
+
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
243
|
+
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
244
|
+
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
245
|
+
<envs />
|
246
|
+
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
|
247
|
+
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
248
|
+
<COVERAGE_PATTERN ENABLED="true">
|
249
|
+
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
250
|
+
</COVERAGE_PATTERN>
|
251
|
+
</EXTENSION>
|
252
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
|
253
|
+
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
254
|
+
<method />
|
255
|
+
</configuration>
|
233
256
|
<configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
|
234
257
|
<predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
|
235
258
|
<module name="" />
|
@@ -267,14 +290,23 @@
|
|
267
290
|
<created>1357837312932</created>
|
268
291
|
<updated>1357837312932</updated>
|
269
292
|
</task>
|
270
|
-
<
|
293
|
+
<task id="LOCAL-00002" summary="pry removed as dependency, fixed permissions bug">
|
294
|
+
<created>1357910080613</created>
|
295
|
+
<updated>1357910080613</updated>
|
296
|
+
</task>
|
297
|
+
<task id="LOCAL-00003" summary="permissions bug with not saving dangerous fix">
|
298
|
+
<created>1357910276278</created>
|
299
|
+
<updated>1357910276278</updated>
|
300
|
+
</task>
|
301
|
+
<option name="localTasksCounter" value="4" />
|
271
302
|
<servers />
|
272
303
|
</component>
|
273
304
|
<component name="ToolWindowManager">
|
274
|
-
<frame x="0" y="0" width="1920" height="1080" extended-state="
|
305
|
+
<frame x="0" y="0" width="1920" height="1080" extended-state="0" />
|
275
306
|
<editor active="true" />
|
276
307
|
<layout>
|
277
308
|
<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" />
|
309
|
+
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32925585" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
278
310
|
<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" />
|
279
311
|
<window_info id="Unicode Browser" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
280
312
|
<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" />
|
@@ -285,7 +317,7 @@
|
|
285
317
|
<window_info id="Regex Tester" 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" />
|
286
318
|
<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" />
|
287
319
|
<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="true" content_ui="tabs" />
|
288
|
-
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.
|
320
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3511206" sideWeight="0.6707441" order="0" side_tool="false" content_ui="combo" />
|
289
321
|
<window_info id="DB Browser" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
290
322
|
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
291
323
|
<window_info id="DB Execution Console" 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" />
|
@@ -293,7 +325,6 @@
|
|
293
325
|
<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" />
|
294
326
|
<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" />
|
295
327
|
<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" />
|
296
|
-
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
297
328
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
298
329
|
<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" />
|
299
330
|
<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" />
|
@@ -334,7 +365,7 @@
|
|
334
365
|
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
|
335
366
|
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
336
367
|
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
|
337
|
-
<option name="LAST_COMMIT_MESSAGE" value="
|
368
|
+
<option name="LAST_COMMIT_MESSAGE" value="permissions bug with not saving dangerous fix" />
|
338
369
|
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
|
339
370
|
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
340
371
|
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
|
@@ -349,6 +380,8 @@
|
|
349
380
|
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
350
381
|
<MESSAGE value="added code" />
|
351
382
|
<MESSAGE value="icon_url bug fixed" />
|
383
|
+
<MESSAGE value="pry removed as dependency, fixed permissions bug" />
|
384
|
+
<MESSAGE value="permissions bug with not saving dangerous fix" />
|
352
385
|
</component>
|
353
386
|
<component name="XDebuggerManager">
|
354
387
|
<breakpoint-manager />
|
@@ -410,11 +443,9 @@
|
|
410
443
|
</state>
|
411
444
|
</provider>
|
412
445
|
</entry>
|
413
|
-
<entry file="file://$PROJECT_DIR$/
|
446
|
+
<entry file="file://$PROJECT_DIR$/README.md">
|
414
447
|
<provider selected="true" editor-type-id="text-editor">
|
415
|
-
<state line="
|
416
|
-
<folding />
|
417
|
-
</state>
|
448
|
+
<state line="26" column="0" selection-start="428" selection-end="428" vertical-scroll-proportion="0.51655626" />
|
418
449
|
</provider>
|
419
450
|
</entry>
|
420
451
|
<entry file="file://$PROJECT_DIR$/Gemfile">
|
@@ -424,9 +455,9 @@
|
|
424
455
|
</state>
|
425
456
|
</provider>
|
426
457
|
</entry>
|
427
|
-
<entry file="file://$PROJECT_DIR$/
|
458
|
+
<entry file="file://$PROJECT_DIR$/Rakefile">
|
428
459
|
<provider selected="true" editor-type-id="text-editor">
|
429
|
-
<state line="
|
460
|
+
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
430
461
|
<folding />
|
431
462
|
</state>
|
432
463
|
</provider>
|
@@ -438,28 +469,30 @@
|
|
438
469
|
</state>
|
439
470
|
</provider>
|
440
471
|
</entry>
|
441
|
-
<entry file="file://$PROJECT_DIR$/
|
472
|
+
<entry file="file://$PROJECT_DIR$/lib/gpis/gpis_app_info.rb">
|
442
473
|
<provider selected="true" editor-type-id="text-editor">
|
443
|
-
<state line="
|
474
|
+
<state line="62" column="51" selection-start="2103" selection-end="2103" vertical-scroll-proportion="0.0">
|
475
|
+
<folding />
|
476
|
+
</state>
|
444
477
|
</provider>
|
445
478
|
</entry>
|
446
479
|
<entry file="file://$PROJECT_DIR$/lib/gpis/gpis_scraper.rb">
|
447
480
|
<provider selected="true" editor-type-id="text-editor">
|
448
|
-
<state line="
|
481
|
+
<state line="20" column="18" selection-start="669" selection-end="669" vertical-scroll-proportion="0.0">
|
449
482
|
<folding />
|
450
483
|
</state>
|
451
484
|
</provider>
|
452
485
|
</entry>
|
453
|
-
<entry file="file://$PROJECT_DIR$/lib/gpis/
|
486
|
+
<entry file="file://$PROJECT_DIR$/lib/gpis/version.rb">
|
454
487
|
<provider selected="true" editor-type-id="text-editor">
|
455
|
-
<state line="
|
488
|
+
<state line="1" column="18" selection-start="30" selection-end="30" vertical-scroll-proportion="0.0">
|
456
489
|
<folding />
|
457
490
|
</state>
|
458
491
|
</provider>
|
459
492
|
</entry>
|
460
|
-
<entry file="file://$PROJECT_DIR$/
|
493
|
+
<entry file="file://$PROJECT_DIR$/gpis.gemspec">
|
461
494
|
<provider selected="true" editor-type-id="text-editor">
|
462
|
-
<state line="
|
495
|
+
<state line="24" column="33" selection-start="1079" selection-end="1079" vertical-scroll-proportion="0.4590861">
|
463
496
|
<folding />
|
464
497
|
</state>
|
465
498
|
</provider>
|
data/gpis.gemspec
CHANGED
data/lib/gpis/gpis_app_info.rb
CHANGED
@@ -60,7 +60,7 @@ class GpisAppInfo
|
|
60
60
|
|
61
61
|
def fill_permissions_for_lang_based_on_danger_and_section_id(document, language, section_id, is_dangerous)
|
62
62
|
begin
|
63
|
-
language_hash = @permissions[language]
|
63
|
+
language_hash = @permissions[language] ||= Hash.new
|
64
64
|
full_css_selector = "##{section_id} li.doc-permission-group"
|
65
65
|
document.css(full_css_selector).each do |group_element| # cycle through permission groups
|
66
66
|
group_name = group_element.css(".doc-permission-group-title").inner_html
|
@@ -72,7 +72,6 @@ class GpisAppInfo
|
|
72
72
|
current_group[:permissions] = Array.new
|
73
73
|
language_hash[group_name] = current_group
|
74
74
|
end
|
75
|
-
|
76
75
|
permission_name = group_element.css(".doc-permission-description").collect { |el| el.inner_html }
|
77
76
|
permission_descriptions = group_element.css(".doc-permission-description-full").collect { |el| el.inner_html }
|
78
77
|
permission_name.each_index do |i|
|
data/lib/gpis/gpis_scraper.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
class GpisScraper
|
2
2
|
|
3
|
-
@@debug = 0
|
4
3
|
|
5
4
|
GOOGLE_PLAY_URL = "https://play.google.com/store/apps/details"
|
6
5
|
|
7
6
|
def self.scrape_info(package_name, languages)
|
8
|
-
|
9
7
|
documents = Hash.new
|
10
8
|
languages.each do |language|
|
11
9
|
initial_url = "#{GOOGLE_PLAY_URL}?id=#{package_name}&hl=#{language}"
|
@@ -21,7 +19,6 @@ class GpisScraper
|
|
21
19
|
stream = open(url, 'User-Agent' => 'ruby', :redirect => false)
|
22
20
|
rescue OpenURI::HTTPRedirect
|
23
21
|
url = $!.uri
|
24
|
-
puts "GpisScraper: Redirecting to "+ url.to_s if @@debug == 1
|
25
22
|
retry
|
26
23
|
rescue OpenURI::HTTPError => e
|
27
24
|
status_code = e.io.status[0] rescue 404
|
data/lib/gpis/version.rb
CHANGED