add versioning

parent 560d8886
......@@ -64,7 +64,7 @@ Comments are required on complex code. Otherwise you should write _self-labeling
```ruby
# BAD
def convert_date(project, issue, user, date, **options)
# ...
# ...
end
# GOOD
......@@ -111,7 +111,6 @@ def my_method(data, key, value, date, type, other, options={})
# GOOD
def my_method(user, issue, **options)
def my_method(user, issue, html_options: '', html_id: '', date: nil)
```
##### Indentation and naming
......@@ -144,25 +143,24 @@ when 'issue'
when 'project'
else
end
```
##### In HTML
* for `class` attribute use use BEM convention - Block__Element_Modifier / multi-word-block-name__multi-word-element-name_modifier-name_modifier-value for complete reference go to https://en.bem.info/methodology/quick-start/
* for `class` attribute use use BEM convention - Block__Element_Modifier / multi-word-block-name__multi-word-element-name_modifier-name_modifier-value for complete reference go to https://en.bem.info/methodology/quick-start/
```html
<div class="easy-query__heading-title_state_selected">...
```
* for `id` attribute use `_` as separator
* for `id` attribute use `_` as separator
```html
<div id="easy_entity_import_dialog">...
```
* respect HTML valid syntax
* use our CSS guideline instead own styles
* respect HTML valid syntax
* use our CSS guideline instead own styles
##### Name routing
......@@ -192,13 +190,12 @@ Don't mix the Ruby 1.9 hash syntax with hash rockets in the same hash literal. W
# GOOD - PREFERABLE
{ a: 1, b: 2 }
```
https://github.com/rubocop-hq/ruby-style-guide#hash-literals = ruby19_no_mixed_keys
---
#### In other cases follow community guidelines
For ruby: https://github.com/rubocop-hq/ruby-style-guide
For rails: https://github.com/rubocop-hq/rails-style-guide
......@@ -104,10 +104,12 @@ In case that issue is not provided, more detailed description is required.
Should be short and descriptive `refs #ISSUE_ID`.
GOOD:
- 500 error on issue edit (refs #123456)
- New version gantt 2.0
BAD:
- fix
- patch
- refs #123456
......@@ -201,3 +203,13 @@ Check for it with `ruby -wc PATH_TO_FILE`. In orders to check all files :
```
find . -name "*.rb" -type f -exec ruby -wc {} \; | grep -v OK
```
##### Versioning
All our RYSy are versioned by semantic versioning. For details please see https://semver.org/#semantic-versioning-200
1. level - MAJOR - includes changes which are release specific - lots of changes, refactoring and whole new features, migrations and etc.
2. level - MINOR - includes new small features, migrations, minor change of internal logic
3. level - PATCH (or bug-fix) - its only for bug-fixing or harmless changes, such as documentation, readme, etc. ! This version must not include migrations and breaking chagnes !
# Redmine plugins as a engines
# Redmine plugins as a engines
We introduce new way of development plugins for Redmine (and Easy Redmine of course) which is almost same as developing standard rails gems.
# Introduce
RYS engines are separated to few gems, and source code is on github. So for full documentation what is RYS and how it works, please check our github page.
https://github.com/easysoftware/rys
# Lukas's personal workflow
How to start develop with RYS? There are some of my recommendations...
## You need Redmine of Easy Redmine first
Because RYS is designed for developing (easy) Redmine plugins, you need download one of it.
We have prepared simple generator of RYS engines
......@@ -20,7 +24,7 @@ We have prepared simple generator of RYS engines
1. Add in your Redmine gem "rys"
2. Run rails generate of RYS
rails generate rys:plugin NAME
### Move generated code to work directory
......@@ -37,32 +41,31 @@ So I take our 'devel' repository, clone as `dummy` and remove *_ALL unnecessary
This dummy I have symlinked to `test/dummy` in RYS engine.
### Prepare to test
1. bundle install - based my experience you need run this many times :)
1. Be sure you have configured `config/database.yml` in your dummy.
1. rake app:db:create app:db:migrate && rake app:easyproject:install
1. rspec
2. Be sure you have configured `config/database.yml` in your dummy.
3. rake app:db:create app:db:migrate && rake app:easyproject:install
4. rspec
## Example
How I do this... (working example)
1. Get Easy Redmine
git clone devel -b devel devel
2. Setup Easy Redmine (database.yml)
2. Setup Easy Redmine (database.yml)
bundle install --without rmagick xapian
3. Generate RYS
3. Generate RYS
rails g rys:plugin ruzovy_jednorozec --path ../
4. Prepare dummy
4. Prepare dummy
git clone devel -b devel dummy
cd dummy/plugins
rm -r * && git checkout easyproject easy_job
......@@ -72,18 +75,19 @@ How I do this... (working example)
vim config/database.yml
5. Link dummy to RYS
cd ../ruzovy_jednorozec
mkdir test
test folder is in `.gitignore` by default
ln -s [~/projects/ or absolute path]dummy test/dummy
6. Make it together
bundle install --without rmagick xapian
rake app:db:create app:db:migrate
rake app:easyproject:install # this work from ER 05.00
rake app:easyproject:install # this work from ER 05.00
7. Ready for use
......@@ -107,16 +111,19 @@ Pending: (Failures listed here are expected and do not affect your suite's statu
Finished in 0.50731 seconds (files took 2.92 seconds to load)
2 examples, 0 failures, 1 pending
```
### Conclusion
When code is pushed to gitlab, CI will run test with whole devel repository (by default).
This is guide based my experience with RYS development, it may not be for everyone ok...
#### Cons
* Test only part of application - other plugins can change behaviour and in this way you missed it...
* Another window with whole ER is needed.
#### Pros
* Very fast development - test finished in few seconds, almost like in real world.
* Based on LOC in every RYS engine, Ruby Mine work faster, consume less RAM - on my old Mac is much better.
* TDD is now possible.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment