vitreous_share 0.0.1 → 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.
@@ -6,9 +6,10 @@ module Vitreous
6
6
  @session = session
7
7
  end
8
8
 
9
- def generate( path = @path )
9
+ def generate
10
+ path = @path
10
11
  {
11
- 'name' => File.basename( path ),
12
+ 'name' => File.basename( File.dirname( path ) ),
12
13
  'path' => '/',
13
14
  'uri' => uri( path ),
14
15
  'type' => 'directory',
@@ -8,7 +8,7 @@ module Vitreous
8
8
 
9
9
  def generate( path = @path )
10
10
  {
11
- 'name' => File.basename( path ),
11
+ 'name' => path == @path ? File.basename( File.dirname( path ) ) : File.basename( path ),
12
12
  'path' => path == @path ? '/' : path.gsub( @path, '' ),
13
13
  'uri' => uri( path ),
14
14
  'type' => File.directory?( path ) ? 'directory' : 'file',
@@ -1,5 +1,5 @@
1
1
  module Vitreous
2
2
  module Share
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ require 'dummy_dropbox'
3
3
 
4
4
  class DropboxStructureTest < Test::Unit::TestCase
5
5
  def setup
6
- DummyDropbox.root_path = FIXTURES_PATH
6
+ DummyDropbox.root_path = File.dirname(__FILE__)
7
7
  @session = ::Dropbox::Session.new( 'key', 'secret' )
8
8
 
9
9
  # @session =
@@ -19,7 +19,7 @@ class DropboxStructureTest < Test::Unit::TestCase
19
19
 
20
20
  structure =
21
21
  Vitreous::Share::DropboxStructure.new(
22
- "/folder_structure",
22
+ "/fixtures/folder_structure",
23
23
  @session
24
24
  )
25
25
 
data/test/element_test.rb CHANGED
@@ -5,7 +5,7 @@ class ElementTest < Test::Unit::TestCase
5
5
  index = JSON.load( File.read( "#{FIXTURES_PATH}/index.json" ) )
6
6
  element = Vitreous::Share::Element.new( index )
7
7
 
8
- assert_equal( 'folder_structure', element.title )
8
+ assert_equal( 'fixtures', element.title )
9
9
  assert_equal( '/', element.link )
10
10
  assert_equal( true, element.collection? )
11
11
  assert_equal( false, element.item? )
@@ -1,5 +1,5 @@
1
1
  {
2
- "title": "folder_structure",
2
+ "title": "fixtures",
3
3
  "elements": [
4
4
  {
5
5
  "jpg": "wadus uri",
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "folder_structure",
2
+ "name": "fixtures",
3
3
  "uri": "wadus uri",
4
4
  "elements": [
5
5
  {
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = Vitreous::Share::VERSION
8
8
  s.authors = ["Fernando Guillen"]
9
9
  s.email = ["fguillen.mail@gmail.com"]
10
- s.homepage = ""
10
+ s.homepage = "https://github.com/fguillen/VitreousShare"
11
11
  s.summary = "Shared components for Vitreous"
12
12
  s.description = "Shared components for Vitreous"
13
13
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vitreous_share
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Fernando Guillen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-27 00:00:00 +02:00
18
+ date: 2011-07-29 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -168,7 +168,7 @@ files:
168
168
  - test/test_helper.rb
169
169
  - vitreous_share.gemspec
170
170
  has_rdoc: true
171
- homepage: ""
171
+ homepage: https://github.com/fguillen/VitreousShare
172
172
  licenses: []
173
173
 
174
174
  post_install_message: