Skip to content
This repository has been archived by the owner on May 21, 2019. It is now read-only.

Commit

Permalink
Merge branch 'release/v0.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
babysnakes committed Sep 11, 2013
2 parents 00978bc + 0830f64 commit 1a329c6
Show file tree
Hide file tree
Showing 20 changed files with 263 additions and 236 deletions.
3 changes: 1 addition & 2 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"directory" : "vendor",
"json" : "config/bower.json"
"directory" : "vendor"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ pom.xml
/vendor/
/resources/
/.emacs.desktop*
.nrepl-port
11 changes: 7 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
distDir: "target/dist",
standaloneJar: "target/production+uberjar/ayler-<%= pkg.version %>-standalone.jar",
standaloneJar: "target/ayler-<%= pkg.version %>-standalone.jar",
distExecutable: "<%= distDir %>/ayler-<%= pkg.version %>",

less: {
Expand Down Expand Up @@ -99,6 +99,10 @@ module.exports = function(grunt) {
unit: {
configFile: "config/karma.conf.js",
background: true
},
once: {
configFile: "config/karma.conf.js",
singleRun: true
}
},

Expand Down Expand Up @@ -145,8 +149,7 @@ module.exports = function(grunt) {
},
uberjar: {
command: [
"export LEIN_SNAPSHOTS_IN_RELEASE=true",
"Lein with-profile production do clean, uberjar"
"lein with-profile production do clean, uberjar"
].join(" && "),
options: {
stdout: true,
Expand Down Expand Up @@ -194,7 +197,7 @@ module.exports = function(grunt) {
}]
},
component: {
src: "config/bower.json",
src: "bower.json",
overwrite: true,
replacements: [{
from: /("version": ").*(",\s*)/,
Expand Down
16 changes: 16 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Project history

### 0.4.2
Features:

* It's now possible to toggle the display of already loaded namespaces
in the *Search all namespaces* window (by default loaded namespaces
are not displayed).
* Display errors in the *Connect to remote host* modal as well as on
the main window.

Fixes:

* Fixed: Namespaces list don't refresh after selecting namespace to
load.
* Updated javascript and clojure dependencies (including the new
`ring-anti-forgery` version (which included my suggestions).

### 0.4.1
Features:

Expand Down
25 changes: 4 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,14 @@ see the [wiki][gwiki].

## Development environment setup

### Custom dependencies
We're using a custom fork of [ring-anti-forgery][]. This fork
currently only exists in github and I couldn't find an elegant way for
including github repositories as dependencies when building production
jar, so currently we require an extra step for installing the fork
locally on your repository. Later it'll either get accepted as pull
request or we'll create a custom fork.

Please run the following in order to install it locally:

```sh
# cd /to/some/directory
# git clone git://github.com/babysnakes/ring-anti-forgery.git
# cd ring-anti-forgery
# git checkout db6d0d9
# lein install
# cd .. && rm -rf ring-anti-forgery
```

### External dependencies
This project relies on external applications to manage different parts
of it's life cycle. You'll need the following applications:

* [Nodejs][node] (currently 0.10.7)
* [Nodejs][node] (currently 0.10.x)
* [phantomjs][pjs] (currently 1.9.x)
* [Leiningen][] - use version 2.3.2 (the output uberjar path differ from
2.2.x).

Once you have these installed run the following:

Expand Down Expand Up @@ -125,5 +108,5 @@ Distributed under the GPLv3 license.
[grunt]: http://gruntjs.com
[clojuredocs]: http://www.clojuredocs.org
[gwiki]: https://github.com/babysnakes/ayler/wiki
[ring-anti-forgery]: https://github.com/weavejester/ring-anti-forgery
[lein-outdated]: https://github.com/ato/lein-outdated
[leiningen]: http://leiningen.org
12 changes: 12 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "ayler",
"version": "0.4.2",
"dependencies": {
"bootstrap": "2.3.2",
"angular": "1.0.8",
"angular-mocks": "1.0.8",
"angular-scenario": "1.0.8",
"underscore": "~1.5.2",
"jquery": "1.10.2"
}
}
11 changes: 0 additions & 11 deletions config/bower.json

This file was deleted.

98 changes: 50 additions & 48 deletions config/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,72 +1,74 @@
// Karma configuration

// base path, that will be used to resolve files and exclude
basePath = '../';
module.exports = function(config) {
config.set({

// base path, that will be used to resolve files and exclude
basePath: '../',

// list of files / patterns to load in the browser
// TODO: fix dependencies list so it'll not repeat the list in grunt.
files = [
JASMINE,
JASMINE_ADAPTER,
"vendor/jquery/jquery.js",
"vendor/underscore/underscore.js",
"vendor/angular/angular.js",
"vendor/bootstrap/docs/assets/js/bootstrap.js",
"vendor/angular-mocks/*.js",
"vendor/highlight.js/highlight.pack.js",
'src/javascript/*.js',
'test/javascript/unit/*.js'
];

// frameworks to use
frameworks: ['jasmine'],

// list of files to exclude
exclude = [
"vendor/angular-*/*.min.js"
];

// list of files / patterns to load in the browser
files: [
"vendor/jquery/jquery.js",
"vendor/underscore/underscore.js",
"vendor/angular/angular.js",
"vendor/bootstrap/docs/assets/js/bootstrap.js",
"vendor/angular-mocks/*.js",
"vendor/highlight.js/highlight.pack.js",
'src/javascript/*.js',
'test/javascript/unit/*.js'
],

// test results reporter to use
// possible values: 'dots', 'progress', 'junit'
reporters = ['progress'];

// list of files to exclude
exclude: [
"vendor/angular-*/*.min.js"
],

// web server port
port = 9876;

// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['progress'],

// cli runner port
runnerPort = 9100;

// web server port
port: 9876,

// enable / disable colors in the output (reporters and logs)
colors = true;

// enable / disable colors in the output (reporters and logs)
colors: true,

// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel = LOG_INFO;

// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,

// enable / disable watching file and executing tests whenever any file changes
autoWatch = true;

// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,

// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers = ['PhantomJS'];

// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],

// If browser does not capture in given timeout [ms], kill it
captureTimeout = 60000;

// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,

// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun = false;

// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false
});
};
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "ayler",
"version": "0.4.1",
"version": "0.4.2",
"description": "Utilities to help during the development of ayler",
"dependencies": {
"bower": "~0.10.0",
"bower": "1.2.*",
"grunt": "~0.4.1",
"grunt-cli": "~0.1.6",
"grunt-contrib-less": "~0.6.0",
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-watch": "~0.4.4",
"grunt-contrib-clean": "~0.4.0",
"grunt-contrib-watch": "~0.5.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-karma": "~0.4.0",
"grunt-shell": "~0.2.1",
"grunt-karma": "~0.6.0",
"grunt-shell": "~0.3.0",
"grunt-text-replace": "~0.3.2",
"grunt-contrib-copy": "~0.4.1"
},
Expand Down
17 changes: 9 additions & 8 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject ayler "0.4.1"
(defproject ayler "0.4.2"
:description "External namespace browswer for clojure projects."
;; :url "http://example.com/FIXME"
:license {:name "GPLv3"
Expand All @@ -9,20 +9,21 @@
[ring/ring-jetty-adapter "1.1.8"]
[compojure "1.1.5"
:exclusions [org.clojure/tools.macro]]
[com.taoensso/timbre "2.1.2"]
[org.clojure/tools.cli "0.2.2"]
[com.taoensso/timbre "2.6.1"]
[org.clojure/tools.cli "0.2.4"]
[ring/ring-json "0.2.0"]
[ring-anti-forgery "0.3.0-SNAPSHOT"]]
[ring-anti-forgery "0.3.0"]]

:source-paths ["src/clojure"]
:test-paths ["test/clojure"]

:profiles {:dev {:source-paths ["src/dev"]
:dependencies [[ring-mock "0.1.5"]
[org.clojure/tools.namespace "0.2.3"]
[org.clojure/java.classpath "0.2.0"]]}
:production {:main ayler.app}}
[org.clojure/tools.namespace "0.2.4"]
[org.clojure/java.classpath "0.2.1"]]}
:production {:main ayler.app
:aot [ayler.app]}}

:main ^{:skip-aot true} ayler.app ; avoid issues with tools.namespace.

:min-lein-version "2.2.0")
:min-lein-version "2.3.2")
8 changes: 4 additions & 4 deletions src/clojure/ayler/api.clj
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@
(-> (construct-varname namespace var)
(queries/query-source)))

