Module: SQLean
- Defined in:
- lib/sqlean.rb,
lib/sqlean/version.rb,
lib/sqlean/upstream.rb
Overview
Defined Under Namespace
Modules: Crypto, Define, FileIO, Fuzzy, IPAddr, Math, Regexp, Stats, Text, Time, UUID, Unicode, Upstream, VSV Classes: UnsupportedPlatform
Constant Summary collapse
- GEM_NAME =
"sqlean"- VERSION =
The version of the SQLean gem.
"0.3.0"
Class Method Summary collapse
-
.check_arch ⇒ Object
:nodoc:.
-
.file_dir ⇒ Object
:nodoc:.
-
.file_path(name) ⇒ Object
“private” methods.
-
.platform ⇒ Object
here mostly for testing purposes (to stub).
-
.to_path ⇒ Object
Returns an absolute path to the SQLean bundle, containing all the SQLean extensions.
Class Method Details
.check_arch ⇒ Object
:nodoc:
138 139 140 141 142 |
# File 'lib/sqlean.rb', line 138 def self.check_arch # :nodoc: if SQLean::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match_gem?(Gem::Platform.new(p), GEM_NAME) } raise UnsupportedPlatform, "#{GEM_NAME} does not support the #{platform} platform." end end |
.file_dir ⇒ Object
:nodoc:
128 129 130 131 132 133 134 135 136 |
# File 'lib/sqlean.rb', line 128 def self.file_dir # :nodoc: @file_arch ||= begin check_arch Dir.glob(File.join(__dir__, "sqlean", "dist", "*")).find do |f| Gem::Platform.match_gem?(Gem::Platform.new(File.basename(f)), GEM_NAME) end end end |
.file_path(name) ⇒ Object
“private” methods
124 125 126 |
# File 'lib/sqlean.rb', line 124 def self.file_path(name) # :nodoc: File.join(SQLean.file_dir, name) end |
.platform ⇒ Object
here mostly for testing purposes (to stub)
145 146 147 |
# File 'lib/sqlean.rb', line 145 def self.platform # :nodoc: RUBY_PLATFORM end |