Skip to content

Commit

Permalink
Merge branch 'master' into ws
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG.markdown
	Makefile
	rel/overlay/yaws/etc/yaws.conf
  • Loading branch information
choptastic committed Jun 11, 2014
2 parents 40bfe7e + 2e6bfed commit 1679f9e
Show file tree
Hide file tree
Showing 14 changed files with 121 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ coverage
.hgignore
*.beam
rel/nitrogen
deps/
TAGS
builds
Quickstart/static/nitrogen
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: erlang
script: "make travis"
otp_release:
- R16B02
- R16B01
- R16B
- R15B02
- R15B01
Expand Down
50 changes: 45 additions & 5 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -1,10 +1,48 @@
# Nitrogen 2.x

## Nitrogen 2.3 (In development)

* Upgrade to Simple Bridge 2.0.0

## Nitrogen 2.2.2 (In development)
## Nitrogen 2.3.0 (in development)

* Upgrade to SimpleBridge 2.0 **(in progress)**:
+ Eliminate platform-specific code in Nitrogen, relying completely on
SimpleBridge for setting up underlying server.
+ Add websockets as an alternative connection mode for `wf:comet` and its
siblings as well as, if available, used in place of ajax for postbacks.
* Add `#sync_panel` element, which allows for simple real-time content
synchronization.
* Add `#qr` element for simple QR code generation.
* Add `html_id` and `title` attributes to all elements, corresponding with the
HTML `id` and `title` attributes (@fooflare)
* Normalize the `next` attribute on input elements to use tab instead of enter,
and also add `next` to elements where it was previously missing (with help
from Stuart Thackray)
* Allow validation to be applied to `#radiogroup` element.
* Add `trap_tabs` attribute to `#textarea` to allow user to specify if the tab
key should move focus to the next element (default behavior) or insert a tab
into the textarea.
* Add `wf:to_qs/1` function for converting a proplist of elements into a
URL-encoded querystring.
* Add `wf:protocol/0` function to retrieve the protocol used (http or https)
* Add `wf:url/0` function to get the full request path, including protocol and
host name.
* Add a helper script for fixing a Nitrogen slim release if the version of
Erlang installed on the machine and the version of Erlang the slim release
* Updated `wf:html_encode` to be more flexible (preventing crashes when a user
accidentally puts tuples, records, or anything else in an element's `text`
field). Also added some tests for `html_encode`. (First of many?)
depends on are different.
* Add `body` to `#radio` and `#restful_submit` (Stuart Thackray)
* Add `button_class` to `#recaptcha{}` (Stuary Thackray)
* Add minified versions of included javascript versions as well as non-minified
versions.
* Fix rendering bug in `#upload` when it would start hidden by CSS.
* Fix issue with POST size in Yaws (Steve Vinoski)
* Updated to work with Erlang/OTP 17.0
* Fix the use of wf:qs/1 with `#dropdown{multiple=true}`
* Improve a handful of error messages (comet pool unexpected death and action
module failing to load).
* Fix default configuration for Yaws to allow larger POST values

## Nitrogen 2.2.2

* Fix an infinite loop bug in `#mobile_grid`.
* Plugins now support more OTP-compliant static directory structure with
Expand All @@ -13,6 +51,8 @@
`template_dir` option to plugins.config
* Modify `#checkbox` to render the HTML checkbox inside its associated label
for better semantics.
* Bugfix for AES pickling when signkey specified is incorrect size for AES.
* Update to SimpleBridge 1.4.0

## Nitrogen 2.2.1

Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

NITROGEN_VERSION=2.2.1
NITROGEN_VERSION=2.2.2

help:
@echo
Expand Down Expand Up @@ -156,7 +156,7 @@ package_yaws_win:
## TODO: simplify further by adding a $(MODE) argument to be used in place of rel_inner_slim and rel_inner_full
slim: compile
@$(MAKE) clean_release
@(cd rel;cp reltool_base.config reltool.config)
@(cd rel; ./add_overlay.escript reltool.config reltool_base.config reltool_slim.config)
@($(MAKE) rel_inner_slim PLATFORM=$(PLATFORM))
@echo Generated a slim-release Nitrogen project
@echo in 'rel/nitrogen', configured to run on $(PLATFORM).
Expand Down Expand Up @@ -221,6 +221,9 @@ R15B03: R15B02
R16B: R15B02
R16B01: R16B
R16B02: R16B
R16B03: R16B
R16B03-1: R16B
17: R16B

# SHARED

