brutalismbot 0.6.0 → 0.6.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 +4 -4
- data/lib/brutalismbot/s3.rb +6 -6
- data/lib/brutalismbot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f5d9a6bba9f8e46a8bfd482cc6342dc1f550fb37ac6cba15d425042b0d5cb59
|
4
|
+
data.tar.gz: b7018131ceaadba8f98322a7d2e110e1ecfedd67d442d75beca66aee00d27896
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e752b362820e81a6ddfdaa7e9a4b8b3e4f3fce841dbe87de2bc34879eedc760dbac5dc7f5a0930408878dffd92cd5ff8174406a859f2e4eba4e7b76c55fe3254
|
7
|
+
data.tar.gz: 8d8b6780fe0d0f8de0e0c500cc87a4627477ccd9d73bb4705ff32c8e1cab719921be45efdd11f00e4663f9fab379c6feed74093fb1e7ae3b505d9b6f11a7c0c7
|
data/lib/brutalismbot/s3.rb
CHANGED
@@ -105,6 +105,10 @@ module Brutalismbot
|
|
105
105
|
end.to_json
|
106
106
|
}
|
107
107
|
end
|
108
|
+
|
109
|
+
def subreddit(endpoint:nil, user_agent:nil)
|
110
|
+
R::Brutalism.new endpoint:endpoint, user_agent: user_agent
|
111
|
+
end
|
108
112
|
end
|
109
113
|
|
110
114
|
class Client < Prefix
|
@@ -117,10 +121,6 @@ module Brutalismbot
|
|
117
121
|
prefix = File.join @prefix, "posts/"
|
118
122
|
PostCollection.new bucket: @bucket, prefix: prefix, client: @client
|
119
123
|
end
|
120
|
-
|
121
|
-
def subreddit(endpoint:nil, user_agent:nil)
|
122
|
-
R::Brutalism.new endpoint:endpoint, user_agent: user_agent
|
123
|
-
end
|
124
124
|
end
|
125
125
|
|
126
126
|
class AuthCollection < Prefix
|
@@ -170,8 +170,8 @@ module Brutalismbot
|
|
170
170
|
max_key.key.match(/(\d+).json\z/).to_a.last.to_i
|
171
171
|
end
|
172
172
|
|
173
|
-
def pull(min_time
|
174
|
-
posts =
|
173
|
+
def pull(min_time:nil, max_time:nil, endpoint:nil, user_agent:nil)
|
174
|
+
posts = subreddit(endpoint: endpoint, user_agent: user_agent).posts(:new)
|
175
175
|
posts = posts.select{|x| x.created_between?(min_time, max_time) }
|
176
176
|
posts = posts.sort{|a,b| a.created_utc <=> b.created_utc }
|
177
177
|
posts.map{|x| put x }
|
data/lib/brutalismbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brutalismbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Mancevice
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|