jruby_activiti 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ef37bf10d71dd32e4edd31744ed986d6f9c8e6f
4
- data.tar.gz: 81513699bc37ce0594c6c19103320436dd9432a5
3
+ metadata.gz: 88fe51b4ed2c04232d92bc1876ca89d8547cb207
4
+ data.tar.gz: f5d2e57e70c3a010b9c50613890627f9eb47159a
5
5
  SHA512:
6
- metadata.gz: 70924820bddc0eb9a8761587d44fb9e20cf78da391f0179137bc8a895dde2bdccbd6abe2da52448f4ba6fe4c633e54ff8a06f8ff73bf32d60238e0d9dfa314f6
7
- data.tar.gz: 8bb7d7c2a76c3ee7b18080d92c896843bb576d8e51d7d6b096a33eb0c25b97c255b2425fa99ab19ea2b6857405e416921ff2dd87f04df4b2877b5159879913e0
6
+ metadata.gz: 9d11d634bd2999bce04da6af15ca66456e61fe734529b1852e2490d1121690f847244a2c8e0f39042062c807c921de580f3d2c537374413876238fa261dee29b
7
+ data.tar.gz: d87b7de71a35208d3a72291fee532bde2d407368e45b4043a3a84aa3180e292d11b79743b05f58ed14aa74b2b73db0c080a17c58a03b90057973729d1c08e9c4
data/README.md CHANGED
@@ -13,39 +13,26 @@ Add this line to your application's Gemfile:
13
13
  gem 'jruby_activiti'
14
14
  ```
15
15
 
16
- create a `Jarfile`. Example:
16
+ Run the `bundle install` command to install it.
17
17
 
18
- ```
19
- jar 'org.activiti:activiti-engine', '~> 5.18'
20
- jar 'org.slf4j:slf4j-log4j12', '>= 1.7'
21
- jar 'com.h2database:h2', '>= 1.4'
22
- ```
18
+ After you install and add it to your Gemfile, you need to run the generator:
23
19
 
24
- And then execute:
25
20
  ```
26
- $ bundle install
27
- $ jbundle install
21
+ rails g jruby_activiti:install
28
22
  ```
29
23
 
30
- ## Usage
24
+ It will create 3 files, edit the config/activiti.cfg.xml as your need.
31
25
 
32
- Create activiti config file. `config/activiti.cfg.xml`
33
26
  ```
34
- <beans xmlns="http://www.springframework.org/schema/beans"
35
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
36
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
37
-
38
- <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
39
- <property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
40
- <property name="jdbcDriver" value="org.h2.Driver" />
41
- <property name="jdbcUsername" value="sa" />
42
- <property name="jdbcPassword" value="" />
43
- </bean>
44
-
45
- </beans>
27
+ create Jarfile
28
+ create config/activiti.cfg.xml
29
+ create config/initializers/jruby_activiti.rb
46
30
  ```
47
31
 
48
- Now, You can access Activiti directly by using `ActivitiEngine`. For example, in a Rails controller
32
+ And then execute `jbundle install`
33
+
34
+ ## Usage
35
+ You can access Activiti directly by using `ActivitiEngine`. For example, in a Rails controller
49
36
 
50
37
  ```
51
38
  repositoryService = ActivitiEngine.getRepositoryService()
