summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-10-11 12:53:10 +0200
committerAzul <azul@leap.se>2012-10-11 12:53:10 +0200
commit09003d3d2df7c250d3a0b55e83094e5e27094859 (patch)
tree90d2a851cd558652121182937a5ec8373722cab0 /core
parent118d9ab5c9f4d7a82b7cf24774ef12d3c221f8ef (diff)
parent33ef3d2ac9a03b06ff29f1367c69731a89f1dfc7 (diff)
Merge branch 'release-0.1.0' into develop
Diffstat (limited to 'core')
-rw-r--r--core/Rakefile10
-rw-r--r--core/Readme.md2
-rw-r--r--core/app/assets/images/leap_web_core/.gitkeep0
-rw-r--r--core/app/assets/javascripts/leap_web_core/.gitkeep0
-rw-r--r--core/app/assets/stylesheets/leap_web_core/.gitkeep0
-rw-r--r--core/app/controllers/.gitkeep0
-rw-r--r--core/app/controllers/home_controller.rb5
-rw-r--r--core/app/helpers/.gitkeep0
-rw-r--r--core/app/mailers/.gitkeep0
-rw-r--r--core/app/models/.gitkeep0
-rw-r--r--core/app/views/.gitkeep0
-rw-r--r--core/app/views/home/index.html.haml1
-rw-r--r--core/leap_web_core.gemspec12
-rw-r--r--core/lib/leap_web_core.rb9
-rw-r--r--core/lib/leap_web_core/ui_dependencies.rb11
-rw-r--r--core/lib/leap_web_core/version.rb3
-rw-r--r--core/test/integration/navigation_test.rb9
-rw-r--r--core/test/leap_web_core_test.rb7
-rw-r--r--core/test/test_helper.rb15
19 files changed, 36 insertions, 48 deletions
diff --git a/core/Rakefile b/core/Rakefile
index 477e34d..3c6539c 100644
--- a/core/Rakefile
+++ b/core/Rakefile
@@ -1,4 +1,8 @@
#!/usr/bin/env rake
+
+require 'rake/packagetask'
+require 'rubygems/package_task'
+
begin
require 'bundler/setup'
rescue LoadError
@@ -20,8 +24,10 @@ RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_files.include('lib/**/*.rb')
end
-
-
+spec = eval(File.read('leap_web_core.gemspec'))
+Gem::PackageTask.new(spec) do |p|
+ p.gem_spec = spec
+end
Bundler::GemHelper.install_tasks
diff --git a/core/Readme.md b/core/Readme.md
index f76999e..795c0a4 100644
--- a/core/Readme.md
+++ b/core/Readme.md
@@ -2,3 +2,5 @@ Leap Web Core
===
[Leap](http://www.leap.se) is the Leap Encryption Access Project and this is the rails app for its web interface.
+
+This is the its core gem. Currently it only serves to load shared dependencies.
diff --git a/core/app/assets/images/leap_web_core/.gitkeep b/core/app/assets/images/leap_web_core/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/core/app/assets/images/leap_web_core/.gitkeep
+++ /dev/null
diff --git a/core/app/assets/javascripts/leap_web_core/.gitkeep b/core/app/assets/javascripts/leap_web_core/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/core/app/assets/javascripts/leap_web_core/.gitkeep
+++ /dev/null
diff --git a/core/app/assets/stylesheets/leap_web_core/.gitkeep b/core/app/assets/stylesheets/leap_web_core/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/core/app/assets/stylesheets/leap_web_core/.gitkeep
+++ /dev/null
diff --git a/core/app/controllers/.gitkeep b/core/app/controllers/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/core/app/controllers/.gitkeep
+++ /dev/null
diff --git a/core/app/controllers/home_controller.rb b/core/app/controllers/home_controller.rb
deleted file mode 100644
index 7db5397..0000000
--- a/core/app/controllers/home_controller.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-
-class HomeController < ApplicationController
- def index
- end
-end
diff --git a/core/app/helpers/.gitkeep b/core/app/helpers/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/core/app/helpers/.gitkeep
+++ /dev/null
diff --git a/core/app/mailers/.gitkeep b/core/app/mailers/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/core/app/mailers/.gitkeep
+++ /dev/null
diff --git a/core/app/models/.gitkeep b/core/app/models/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/core/app/models/.gitkeep
+++ /dev/null
diff --git a/core/app/views/.gitkeep b/core/app/views/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/core/app/views/.gitkeep
+++ /dev/null
diff --git a/core/app/views/home/index.html.haml b/core/app/views/home/index.html.haml
deleted file mode 100644
index 82f5152..0000000
--- a/core/app/views/home/index.html.haml
+++ /dev/null
@@ -1 +0,0 @@
-%h3 Home
diff --git a/core/leap_web_core.gemspec b/core/leap_web_core.gemspec
index 709b451..e721637 100644
--- a/core/leap_web_core.gemspec
+++ b/core/leap_web_core.gemspec
@@ -1,23 +1,25 @@
$:.push File.expand_path("../lib", __FILE__)
-# Maintain your gem's version:
-require "leap_web_core/version"
+require File.expand_path('../../lib/leap_web/version.rb', __FILE__)
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "leap_web_core"
- s.version = LeapWebCore::VERSION
+ s.version = LeapWeb::VERSION
s.authors = ["Azul"]
s.email = ["azul@leap.se"]
s.homepage = "http://www.leap.se"
- s.summary = "Web interface to the leap platform"
+ s.summary = "Web interface to the leap platform - core engine"
s.description = "This web interface provides various administrative tools for the leap platform through plugins. Currently it manages user accounts and certificates."
- s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "Readme.md"]
+ s.files = Dir["{app,config,db,lib}/**/*"] + ["Rakefile", "Readme.md"]
s.test_files = Dir["test/**/*"]
s.add_dependency "rails", "~> 3.2.8"
+
s.add_dependency "couchrest", "~> 1.1.3"
s.add_dependency "couchrest_model", "~> 2.0.0.beta2"
+ s.add_dependency "couchrest_session_store", "~> 0.0.1"
+ s.add_dependency "json"
end
diff --git a/core/lib/leap_web_core.rb b/core/lib/leap_web_core.rb
index 16004f8..8826880 100644
--- a/core/lib/leap_web_core.rb
+++ b/core/lib/leap_web_core.rb
@@ -1,5 +1,12 @@
+require "rails"
+
+require "couchrest"
+require "couchrest_model"
+require "couchrest_session_store"
+
+require "json"
+
require "extensions/testing"
-require "leap_web_core/dependencies"
require "leap_web_core/engine"
module LeapWebCore
diff --git a/core/lib/leap_web_core/ui_dependencies.rb b/core/lib/leap_web_core/ui_dependencies.rb
new file mode 100644
index 0000000..e0a0b86
--- /dev/null
+++ b/core/lib/leap_web_core/ui_dependencies.rb
@@ -0,0 +1,11 @@
+require "haml"
+require "bootstrap-sass"
+require "jquery-rails"
+require "simple_form"
+
+if Rails.env == "development"
+ require "haml-rails"
+ require "sass-rails"
+ require "coffee-rails"
+ require "uglifier"
+end
diff --git a/core/lib/leap_web_core/version.rb b/core/lib/leap_web_core/version.rb
deleted file mode 100644
index 6a34982..0000000
--- a/core/lib/leap_web_core/version.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-module LeapWebCore
- VERSION = "0.0.1"
-end
diff --git a/core/test/integration/navigation_test.rb b/core/test/integration/navigation_test.rb
deleted file mode 100644
index eec8c0e..0000000
--- a/core/test/integration/navigation_test.rb
+++ /dev/null
@@ -1,9 +0,0 @@
-require 'test_helper'
-
-class NavigationTest < ActionDispatch::IntegrationTest
-
- # test "the truth" do
- # assert true
- # end
-end
-
diff --git a/core/test/leap_web_core_test.rb b/core/test/leap_web_core_test.rb
deleted file mode 100644
index 0dd71ff..0000000
--- a/core/test/leap_web_core_test.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-require 'test_helper'
-
-class LeapWebCoreTest < ActiveSupport::TestCase
- test "truth" do
- assert_kind_of Module, LeapWebCore
- end
-end
diff --git a/core/test/test_helper.rb b/core/test/test_helper.rb
deleted file mode 100644
index 1e26a31..0000000
--- a/core/test/test_helper.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# Configure Rails Environment
-ENV["RAILS_ENV"] = "test"
-
-require File.expand_path("../dummy/config/environment.rb", __FILE__)
-require "rails/test_help"
-
-Rails.backtrace_cleaner.remove_silencers!
-
-# Load support files
-Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
-
-# Load fixtures from the engine
-if ActiveSupport::TestCase.method_defined?(:fixture_path=)
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
-end