yatter 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +5 -5
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +2 -1
  4. data/lib/yatter.rb +51 -7
  5. metadata +38 -55
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6be7202f0b1e319b265e2a860bf10c417478eab2
4
- data.tar.gz: e8016ded7bb515785314a98cca58bf2f523adf06
2
+ SHA256:
3
+ metadata.gz: 2304d0da3a52b3c27cbc5dc8ab0d9ffb3a0ee97f0870f659b105493d33ebf5a4
4
+ data.tar.gz: d487ef4f67e8db15ff140690f9b4d89d4e54873de7250928240b1296223700a5
5
5
  SHA512:
6
- metadata.gz: c2df368d8adb990aa8c0225d1da113065ba5c2c82a9aadb983bf8e0e498fd20d73b78b5be35ae1b526753fdf5b2c34ea5ec07a4ba4c5fc6ac96c9434e9e9b400
7
- data.tar.gz: 974668e0bd9c70a4b1af1bfbd303a8affb0cc01e4e9a2e079398f1cb11ffa3ec7bbb179cd251fed9a904ed9177938dcd82dbabcfc7b8471e0da4cdd3f168711d
6
+ metadata.gz: 729b497c6256df535e539bda384320fb9805d07234cef3ab63c464f8cd3af66b815009f1ea9ee0f39e0b12bbcc171ff9ea5a87f6865a58801079865a1987e184
7
+ data.tar.gz: 2907016fc0539ef7fb789838cfec09b186d6fa076f38d6854f254bbf521edbebf5d7044867420382cc50a3327d3aa9d6418b9ed6555f9dab3ebbba1240192760
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- Bz�������]��
1
+ 7�����K{37^UН+�=1U5��"/�Z��[�k�\O�+�m$��|�}$�k�*�gu��f)�"b��3�H_�i�Pt�S��d;쬬�:빪�����UMw����Q����`W�/���T�D�[�+Vd9c%„�ۚ _�
2
+ �������n�/ �wM��eDŋ;���ۜ$&��h���XK��$�f���;^>�?�=sK�����;��Z��cX�����y
data/lib/yatter.rb CHANGED
@@ -6,7 +6,8 @@
6
6
 
7
7
  require 'twitter'
8
8
  require 'dynarex-password'
9
- require 'xml-registry'
9
+
10
+
10
11
 
11
12
  class Yatter < Twitter::REST::Client
12
13
 
@@ -14,20 +15,63 @@ class Yatter < Twitter::REST::Client
14
15
 
15
16
  raise 'You must enter a user' if user.nil?
16
17
 
17
- e = reg.get_key('hkey_apps/microblog/twitter/' + user)
18
- @lookup_file = e.text('lookup_file')
18
+ key = 'hkey_apps/microblog/twitter/'
19
+ e = reg.get_key(key + user)
20
+ @lookup_file = e.text('lookup_file').to_s
19
21
 
20
22
  super() do |config|
21
23
 
22
- config.consumer_key = e.text('ctoken')
23
- config.consumer_secret = decipher(e.text('csecret'))
24
- config.access_token = e.text('atoken')
25
- config.access_token_secret = decipher(e.text('asecret'))
24
+ config.consumer_key = e.text('ctoken').to_s
25
+ config.consumer_secret = decipher(e.text('csecret').to_s)
26
+ config.access_token = e.text('atoken').to_s
27
+ config.access_token_secret = decipher(e.text('asecret').to_s)
26
28
 
27
29
  end
30
+
31
+ if e.text('last_follower').to_s.empty? then
32
+ reg.set_key(key + 'last_follower', last_follower)
33
+ end
34
+
35
+ end
36
+
37
+ def followers()
38
+
39
+ @followers ||= super().take(10)
40
+
41
+ @followers.map do |x|
42
+
43
+ OpenStruct.new({
44
+ name: x.name,
45
+ username: x.screen_name,
46
+ profile: x.description,
47
+ followers: x.followers_count,
48
+ following: x.friends_count,
49
+ member_since: x.created_at,
50
+ website: x.website.to_s
51
+ }).freeze
52
+
53
+ end
54
+
55
+ end
56
+
57
+ def last_follower()
58
+
59
+ @followers ||= followers.take(10)
60
+ @followers[0][:username]
28
61
 
29
62
  end
30
63
 
64
+ def mentions()
65
+
66
+ @mentions ||= super()
67
+
68
+ @mentions.map do |x|
69
+ OpenStruct.new({date: x.created_at, user: x.user.screen_name,
70
+ text: x.text}).freeze
71
+ end
72
+
73
+ end
74
+
31
75
  def update(msg)
32
76
  super(msg)
33
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,49 +10,53 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
- YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE1MDkxOTE4NTYwN1oXDTE2MDkxODE4NTYwN1owSDESMBAG
16
- A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
- EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
18
- ggEBAKxAF6OEQOiuursjjg9ZSqwrbNlK+0iO5FLIVU+JWs2+VWzqeqLlIgaiort1
19
- JZzaSXgiXyDWEdG7thSf15jETTNMD0FomYuzkM4SagiBtcvD0p3GZtj6bzsA1y9g
20
- 1s4HAvHbXknYNMtEVfLjY21xYEd75z8HYZtQiaHexPioeWj5UX3U3csvFmQR82/j
21
- ZaN9uI811QwmTcjol1ZalNRiRbD/Mdpe+R8jypCYxXW8NDHd+gHgkIJATer60zL/
22
- pLVdc7gipU35gjgPHjXsEcjG/7B3fjbmLBwlS3CwprkGkD+madfTYhX+btA8RbvC
23
- eUxhZWpJX9UCPhGFLbGFzXhHIm8CAwEAAaOBijCBhzAJBgNVHRMEAjAAMAsGA1Ud
24
- DwQEAwIEsDAdBgNVHQ4EFgQUrz/Hbh5TAm91c0OHqGSxkPVJCdcwJgYDVR0RBB8w
25
- HYEbZ2VtbWFzdGVyQ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000000 Z
38
+ date: 2019-11-08 00:00:00.000000000 Z
35
39
  dependencies:
36
40
  - !ruby/object:Gem::Dependency
37
41
  name: twitter
38
42
  requirement: !ruby/object:Gem::Requirement
39
43
  requirements:
40
- - - "~>"
41
- - !ruby/object:Gem::Version
42
- version: '5.15'
43
44
  - - ">="
44
45
  - !ruby/object:Gem::Version
45
- version: 5.15.0
46
+ version: 6.2.0
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '6.2'
46
50
  type: :runtime
47
51
  prerelease: false
48
52
  version_requirements: !ruby/object:Gem::Requirement
49
53
  requirements:
50
- - - "~>"
51
- - !ruby/object:Gem::Version
52
- version: '5.15'
53
54
  - - ">="
54
55
  - !ruby/object:Gem::Version
55
- version: 5.15.0
56
+ version: 6.2.0
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '6.2'
56
60
  - !ruby/object:Gem::Dependency
57
61
  name: dynarex-password
58
62
  requirement: !ruby/object:Gem::Requirement
@@ -62,7 +66,7 @@ dependencies:
62
66
  version: '0.1'
63
67
  - - ">="
64
68
  - !ruby/object:Gem::Version
65
- version: 0.1.11
69
+ version: 0.1.12
66
70
  type: :runtime
67
71
  prerelease: false
68
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -72,29 +76,9 @@ dependencies:
72
76
  version: '0.1'
73
77
  - - ">="
74
78
  - !ruby/object:Gem::Version
75
- version: 0.1.11
76
- - !ruby/object:Gem::Dependency
77
- name: xml-registry
78
- requirement: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.3'
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- version: 0.3.1
86
- type: :runtime
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- requirements:
90
- - - "~>"
91
- - !ruby/object:Gem::Version
92
- version: '0.3'
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- version: 0.3.1
79
+ version: 0.1.12
96
80
  description:
97
- email: james@r0bertson.co.uk
81
+ email: james@jamesrobertson.eu
98
82
  executables: []
99
83
  extensions: []
100
84
  extra_rdoc_files: []
@@ -119,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
103
  - !ruby/object:Gem::Version
120
104
  version: '0'
121
105
  requirements: []
122
- rubyforge_project:
123
- rubygems_version: 2.4.8
106
+ rubygems_version: 3.0.3
124
107
  signing_key:
125
108
  specification_version: 4
126
109
  summary: Yet another Twitter wrapper
metadata.gz.sig CHANGED
Binary file