Skip to content

Commit e01f1fa

Browse files
Merge pull request ReactiveX#6 from benjchristensen/refactoring
Refactoring
2 parents 41fef2b + d102203 commit e01f1fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+573
-342
lines changed

language-adaptors/rxjava-clojure/src/main/java/org/rx/lang/clojure/ClojureAdaptor.java renamed to language-adaptors/rxjava-clojure/src/main/java/rx/lang/clojure/ClojureAdaptor.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.rx.lang.clojure;
16+
package rx.lang.clojure;
1717

1818
import java.util.Arrays;
1919

2020
import org.junit.Before;
2121
import org.junit.Test;
2222
import org.mockito.Mock;
2323
import org.mockito.MockitoAnnotations;
24-
import org.rx.functions.FunctionLanguageAdaptor;
25-
import org.rx.reactive.Observer;
24+
25+
import rx.observables.Observer;
26+
import rx.util.FunctionLanguageAdaptor;
2627

2728
import clojure.lang.IFn;
2829
import clojure.lang.RT;
@@ -99,7 +100,7 @@ public void before() {
99100

100101
@Test
101102
public void testTake() {
102-
runClojureScript("(-> (org.rx.reactive.Observable/toObservable [\"one\" \"two\" \"three\"]) (.take 2) (.subscribe (fn [arg] (println arg))))");
103+
runClojureScript("(-> (rx.observables.Observable/toObservable [\"one\" \"two\" \"three\"]) (.take 2) (.subscribe (fn [arg] (println arg))))");
103104
}
104105

105106
// commented out for now as I can't figure out how to set the var 'a' with the 'assertion' instance when running the code from java

language-adaptors/rxjava-groovy/src/main/java/org/rx/lang/groovy/GroovyAdaptor.java renamed to language-adaptors/rxjava-groovy/src/main/java/rx/lang/groovy/GroovyAdaptor.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.rx.lang.groovy;
16+
package rx.lang.groovy;
1717

1818
import static org.mockito.Matchers.*;
1919
import static org.mockito.Mockito.*;
@@ -28,11 +28,12 @@
2828
import org.junit.Test;
2929
import org.mockito.Mock;
3030
import org.mockito.MockitoAnnotations;
31-
import org.rx.functions.FunctionLanguageAdaptor;
32-
import org.rx.reactive.Notification;
33-
import org.rx.reactive.Observable;
34-
import org.rx.reactive.Observer;
35-
import org.rx.reactive.Subscription;
31+
32+
import rx.observables.Notification;
33+
import rx.observables.Observable;
34+
import rx.observables.Observer;
35+
import rx.observables.Subscription;
36+
import rx.util.FunctionLanguageAdaptor;
3637

3738
public class GroovyAdaptor implements FunctionLanguageAdaptor {
3839

@@ -208,7 +209,7 @@ private void runGroovyScript(String script) {
208209
Binding binding = new Binding();
209210
binding.setVariable("mockApiCall", new TestFactory());
210211
binding.setVariable("a", assertion);
211-
binding.setVariable("o", org.rx.reactive.Observable.class);
212+
binding.setVariable("o", rx.observables.Observable.class);
212213

213214
/* parse the script and execute it */
214215
InvokerHelper.createScript(loader.parseClass(script), binding).run();

language-adaptors/rxjava-jruby/src/main/java/org/rx/lang/jruby/JRubyAdaptor.java renamed to language-adaptors/rxjava-jruby/src/main/java/rx/lang/jruby/JRubyAdaptor.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.rx.lang.jruby;
16+
package rx.lang.jruby;
1717

1818
import static org.mockito.Matchers.*;
1919
import static org.mockito.Mockito.*;
@@ -29,11 +29,12 @@
2929
import org.junit.Test;
3030
import org.mockito.Mock;
3131
import org.mockito.MockitoAnnotations;
32-
import org.rx.functions.FunctionLanguageAdaptor;
33-
import org.rx.reactive.Notification;
34-
import org.rx.reactive.Observable;
35-
import org.rx.reactive.Observer;
36-
import org.rx.reactive.Subscription;
32+
33+
import rx.observables.Notification;
34+
import rx.observables.Observable;
35+
import rx.observables.Observer;
36+
import rx.observables.Subscription;
37+
import rx.util.FunctionLanguageAdaptor;
3738

3839
public class JRubyAdaptor implements FunctionLanguageAdaptor {
3940

@@ -162,7 +163,7 @@ private void runGroovyScript(String script) {
162163

163164
StringBuilder b = new StringBuilder();
164165
// force JRuby to always use subscribe(Object)
165-
b.append("import org.rx.reactive.Observable").append("\n");
166+
b.append("import \"rx.observables.Observable\"").append("\n");
166167
b.append("class Observable").append("\n");
167168
b.append(" java_alias :subscribe, :subscribe, [java.lang.Object]").append("\n");
168169
b.append("end").append("\n");

rxjava-core/src/main/java/org/rx/reactive/package.html

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright 2013 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
/**
17+
* Rx Schedulers
18+
*/
19+
package rx.concurrency;

rxjava-core/src/main/java/org/rx/reactive/CompositeException.java renamed to rxjava-core/src/main/java/rx/observables/CompositeException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.rx.reactive;
16+
package rx.observables;
1717

1818
import java.util.ArrayList;
1919
import java.util.Collection;

rxjava-core/src/main/java/org/rx/reactive/Notification.java renamed to rxjava-core/src/main/java/rx/observables/Notification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.rx.reactive;
16+
package rx.observables;
1717

1818
/**
1919
* An object representing a notification sent to a Observable.

0 commit comments

Comments
 (0)