Skip to content

Commit

Permalink
adding license to source code
Browse files Browse the repository at this point in the history
git-svn-id: http://solrnet.googlecode.com/svn/trunk@171 66c3f25c-543c-0410-ae2e-6f2ca0bd8c61
  • Loading branch information
mausch committed Jan 29, 2009
1 parent 5f269a6 commit 3502853
Show file tree
Hide file tree
Showing 130 changed files with 2,221 additions and 34 deletions.
18 changes: 17 additions & 1 deletion Castle.Facilities.SolrNetIntegration.Tests/Tests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
using System;
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using Castle.Core.Configuration;
using Castle.MicroKernel.Facilities;
using Castle.MicroKernel.SubSystems.Configuration;
Expand Down
18 changes: 17 additions & 1 deletion Castle.Facilities.SolrNetIntegration/SolrNetFacility.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
using System;
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using Castle.MicroKernel.Facilities;
using Castle.MicroKernel.Registration;
using SolrNet;
Expand Down
16 changes: 16 additions & 0 deletions HttpWebAdapters/IHttpWebRequest.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.IO;
using System.Net;
Expand Down
16 changes: 16 additions & 0 deletions HttpWebAdapters/IHttpWebRequestFactory.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;

namespace HttpWebAdapters {
Expand Down
16 changes: 16 additions & 0 deletions HttpWebAdapters/IHttpWebResponse.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.IO;
using System.Net;
Expand Down
16 changes: 16 additions & 0 deletions HttpWebAdapters/Impl/HttpWebRequestAdapter.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.IO;
using System.Net;
Expand Down
16 changes: 16 additions & 0 deletions HttpWebAdapters/Impl/HttpWebRequestFactory.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.Net;
using HttpWebAdapters.Adapters;
Expand Down
16 changes: 16 additions & 0 deletions HttpWebAdapters/Impl/HttpWebRequestMethod.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

namespace HttpWebAdapters {
public class HttpWebRequestMethod {
private string method;
Expand Down
16 changes: 16 additions & 0 deletions HttpWebAdapters/Impl/HttpWebResponseAdapter.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.IO;
using System.Net;
Expand Down
16 changes: 16 additions & 0 deletions HttpWebAdapters/WebResponseStub.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.Net;

Expand Down
74 changes: 74 additions & 0 deletions InsertLicenseTask.boo
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#region license
// Copyright (c) 2004, Rodrigo B. de Oliveira ([email protected])
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of Rodrigo B. de Oliveira nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
"""
Makes sure that every file in the fileset starts
with the license notice.
"""
import System.Diagnostics
import System.Collections.Generic
import System.IO

class InsertLicenseTask:

_license as string

License:
get:
return _license
set:
_license = value

def ExecuteTask():
licenseText = File.ReadAllText(_license)
for fname in GetFiles("."):
InsertLicense(fname, licenseText) if GetFirstLine(fname) != "#region license"

def InsertLicense(fname as string, license as string):
print "Processing: ${fname}"
contents = File.ReadAllText(fname)
using writer=StreamWriter(fname, false, System.Text.Encoding.UTF8):
writer.WriteLine(license)
writer.WriteLine()
writer.Write(contents)

def GetFirstLine(fname as string):
using f=File.OpenText(fname):
return f.ReadLine()


def GetFiles(dir as string) as IEnumerable of string:
exts = ("*.cs", "*.boo")
for ext in exts:
for file in Directory.GetFiles(dir, ext):
yield file

for subDir in Directory.GetDirectories(dir):
for fname as string in GetFiles(subDir):
yield fname

InsertLicenseTask(License: "notice.txt").ExecuteTask()
16 changes: 16 additions & 0 deletions SolrNet.DSL.Tests/DSLTests.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System;
using System.Collections.Generic;
using NUnit.Framework;
Expand Down
18 changes: 17 additions & 1 deletion SolrNet.DSL/DSLFacetFieldOptions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
using System.Collections.Generic;
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

using System.Collections.Generic;

namespace SolrNet.DSL {
public class DSLFacetFieldOptions<T> : DSLRun<T>, IDSLFacetFieldOptions<T> where T : new() {
Expand Down
16 changes: 16 additions & 0 deletions SolrNet.DSL/DSLQuery.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

namespace SolrNet.DSL {
public class DSLQuery<T> : DSLRun<T>, IDSLQuery<T> where T : new() {
public DSLQuery(ISolrConnection connection) : base(connection) {}
Expand Down
16 changes: 16 additions & 0 deletions SolrNet.DSL/DSLQueryBetween.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

namespace SolrNet.DSL {
public class DSLQueryBetween<T, RT> : IDSLQueryBetween<T, RT> where T : new() {
private readonly string fieldName;
Expand Down
16 changes: 16 additions & 0 deletions SolrNet.DSL/DSLQueryBy.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
#region license
// Copyright (c) 2007-2009 Mauricio Scheffer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

namespace SolrNet.DSL {
public class DSLQueryBy<T> : IDSLQueryBy<T> where T : new() {
private readonly string fieldName;
Expand Down
Loading

0 comments on commit 3502853

Please sign in to comment.