fuck_facebook 0.1.1 → 0.1.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/bin/fuck-facebook +0 -1
- data/lib/fuck_facebook/version.rb +1 -1
- data/src/config.rb +3 -2
- data/src/storage.rb +1 -1
- data/src/xpaths.rb +4 -3
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f671ef4b3c5a7c3f2e6588e97c23047de204f309c06b0d563e239ad4f654ca8
|
|
4
|
+
data.tar.gz: 94d1962dbc7d824bca10f51fb08f3388cd33f482f41f49afeed09fd80b77a325
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2c7745e2ed0559bce742015e66e4203e254404badf0402a57deef1289496f6775e2c73766968779630a3c3a08a19ba270a8fd34c7c4b5846c1227d29074fcf6
|
|
7
|
+
data.tar.gz: ae7dcdd2c32cac29858da002a0a13c16eaeff59bbe2e1734732aeee7022128d461ac12f8aa564e23f67ce4501c9d722a8dc324869b44d14ee62f100e80a711aa
|
data/Gemfile.lock
CHANGED
data/bin/fuck-facebook
CHANGED
data/src/config.rb
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
require 'yaml'
|
|
2
2
|
|
|
3
3
|
class Config
|
|
4
|
-
CONFIG = YAML.load_file("#{ENV['HOME']}/.config/fuck-facebook/config.yaml"
|
|
4
|
+
CONFIG = YAML.load_file("#{ENV['HOME']}/.config/fuck-facebook/config.yaml")
|
|
5
5
|
|
|
6
6
|
def self.option(*path)
|
|
7
|
-
|
|
7
|
+
path_strings = path.map(&:to_s)
|
|
8
|
+
CONFIG.dig(*path_strings)
|
|
8
9
|
end
|
|
9
10
|
end
|
data/src/storage.rb
CHANGED
data/src/xpaths.rb
CHANGED
|
@@ -64,16 +64,17 @@ class Xpaths
|
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
def for(*path_elements)
|
|
67
|
-
|
|
67
|
+
path_elements_strings = path_elements.map(&:to_s)
|
|
68
|
+
result = XPATHS.dig(*path_elements_strings)
|
|
68
69
|
|
|
69
|
-
raise 'Could not find xpath' if result.empty?
|
|
70
|
+
raise 'Could not find xpath' if result.nil? || result.empty?
|
|
70
71
|
|
|
71
72
|
result
|
|
72
73
|
end
|
|
73
74
|
|
|
74
75
|
private_class_method def self.xpaths_from_file
|
|
75
76
|
xpaths_file = File.join(File.dirname(__FILE__), '../xpaths.yaml')
|
|
76
|
-
YAML.load_file(xpaths_file
|
|
77
|
+
YAML.load_file(xpaths_file)
|
|
77
78
|
end
|
|
78
79
|
|
|
79
80
|
XPATHS = xpaths_from_file
|