Module: Miteru
- Extended by:
- MemoWise
- Defined in:
- lib/miteru.rb,
lib/miteru/kit.rb,
lib/miteru/http.rb,
lib/miteru/cache.rb,
lib/miteru/mixin.rb,
lib/miteru/config.rb,
lib/miteru/errors.rb,
lib/miteru/record.rb,
lib/miteru/crawler.rb,
lib/miteru/helpers.rb,
lib/miteru/service.rb,
lib/miteru/version.rb,
lib/miteru/website.rb,
lib/miteru/cli/base.rb,
lib/miteru/database.rb,
lib/miteru/downloader.rb,
lib/miteru/feeds/base.rb,
lib/miteru/cli/database.rb,
lib/miteru/commands/web.rb,
lib/miteru/orchestrator.rb,
lib/miteru/sidekiq/jobs.rb,
lib/miteru/commands/main.rb,
lib/miteru/feeds/urlscan.rb,
lib/miteru/feeds/ayashige.rb,
lib/miteru/notifiers/base.rb,
lib/miteru/cli/application.rb,
lib/miteru/feeds/tweetfeed.rb,
lib/miteru/notifiers/slack.rb,
lib/miteru/web/application.rb,
lib/miteru/commands/sidekiq.rb,
lib/miteru/commands/database.rb,
lib/miteru/feeds/urlscan_pro.rb,
lib/miteru/notifiers/urlscan.rb,
lib/miteru/feeds/phishing_database.rb,
lib/miteru/concerns/url_truncatable.rb,
lib/miteru/concerns/error_unwrappable.rb,
lib/miteru/concerns/database_connectable.rb
Defined Under Namespace
Modules: CLI, Commands, Concerns, HTTP, Helpers, Jobs, Mixins, Notifiers, Web
Classes: Cache, Config, Crawler, Database, DownloadError, Downloader, Error, Feeds, FileSizeError, Kit, Orchestrator, Record, Service, StatusError, UniquenessError, Website
Constant Summary
collapse
- VERSION =
"2.4.0"
Class Method Summary
collapse
Class Method Details
85
86
87
|
# File 'lib/miteru.rb', line 85
def config
@config ||= Config.new
end
|
.development? ⇒ Boolean
99
100
101
|
# File 'lib/miteru.rb', line 99
def development?
env == "development"
end
|
.env ⇒ String
92
93
94
|
# File 'lib/miteru.rb', line 92
def env
ENV["APP_ENV"] || ENV["RACK_ENV"]
end
|
69
70
71
|
# File 'lib/miteru.rb', line 69
def feeds
[]
end
|
.initialize_sentry ⇒ Object
122
123
124
125
126
127
128
129
130
|
# File 'lib/miteru.rb', line 122
def initialize_sentry
return if Sentry.initialized?
Sentry.init do |config|
config.dsn = Miteru.config.sentry_dsn
config.traces_sample_rate = Miteru.config.sentry_trace_sample_rate
config.breadcrumbs_logger = %i[sentry_logger http_logger]
end
end
|
.logger ⇒ SematicLogger
57
58
59
60
61
62
63
|
# File 'lib/miteru.rb', line 57
def logger
SemanticLogger.sync! unless sidekiq?
SemanticLogger.default_level = :info
SemanticLogger.add_appender(io: $stderr, formatter: :color)
SemanticLogger["Miteru"]
end
|
77
78
79
|
# File 'lib/miteru.rb', line 77
def notifiers
[]
end
|