2015年1月30日 星期五

Uninstall Redmine plugin on OpenShift

1. Log into Redmine from SSH
  $ rhc ssh
2. Remove plugin's configuration. (Plugin's name=plugin_name)
  $ RAILS_ENV=production rake db:migrate_plugins PLUGIN={plugin_name} VERSION=0
3. Log out and back into redmine git repo.
4. Remove plugin from source code
  $ git submodule deinit plugins/{plugin_name}
5. Remove submodule info from .gitsubmodule
  $ vi .gitsubmodule
6. Remove plugin's directory
  $ git rm plugins/{plugin_name}
7. Commit & Push it to OpenShift server.
8. Done...

2015年1月17日 星期六

Install Redmine plugin on OpenShift (ex. TimeSheet)


There are 2 TimeSheet Redmine plugin that I have survey.

1. TimeSheets Application
  (https://github.com/maxrossello/redmine_app_timesheets)
2. TimeSheet
  (https://github.com/arkhitech/redmine_timesheet_plugin)

Install TimeSheets Application plugin into OpenShift:
1. Goto redmine root directory
  $ cd redmine
2. git clone with submodule method. (redmine_app__space is the depend plugin)
  $ git submodule add -f https://github.com/maxrossello/redmine_app__space.git plugins/redmine_app__space
   $ git sub modle add -f https://github.com/maxrossello/redmine_app_timesheets.git plugins/redmine_app_timesheet
3. Commit into local repo.
  $ git commit -m "Add TimeSheets Application Plugin"
4. Push to remote repo.
  $ git push
5. If the database information does not be migrate, please login OpenShift server, and rebuild it.
  $ rhc ssh
  $ cd app-root/repo
  $ RAILS_ENV=production rake redmine:plugins:migrate

Install TimeSheet plugin into Openshift:
1. Goto redmine root directory
  $ cd redmine
2. git clone with submodule method.
  git submodule add -f https://github.com/arkhitech/redmine_timesheet_plugin.git plugins/redmine_timesheet_plugin
3. commit into local repo
  $ git commit -m "Add TimeSheet Plugin"
4. Push to remote repo.
  $ git push
5. If the database information does not be migrate, please login OpenShift server, and rebuild it.
  $ rhc ssh
  $ cd app-root/repo
  $ RAILS_ENV=production rake redmine:plugins:migrate

Notes:
1. After I install TimeSheets Application Plugin then I install TimeSheet Plugin, but the TimeSheet Plugin can NOT work. (I don't know what happened)
2. I don't know the usage of "Order" in TimeSheets Application Plugin. (How to delete Order?)

2015年1月13日 星期二

OpenShift with Redmine application

1. Setup OpenShift environment.
    $ rhc setup
2. Create application "redmine" with "ruby-1.9" and "mysql-5.5"
    $ rhc app create redmine ruby-1.9 mysql-5.5
3. Merge "https://github.com/ikedam/openshift-redmine.git" for any version Redmine
    $ cd redmine
    $ git remote add upstream -m master https://github.com/ikedam/openshift-redmine.git
    $ git pull -s recursive -X theirs upstream master
4. Download "redmine-x.y.z.tar.gz" from "http://www.redmine.org"
5. Decompress "redmine-x.y.z.tar.gz" to "redmine-x.y.z" directory.
    $ tar zxvf redmine-x.y.z.tar.gz
6. Copy all files from "redmine-x.y.z" directory to "redmine" directory
    $ cp -R redmine-x.y.z/ redmine/
7. Add 3 lines into .gitignore:
    /files/*
    /log/*
    /public/plugin_assets/*
8. Use "git" to add all files into local repo.
9.  Push local repo. to remote repo.
    $ git push -u origin master
10. Goto Web Page.

Use SubmlineLinter under Windows

PyLint or Flake8

1. Install SublimeLinter by using PackageControl
2. Install Python into Windows
3. Download get-pip.bat and Install pip
4. Install PyLint and Flake8
    $ pip install pylint
    $ pip install flake8
5. Install SublimeLinter-pylint
6. Install SublimeLinter-flake8
7. Modify SublimeLinter-setting
  {
    "user": {
      "linters": {
        "pyLint": {
          "paths": [
            "C:\\Python27\\Lib\\site-packages\\astroid",
            "C:\\Python27\\Lib\\site-packages\\pyLint",
            "C:\\Python27\\Lib\\site-packages\\LogiLab"
          ] ,
        },
      },
      "paths": {
        "linux": [],
        "osx": [],
        "windows": [
          "C:\\Python27"
        ]
      },
      "python_paths": {
        "linux": [],
        "osx": [],
        "windows": [
          "C:\\Python27\\python.exe"
        ]
      },
    }
  }
8. Restart SublimeText