Expand Down
5 changes: 5 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ technology stack.
See the [Nitrogen Project website](http://nitrogenproject.com) for
additional information.


## Getting Started

Follow the tutorial at
Expand All @@ -34,6 +35,10 @@ Instructions for building on windows can be found in [rel/overlay/win](https://g

## Want to contribute?

[nitrogen_core](https://github.com/nitrogen/nitrogen_core) is where you would
find the vast majority of Nitrogen's codebase, should you wish to contribute or
make changes.

Read our [contribution
guidelines](https://github.com/nitrogen/nitrogen/blob/master/CONTRIB.markdown)
to get started contributing to Nitrogen! (they're not strict, just
Expand Down
2 changes: 2 additions & 0 deletions THANKS.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Sincere thanks to all the people who have helped make Nitrogen great, including:
+ Boris Resnick
+ Piotr Nosek
+ Stefan Zegenhagen
+ Mehmet Emin Tok
+ Stuart Thackray

Roughly sorted by date of contribution. Send your twitter handles to
[@jessegumm](http://twitter.com/jessevumm)
6 changes: 3 additions & 3 deletions TODO.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

* Look into ErlyDTL integration as alternate templating engine
* Websocket Support, possibly as alternative replacement for comet backends
* Email integration with gen\_smtp and its own handler (mail\_handler?)
* Integrated cache server and using cache\_handler
* Elements that have to render text should throw a better error if passed
nitrogen elements/tuples
* Test suite for `nitrogen_core`, probably using NitrogenProject.com's demos
section as the main test, and integrating it with javascript testing. This
will ensure many of the elements succeed in rendering without crashing.
section combined with the tool Selenium as the main test, and integrating it
with javascript testing. This will ensure many of the elements succeed in
rendering without crashing.

## Elements

Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{sub_dirs, ["rel"]}.

{require_otp_vsn, "R15|R16"}.
{require_otp_vsn, "R15|R16|17"}.

{cover_enabled, true}.

Expand Down
7 changes: 7 additions & 0 deletions rel/overlay/common/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.PHONY: fix-slim-release

all: get-deps plugins compile

cookie:
Expand All @@ -20,6 +22,11 @@ copy-static:
plugins:
@(export PATH=`pwd`/`echo erts-*/bin`:$$PATH;escript do-plugins.escript)

## This is only applicable for slim releases
fix-slim-release:
@echo Fixing slim release to the version of Erlang installed on this machine
@(./fix-slim-release)

DEPS_PLT=$(CURDIR)/.deps_plt
DEPS=erts kernel stdlib sasl nitrogen_core simple_bridge sync nprocreg

Expand Down
2 changes: 1 addition & 1 deletion rel/overlay/common/bin/dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

RUNNER_SCRIPT_DIR=$(cd ${0%/*} && pwd)

Expand Down
6 changes: 3 additions & 3 deletions rel/overlay/rebar.config.src
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"deps"
]}.

{require_otp_vsn, "R15|R16"}.
{require_otp_vsn, "R15|R16|17"}.

{cover_enabled, true}.

Expand All @@ -27,8 +27,8 @@
{sync, ".*", {git, "git://github.com/rustyio/sync", {branch, master}}}

%% Get specific tagged version
%{nitrogen_core, ".*", {git, "git://github.com/nitrogen/nitrogen_core",{tag, "v2.2.1"}}},
%{nitrogen_core, ".*", {git, "git://github.com/nitrogen/nitrogen_core",{tag, "v2.2.2"}}},
%{nprocreg, ".*", {git, "git://github.com/nitrogen/nprocreg", {tag, "v0.2.1"}}},
%{simple_bridge, ".*", {git, "git://github.com/nitrogen/simple_bridge",{tag, "v1.3.0"}}},
%{simple_bridge, ".*", {git, "git://github.com/nitrogen/simple_bridge",{tag, "v1.4.0"}}},
%{sync, ".*", {git, "git://github.com/rustyio/sync", "a8366be73244383c07f9cafe30b72e83f3ad0621"}}
]}.
40 changes: 40 additions & 0 deletions rel/overlay/slim/fix-slim-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash

## SCRIPT TO FIX SLIM RELEASES

## This script is a nasty bit of hackery. Basically, instead of doing any kind
## of analysis, it solves the "erlang version mismatch" between a generated slim
## release and the installed erlang version. Rather than using a scalpel and
## carefully upgrading scripts and regenerating the boot files, it activates
## "HULK SMASH MODE" to solve this problem:

## 1) It removes the releases directory
## 2) it clones nitrogen into /tmp
## 3) it generates a slim_release in /tmp/nitrogen/rel/nitrogen
## 4) It moves the newly generated releases directory into our project's directory

## This is as inelegant as can possibly be done, but it works.


# so we can get back
home=`pwd`

# nasty: clone nitrogen and generate a slim release using the current version
# of erlang so we can just copy the releases directory. A little embarrassingly
# stupid.
mkdir -p /tmp/nitrogen
cd /tmp
git clone git://github.com/nitrogen/nitrogen
cd nitrogen
## The generated release doesn't need anything more, and slim_inets has the
## fewest dependencies to build and fetch (since dependencies don't do anything
## for our releases directory anyway)
make slim_inets

# back to project dir
cd $home
rm -fr releases
mv /tmp/nitrogen/rel/nitrogen/releases .

# clean up
rm -fr /tmp/nitrogen
2 changes: 1 addition & 1 deletion rel/reltool_base.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% vim: ts=4 sw=4 et ft=erlang

{sys, [
{rel, "nitrogen", "2.2.1",
{rel, "nitrogen", "2.2.2",
[
kernel,
stdlib,
Expand Down
5 changes: 5 additions & 0 deletions rel/reltool_slim.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
%% vim: ts=4 sw=4 et ft=erlang
{overlay, [
%% Copy slim-release-specific files
{copy, "./overlay/slim/*"}
]}.

0 comments on commit 1679f9e

Please sign in to comment.