v. 0.7.20410
authorpkanavos <pkanavos@gmail.com>
Tue, 10 Apr 2012 05:48:14 +0000 (08:48 +0300)
committerpkanavos <pkanavos@gmail.com>
Tue, 10 Apr 2012 05:48:14 +0000 (08:48 +0300)
trunk/Pithos.Client.WPF/Properties/AssemblyInfo.cs
trunk/Pithos.Core.Test/CollectionExtensionsTest.cs [new file with mode: 0644]
trunk/Pithos.Installer/rnotes.0.7.20410.html [new file with mode: 0644]
trunk/Pithos.Installer/versioninfo.xml
trunk/Pithos.Interfaces.Test/PermissionConverterTEst.cs [new file with mode: 0644]
trunk/Pithos.Interfaces.Test/Pithos.Interfaces.Test.csproj [new file with mode: 0644]
trunk/Pithos.Interfaces.Test/Properties/AssemblyInfo.cs [new file with mode: 0644]

index 7dff65c..abe18fd 100644 (file)
@@ -56,7 +56,7 @@ using System.Windows;
 [assembly: AssemblyCopyright("Copyright © GRNet 2011-2012")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyInformationalVersion("2012-04-09")]
+[assembly: AssemblyInformationalVersion("2012-04-10")]
 
 // Setting ComVisible to false makes the types in this assembly not visible 
 // to COM components.  If you need to access a type in this assembly from 
@@ -93,5 +93,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers 
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.7.20409.0")]
-[assembly: AssemblyFileVersionAttribute("0.7.20409.0")]
+[assembly: AssemblyVersion("0.7.20410.0")]
+[assembly: AssemblyFileVersionAttribute("0.7.20410.0")]
diff --git a/trunk/Pithos.Core.Test/CollectionExtensionsTest.cs b/trunk/Pithos.Core.Test/CollectionExtensionsTest.cs
new file mode 100644 (file)
index 0000000..0ef455b
--- /dev/null
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using NUnit.Framework;
+using Pithos.Core.Agents;
+
+namespace Pithos.Core.Test
+{
+    [TestFixture]
+    class CollectionExtensionsTest
+    {
+        [Test]
+        public void TestUriIsFileDirectlyBelow()
+        {
+            var target=   new Uri("https://okeanos/pithos/vi/account1/pithos/file1.xml");
+            var rootUri = new Uri("https://okeanos/pithos/vi/account1/pithos");
+
+            Assert.That(target.IsAtOrBelow(rootUri),Is.True);
+        }
+
+        [Test]
+        public void TestUriIsAbove()
+        {
+            var target =  new Uri("https://okeanos/pithos/vi/account1/pithos");
+            var rootUri = new Uri("https://okeanos/pithos/vi/account1/pithos/folder");
+
+            Assert.That(target.IsAtOrBelow(rootUri),Is.False);
+        }
+
+        [Test]
+        public void TestUriIsSameFolde()
+        {
+            var target=   new Uri("https://okeanos/pithos/vi/account1/pithos/folder");
+            var rootUri = new Uri("https://okeanos/pithos/vi/account1/pithos/folder");
+
+            Assert.That(target.IsAtOrBelow(rootUri),Is.True);
+        } 
+        
+        [Test]
+        public void TestStringIsFileDirectlyBelow()
+        {
+            var target=   @"c:\okeanos\pithos\vi\account1\pithos\file1.xml";
+            var root = @"c:\okeanos\pithos\vi\account1\pithos";
+
+            Assert.That(target.IsAtOrBelow(root),Is.True);
+        }
+
+        [Test]
+        public void TestStringIsAbove()
+        {
+            var target =  @"c:\okeanos\pithos\vi\account1\pithos";
+            var root = @"c:\okeanos\pithos\vi\account1\pithos\folder";
+
+            Assert.That(target.IsAtOrBelow(root),Is.False);
+        }
+
+        [Test]
+        public void TestStringIsSameFolder()
+        {
+            var target =  @"c:\okeanos\pithos\vi\account1\pithos\folder";
+            var root = @"c:\okeanos\pithos\vi\account1\pithos\folder";
+
+            Assert.That(target.IsAtOrBelow(root),Is.True);
+        }
+    }
+}
diff --git a/trunk/Pithos.Installer/rnotes.0.7.20410.html b/trunk/Pithos.Installer/rnotes.0.7.20410.html
new file mode 100644 (file)
index 0000000..9253963
--- /dev/null
@@ -0,0 +1,12 @@
+<html>
+<body>
+<h2>Pithos MS Client v. 0.7.20410</h2>
+Release Date: Apr 10, 2012, 09:00
+<br/>
+Includes:
+<br/>
+<ul>
+<li> Workaround for multiple file permissions for the same account</li>
+</ul>
+</body>
+</html>
\ No newline at end of file
index e08b253..231f029 100644 (file)
@@ -5,9 +5,21 @@
                <title>Pithos MS Client</title>      \r
                <link>https://code.grnet.gr/projects/pithos-ms-client/repository/revisions/master/changes/trunk/Pithos.Installer/versioninfo.xml</link>     \r
                <description></description>      \r