(defn- remote-require
(defn- remote-load
[namespace]
(timbre/debug (str "require on remote nrepl: " namespace))
(-> namespace
url-decode
queries/require-namespace))
queries/load-namespace))

(defn- set-remote
[port host]
Expand All @@ -82,8 +82,8 @@
(response (var-doc namespace var)))
(GET "/api/source/:namespace/:var" [namespace var]
(response (var-source namespace var)))
(POST "/api/require/:namespace" [namespace :as request]
(response (remote-require namespace)))
(POST "/api/load/:namespace" [namespace :as request]
(response (remote-load namespace)))
(POST "/api/remote/" [port host :as request] (set-remote port host))
(POST "/api/disconnect/" _ (response (client/disconnect))))

Expand Down
2 changes: 1 addition & 1 deletion src/clojure/ayler/ns_queries.clj
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
(clojure.java.classpath/classpath))))]
(compose-response query value-response-handler)))

(defn require-namespace
(defn load-namespace
"require namespace on remote nrepl"
[namespace]
(compose-response (pr-str `(require (quote ~(symbol namespace))))
Expand Down
2 changes: 1 addition & 1 deletion src/clojure/ayler/version.clj
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(ns ayler.version)

(def version "0.4.1")
(def version "0.4.2")
3 changes: 1 addition & 2 deletions src/clojure/ayler/webapp.clj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@

(def app
(-> app-routes
(wrap-anti-forgery {:access-denied-response access-denied-response
:request-token-extractor token-header-extractor})
(wrap-anti-forgery {:error-response access-denied-response})
handler/site))
Loading

0 comments on commit 1a329c6

Please sign in to comment.