Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

prepare 1.0.0-beta16 release #11

Merged
merged 112 commits into from
Apr 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
e116f46
Remove old circle.yml file
ashanbrown Jul 11, 2018
a03fa0d
Send back flagVersion in events when it is present (#5)
ashanbrown Jul 12, 2018
56165a0
Send default feature flag event when flag.value is null (#6)
ashanbrown Jul 13, 2018
d0ca44e
Create License.txt
ashanbrown Jul 13, 2018
2644d7f
Add test that we return default value for off variation (#7)
ashanbrown Jul 13, 2018
7fdf036
misc cleanup of project files
eli-darkly Jul 13, 2018
8924b5c
rm usage that won't work in older target frameworks
eli-darkly Jul 13, 2018
24b9809
Merge pull request #8 from launchdarkly/eb/cleanup
eli-darkly Jul 13, 2018
b3287b6
version 1.0.0-beta8
eli-darkly Jul 13, 2018
dcc7f9f
version 1.0.0-beta9
eli-darkly Jul 13, 2018
c2f674a
clean up unnecessary static references and make tests stable
eli-darkly Jul 17, 2018
b64cd58
Merge pull request #9 from launchdarkly/eb/static-instance-cleanup
eli-darkly Jul 18, 2018
27c0a39
break out and simplify basic flag evaluation tests
eli-darkly Jul 18, 2018
e4f6109
get rid of test fixture files
eli-darkly Jul 18, 2018
5ef9ea2
fix default value logic
eli-darkly Jul 18, 2018
0fc8c34
Merge pull request #10 from launchdarkly/eb/evaluation-tests
eli-darkly Jul 18, 2018
c43c4bb
add tests for event generation
eli-darkly Jul 18, 2018
5ed0280
Merge pull request #11 from launchdarkly/eb/event-tests
eli-darkly Jul 18, 2018
537886f
throw exception if user is null; assign unique key if key is null or …
eli-darkly Jul 19, 2018
c59ce16
Merge pull request #12 from launchdarkly/eb/ch20411/null-user
eli-darkly Jul 19, 2018
8d299c7
don't use strong naming for LaunchDarkly.Xamarin
eli-darkly Jul 23, 2018
df9e61e
skip connectivity check in .NET Standard
eli-darkly Jul 23, 2018
3e4f4e1
fix name of config setter
eli-darkly Jul 23, 2018
fb5621a
use platform reference instead of package reference
eli-darkly Jul 23, 2018
52bc60a
skip using preferences API in .NET Standard
eli-darkly Jul 23, 2018
a9d5167
beta11
eli-darkly Jul 23, 2018
fca4ca0
fix test
eli-darkly Jul 23, 2018
a8ffc36
rm note about signing
eli-darkly Jul 23, 2018
f5fd89d
Merge branch 'eb/ch20841/no-strong-name' into eb/misc-fixes
eli-darkly Jul 23, 2018
d32bdf6
don't set updateProcessor to null
eli-darkly Jul 23, 2018
23c94c1
more cleanup/simplification of test code
eli-darkly Jul 23, 2018
c0cd164
make timeout a parameter instead of a config property
eli-darkly Jul 23, 2018
5305820
Remove @ashanbrown from codeowners
ashanbrown Jul 23, 2018
15b7052
Merge branch 'eb/test-cleanup' into eb/ch20546/timeout-param
eli-darkly Jul 24, 2018
77816f2
propagate exception if polling task fails permanently
eli-darkly Jul 24, 2018
7bd3af3
Merge pull request #13 from launchdarkly/eb/ch20841/no-strong-name
eli-darkly Jul 24, 2018
9815b7a
Merge pull request #14 from launchdarkly/eb/misc-fixes
eli-darkly Jul 24, 2018
f835bd4
Merge pull request #15 from launchdarkly/eb/test-cleanup
eli-darkly Jul 24, 2018
05ae673
validate maxWaitTime
eli-darkly Jul 24, 2018
f2ac11e
send an initial identify event when client is created
eli-darkly Jul 24, 2018
70abf94
Merge branch 'master' into eb/ch20546/timeout-param
eli-darkly Jul 24, 2018
6e1f386
Merge branch 'eb/ch20546/timeout-param' into eb/ch20906/first-identif…
eli-darkly Jul 24, 2018
2b43a05
Merge branch 'eb/ch20546/timeout-param' into eb/ch20545/init-errors
eli-darkly Jul 24, 2018
f9e3289
Merge pull request #16 from launchdarkly/eb/ch20546/timeout-param
eli-darkly Jul 24, 2018
4243a00
Merge pull request #17 from launchdarkly/eb/ch20545/init-errors
eli-darkly Jul 24, 2018
2770185
Merge branch 'master' into eb/ch20906/first-identify-event
eli-darkly Jul 24, 2018
f963743
Merge pull request #18 from launchdarkly/eb/ch20906/first-identify-event
eli-darkly Jul 24, 2018
3f2d0c0
misc project file & test cleanup
eli-darkly Jul 25, 2018
a25b8cc
beta12 release (fixes System.Runtime reference problem in LD.Common)
eli-darkly Jul 27, 2018
17b7585
provide callback mechanism for backgrounding
eli-darkly Jul 27, 2018
d7bc235
don't try to restart the update processor in background unless backgr…
eli-darkly Jul 27, 2018
7c023e2
always initialize platform adapter
eli-darkly Jul 27, 2018
a7376c0
doc comment typo
eli-darkly Jul 28, 2018
0de1c94
doc comment typo
eli-darkly Jul 28, 2018
a97dd0d
fix hang in synchronous Identify
eli-darkly Jul 30, 2018
d631156
rm debugging
eli-darkly Jul 30, 2018
44daaf5
Merge pull request #20 from launchdarkly/eb/ch21044/identify-hanging
eli-darkly Jul 30, 2018
7961435
Merge branch 'master' into eb/ch20389/backgrounding-interface
eli-darkly Jul 30, 2018
b8da2e0
need to pass polling interval to adapter
eli-darkly Jul 30, 2018
bb76380
fix method parameter
eli-darkly Jul 30, 2018
d6cd177
Merge pull request #19 from launchdarkly/eb/ch20389/backgrounding-int…
eli-darkly Jul 30, 2018
3342490
version 1.0.0-beta13
eli-darkly Jul 30, 2018
7a03409
don't allow null/empty mobile key
eli-darkly Jul 31, 2018
16ebef0
Merge pull request #21 from launchdarkly/eb/ch20409/missing-key
eli-darkly Jul 31, 2018
f73aaa6
make polling intervals consistent with other mobile SDKs
eli-darkly Jul 31, 2018
281502e
Merge pull request #22 from launchdarkly/eb/ch21362/polling-intervals
eli-darkly Jul 31, 2018
08e08f7
bump LD.Common to 1.0.5 to get fix for reconnection delay
eli-darkly Aug 14, 2018
3574e2f
Merge pull request #23 from launchdarkly/eb/ch21070/stream-reconnect
eli-darkly Aug 14, 2018
0b66a68
1.0.0-beta14
eli-darkly Aug 14, 2018
63ed5ba
fix sample code
eli-darkly Sep 10, 2018
aa1c3c3
Merge branch 'master' of github.com:launchdarkly/xamarin-client
eli-darkly Sep 10, 2018
3c9712d
use LaunchDarkly.Common 1.1.1
eli-darkly Sep 10, 2018
c266105
use Xamarin.Essentials 0.10.0-preview
eli-darkly Sep 10, 2018
65e2bdc
version 1.0.0-beta15
eli-darkly Sep 10, 2018
7faafbe
feat(src/): Removed Xamarin.Essentials and added necessary classes to…
Mar 5, 2019
3d015eb
feat(README, LdClient.cs): Implemented Initialized(), removed python …
Mar 5, 2019
95d4e15
feat(src/): Added BackgroundAdapter/, changed conditional compilation…
Mar 5, 2019
791531c
fix(src/): AssemblyInfo wasn't compiling, removed unnecessary public key
Mar 6, 2019
18ea6f8
fix(LdClient.shared.cs): Fixed unit tests by catching NotImplementedE…
Mar 6, 2019
40fa909
implement evaluation reasons
eli-darkly Mar 13, 2019
fcc5429
Merge pull request #27 from launchdarkly/eb/ch33726/eval-reasons
eli-darkly Mar 13, 2019
a1f08ca
always dispose of CancellationTokenSource
eli-darkly Mar 13, 2019
a6b332c
Merge commit '908b54b24d14c523dd7ffe24a287a4e755abb896'
eli-darkly Mar 13, 2019
bc6427e
Merge pull request #28 from launchdarkly/eb/ch33693/dispose-token
eli-darkly Mar 14, 2019
a23efce
feat(./): removed Xamarin.Essentials, build succeeds for all platform…
Mar 18, 2019
2b5faf0
feat(MobilePollingProcessor.shared.cs, LdClient.shared.cs, Background…
Mar 19, 2019
d468886
feat(BackgroundAdapter.ios.cs): iOS foreground and background polling…
Mar 19, 2019
b26a8ce
feat(src/): changed xamarin essentials code to internal
Mar 20, 2019
158e710
fix(LDAndroidTests.cs, LDiOSTests.cs, AndroidManifest.xml, packages.c…
Mar 21, 2019
e972215
feat(src/, LDAndroiTests.cs, LDiOSTests.cs): added additional platfor…
Mar 22, 2019
6fde159
Merge branch 'master' into jc/ch32871/rm-essentials
eli-darkly Mar 22, 2019
137aa41
fix merge
eli-darkly Mar 22, 2019
7099e76
fix(LdClient.shared.cs, Factory.shared.cs, Configuration.shared.cs): …
Mar 25, 2019
e39b904
fix(./): merge conflicts
Mar 25, 2019
330a711
feat(Factory.shared.cs, IBackgroundingState.shared.cs, LdClient.share…
Mar 25, 2019
de6b1b7
fix(LdClient.shared.cs): forgot an argument to RestartUpdateProcessor…
torchhound Mar 25, 2019
f8a3839
fix(MobileStreamingProcessorTests.cs): added additional timespan argu…
torchhound Mar 25, 2019
d9796f4
fix(LaunchDarkly.Xamarin.Android.Tests.csproj): removed unnecessary A…
torchhound Mar 25, 2019
ffccf37
ensure that LdClient instances are always cleaned up in tests
eli-darkly Mar 25, 2019
ee940e3
Bump LD Common to beta4
torchhound Mar 26, 2019
420c6b2
Fixed dotnet restore errors, forgot to bump LD Common beta4 in tests
torchhound Mar 26, 2019
c8b23ae
Merge branch 'eb/ch34904/ci-tests' into jc/ch32871/rm-essentials
eli-darkly Mar 26, 2019
eae5ec6
Merge pull request #29 from launchdarkly/jc/ch32871/rm-essentials
eli-darkly Mar 26, 2019
27c66ed
Add "os" and "device" attributes to user
eli-darkly Mar 27, 2019
59191cd
create package during build + update dependency versions
eli-darkly Mar 27, 2019
b1274fa
fix dependency version
eli-darkly Mar 27, 2019
94a39af
fix unstable test state
eli-darkly Mar 28, 2019
3986efd
Merge pull request #30 from launchdarkly/eb/ch22803/os-device
eli-darkly Mar 29, 2019
911cdba
Merge pull request #31 from launchdarkly/eb/ch35143/packaging
eli-darkly Mar 29, 2019
eab476d
prepare 1.0.0-beta16 release
eli-darkly Apr 5, 2019
5a95f98
edit compatibility note
eli-darkly Apr 5, 2019
c135eb5
fix readme numbering
eli-darkly Apr 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions LaunchDarkly.Xamarin.Android.Tests/LDAndroidTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
using System;
using NUnit.Framework;
using Newtonsoft.Json.Linq;

namespace LaunchDarkly.Xamarin.Android.Tests
{
[TestFixture]
public class LDAndroidTests
{
private ILdMobileClient client;

[SetUp]
public void Setup()
{
var user = LaunchDarkly.Client.User.WithKey("test-user");
var timeSpan = TimeSpan.FromSeconds(10);
client = LdClient.Init("MOBILE_KEY", user, timeSpan);
}

[TearDown]
public void Tear() { LdClient.Instance = null; }

[Test]
public void BooleanFeatureFlag()
{
Console.WriteLine("Test Boolean Variation");
Assert.True(client.BoolVariation("boolean-feature-flag"));
}

[Test]
public void IntFeatureFlag()
{
Console.WriteLine("Test Integer Variation");
Assert.True(client.IntVariation("int-feature-flag") == 2);
}

[Test]
public void StringFeatureFlag()
{
Console.WriteLine("Test String Variation");
Assert.True(client.StringVariation("string-feature-flag", "false").Equals("bravo"));
}

[Test]
public void JsonFeatureFlag()
{
string json = @"{
""test2"": ""testing2""
}";
Console.WriteLine("Test JSON Variation");
JToken jsonToken = JToken.FromObject(JObject.Parse(json));
Assert.True(JToken.DeepEquals(jsonToken, client.JsonVariation("json-feature-flag", "false")));
}

[Test]
public void FloatFeatureFlag()
{
Console.WriteLine("Test Float Variation");
Assert.True(client.FloatVariation("float-feature-flag") == 1.5);
}
}
}

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions LaunchDarkly.Xamarin.Android.Tests/MainActivity.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System.Reflection;

using Android.App;
using Android.OS;
using Xamarin.Android.NUnitLite;

namespace LaunchDarkly.Xamarin.Android.Tests
{
[Activity(Label = "LaunchDarkly.Xamarin.Android.Tests", MainLauncher = true)]
public class MainActivity : TestSuiteActivity
{
protected override void OnCreate(Bundle bundle)
{
// tests can be inside the main assembly
AddTest(Assembly.GetExecutingAssembly());
// or in any reference assemblies
// AddTest (typeof (Your.Library.TestClass).Assembly);

// Once you called base.OnCreate(), you cannot add more assemblies.
base.OnCreate(bundle);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="LaunchDarkly.Xamarin.Android.Tests">
<uses-sdk />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:label="LaunchDarkly.Xamarin.Android.Tests"></application>
</manifest>
27 changes: 27 additions & 0 deletions LaunchDarkly.Xamarin.Android.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Android.App;

// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.

[assembly: AssemblyTitle("LaunchDarkly.Xamarin.Android.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("${AuthorCopyright}")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("1.0.0")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.

//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
44 changes: 44 additions & 0 deletions LaunchDarkly.Xamarin.Android.Tests/Resources/AboutResources.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.

For example, a sample Android app that contains a user interface layout (main.axml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:

Resources/
drawable/
icon.png

layout/
main.axml

values/
strings.xml

In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called "R"
(this is an Android convention) that contains the tokens for each one of the resources
included. For example, for the above Resources layout, this is what the R class would expose:

public class R {
public class drawable {
public const int icon = 0x123;
}

public class layout {
public const int main = 0x456;
}

public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}

You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.axml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.
Loading