Skip to content

Commit

Permalink
Merge pull request #171 from pooza/2_3_11
Browse files Browse the repository at this point in the history
2.3.11
  • Loading branch information
pooza committed Aug 27, 2019
2 parents a655e5d + dac3e39 commit b529f16
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 44 deletions.
18 changes: 12 additions & 6 deletions Gemfile.lock
@@ -1,8 +1,8 @@
GIT
remote: https://github.com/pooza/ginseng-core.git
revision: da6a24fd19633c2b6dbf9f1ef85f44949816afeb
revision: d68e5450bc2e527ee923fb3a0008485c7f55f80a
specs:
ginseng-core (1.4.4)
ginseng-core (1.4.7)
activesupport
addressable
bundler
Expand All @@ -14,15 +14,17 @@ GIT
rubocop
syslog-logger
test-unit
yajl-ruby

GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.3)
activesupport (6.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.1, >= 2.1.8)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
ast (2.4.0)
Expand All @@ -45,6 +47,7 @@ GEM
faraday_middleware (>= 0.9)
loofah (>= 2.0)
sax-machine (>= 1.0)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
httparty (0.17.0)
Expand All @@ -66,7 +69,7 @@ GEM
multi_xml (0.6.0)
multipart-post (2.1.1)
netrc (0.11.0)
nokogiri (1.10.3)
nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
Expand All @@ -77,12 +80,13 @@ GEM
parallel (1.17.0)
parser (2.6.3.0)
ast (~> 2.4.0)
power_assert (1.1.4)
power_assert (1.1.5)
public_suffix (3.1.1)
rack (2.0.7)
rainbow (3.0.0)
rake (12.3.3)
rest-client (2.0.2)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
Expand All @@ -105,6 +109,8 @@ GEM
unf_ext
unf_ext (0.0.7.6)
unicode-display_width (1.6.0)
yajl-ruby (1.4.1)
zeitwerk (2.1.9)

PLATFORMS
ruby
Expand Down
2 changes: 1 addition & 1 deletion config/application.yaml
@@ -1,5 +1,5 @@
package:
version: 2.3.10
version: 2.3.11
url: https://github.com/pooza/tomato-toot
authors:
- Tatsuya Koishi
Expand Down
6 changes: 3 additions & 3 deletions lib/tomato_toot/feed.rb
@@ -1,6 +1,5 @@
require 'feedjira'
require 'digest/sha1'
require 'json'
require 'optparse'

module TomatoToot
Expand Down Expand Up @@ -199,8 +198,9 @@ def self.crawl_all
rescue => e
e = Ginseng::Error.create(e)
e.package = Package.full_name
Slack.broadcast(e)
logger.error(e)
message = e.to_h.merge(feed: feed.params)
Slack.broadcast(message)
logger.error(message)
next
end
end
Expand Down
6 changes: 3 additions & 3 deletions lib/tomato_toot/feed_entry.rb
Expand Up @@ -30,7 +30,7 @@ def post
@logger.error(e)
end
touch
@logger.info({entry: {date: date, body: body}})
@logger.info(entry: {date: date, body: body})
end

def toot
Expand All @@ -40,11 +40,11 @@ def toot
rescue Ginseng::GatewayError => e
@logger.error(e)
end
return @feed.mastodon.toot({
return @feed.mastodon.toot(
status: body,
visibility: @feed.visibility,
media_ids: ids,
})
)
end

def touch
Expand Down
14 changes: 5 additions & 9 deletions lib/tomato_toot/package.rb
@@ -1,27 +1,23 @@
module TomatoToot
module Package
def module_name
return 'TomatoToot'
end

def environment_class
return "#{module_name}::Environment".constantize
return Environment
end

def package_class
return "#{module_name}::Package".constantize
return Package
end

def config_class
return "#{module_name}::Config".constantize
return Config
end

def logger_class
return "#{module_name}::Logger".constantize
return Logger
end

def http_class
return "#{module_name}::HTTP".constantize
return HTTP
end

def self.name
Expand Down
7 changes: 0 additions & 7 deletions test/package.rb

This file was deleted.

15 changes: 0 additions & 15 deletions test/slack.rb

This file was deleted.

0 comments on commit b529f16

Please sign in to comment.