photoscan_outputs 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 25904f3b8fba33b0149a2e7340a8c5c906838ea0
4
- data.tar.gz: dff0ab70fbb174768344fd99c0b0a1bea6c5ae28
3
+ metadata.gz: bc5d5b64678d8efc0c004c2ac56e1ede6b52aeac
4
+ data.tar.gz: 9aa223ce8d78dc0e260a2bb817c301e829606160
5
5
  SHA512:
6
- metadata.gz: f050e0944859cc8522c46cac44da3f126ab98f57800297cc5453fe5daead51d0956502648859209b8065b55557a46c77486e26c4756cddb2c2e307a4d5c9f564
7
- data.tar.gz: 5650def2dfe939aeab7aee087214043a4473a81fb4646dbb2c65f66ec2f2393d4977357aa9f2534cfcd10c61560082fd018fb58437d9de29f679372ccfcb343f
6
+ metadata.gz: 769a94a85f9f98bd99428129d543ca2ddd0f0f33c2f31e16e22e17600e52681bf35ffa5ef89464948069bd062eaa135cd743a93d74c6edd4ac4c8422b78d5bb5
7
+ data.tar.gz: 3f8eeb7f5aeb8a385c3f4a1ee0988ec5bf5abf5e5dd6e91888ef3f5bcb347ea08131b6e1838a8909d4459a059cadba417fda42212e07b28c265859e0cc9e2845
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ cache: bundler
3
+ rvm:
4
+ - 2.0.0
5
+ - 1.9.3
@@ -15,7 +15,7 @@ module PhotoscanOutputs
15
15
  end
16
16
 
17
17
  def find_by_name( name )
18
- find { |cam| cam.name == name }
18
+ find { |cam| cam.name.match name }
19
19
  end
20
20
 
21
21
  def each
@@ -1,3 +1,3 @@
1
1
  module PhotoscanOutputs
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = PhotoscanOutputs::VERSION
9
9
  spec.authors = ["Aaron Marburg"]
10
10
  spec.email = ["amarburg@notetofutureself.org"]
11
- spec.summary = %q{A Ruby Gem to parse the Photoscan export file formats.}
11
+ spec.summary = %q{A Ruby Gem to parse export file formats from Photoscan.}
12
12
  spec.homepage = "http://github.com/amarburg/rb_photoscan_outputs"
13
13
  spec.license = "MIT"
14
14
 
data/test/common.rb ADDED
@@ -0,0 +1,10 @@
1
+
2
+
3
+ module PhotoscanOutputsTestCommon
4
+
5
+ def demo_cameras_xml
6
+ Pathname.new(__FILE__).parent.parent.join("demo", "cameras.xml")
7
+ end
8
+ end
9
+
10
+
@@ -0,0 +1,28 @@
1
+
2
+
3
+ require "minitest/autorun"
4
+ require "photoscan_outputs"
5
+
6
+ require_relative "common"
7
+
8
+ class TestFindByName < MiniTest::Unit::TestCase
9
+ include PhotoscanOutputs
10
+ include PhotoscanOutputsTestCommon
11
+
12
+ def setup
13
+ @cameras = CameraFile.load( demo_cameras_xml )
14
+ end
15
+
16
+ def test_find_by_name_by_string
17
+ assert_kind_of Camera, @cameras.find_by_name( "IMG_7622.jpg" )
18
+ end
19
+
20
+ def test_find_by_name_by_substring
21
+ assert_kind_of Camera, @cameras.find_by_name( "IMG_7622" )
22
+ end
23
+
24
+ def test_find_by_name_by_regexp
25
+ assert_kind_of Camera, @cameras.find_by_name( /^IMG_7622/ )
26
+ end
27
+
28
+ end
@@ -2,13 +2,12 @@
2
2
  require "minitest/autorun"
3
3
  require "photoscan_outputs"
4
4
 
5
+ require_relative "common"
6
+
5
7
  class TestCameraFile < MiniTest::Unit::TestCase
6
8
 
7
9
  include PhotoscanOutputs
8
-
9
- def demo_cameras_xml
10
- Pathname.new(__FILE__).parent.parent.join("demo", "cameras.xml")
11
- end
10
+ include PhotoscanOutputsTestCommon
12
11
 
13
12
  def test_loads_a_file
14
13
  cameras = CameraFile.load( demo_cameras_xml )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: photoscan_outputs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Marburg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-20 00:00:00.000000000 Z
11
+ date: 2014-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
+ - ".travis.yml"
77
78
  - Gemfile
78
79
  - LICENSE
79
80
  - README.md
@@ -86,6 +87,8 @@ files:
86
87
  - lib/photoscan_outputs/camera_file.rb
87
88
  - lib/photoscan_outputs/version.rb
88
89
  - photoscan_outputs.gemspec
90
+ - test/common.rb
91
+ - test/find_by_name_test.rb
89
92
  - test/load_file_test.rb
90
93
  homepage: http://github.com/amarburg/rb_photoscan_outputs
91
94
  licenses:
@@ -110,6 +113,8 @@ rubyforge_project:
110
113
  rubygems_version: 2.2.1
111
114
  signing_key:
112
115
  specification_version: 4
113
- summary: A Ruby Gem to parse the Photoscan export file formats.
116
+ summary: A Ruby Gem to parse export file formats from Photoscan.
114
117
  test_files:
118
+ - test/common.rb
119
+ - test/find_by_name_test.rb
115
120
  - test/load_file_test.rb