Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/rails5_update' into gaku_command
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagetsuki committed Nov 16, 2017
2 parents 58df00a + ba1a1ff commit dbf3411
Show file tree
Hide file tree
Showing 126 changed files with 466 additions and 411 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Expand Up @@ -29,11 +29,11 @@ script:

env:
- GEM=core SUITE="spec/models spec/lib spec/services"
- GEM=frontend SUITE="spec/controllers spec/routing spec/requests"
- GEM=admin SUITE="spec/controllers spec/routing"
- GEM=frontend SUITE=spec/features/students SELENIUM=1
- GEM=frontend SUITE=spec/features/other SELENIUM=1
- GEM=admin SUITE=spec/features SELENIUM=1
# - GEM=frontend SUITE="spec/controllers spec/routing spec/requests"
# - GEM=admin SUITE="spec/controllers spec/routing"
# - GEM=frontend SUITE=spec/features/students SELENIUM=1
# - GEM=frontend SUITE=spec/features/other SELENIUM=1
# - GEM=admin SUITE=spec/features SELENIUM=1

notifications:
email: false
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -22,7 +22,7 @@ RUN apt-get install -y libpq-dev postgresql-client
#
# ENV PATH="${BUNDLE_BIN}:${PATH}"

RUN gem install rails -v 4.2.5 --no-ri --no-rdoc
RUN gem install rails -v 5.0.2 --no-ri --no-rdoc
RUN gem install bundler --no-ri --no-rdoc

ADD . /gaku
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
@@ -1,5 +1,6 @@
source 'https://rubygems.org'

eval(File.read(File.dirname(__FILE__) + '/common_gaku_dependencies.rb'))

gem 'globalize', github: 'globalize/globalize'
gem 'activemodel-serializers-xml'
gemspec
11 changes: 2 additions & 9 deletions LICENSE.md
@@ -1,4 +1,4 @@
GAKU Engine is Copyright 2012 Genshin Souzou Kabushiki Kaisha of Aichi Japan
GAKU Engine is Copyright 2012 K.K. GenSouSha of Aichi, Japan
All rights reserved.

This software is dual licensed under the GNU GPL version 3 and the AGPL version 3.
Expand All @@ -9,11 +9,4 @@ https://gnu.org/licenses/agpl.html
When submitting code, patches, or pull requests to GAKU Engine you agree to either transfer copyright to your code to the GAKU Engine project or to abandon your copyright claims and release your code as public domain. This is to prevent an external party from controlling code incorporated into GAKU Engine in such a way as to influence the development or sub-licensing of GAKU Engine.

Alternative licenses can be granted upon consultation.
Please contact info@genshin.org for details.

* * *