-               <language>en</language>                                 \r
+               <language>en</language>         \r
+                                       \r
                <item>            \r
-                       <title>Version 0.7.20403</title>\r
+                       <title>Version 0.7.20410</title>\r
+                       <sparkle:releaseNotesLink>https://code.grnet.gr/projects/pithos-ms-client/repository/revisions/master/raw/trunk/Pithos.Installer/rnotes.0.7.20410.html</sparkle:releaseNotesLink>\r
+                       <pubDate>Mon, 10 Apr 2012 09:00:00 +0200</pubDate>\r
+                       <enclosure \r
+                               url="https://code.grnet.gr/attachments/download/1122/PithosPlus_Setupv0.7.20410.0.exe"\r
+                               length="4962611" \r
+                               type="application/octet-stream"\r
+                               sparkle:version="0.7.20410" \r
+                       />\r
+               </item>\r
+               <item>            \r
+                       <title>Version 0.7.20409</title>\r
                        <sparkle:releaseNotesLink>https://code.grnet.gr/projects/pithos-ms-client/repository/revisions/master/raw/trunk/Pithos.Installer/rnotes.0.7.20409.html</sparkle:releaseNotesLink>\r
                        <pubDate>Mon, 09 Apr 2012 09:00:00 +0200</pubDate>\r
                        <enclosure \r
