castle-log 0.0.2 → 0.0.3

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f9c7b4009e9b5875b1d66fadc760aed5d6e1b621
4
+ data.tar.gz: 53522822f42bde658e2d98f37d4328a48b2d67ef
5
+ SHA512:
6
+ metadata.gz: 2ef998e9d21f2d28aa0f7eed12449a1634ec507f37685e9a85f9571d1f16a30910cc3a6ab1eef90847f62b140a6896ee8d60ac8356c44f313bf4b7b3c72cf016
7
+ data.tar.gz: 7e08bba344072a02af02fb8a44461da64837c005381d546d4af7577a21a2a05eacc166528ba6378b650853794fe32e829ad53aebd732adaee4ccce4e2e4b4cce
data/castle-log.gemspec CHANGED
@@ -18,8 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ spec.add_development_dependency 'awesome_print'
21
22
  spec.add_development_dependency 'bundler', '~> 1.3'
22
23
  spec.add_development_dependency 'ci_reporter', '= 1.8.4'
23
- spec.add_development_dependency 'rake', '~> 0.8'
24
- spec.add_development_dependency 'rspec', '~> 2.12'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'rspec', '~> 2.13'
26
+ spec.add_development_dependency 'simplecov'
27
+ spec.add_development_dependency 'simplecov-gem-adapter'
28
+ spec.add_development_dependency 'simplecov-rcov'
25
29
  end
@@ -14,6 +14,16 @@ module Castle
14
14
  # @return [Array<Session>] Sessions contained in this file
15
15
  attr_reader :sessions
16
16
 
17
+ # Determines if the file at the given URI is a Castle log file. If one intends
18
+ # to read the file, simply using #new should be preferred in favor of this, catching any
19
+ # errors that may be raised.
20
+ #
21
+ # @param uri URI to file to read
22
+ # @return [Boolean] true if the file is a Castle log file, false otherwise
23
+ def self.castle? uri
24
+ !!File.new(uri) rescue false
25
+ end
26
+
17
27
  def initialize uri
18
28
  @sessions = []
19
29
 
@@ -1,5 +1,5 @@
1
1
  module Castle
2
2
  module Log
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -0,0 +1,5 @@
1
+ Skywalker
2
+ 0 0 0 255 1 0 0 0 255 1 254 0 0 1 0 0 0 255 0 0 0 1 0 74 1536 10.04 536588 0 262228
3
+ All Sessions
4
+ 0 0
5
+ Milliseconds IsEvent EventError EventData Altitude Airspeed ServoCurrent*100 Throttle PackVolt*100 Amps*100 GForceX*100 GForceY*100 GForceZ*100 Temp1*10 Temp2*10 Temp3*10 RPM RPM2 GPSLat GPSLon GPSAlt GPSSpeed GPSCourse GPSDist GPSUTC NumSats GPSFlags SpektrumHolds SpektrumLostFrames SpektrumAFades SpektrumBFades SpektrumLeftFades SpektrumRightFades GPSUTC-ASCII HDOP*10