@@ -0,0 +1,23 @@
1
+ require 'rails/generators/base'
2
+
3
+ module JrubyActiviti
4
+ module Generators
5
+ class InstallGenerator < Rails::Generators::Base
6
+ source_root File.expand_path("../templates", __FILE__)
7
+
8
+ desc "Creates a initializer and copy config files to your application."
9
+
10
+ def create_jarfile
11
+ copy_file "Jarfile", "Jarfile"
12
+ end
13
+
14
+ def create_config
15
+ copy_file "activiti.cfg.xml", "config/activiti.cfg.xml"
16
+ end
17
+
18
+ def create_initializer_file
19
+ copy_file "initializer.rb", "config/initializers/jruby_activiti.rb"
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,3 @@
1
+ jar 'org.activiti:activiti-engine', '~> 5.18'
2
+ jar 'org.slf4j:slf4j-log4j12', '>= 1.7'
3
+ jar 'com.h2database:h2', '>= 1.4'
@@ -0,0 +1,14 @@
1
+ <beans xmlns="http://www.springframework.org/schema/beans"
2
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
4
+
5
+ <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
6
+ <property name="jdbcUrl" value="jdbc:h2:mem:activiti;DB_CLOSE_DELAY=1000" />
7
+ <property name="jdbcDriver" value="org.h2.Driver" />
8
+ <property name="jdbcUsername" value="sa" />
9
+ <property name="jdbcPassword" value="" />
10
+
11
+ <property name="databaseSchemaUpdate" value="true" />
12
+ </bean>
13
+
14
+ </beans>
@@ -0,0 +1 @@
1
+ ActivitiEngine = JrubyActiviti.get_engine
@@ -4,10 +4,11 @@ require "jbundler"
4
4
  Bundler.require "activiti-engine"
5
5
 
6
6
  ActivitiConfigPath ||= "config/activiti.cfg.xml"
7
- configuration = Java::OrgActivitiEngine::ProcessEngineConfiguration.
8
- createProcessEngineConfigurationFromResource(ActivitiConfigPath)
9
- ActivitiEngine = configuration.buildProcessEngine
10
7
 
11
8
  module JrubyActiviti
12
- # Your code goes here...
9
+ def self.get_engine
10
+ configuration = Java::OrgActivitiEngine::ProcessEngineConfiguration.
11
+ createProcessEngineConfigurationFromResource(ActivitiConfigPath)
12
+ configuration.buildProcessEngine
13
+ end
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module JrubyActiviti
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
data/test/base_test.rb CHANGED
@@ -2,6 +2,8 @@ require 'test_helper'
2
2
 
3
3
  Bundler.require "h2"
4
4
 
5
+ ActivitiEngine = JrubyActiviti.get_engine
6
+
5
7
  class BaseTest < Minitest::Test
6
8
  def deploy_vacation_request
7
9
  repositoryService = ActivitiEngine.getRepositoryService()
metadata CHANGED
@@ -1,38 +1,38 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby_activiti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - richfisher
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: minitest
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
18
  version: '5.8'
20
- type: :development
19
+ name: minitest
21
20
  prerelease: false
21
+ type: :development
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5.8'
27
27
  - !ruby/object:Gem::Dependency
28
- name: jbundler
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
32
  version: '0.9'
34
- type: :runtime
33
+ name: jbundler
35
34
  prerelease: false
35
+ type: :runtime
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
@@ -54,6 +54,10 @@ files:
54
54
  - README.md
55
55
  - Rakefile
56
56
  - jruby_activiti.gemspec
57
+ - lib/generators/jruby_activiti/install_generator.rb
58
+ - lib/generators/jruby_activiti/templates/Jarfile
59
+ - lib/generators/jruby_activiti/templates/activiti.cfg.xml
60
+ - lib/generators/jruby_activiti/templates/initializer.rb
57
61
  - lib/jruby_activiti.rb
58
62
  - lib/jruby_activiti/version.rb
59
63
  - test/VacationRequest.bpmn20.xml
@@ -64,7 +68,7 @@ homepage: https://github.com/richfisher/jruby_activiti
64
68
  licenses:
65
69
  - MIT
66
70
  metadata: {}
67
- post_install_message:
71
+ post_install_message:
68
72
  rdoc_options: []
69
73
  require_paths:
70
74
  - lib
@@ -79,9 +83,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
83
  - !ruby/object:Gem::Version
80
84
  version: '0'
81
85
  requirements: []
82
- rubyforge_project:
86
+ rubyforge_project:
83
87
  rubygems_version: 2.4.8
84
- signing_key:
88
+ signing_key:
85
89
  specification_version: 4
86
90
  summary: Interact with Activiti BPM in JRuby, https://github.com/richfisher/jruby_activiti
87
91
  test_files: