Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

app rebranded to desantapp

  • Loading branch information...
commit 25065b3ab8f3c368fe89c63ba16a004a8c6ad50c 1 parent 1646495
Chris Kowalik authored
Showing with 187 additions and 187 deletions.
  1. +1 −1  .env.sample
  2. +1 −1  .rvmrc
  3. +8 −8 README.md
  4. +3 −3 Vagrantfile
  5. +2 −2 apps/admin/app.rb
  6. +9 −9 apps/admin/assets/app/app.js
  7. +1 −1  apps/admin/assets/app/collections/cities.js
  8. +1 −1  apps/admin/assets/app/collections/countries.js
  9. +1 −1  apps/admin/assets/app/collections/mercator_data.js
  10. +1 −1  apps/admin/assets/app/collections/referers.js
  11. +1 −1  apps/admin/assets/app/collections/signups.js
  12. +3 −3 apps/admin/assets/app/helpers/scrolling.js
  13. +4 −4 apps/admin/assets/app/mixins/default_listing.js
  14. +4 −4 apps/admin/assets/app/mixins/infinite_scroll.js
  15. +1 −1  apps/admin/assets/app/models/session.js
  16. +5 −5 apps/admin/assets/app/setup.js
  17. +1 −1  apps/admin/assets/app/views/ajax_loader_view.js
  18. +2 −2 apps/admin/assets/app/views/chrome_view.js
  19. +1 −1  apps/admin/assets/app/views/listing_counter_view.js
  20. +15 −15 apps/admin/assets/app/views/locations_list_view.js
  21. +3 −3 apps/admin/assets/app/views/locations_map_view.js
  22. +10 −10 apps/admin/assets/app/views/loginform_view.js
  23. +2 −2 apps/admin/assets/app/views/navbar_view.js
  24. +8 −8 apps/admin/assets/app/views/referers_list_view.js
  25. +10 −10 apps/admin/assets/app/views/signups_view.js
  26. +1 −1  apps/admin/forms/login_form.rb
  27. +2 −2 apps/admin/loggers/login_logger.rb
  28. +1 −1  apps/admin/presenters/cities_presenter.rb
  29. +1 −1  apps/admin/presenters/countries_presenter.rb
  30. +1 −1  apps/admin/presenters/latest_signups_presenter.rb
  31. +1 −1  apps/admin/presenters/referers_presenter.rb
  32. +2 −2 apps/admin/spec/forms/login_form_spec.rb
  33. +5 −5 apps/admin/spec/presenters/cities_presenter_spec.rb
  34. +5 −5 apps/admin/spec/presenters/countries_presenter_spec.rb
  35. +4 −4 apps/admin/spec/presenters/latest_signups_presenter_spec.rb
  36. +5 −5 apps/admin/spec/presenters/referer_presenters_spec.rb
  37. +3 −3 apps/admin/views/layout.erb
  38. +2 −2 apps/core/app.rb
  39. +3 −3 apps/core/assets/app/app.js
  40. +1 −1  apps/core/assets/app/helpers/common_helpers.js
  41. +2 −2 apps/core/assets/app/mixins/enable_form.js
  42. +2 −2 apps/core/assets/app/models/signup.js
  43. +2 −2 apps/core/assets/app/setup.js
  44. +3 −3 apps/core/assets/app/views/flash_view.js
  45. +9 −9 apps/core/assets/app/views/signup_view.js
  46. +1 −1  apps/core/helpers/metric_helpers.rb
  47. +2 −2 apps/core/loggers/signup_logger.rb
  48. +1 −1  apps/core/models/signup.rb
  49. +1 −1  apps/core/services/signup_service.rb
  50. +10 −10 apps/core/spec/models/signup_spec.rb
  51. +3 −3 apps/core/spec/services/signup_service_spec.rb
  52. +1 −1  apps/core/spec/support/blueprints.rb
  53. +1 −1  apps/core/views/index.erb
  54. +3 −3 apps/core/views/layout.erb
  55. +2 −2 boot.rb
  56. +2 −2 config.ru
  57. +1 −1  config/001_apps.rb
  58. +2 −2 lib/{airstrip.rb → desant.rb}
  59. +1 −1  lib/{airstrip → desant}/version.rb
  60. +2 −2 lib/tasks/populate.rake
  61. +1 −1  spec/spec_helper.rb
2  .env.sample
View
@@ -1,7 +1,7 @@
RACK_ENV=development
DATABASE_ADAPTER=mysql2
-DATABASE_NAME=airstrip
+DATABASE_NAME=desant
DATABASE_HOST=localhost
DATABASE_PORT=3306
DATABASE_USER=
2  .rvmrc
View
@@ -1,3 +1,3 @@
rvm_gemset_create_on_use_flag=1
rvm_project_rvmrc_default=1
-rvm ruby-1.9.3-p194@airstrip
+rvm ruby-1.9.3-p194@desant
16 README.md
View
@@ -1,18 +1,18 @@
-# Airstrip - Open Source Landing Pages!
+# Desant - Open Source Landing Pages!
-_Airstrip_ is an open source, neat landing page application. It's simple to
+_Desant_ is an open source, neat landing page application. It's simple to
use, customize and extend to your needs. There's an awesome admin area
too - it will give you all the information and statistics you need.
## Quick start with Vagrant
-There's a public Vagrant box configured to run with _Airstrip_. You can hop
+There's a public Vagrant box configured to run with _Desant_. You can hop
into the project qucikly by running:
$ gem install vagrant # if not installed yet
$ vagrant up
$ vagrant ssh
- vagrant@vagrant:~$ cd airstrip
+ vagrant@vagrant:~$ cd desant
Now just go and perform traditional installation steps described below.
@@ -22,7 +22,7 @@ First of all, install all the dependencies using _Bundler_:
$ bundle
-_Airstrip_ uses _MySQL_ or _PostgresSQL_ as backend, so you should have
+_Desant_ uses _MySQL_ or _PostgresSQL_ as backend, so you should have
one of these databases installed and running. First, copy `.env.sample`
to `.env` - this file contains i.a. database configuration and admin setup:
@@ -74,7 +74,7 @@ rake task:
## Design introduction
-_Airstrip_ is not a Rails app, it's an experiment with full stack, single
+_Desant_ is not a Rails app, it's an experiment with full stack, single
page application in _Backbone.js_ managed by _Sinatra_ backend. Here's
the directory structure explained:
@@ -107,7 +107,7 @@ are routed in config.ru, with standard Rack::Router.
The main goal of the experiment was to provide system for easy and robust
work on _Backbone.js_ application and reusable backend elements. It's also
aims to get rid of stupid Rails' assumptions that action = page, and models
-are used both in forms and presentations. In _Airstrip_, **models** are separated
+are used both in forms and presentations. In _Desant_, **models** are separated
from **forms** and **presenters**. Model takes care about business logic, when
forms handle input and presenters output. More sophisticated operations
are handled with **services**. This design makes the stuff easy to test
@@ -117,4 +117,4 @@ and reuse across the projects.
Copyright (C) 2012 by Chris Kowalik a.k.a nu7hatch
-_Airstrip_ is distributed under an MIT-style license. See LICENSE for details.
+_Desant_ is distributed under an MIT-style license. See LICENSE for details.
6 Vagrantfile
View
@@ -3,11 +3,11 @@
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
- config.vm.box = "airstrip"
+ config.vm.box = "desantapp"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
- config.vm.box_url = "https://dl.dropbox.com/s/693uz0riijn60ia/ubuntu-precise-server-x64-airstrip.box?dl=1"
+ config.vm.box_url = "https://dl.dropbox.com/s/693uz0riijn60ia/ubuntu-precise-server-x64-desantapp.box?dl=1"
# Boot with a GUI so you can see the screen. (Default is headless)
# config.vm.boot_mode = :gui
@@ -34,5 +34,5 @@ Vagrant::Config.run do |config|
# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
- config.vm.share_folder "v-root", "/home/vagrant/airstrip", "", :nfs => true
+ config.vm.share_folder "v-root", "/home/vagrant/desant", "", :nfs => true
end
4 apps/admin/app.rb
View
@@ -5,11 +5,11 @@
require_rel 'forms'
require_rel 'loggers'
-module Airstrip
+module Desant
module Admin
class App < Reusable::Application
# Configuration
- set :app_title, "Airstrip Admin"
+ set :app_title, "Desant Admin"
set :root, File.dirname(__FILE__)
# Custom extensions.
18 apps/admin/assets/app/app.js
View
@@ -1,4 +1,4 @@
-Airstrip.Admin.Router = Backbone.Router.extend({
+Desant.Admin.Router = Backbone.Router.extend({
routes: {
'admin': 'home',
'admin/': 'home',
@@ -10,32 +10,32 @@ Airstrip.Admin.Router = Backbone.Router.extend({
},
initialize: function() {
- this.session = new Airstrip.Admin.Session();
+ this.session = new Desant.Admin.Session();
},
home: function() {
- Airstrip.Admin.chromeView.makeSureRender()
+ Desant.Admin.chromeView.makeSureRender()
this.navigate('admin/signups', true)
},
login: function() {
- Airstrip.Admin.loginFormView = new Airstrip.Admin.LoginFormView()
- Airstrip.Admin.loginFormView.render()
+ Desant.Admin.loginFormView = new Desant.Admin.LoginFormView()
+ Desant.Admin.loginFormView.render()
},
signupsList: function() {
- (new Airstrip.Admin.SignupsListView()).render()
+ (new Desant.Admin.SignupsListView()).render()
},
citiesList: function() {
- (new Airstrip.Admin.LocationsListView({ group: 'cities' })).render()
+ (new Desant.Admin.LocationsListView({ group: 'cities' })).render()
},
countriesList: function() {
- (new Airstrip.Admin.LocationsListView({ group: 'countries' })).render()
+ (new Desant.Admin.LocationsListView({ group: 'countries' })).render()
},
referersList: function() {
- (new Airstrip.Admin.ReferersListView()).render()
+ (new Desant.Admin.ReferersListView()).render()
},
})
2  apps/admin/assets/app/collections/cities.js
View
@@ -4,7 +4,7 @@
*
* This collection is paginated.
*/
-Airstrip.Admin.Cities = Backbone.Collection.extend({
+Desant.Admin.Cities = Backbone.Collection.extend({
url: function() {
return '/admin/api/cities?page=' + this.page
},
2  apps/admin/assets/app/collections/countries.js
View
@@ -4,7 +4,7 @@
*
* This collection is paginated.
*/
-Airstrip.Admin.Countries = Backbone.Collection.extend({
+Desant.Admin.Countries = Backbone.Collection.extend({
url: function() {
return '/admin/api/countries?page=' + this.page
},
2  apps/admin/assets/app/collections/mercator_data.js
View
@@ -2,7 +2,7 @@
* Public: A collection of the data used to display markers on
* the locations (cities or countries) graph.
*/
-Airstrip.Admin.MercatorData = Backbone.Collection.extend({
+Desant.Admin.MercatorData = Backbone.Collection.extend({
url: function() {
return "/admin/api/" + this.options.group + "/map"
},
2  apps/admin/assets/app/collections/referers.js
View
@@ -4,7 +4,7 @@
*
* This collection is paginated.
*/
-Airstrip.Admin.Referers = Backbone.Collection.extend({
+Desant.Admin.Referers = Backbone.Collection.extend({
url: function() {
return '/admin/api/referers?page=' + this.page
},
2  apps/admin/assets/app/collections/signups.js
View
@@ -4,7 +4,7 @@
*
* This collection is paginated.
*/
-Airstrip.Admin.Signups = Backbone.Collection.extend({
+Desant.Admin.Signups = Backbone.Collection.extend({
url: function() {
return '/admin/api/signups?page=' + this.page
},
6 apps/admin/assets/app/helpers/scrolling.js
View
@@ -6,7 +6,7 @@
* callback - A Function callback to be exectuted.
*
*/
-Airstrip.Admin.whenScrollReached = function(cond, callback) {
+Desant.Admin.whenScrollReached = function(cond, callback) {
$window = $(window)
scrollTop = $window.scrollTop()
triggerPoint = $(document).height() - $window.height() - 100;
@@ -22,7 +22,7 @@ Airstrip.Admin.whenScrollReached = function(cond, callback) {
* callback - A Function callback to be bound with scrolling.
*
*/
-Airstrip.Admin.bindScroll = function(callback) {
+Desant.Admin.bindScroll = function(callback) {
$window = $(window)
$window.unbind('scroll')
$window.scroll(callback)
@@ -31,6 +31,6 @@ Airstrip.Admin.bindScroll = function(callback) {
/**
* Public: Unbinds all window's scroll callbacks.
*/
-Airstrip.Admin.unbindScroll = function() {
+Desant.Admin.unbindScroll = function() {
$(window).unbind('scroll')
}
8 apps/admin/assets/app/mixins/default_listing.js
View
@@ -14,15 +14,15 @@
* }
* })
*
- * _.extend(UsersListItemsView.prototype, Airstrip.Admin.Mixins.DefaultListing)
+ * _.extend(UsersListItemsView.prototype, Desant.Admin.Mixins.DefaultListing)
*
*/
-Airstrip.Admin.Mixins.DefaultListing = {
+Desant.Admin.Mixins.DefaultListing = {
/**
* Public: Initializes listing configuration.
*/
initListing: function() {
- this.counter = new Airstrip.Admin.ListingCounterView()
+ this.counter = new Desant.Admin.ListingCounterView()
this.isLoading = false
this.showEmpty = true
this.done = false
@@ -50,7 +50,7 @@ Airstrip.Admin.Mixins.DefaultListing = {
}
},
error: function(collection, resp) {
- Airstrip.renderFlash('error', "Couldn't load content for the page!")
+ Desant.renderFlash('error', "Couldn't load content for the page!")
}
}).complete(function() {
self.isLoading = false
8 apps/admin/assets/app/mixins/infinite_scroll.js
View
@@ -11,15 +11,15 @@
* }
* })
*
- * _.extend(UsersListView.prototype, Airstrip.Admin.Mixins.InifiniteScrollListing)
+ * _.extend(UsersListView.prototype, Desant.Admin.Mixins.InifiniteScrollListing)
*/
-Airstrip.Admin.Mixins.InifiniteScrollListing = {
+Desant.Admin.Mixins.InifiniteScrollListing = {
/**
* Public: Initializez infinite scrolling configuration.
*/
initScroll: function() {
_.bindAll(this, 'checkScroll')
- Airstrip.Admin.bindScroll(this.checkScroll)
+ Desant.Admin.bindScroll(this.checkScroll)
},
/**
@@ -32,7 +32,7 @@ Airstrip.Admin.Mixins.InifiniteScrollListing = {
var self = this
condition = !this.items.isLoading && !this.items.done
- Airstrip.Admin.whenScrollReached(condition, function() {
+ Desant.Admin.whenScrollReached(condition, function() {
self.items.render()
})
}
2  apps/admin/assets/app/models/session.js
View
@@ -2,7 +2,7 @@
* Public; Admin sessions logic. App should have one global
* instance of this model (eg. app.session).
*/
-Airstrip.Admin.Session = Backbone.Model.extend({
+Desant.Admin.Session = Backbone.Model.extend({
url: '/admin/session',
defaults: {
10 apps/admin/assets/app/setup.js
View
@@ -20,18 +20,18 @@
//
//= require ./app
-window.Airstrip = {
+window.Desant = {
Mixins: {},
}
-window.Airstrip.Admin = {
+window.Desant.Admin = {
Mixins: {},
}
$(function() {
- Airstrip.Admin.router = new Airstrip.Admin.Router();
- app = Airstrip.Admin.router
+ Desant.Admin.router = new Desant.Admin.Router();
+ app = Desant.Admin.router
app.session.fetch().complete(function() {
- Airstrip.Admin.chromeView = new Airstrip.Admin.ChromeView()
+ Desant.Admin.chromeView = new Desant.Admin.ChromeView()
Backbone.history.start({ pushState: true })
})
})
2  apps/admin/assets/app/views/ajax_loader_view.js
View
@@ -3,7 +3,7 @@
* to all the ajax start/stop events, so you don't have to worry
* about it at all.
*/
-Airstrip.Admin.AjaxLoaderView = Backbone.View.extend({
+Desant.Admin.AjaxLoaderView = Backbone.View.extend({
el: '#ajax_loader',
events: {
4 apps/admin/assets/app/views/chrome_view.js
View
@@ -4,7 +4,7 @@
* Application should have global instance of this view (eg.
* app.chromeView).
*/
-Airstrip.Admin.ChromeView = Backbone.View.extend({
+Desant.Admin.ChromeView = Backbone.View.extend({
el: '#yield',
template: JST['templates/admin/chrome'],
@@ -19,7 +19,7 @@ Airstrip.Admin.ChromeView = Backbone.View.extend({
render: function() {
this.$el.html(this.template())
this.$el.addClass('logged')
- this.navbarView = (new Airstrip.Admin.NavbarView()).render()
+ this.navbarView = (new Desant.Admin.NavbarView()).render()
return this
},
2  apps/admin/assets/app/views/listing_counter_view.js
View
@@ -2,7 +2,7 @@
* Public: This is a view for listing counters. It shows a number
* of the items displayed compared to total count of the listing.
*/
-Airstrip.Admin.ListingCounterView = Backbone.View.extend({
+Desant.Admin.ListingCounterView = Backbone.View.extend({
el: '#counter',
template: JST['templates/admin/listing_counter'],
30 apps/admin/assets/app/views/locations_list_view.js
View
@@ -2,42 +2,42 @@
* Internal: A view for the cities list items. It's derived from
* the default listing.
*/
-Airstrip.Admin.CitiesListItemsView = Backbone.View.extend({
+Desant.Admin.CitiesListItemsView = Backbone.View.extend({
el: '#cities tbody',
template: JST['templates/admin/city_items'],
initialize: function() {
- this.models = new Airstrip.Admin.Cities()
+ this.models = new Desant.Admin.Cities()
this.initListing()
},
})
-_.extend(Airstrip.Admin.CitiesListItemsView.prototype,
- Airstrip.Admin.Mixins.DefaultListing)
+_.extend(Desant.Admin.CitiesListItemsView.prototype,
+ Desant.Admin.Mixins.DefaultListing)
/**
* Internal: A view for the countries list items. It's derived from
* the default listing.
*/
-Airstrip.Admin.CountriesListItemsView = Backbone.View.extend({
+Desant.Admin.CountriesListItemsView = Backbone.View.extend({
el: '#countries tbody',
template: JST['templates/admin/country_items'],
initialize: function() {
- this.models = new Airstrip.Admin.Countries()
+ this.models = new Desant.Admin.Countries()
this.initListing()
},
})
-_.extend(Airstrip.Admin.CountriesListItemsView.prototype,
- Airstrip.Admin.Mixins.DefaultListing)
+_.extend(Desant.Admin.CountriesListItemsView.prototype,
+ Desant.Admin.Mixins.DefaultListing)
/**
* Internal: A shared view for the locations list. It can either
* display list of cities or countries, dependent on the 'group'
* option specified. It's an infinitely scrolled listing.
*/
-Airstrip.Admin.LocationsListView = Backbone.View.extend({
+Desant.Admin.LocationsListView = Backbone.View.extend({
el: '#content',
template: JST['templates/admin/listing'],
subnav_template: JST['templates/admin/locations_subnav'],
@@ -87,8 +87,8 @@ Airstrip.Admin.LocationsListView = Backbone.View.extend({
this.navigate('/admin/locations/cities')
- this.items = new Airstrip.Admin.CitiesListItemsView().render()
- this.map = new Airstrip.Admin.LocationsMapView({ group: 'cities' }).render()
+ this.items = new Desant.Admin.CitiesListItemsView().render()
+ this.map = new Desant.Admin.LocationsMapView({ group: 'cities' }).render()
return this
},
@@ -106,8 +106,8 @@ Airstrip.Admin.LocationsListView = Backbone.View.extend({
this.navigate('/admin/locations/countries')
- this.items = new Airstrip.Admin.CountriesListItemsView().render()
- this.map = new Airstrip.Admin.LocationsMapView({ group: 'countries' }).render()
+ this.items = new Desant.Admin.CountriesListItemsView().render()
+ this.map = new Desant.Admin.LocationsMapView({ group: 'countries' }).render()
return this
},
@@ -132,5 +132,5 @@ Airstrip.Admin.LocationsListView = Backbone.View.extend({
},
})
-_.extend(Airstrip.Admin.LocationsListView.prototype,
- Airstrip.Admin.Mixins.InifiniteScrollListing)
+_.extend(Desant.Admin.LocationsListView.prototype,
+ Desant.Admin.Mixins.InifiniteScrollListing)
6 apps/admin/assets/app/views/locations_map_view.js
View
@@ -2,7 +2,7 @@
* Public: This view renders world map graphs with selected user
* locations grouped by nearby cities or countries.
*/
-Airstrip.Admin.LocationsMapView = Backbone.View.extend({
+Desant.Admin.LocationsMapView = Backbone.View.extend({
el: '.extras',
template: '<div id="map"><svg></svg></div>',
@@ -57,7 +57,7 @@ Airstrip.Admin.LocationsMapView = Backbone.View.extend({
load: function(group) {
var self = this
- mercatorData = new Airstrip.Admin.MercatorData({ group: group })
+ mercatorData = new Desant.Admin.MercatorData({ group: group })
mercatorData.fetch({
success: function(collection, resp) {
if (group == 'countries') {
@@ -67,7 +67,7 @@ Airstrip.Admin.LocationsMapView = Backbone.View.extend({
}
},
error: function(collection, resp) {
- Airstrip.renderFlash('error', "Something went wrong while loading map!")
+ Desant.renderFlash('error', "Something went wrong while loading map!")
}
})
20 apps/admin/assets/app/views/loginform_view.js
View
@@ -2,7 +2,7 @@
* Public: A view for the login form's submit button. It handles
* user input and provides submit operation.
*/
-Airstrip.Admin.LoginSubmitButtonView = Backbone.View.extend({
+Desant.Admin.LoginSubmitButtonView = Backbone.View.extend({
el: '#login_form_submit',
events: {
@@ -22,38 +22,38 @@ Airstrip.Admin.LoginSubmitButtonView = Backbone.View.extend({
this.disable()
- Airstrip.Admin.router.session.save({
+ Desant.Admin.router.session.save({
login: this.login.val(),
password: this.password.val(),
}, {
success: function(model, resp) {
app.navigate('admin/', true)
- Airstrip.renderFlash("success", "Welcome home, Master!")
+ Desant.renderFlash("success", "Welcome home, Master!")
},
error: function(model, resp) {
- data = Airstrip.parseResponse(resp)
+ data = Desant.parseResponse(resp)
self.enable()
- Airstrip.renderFlash('error', data.error)
+ Desant.renderFlash('error', data.error)
}
})
}
})
-_.extend(Airstrip.Admin.LoginSubmitButtonView.prototype,
- Airstrip.Mixins.EnableField)
+_.extend(Desant.Admin.LoginSubmitButtonView.prototype,
+ Desant.Mixins.EnableField)
/**
* Public: The login form view - displays login form and handles
* user input.
*/
-Airstrip.Admin.LoginFormView = Backbone.View.extend({
+Desant.Admin.LoginFormView = Backbone.View.extend({
el: '#yield',
template: JST['templates/admin/login_form'],
render: function() {
this.$el.html(this.template())
- this.spinner = new Airstrip.Admin.AjaxLoaderView()
- this.submitButton = new Airstrip.Admin.LoginSubmitButtonView({ form: this })
+ this.spinner = new Desant.Admin.AjaxLoaderView()
+ this.submitButton = new Desant.Admin.LoginSubmitButtonView({ form: this })
this.submitButton.render()
return this
4 apps/admin/assets/app/views/navbar_view.js
View
@@ -3,7 +3,7 @@
* links with '.nav' class so they navigate to the app defined
* actions.
*/
-Airstrip.Admin.NavbarView = Backbone.View.extend({
+Desant.Admin.NavbarView = Backbone.View.extend({
el: '#navbar',
template: JST['templates/admin/navbar'],
@@ -13,7 +13,7 @@ Airstrip.Admin.NavbarView = Backbone.View.extend({
render: function() {
this.$el.html(this.template())
- this.spinner = new Airstrip.Admin.AjaxLoaderView()
+ this.spinner = new Desant.Admin.AjaxLoaderView()
var $current = this.$('a.nav[href="' + document.location.pathname + '"]')
$current.addClass('current')
16 apps/admin/assets/app/views/referers_list_view.js
View
@@ -2,24 +2,24 @@
* Internal: A view for the referers list items. It's derived from
* the default listing.
*/
-Airstrip.Admin.ReferersListItemsView = Backbone.View.extend({
+Desant.Admin.ReferersListItemsView = Backbone.View.extend({
el: '#referers tbody',
template: JST['templates/admin/referer_items'],
initialize: function() {
- this.models = new Airstrip.Admin.Referers()
+ this.models = new Desant.Admin.Referers()
this.initListing()
},
})
-_.extend(Airstrip.Admin.ReferersListItemsView.prototype,
- Airstrip.Admin.Mixins.DefaultListing)
+_.extend(Desant.Admin.ReferersListItemsView.prototype,
+ Desant.Admin.Mixins.DefaultListing)
/**
* Internal: A view for the refering websites list. It's an
* infinitely scrolled listing.
*/
-Airstrip.Admin.ReferersListView = Backbone.View.extend({
+Desant.Admin.ReferersListView = Backbone.View.extend({
el: '#content',
template: JST['templates/admin/listing'],
@@ -35,11 +35,11 @@ Airstrip.Admin.ReferersListView = Backbone.View.extend({
columns: ['#', "Referer's URL", 'Brought users'],
}))
- this.items = new Airstrip.Admin.ReferersListItemsView().render()
+ this.items = new Desant.Admin.ReferersListItemsView().render()
return this
},
})
-_.extend(Airstrip.Admin.ReferersListView.prototype,
- Airstrip.Admin.Mixins.InifiniteScrollListing)
+_.extend(Desant.Admin.ReferersListView.prototype,
+ Desant.Admin.Mixins.InifiniteScrollListing)
20 apps/admin/assets/app/views/signups_view.js
View
@@ -2,7 +2,7 @@
* Internal: A view and handler for the button to download CSV
* dump file with all the registered users' information.
*/
-Airstrip.Admin.SignupsDownloadCSVButtonView = Backbone.View.extend({
+Desant.Admin.SignupsDownloadCSVButtonView = Backbone.View.extend({
template: JST['templates/admin/download_csv_button'],
events: {
@@ -24,24 +24,24 @@ Airstrip.Admin.SignupsDownloadCSVButtonView = Backbone.View.extend({
* Internal: A view for the registered users list items. It's derived
* from the default listing.
*/
-Airstrip.Admin.SignupsListItemsView = Backbone.View.extend({
+Desant.Admin.SignupsListItemsView = Backbone.View.extend({
el: '#signups tbody',
template: JST['templates/admin/signup_items'],
initialize: function() {
- this.models = new Airstrip.Admin.Signups()
+ this.models = new Desant.Admin.Signups()
this.initListing()
},
})
-_.extend(Airstrip.Admin.SignupsListItemsView.prototype,
- Airstrip.Admin.Mixins.DefaultListing)
+_.extend(Desant.Admin.SignupsListItemsView.prototype,
+ Desant.Admin.Mixins.DefaultListing)
/**
* Internal: A view for the registered users list. It's an
* infinitely scrolled listing.
*/
-Airstrip.Admin.SignupsListView = Backbone.View.extend({
+Desant.Admin.SignupsListView = Backbone.View.extend({
el: '#content',
template: JST['templates/admin/listing'],
@@ -57,15 +57,15 @@ Airstrip.Admin.SignupsListView = Backbone.View.extend({
columns: ['#', 'E-mail', 'IP address', 'Registered at'],
}))
- this.downloadCSVButton = new Airstrip.Admin.SignupsDownloadCSVButtonView({
+ this.downloadCSVButton = new Desant.Admin.SignupsDownloadCSVButtonView({
el: this.$('.action_buttons')
}).render()
- this.items = new Airstrip.Admin.SignupsListItemsView().render()
+ this.items = new Desant.Admin.SignupsListItemsView().render()
return this
},
})
-_.extend(Airstrip.Admin.SignupsListView.prototype,
- Airstrip.Admin.Mixins.InifiniteScrollListing)
+_.extend(Desant.Admin.SignupsListView.prototype,
+ Desant.Admin.Mixins.InifiniteScrollListing)
2  apps/admin/forms/login_form.rb
View
@@ -1,6 +1,6 @@
require 'digest/sha1'
-module Airstrip
+module Desant
module Admin
# Public: Admin login form service. Authenticates administrator
# and gives access to the admin area.
4 apps/admin/loggers/login_logger.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
module Admin
# Internal: A logger bound to `.admin_login` notifications.
class LoginLogger < ActiveSupport::LogSubscriber
@@ -21,4 +21,4 @@ def success(event)
end
end
-Airstrip::Admin::LoginLogger.attach_to :admin_login
+Desant::Admin::LoginLogger.attach_to :admin_login
2  apps/admin/presenters/cities_presenter.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
module Admin
# Public: Fetches paginated list of referring websites.
class CitiesPresenter < Struct.new(:page)
2  apps/admin/presenters/countries_presenter.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
module Admin
# Public: Fetches paginated list of referring websites.
class CountriesPresenter < Struct.new(:page)
2  apps/admin/presenters/latest_signups_presenter.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
module Admin
# Public: Fetches paginated list of latest signup entries.
class LatestSignupsPresenter < Struct.new(:page)
2  apps/admin/presenters/referers_presenter.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
module Admin
# Public: Fetches paginated list of referring websites.
class ReferersPresenter < Struct.new(:page)
4 apps/admin/spec/forms/login_form_spec.rb
View
@@ -1,8 +1,8 @@
require File.expand_path("../../spec_helper", __FILE__)
-describe Airstrip::Admin::LoginForm do
+describe Desant::Admin::LoginForm do
subject do
- Airstrip::Admin::LoginForm
+ Desant::Admin::LoginForm
end
before do
10 apps/admin/spec/presenters/cities_presenter_spec.rb
View
@@ -1,14 +1,14 @@
require File.expand_path("../../spec_helper", __FILE__)
-describe Airstrip::Admin::CitiesPresenter do
+describe Desant::Admin::CitiesPresenter do
subject do
- Airstrip::Admin::CitiesPresenter
+ Desant::Admin::CitiesPresenter
end
before do
- Airstrip::Signup.destroy_all
- 2.times { Airstrip::Signup.make!(:city => "Montevideo", :country => "Uruguay") }
- Airstrip::Signup.make!(:city => nil, :country => nil)
+ Desant::Signup.destroy_all
+ 2.times { Desant::Signup.make!(:city => "Montevideo", :country => "Uruguay") }
+ Desant::Signup.make!(:city => nil, :country => nil)
end
it "loads paginated list of refering websites with number of brought users" do
10 apps/admin/spec/presenters/countries_presenter_spec.rb
View
@@ -1,14 +1,14 @@
require File.expand_path("../../spec_helper", __FILE__)
-describe Airstrip::Admin::CountriesPresenter do
+describe Desant::Admin::CountriesPresenter do
subject do
- Airstrip::Admin::CountriesPresenter
+ Desant::Admin::CountriesPresenter
end
before do
- Airstrip::Signup.destroy_all
- 2.times { Airstrip::Signup.make!(:city => "Montevideo", :country => "Uruguay") }
- Airstrip::Signup.make!(:city => nil, :country => nil)
+ Desant::Signup.destroy_all
+ 2.times { Desant::Signup.make!(:city => "Montevideo", :country => "Uruguay") }
+ Desant::Signup.make!(:city => nil, :country => nil)
end
it "loads paginated list of refering websites with number of brought users" do
8 apps/admin/spec/presenters/latest_signups_presenter_spec.rb
View
@@ -1,13 +1,13 @@
require File.expand_path("../../spec_helper", __FILE__)
-describe Airstrip::Admin::LatestSignupsPresenter do
+describe Desant::Admin::LatestSignupsPresenter do
subject do
- Airstrip::Admin::LatestSignupsPresenter
+ Desant::Admin::LatestSignupsPresenter
end
before do
- Airstrip::Signup.destroy_all
- 2.times { Airstrip::Signup.make! }
+ Desant::Signup.destroy_all
+ 2.times { Desant::Signup.make! }
end
it "loads paginated list of latest signups" do
10 apps/admin/spec/presenters/referer_presenters_spec.rb
View
@@ -1,14 +1,14 @@
require File.expand_path("../../spec_helper", __FILE__)
-describe Airstrip::Admin::ReferersPresenter do
+describe Desant::Admin::ReferersPresenter do
subject do
- Airstrip::Admin::ReferersPresenter
+ Desant::Admin::ReferersPresenter
end
before do
- Airstrip::Signup.destroy_all
- 2.times { Airstrip::Signup.make!(:referer => 'http://google.com') }
- Airstrip::Signup.make!(:referer => nil)
+ Desant::Signup.destroy_all
+ 2.times { Desant::Signup.make!(:referer => 'http://google.com') }
+ Desant::Signup.make!(:referer => nil)
end
it "loads paginated list of refering websites with number of brought users" do
6 apps/admin/views/layout.erb
View
@@ -2,8 +2,8 @@
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
- <title>Airstrip - Open Source Landing Page System!</title>
- <meta name="description" content="Airstrip is an open source landing page scaffold system.">
+ <title>Desant - Open Source Landing Page System!</title>
+ <meta name="description" content="Desant is an open source landing page scaffold system.">
<meta name="author" content="nu7hatch">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Droid+Sans:400,700|Bevan" type="text/css">
@@ -22,7 +22,7 @@
<small>All rights reserved.</small>
</p>
<p>
- <a href="http://github.com/nu7hatch/airstrip"> Fork me on <i class="icon-github"></i> Github!</a>
+ <a href="http://github.com/nu7hatch/desant"> Fork me on <i class="icon-github"></i> Github!</a>
</p>
</div>
</footer>
4 apps/core/app.rb
View
@@ -5,11 +5,11 @@
require_rel 'helpers'
require_rel 'loggers'
-module Airstrip
+module Desant
module Core
class App < Reusable::Application
# Configuration.
- set :app_title, "Airstrip"
+ set :app_title, "Desant"
set :root, File.dirname(__FILE__)
# Custom extensions.
6 apps/core/assets/app/app.js
View
@@ -1,10 +1,10 @@
-Airstrip.Router = Backbone.Router.extend({
+Desant.Router = Backbone.Router.extend({
routes: {
'': 'home',
},
home: function() {
- Airstrip.signupFormView = new Airstrip.SignupFormView({})
- Airstrip.signupFormView.render()
+ Desant.signupFormView = new Desant.SignupFormView({})
+ Desant.signupFormView.render()
}
})
2  apps/core/assets/app/helpers/common_helpers.js
View
@@ -6,7 +6,7 @@
*
* Returns parsed response data.
*/
-Airstrip.parseResponse = function(resp) {
+Desant.parseResponse = function(resp) {
var data = {}
try {
4 apps/core/assets/app/mixins/enable_form.js
View
@@ -4,7 +4,7 @@
* In order to use it, extended object must have a this.submitButton
* field with submit button view (extended by Mixins.EnableField).
*/
-Airstrip.Mixins.EnableForm = {
+Desant.Mixins.EnableForm = {
/**
* Public: Enables this form.
*/
@@ -28,7 +28,7 @@ Airstrip.Mixins.EnableForm = {
* Public: Provides enabling/disabling for form fields. Mostly
* used for buttons.
*/
-Airstrip.Mixins.EnableField = {
+Desant.Mixins.EnableField = {
/**
* Public: Enables this field.
*/
4 apps/core/assets/app/models/signup.js
View
@@ -1,7 +1,7 @@
/**
- * Public: Reflection of the backend's Airstrip::Signup model.
+ * Public: Reflection of the backend's Desant::Signup model.
*/
-Airstrip.Signup = Backbone.Model.extend({
+Desant.Signup = Backbone.Model.extend({
url: "/signup",
toJSON: function() {
4 apps/core/assets/app/setup.js
View
@@ -11,11 +11,11 @@
//
//= require ./app
-window.Airstrip = {
+window.Desant = {
Mixins: {},
}
$(function() {
- Airstrip.router = new Airstrip.Router();
+ Desant.router = new Desant.Router();
Backbone.history.start({ pushState: true });
})
6 apps/core/assets/app/views/flash_view.js
View
@@ -6,8 +6,8 @@
* message - A String message to be displayed in this flash.
*
*/
-Airstrip.renderFlash = function(type, message) {
- flash = new Airstrip.Flash({ type: type, message: message })
+Desant.renderFlash = function(type, message) {
+ flash = new Desant.Flash({ type: type, message: message })
flash.render()
}
@@ -15,7 +15,7 @@ Airstrip.renderFlash = function(type, message) {
* Public: A view for the flash messages. The 'div#flash' DOM
* object must be defined in order to make it work.
*/
-Airstrip.Flash = Backbone.View.extend({
+Desant.Flash = Backbone.View.extend({
el: '#flash',
template: JST["templates/flash"],
18 apps/core/assets/app/views/signup_view.js
View
@@ -1,7 +1,7 @@
/**
* Internal: A view for the signup form submit button.
*/
-Airstrip.SignupSubmitButtonView = Backbone.View.extend({
+Desant.SignupSubmitButtonView = Backbone.View.extend({
el: '#signup_form_submit',
events: {
@@ -19,36 +19,36 @@ Airstrip.SignupSubmitButtonView = Backbone.View.extend({
this.disable()
- signup = new Airstrip.Signup({ email: this.email.val() })
+ signup = new Desant.Signup({ email: this.email.val() })
signup.save({}, {
success: function(model, resp) {
- Airstrip.signupFormView.render()
- Airstrip.renderFlash('success', 'Thanks for registering!')
+ Desant.signupFormView.render()
+ Desant.renderFlash('success', 'Thanks for registering!')
},
error: function(model, resp) {
self.enable()
- var data = Airstrip.parseResponse(resp)
- Airstrip.renderFlash('error', data.error)
+ var data = Desant.parseResponse(resp)
+ Desant.renderFlash('error', data.error)
}
})
}
})
-_.extend(Airstrip.SignupSubmitButtonView.prototype, Airstrip.Mixins.EnableField)
+_.extend(Desant.SignupSubmitButtonView.prototype, Desant.Mixins.EnableField)
/**
* Internal: A view for the signup form. The 'div#signup_form_wrapper'
* DOM Object must be defined in order to make it work.
*/
-Airstrip.SignupFormView = Backbone.View.extend({
+Desant.SignupFormView = Backbone.View.extend({
el: '#signup_form_wrapper',
template: JST["templates/signup_form"],
render: function() {
this.$el.html(this.template())
- this.submitButton = new Airstrip.SignupSubmitButtonView({ form: this })
+ this.submitButton = new Desant.SignupSubmitButtonView({ form: this })
this.submitButton.render()
return this
2  apps/core/helpers/metric_helpers.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
# Public: Contains helpers for various analytics and metrics
# systems.
module MetricHelpers
4 apps/core/loggers/signup_logger.rb
View
@@ -1,6 +1,6 @@
require 'reusable/helpers/email_helpers'
-module Airstrip
+module Desant
# Internal: A logger bound to `*.signup` notifications.
class SignupLogger < ActiveSupport::LogSubscriber
include Reusable::EmailHelpers
@@ -22,4 +22,4 @@ def success(event)
end
end
-Airstrip::SignupLogger.attach_to :signup
+Desant::SignupLogger.attach_to :signup
2  apps/core/models/signup.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
# Signup entity represents single user signed up for the beta
# access.
#
2  apps/core/services/signup_service.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
# Public: Signup service registers new email address signed up
# from the landing page.
class SignupService < Struct.new(:app)
20 apps/core/spec/models/signup_spec.rb
View
@@ -1,6 +1,6 @@
require File.expand_path("../../spec_helper", __FILE__)
-describe Airstrip::Signup do
+describe Desant::Signup do
describe "#set_client_info" do
it "sets given client's ip and referer information" do
subject.set_client_info("127.0.0.1", "google.com")
@@ -11,13 +11,13 @@
describe ".referers" do
before do
- Airstrip::Signup.destroy_all
- 2.times { Airstrip::Signup.make!(:referer => 'http://google.com') }
- Airstrip::Signup.make!(:referer => nil)
+ Desant::Signup.destroy_all
+ 2.times { Desant::Signup.make!(:referer => 'http://google.com') }
+ Desant::Signup.make!(:referer => nil)
end
it "returns list of referring websites together with number of users brought" do
- referers = Airstrip::Signup.referers
+ referers = Desant::Signup.referers
referers.to_a.should have(1).item
referers.first.url.should == "http://google.com"
referers.first.users_count.should == 2
@@ -26,14 +26,14 @@
context "locations" do
before do
- Airstrip::Signup.destroy_all
- 2.times { Airstrip::Signup.make!(:city => "Montevideo", :country => "Uruguay") }
- Airstrip::Signup.make!(:city => nil, :country => nil)
+ Desant::Signup.destroy_all
+ 2.times { Desant::Signup.make!(:city => "Montevideo", :country => "Uruguay") }
+ Desant::Signup.make!(:city => nil, :country => nil)
end
describe ".cities" do
it "returns list of cities with number of users from there" do
- cities = Airstrip::Signup.cities
+ cities = Desant::Signup.cities
cities.to_a.should have(1).item
cities.first.city.should == "Montevideo"
cities.first.country.should == "Uruguay"
@@ -43,7 +43,7 @@
describe ".countries" do
it "returns list of countries with number of users from there" do
- countries = Airstrip::Signup.countries
+ countries = Desant::Signup.countries
countries.to_a.should have(1).item
countries.first.country.should == "Uruguay"
countries.first.users_count.should == 2
6 apps/core/spec/services/signup_service_spec.rb
View
@@ -1,8 +1,8 @@
require File.expand_path("../../spec_helper", __FILE__)
-describe Airstrip::SignupService do
+describe Desant::SignupService do
subject do
- Airstrip::SignupService
+ Desant::SignupService
end
context "when given email address is valid and not duplicated" do
@@ -17,7 +17,7 @@
it "creates new signup entry" do
res = subject.new(app).call
res.should == { "email" => "chris@nu7hat.ch" }
- Airstrip::Signup.find_by_email("chris@nu7hat.ch").should be
+ Desant::Signup.find_by_email("chris@nu7hat.ch").should be
end
end
2  apps/core/spec/support/blueprints.rb
View
@@ -1,7 +1,7 @@
require "machinist/active_record"
require "ffaker"
-Airstrip::Signup.blueprint do
+Desant::Signup.blueprint do
email { "me#{sn}@fakemail.com" }
ip_address { Faker::Internet.ip_v4_address }
referer { Faker::Internet.uri('http') }
2  apps/core/views/index.erb
View
@@ -1,7 +1,7 @@
<div class="vessel">
<h1>Open source landing pages are coming!</h1>
<p>
- That's not a joke! Airstrip is an open source landing page
+ That's not a joke! Desant is an open source landing page
application with really nice looking and neat backend providing
all the data and statistics you need in your business! Check
it out now!
6 apps/core/views/layout.erb
View
@@ -2,8 +2,8 @@
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
- <title>Airstrip - Open Source Landing Page System!</title>
- <meta name="description" content="Airstrip is an open source landing page scaffold system.">
+ <title>Desant - Open Source Landing Page System!</title>
+ <meta name="description" content="Desant is an open source landing page scaffold system.">
<meta name="author" content="nu7hatch">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Bevan|Droid+Sans:400,700" type="text/css">
@@ -25,7 +25,7 @@
<small>Background image by <a href="http://www.flickr.com/photos/cyanatic/">cyanatic</a>.</small>
</p>
<p>
- <a href="http://github.com/nu7hatch/airstrip">Fork me on <i class="icon-github"></i> Github!</a>
+ <a href="http://github.com/nu7hatch/desant">Fork me on <i class="icon-github"></i> Github!</a>
</p>
</div>
</footer>
4 boot.rb
View
@@ -19,7 +19,7 @@
end
# The app foundation.
-require 'airstrip'
+require 'desant'
# Load all the configuration files
Dir[File.expand_path('../config/*.rb', __FILE__)].each do |conf|
@@ -27,4 +27,4 @@
end
# Load core and all the applications.
-Airstrip.load_apps(APPS_PATH)
+Desant.load_apps(APPS_PATH)
4 config.ru
View
@@ -2,9 +2,9 @@
require File.expand_path('../boot', __FILE__)
map '/' do
- run Airstrip::Core::App
+ run Desant::Core::App
end
map '/admin' do
- run Airstrip::Admin::App
+ run Desant::Admin::App
end
2  config/001_apps.rb
View
@@ -1,2 +1,2 @@
# List of the applications to be loaded.
-Airstrip.apps += %w(core admin)
+Desant.apps += %w(core admin)
4 lib/airstrip.rb → lib/desant.rb
View
@@ -25,8 +25,8 @@
require 'reusable/apps_foundation'
require 'reusable/application'
-require 'airstrip/version'
+require 'desant/version'
-module Airstrip
+module Desant
extend Reusable::AppsFoundation
end
2  lib/airstrip/version.rb → lib/desant/version.rb
View
@@ -1,4 +1,4 @@
-module Airstrip
+module Desant
VERSION = "0.0.1"
# Public: Returns current version number.
4 lib/tasks/populate.rake
View
@@ -14,10 +14,10 @@ module Populate
puts "== Populating: Signup"
50.times do
- Airstrip::Signup.make(:email => Faker::Internet.email).tap do |signup|
+ Desant::Signup.make(:email => Faker::Internet.email).tap do |signup|
signup.full_geocode unless RACK_ENV == 'production'
signup.save!
- puts " -> #<Airstrip::Signup email=#{signup.email.inspect} lat=#{signup.lat.inspect} lon=#{signup.lon.inspect} ip_address=#{signup.ip_address.inspect}>"
+ puts " -> #<Desant::Signup email=#{signup.email.inspect} lat=#{signup.lat.inspect} lon=#{signup.lon.inspect} ip_address=#{signup.ip_address.inspect}>"
end
end
2  spec/spec_helper.rb
View
@@ -4,7 +4,7 @@
require 'rspec'
require 'mocha'
-require 'airstrip'
+require 'desant'
# Flush database and re-run migrations.
require 'reusable/active_record_tasks'
Please sign in to comment.
Something went wrong with that request. Please try again.