diff --git a/trunk/Pithos.Interfaces.Test/PermissionConverterTEst.cs b/trunk/Pithos.Interfaces.Test/PermissionConverterTEst.cs
new file mode 100644 (file)
index 0000000..922f17a
--- /dev/null
@@ -0,0 +1,85 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using NUnit.Framework;
+
+namespace Pithos.Interfaces.Test
+{
+    [TestFixture]
+    class PermissionConverterTest
+    {
+        [Test]
+        public void TestMostPermissivePermissions()
+        {
+            var permissions = "read=acc1@gmail.com,acc2@gmail.com;write=acc1@gmail.com";
+            var result = PermissionConverter.ParsePermissions(permissions);
+
+            Assert.That(result.ContainsKey("acc1@gmail.com"),Is.True);
+            Assert.That(result["acc1@gmail.com"], Is.EqualTo("write"));
+            
+            Assert.That(result.ContainsKey("acc2@gmail.com"),Is.True);
+            Assert.That(result["acc2@gmail.com"], Is.EqualTo("read"));
+        }
+
+        [Test]
+        public void TestReadPermissions()
+        {
+            var permissions = "read=acc1@gmail.com";
+            var result = PermissionConverter.ParsePermissions(permissions);
+
+            Assert.That(result.ContainsKey("acc1@gmail.com"),Is.True);
+            Assert.That(result["acc1@gmail.com"], Is.EqualTo("read"));
+        }
+
+        [Test]
+        public void TestMultipleReadPermissions()
+        {
+            var permissions = "read=acc1@gmail.com,acc2@gmail.com";
+            var result = PermissionConverter.ParsePermissions(permissions);
+
+            Assert.That(result.ContainsKey("acc1@gmail.com"),Is.True);
+            Assert.That(result["acc1@gmail.com"], Is.EqualTo("read"));
+            Assert.That(result.ContainsKey("acc2@gmail.com"),Is.True);
+            Assert.That(result["acc2@gmail.com"], Is.EqualTo("read"));
+        }
+
+        [Test]
+        public void TestMixedPermissions()
+        {
+            var permissions = "read=acc1@gmail.com,acc2@gmail.com;write=acc3@gmail.com";
+            var result = PermissionConverter.ParsePermissions(permissions);
+
+            Assert.That(result.ContainsKey("acc1@gmail.com"),Is.True);
+            Assert.That(result["acc1@gmail.com"], Is.EqualTo("read"));
+            Assert.That(result.ContainsKey("acc2@gmail.com"),Is.True);
+            Assert.That(result["acc2@gmail.com"], Is.EqualTo("read"));
+            Assert.That(result.ContainsKey("acc3@gmail.com"),Is.True);
+            Assert.That(result["acc3@gmail.com"], Is.EqualTo("write"));
+        }
+
+        [Test]
+        public void TestMixedPermissionsSeparated()
+        {
+            var permissions = "read=acc1@gmail.com;read=acc2@gmail.com;write=acc3@gmail.com;write=acc3@gmail.com";
+            var result = PermissionConverter.ParsePermissions(permissions);
+
+            Assert.That(result.ContainsKey("acc1@gmail.com"),Is.True);
+            Assert.That(result["acc1@gmail.com"], Is.EqualTo("read"));
+            Assert.That(result.ContainsKey("acc2@gmail.com"),Is.True);
+            Assert.That(result["acc2@gmail.com"], Is.EqualTo("read"));
+            Assert.That(result.ContainsKey("acc3@gmail.com"),Is.True);
+            Assert.That(result["acc3@gmail.com"], Is.EqualTo("write"));
+        }
+
+        [Test]
+        public void TestWritePermissions()
+        {
+            var permissions = "write=acc1@gmail.com";
+            var result = PermissionConverter.ParsePermissions(permissions);
+
+            Assert.That(result.ContainsKey("acc1@gmail.com"),Is.True);
+            Assert.That(result["acc1@gmail.com"], Is.EqualTo("write"));
+        }
+    }
+}
diff --git a/trunk/Pithos.Interfaces.Test/Pithos.Interfaces.Test.csproj b/trunk/Pithos.Interfaces.Test/Pithos.Interfaces.Test.csproj
new file mode 100644 (file)
index 0000000..0ec9c47
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{881F7260-CA40-40FD-AEEC-860B346DC2DC}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Pithos.Interfaces.Test</RootNamespace>
+    <AssemblyName>Pithos.Interfaces.Test</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="nunit.framework">
+      <HintPath>..\packages\NUnit.2.5.10.11092\lib\nunit.framework.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="PermissionConverterTEst.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Libraries\Json40r2\Source\Src\Newtonsoft.Json\Newtonsoft.Json.csproj">
+      <Project>{A9AE40FF-1A21-414A-9FE7-3BE13644CC6D}</Project>
+      <Name>Newtonsoft.Json</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Pithos.Interfaces\Pithos.Interfaces.csproj">
+      <Project>{7EEFF32F-CCF8-436A-9E0B-F40434C09AF4}</Project>
+      <Name>Pithos.Interfaces</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file
diff --git a/trunk/Pithos.Interfaces.Test/Properties/AssemblyInfo.cs b/trunk/Pithos.Interfaces.Test/Properties/AssemblyInfo.cs
new file mode 100644 (file)
index 0000000..60aba5b
--- /dev/null
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Pithos.Interfaces.Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP")]
+[assembly: AssemblyProduct("Pithos.Interfaces.Test")]
+[assembly: AssemblyCopyright("Copyright © HP 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("9269d61d-a427-4c00-864e-f73886584a6e")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]