twitter_ebooks 2.3.0 → 2.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a33310c52cb154361bfa00ccdf9cba3b9850af3b
4
- data.tar.gz: c6c29fd59ae7a7926b5e649ca2858eed204f0cdb
3
+ metadata.gz: 88ce1252a7ecb18f0d8670a180528c65083e22cd
4
+ data.tar.gz: 7af9ad8f5464571d0e3f9d394805fd4244910807
5
5
  SHA512:
6
- metadata.gz: 807bdfd51ac33fdb4ae25687e74ff89da02ca8004a7cae576d1fa159df2e7801d4f98195983ae8f8f3c5bff0136b4e880ee4bd67b1b219ede0e1aaf350b6e627
7
- data.tar.gz: 082ef0b1c815c30d535174c19a7f21c21d9988486f3c64759d908b04d5b7379a077cf54cfdf39bff2c11346fea7654187a80f097c938d0fc26a3128d49eeb51b
6
+ metadata.gz: ef1e74a136e604aa89bb0a792303b24c8b24b22bf74a9ad3a9971d7341f6f6df7c4db2961b394601f24ceb38e44452284d942915e94894f872b1f9ed9c6f852c
7
+ data.tar.gz: 6d8dc5f5c3c98a5459424c4eb5c1eb6f60c161989d58b13e2e5702a0b3eb72d9dc9cfa5adf8117fb6cfab5040d67c5ad3f458cde614622f1fdb0300cc0d99964
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # twitter\_ebooks 2.3.0
1
+ # twitter\_ebooks 2.3.1
2
2
 
3
3
  Rewrite of my twitter\_ebooks code. While the original was solely a tweeting Markov generator, this framework helps you build any kind of interactive twitterbot which responds to mentions/DMs. See [ebooks\_example](https://github.com/mispy/ebooks_example) for an example of a full bot.
4
4
 
@@ -15,7 +15,23 @@ module Ebooks
15
15
  end
16
16
 
17
17
  def self.load(path)
18
- Marshal.load(File.open(path, 'rb') { |f| f.read })
18
+ props = Marshal.load(File.open(path, 'rb') { |f| f.read })
19
+ @tokens = props[:tokens]
20
+ @sentences = props[:sentences]
21
+ @mentions = props[:mentions]
22
+ @keywords = props[:keywords]
23
+ end
24
+
25
+ def save(path)
26
+ File.open(path, 'wb') do |f|
27
+ f.write(Marshal.dump({
28
+ tokens: @tokens,
29
+ sentences: @sentences,
30
+ mentions: @mentions,
31
+ keywords: @keywords
32
+ }))
33
+ end
34
+ self
19
35
  end
20
36
 
21
37
  def initialize
@@ -98,13 +114,6 @@ module Ebooks
98
114
  self
99
115
  end
100
116
 
101
- def save(path)
102
- File.open(path, 'wb') do |f|
103
- f.write(Marshal.dump(self))
104
- end
105
- self
106
- end
107
-
108
117
  def fix(tweet)
109
118
  # This seems to require an external api call
110
119
  #begin
@@ -1,3 +1,3 @@
1
1
  module Ebooks
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.1"
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_ebooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaiden Mispy