Skip to content

Commit

Permalink
Merge pull request #44 from electricimp/develop
Browse files Browse the repository at this point in the history
Develop -> Master for 3.0.1
  • Loading branch information
ElectricImpSampleCode authored Jan 15, 2021
2 parents fde8d49 + 00f8e48 commit 04255f4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2015-19 Electric Imp
Copyright (c) 2015-20 Electric Imp
Copyright (c) 2021 Twilio

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Rocky 3.0.0 #
# Rocky 3.0.1 #

Rocky is an framework for building powerful and scalable APIs for your imp-powered products.

Expand Down Expand Up @@ -59,7 +59,7 @@ The Rocky library consists of the following components:

## Rocky Usage ##

Rocky 3.0.0 is implemented as a table to enforce singleton behavior. You code should no longer instantiate Rocky using a constructor call, but instead call the new *init()* method to initialize the library.
Rocky 3.0.0 and up is implemented as a table to enforce singleton behavior. You code should no longer instantiate Rocky using a constructor call, but instead call the new *init()* method to initialize the library.

All of Rocky’s methods are accessible as before, and return the same values. *init()* returns a reference to the Rocky singleton. There is no longer a distinction between class and instance methods: all of Rocky’s methods can be called on Rocky itself, or an alias variables, as these reference the same table:

Expand Down Expand Up @@ -105,7 +105,7 @@ A table containing any of the following keys may be passed into *init()* to modi
#### Example ####

```squirrel
#require "rocky.agent.lib.nut:3.0.0"
#require "rocky.agent.lib.nut:3.0.1"
local settings = { "timeout": 30 };
app <- Rocky.init(settings);
Expand Down
9 changes: 5 additions & 4 deletions Rocky.agent.lib.nut
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ enum ROCKY_ERROR {
/**
* This class allows you to define and operate an agent-served API.
*
* @copyright Electric Imp, Inc. 2015-19
* @copyright 2015-19 Electric Imp
* @copyright 2020-21 Twilio
* @license MIT
*
* @table
*
*/
Rocky <- {

"VERSION": "3.0.0",
"VERSION": "3.0.1",

// ------------------ PRIVATE PROPERTIES ------------------//

Expand Down Expand Up @@ -47,7 +48,7 @@ Rocky <- {
_setDefaults();

// Initialize settings, checking values as appropriate
if ("timeout" in settings && typeof settings.timeout == "bool") _timeout = settings.timeout;
if ("timeout" in settings && (typeof settings.timeout == "integer" || typeof settings.timeout == "float")) _timeout = settings.timeout;
if ("allowUnsecure" in settings && typeof settings.allowUnsecure == "bool") _allowUnsecure = settings.allowUnsecure;
if ("strictRouting" in settings && typeof settings.strictRouting == "bool") _strictRouting = settings.strictRouting;
if ("accessControl" in settings && typeof settings.accessControl == "bool") _accessControl = settings.accessControl;
Expand Down Expand Up @@ -1100,4 +1101,4 @@ class Rocky.Context {
sent = true;
}

}
}

0 comments on commit 04255f4

Please sign in to comment.