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 =
"3.0.0"
Class Method Summary
collapse
Class Method Details
84
85
86
|
# File 'lib/miteru.rb', line 84
def config
@config ||= Config.new
end
|
.development? ⇒ Boolean
98
99
100
|
# File 'lib/miteru.rb', line 98
def development?
env == "development"
end
|
.env ⇒ String
91
92
93
|
# File 'lib/miteru.rb', line 91
def env
ENV["APP_ENV"] || ENV["RACK_ENV"]
end
|
68
69
70
|
# File 'lib/miteru.rb', line 68
def feeds
[]
end
|
.initialize_sentry ⇒ Object
114
115
116
117
118
119
120
121
122
|
# File 'lib/miteru.rb', line 114
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
56
57
58
59
60
61
62
|
# File 'lib/miteru.rb', line 56
def logger
SemanticLogger.sync! unless sidekiq?
SemanticLogger.default_level = :info
SemanticLogger.add_appender(io: $stderr, formatter: :color)
SemanticLogger["Miteru"]
end
|
76
77
78
|
# File 'lib/miteru.rb', line 76
def notifiers
[]
end
|