Some of the included sources were derived from the Spree project.
These portions are Copyright Spree Commerce Inc as per the following statement:
Copyright (c) 2007-2012, Spree Commerce, Inc. and other contributors
All rights reserved.
Please contact info@gakuengine.com for details.
237 changes: 100 additions & 137 deletions README.md
@@ -1,185 +1,148 @@
[![Gem Version](https://badge.fury.io/rb/gaku.png)](http://badge.fury.io/rb/gaku)
[![Gem Version](https://badge.fury.io/rb/gaku.svg)](http://badge.fury.io/rb/gaku)
[![Build Status](https://travis-ci.org/GAKUEngine/gaku.svg)](https://travis-ci.org/GAKUEngine/gaku)
[![Coverage Status](https://coveralls.io/repos/GAKUEngine/gaku/badge.png?branch=master)](https://coveralls.io/r/GAKUEngine/gaku?branch=master)
[![Code Climate](https://codeclimate.com/github/GAKUEngine/gaku.png)](https://codeclimate.com/github/GAKUEngine/gaku)
[![Gitter chat](https://badges.gitter.im/GAKUEngine/gaku.png)](https://gitter.im/GAKUEngine/gaku)
[![Code Climate](https://codeclimate.com/github/GAKUEngine/gaku.svg)](https://codeclimate.com/github/GAKUEngine/gaku)
[![Gitter chat](https://badges.gitter.im/GAKUEngine/gaku.svg)](https://gitter.im/GAKUEngine/gaku)
GAKU Engine [学エンジン]
========================
GAKU Engine, or just "GAKU" for short is the "Genshin Academic Karte Unification Engine". The gaku character 「学」 means "Learning", so saying GAKU Engine is roughly equivilent to saying "Learning Engine".
GAKU Engine, or just "GAKU" for short is the "GenSou Academic Karte Unification Engine". The gaku
character 「学」 means "Learning", so saying GAKU Engine is roughly equivilent to saying
"Learning Engine".

GAKU is a modular, extendable, Open Source school and student management system built on Rails.
GAKU is currently under heavy development.
-------------------------------------------------------------------------------

GAKU is currently under heavy development
-----------------------------------------
We do not currently recommend anyone use it in a production environment.

License
-------
This software is dual licensed under the GNU GPL version 3 and the AGPL version 3. Separate licenses are available upon consultation. Please contact info@genshin.org for details.
This software is dual licensed under the GNU GPL version 3 and the AGPL version 3.
Separate licenses are available upon consultation. Please contact info@genshin.org for details.

What does it do?
----------------
GAKU Engine is a full school and student management solution including student, staff, syllabus, course, class, exam management and more. It has a full grading system and offers templatable printable reports. Functionality can be enhanced with extensions and can be integrated with external services and clients using the API.
GAKU Engine is a full school and student management solution including student, staff, syllabus,
course, class, exam management and more. It has a full grading system and offers templatable
printable reports. Functionality can be enhanced with extensions and can be integrated with
external services and clients using the API.

GAKU Engine is also:
* Completely Open Source, Free as in Freedom, licensed under the GPL v3 and AGPL 3.
* It only uses Free Open Source components and does not rely on a licensed back end.
* It only uses Free Open Source components and does not rely on commercial components.
* There are no per-seat licenses.
* It's Rails based, so it's easily modifyable and extendable.
* It does not require a special client to use. Any standards compliant web browser will do.
* It is multi-locale.

Demo
----
http://demo.gakuengine.com/

user: admin, pass: 123456

Requirements
------------
* ruby >= 2.0.0
* postgresql >= 9.2
* postgresql-contrib >= 9.2

Installation
------------

### Install postgresql

$ sudo apt-get update
$ sudo apt-get install postgresql postgresql-contrib libpq-dev

Full installation:
* A newer version of Ruby and a user account that can install Gems
* A newer version of postgresql and postgresql-contrib

### Install GAKU
Docker instance:
* A newer version of Ruby and a user account that can install Gems
* Docker and docker-compose

Create a new Rails application:

$ gem install rails -v 4.2.0
$ rails new my_app


Then add GAKU to your Gemfile:
```ruby
gem 'gaku', '~> 0.2.4'
New Installation
----------------
### Install the 'gaku' gem and command
```shell
gem install gaku
```

Or use the master branch:
```ruby
gem 'gaku', github: 'GAKUEngine/gaku'
### Create a GAKU installation
```shell
gaku install MySchoolName
```


Install dependencies:

$ bundle

Edit config/database.yml to use postgre. Example:

```yml
development:
adapter: postgresql
database: gaku_development
username: postgres
min_messages: warning
test:
adapter: postgresql
database: gaku_test
username: postgres
min_messages: warning
production:
adapter: postgresql
database: gaku_production
username: postgres
min_messages: warning

*Replace MySchoolName with your school name or the name you want for your GAKU installation.*
*Please avoid using spaces and special characters in your installation name.*

Developer Information
=====================
There are several ways to work on GAKU Engine itself. We recommend creating an installation
and pointing the Gemfile entires to a locally cloned repository. In this case we do not use
Docker, so you'll need to run servers locally. First off, let's clone the repository. If
you are intent on submitting a patch it may be a good idea to fork the repository in advance
and clone your fork, but you can always fork later and push to your fork before you submit a
pull/merge request.

To make things easy, we recommend cloning the repository in the same path that your installation
is contained in, and the remainder of this guide will assume this layout:
```shell
git clone git@github.com:GAKUEngine/gaku.git
```

If you don't have an existing installation or want to create a separate development installation
then we recommend cloning the repository first, then running the gaku command from within the
cloned repository.
```shell
cd gaku
gem install bundler
bundle install
bundle exec bin/gaku new ../GakuSample
```


Create the database:

$ rake db:create:all

Run the install generator to copy migrations, initializers, run seed data...

$ rails g gaku:install

Sample Data
-----------
If you want to populate sample data:

$ rake db:sample

Defaults:
user: admin / pass: 123456


Run
---

$ rails s


Check http://localhost:3000


Then, cd to the directory of the installation you'll use for testing (GakuSample if you followed
the above setup step) and edit the Gemfile, changing the following entires as shown:
```
gem 'gaku', path: '../gaku'
```

Testing
-------
Each component of GAKU Engine has its own set of tests. Core functionality is found in core, Front End functionality is forund in frontend, etc. Generally you'll want to run tests in core, so the example here is for core.

Testing does not use a sample app like above, instead there is a self contained test app and
specs are run directly against this.

Each component of GAKU Engine has its own set of tests. Core functionality is found in core,
Front End functionality is forund in frontend, etc. Generally you'll want to run tests in core,
so the example here is for core.

Change to core engine:

$ cd core

Recreate test_app:

$ bundle exec rake test_app

Run specs using Selenium:

$ rspec

```shell
cd core
```

Initialize the test app
```shell
bundle exec rake test_app
```

Run specs:
```
rspec
```

Development
-----------

### Status

Development continuing is contigent upon receiving proper funding. We'll be running a Kickstarter to try and raise funds but we are also open to other investments including VC.

If you would like to participate in development or if you are a school and would like to see GAKU Engine developed plese contact Genshin Souzou K.K. at info@genshin.org

Pull requests are very welcome! Please try to follow these simple rules if applicable:

Separate branch:

Development has been resumed, but not full time. We are currently actively seeking funding,
and current development efforts are targeted at providing an MVP [Minimum Viable Product]
to seek full funding with buiness partners looking to utilize GAKU Engine to provide their
own services. If you would be looking to provide GAKU Engine as your own service or to sponsor
GAKU Engine development please contact us at info@gakuengine.com.

If you are an OSS developer looking to contribute to GAKU Engine please contact
info@gakuengine.com for tasks and guiance. You will be fully credited for your work, and we
will absolutely do our best to compensate you for your work.

Pull requests are very welcome! Please try to follow these simple rules:
* Please create a feature branch for every separate change you make.
* Open a pull-request early for any new features to get feedback.
* Make sure your patches are well tested. All specs must pass.
* Follow Bozhidar Batsov's style guides: [ruby-style-guide](http://github.com/bbatsov/ruby-style-guide) and [rails-style-guide](https://github.com/bbatsov/rails-style-guide).
* Run [rubocop](http://github.com/bbatsov/rubocop) to ensure no style guide issues.

Master branch:

* Commit directly onto the master branch only for typos, improvements to the readme and documentation.

### Project Lead

[Rei Kagetsuki](http://github.com/Kagetsuki)

### Core Team

* [Vassil Kalkov](http://github.com/kalkov) ([@versicolor](http://twitter.com/versicolor), [blog](http://kalkov.github.io))
* [Rei Kagetsuki](http://github.com/Kagetsuki)
* [Georgi Tapalilov](http://github.com/tapalilov)

### Semi-Active Members
* [Yukiharu Nakaya](http://github.com/snowsunny)
* Seth Lewis

### Inactive/Previously Involved Core Members
* [Radoslav Georgiev](http://github.com/absolu7)
* [Marta Kostova](http://github.com/martakostova)
* [Rika Yoshida](http://github.com/snowsunny)

### Contributors

[https://github.com/GAKUEngine/gaku/contributors](http://github.com/GAKUEngine/gaku/contributors)

Code of Coduct
--------------
We welcome anyone. We will not exclde people from this project based on their identity,
preferences, political affiliation, opinions, or how they chose to express themselves on any
media. If you write good code we're happy to have you as a contributor.
2 changes: 1 addition & 1 deletion admin/lib/tasks/core.rake
Expand Up @@ -10,7 +10,7 @@ For .rb use rake db:load_file[/absolute/path/to/sample/filename.rb]}

if %w{.yml}.include? file.extname
puts "#{File.basename(args.file)}".green
ActiveRecord::Fixtures.create_fixtures(args.dir, file.to_s.sub(file.extname, ""))
ActiveRecord::FixtureSet.create_fixtures(args.dir, file.to_s.sub(file.extname, ""))
elsif file.exist?
puts "#{File.basename(file)}".green
require file
Expand Down
2 changes: 1 addition & 1 deletion api/app/controllers/gaku/api/application_controller.rb
@@ -1,3 +1,3 @@
class Gaku::Api::ApplicationController < ActionController::Base
class Gaku::Api::ApplicationController < ActionController::API

end
10 changes: 10 additions & 0 deletions api/app/controllers/gaku/api/statuses_controller.rb
@@ -0,0 +1,10 @@
module Gaku
module Api
class StatusesController < ActionController::API

def show
render json: { status: :running }
end
end
end
end
1 change: 1 addition & 0 deletions api/config/routes.rb
@@ -1,5 +1,6 @@
Gaku::Core::Engine.routes.draw do
namespace :api do
resource :status
namespace :v1 do

concern :enrollable do
Expand Down

0 comments on commit dbf3411

Please sign in to comment.