redmine_acts_as_taggable_on 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +12 -3
- data/README.md +9 -11
- data/lib/redmine_acts_as_taggable_on/version.rb +1 -1
- data/test/mk_temp_redmine.bash +3 -2
- data/test/run.bash +14 -6
- data/test/test.bats +2 -2
- data/test/test_helpers.bash +4 -2
- metadata +89 -67
- checksums.yaml +0 -7
data/.travis.yml
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
language: ruby
|
2
|
-
|
3
|
-
|
4
|
-
-
|
2
|
+
before_install:
|
3
|
+
- gem update --system 1.8.25
|
4
|
+
- gem --version
|
5
|
+
script: ./test/run.bash
|
6
|
+
rvm: 2.0.0-p0
|
7
|
+
env: branches="trunk tags/2.3.1"
|
8
|
+
matrix:
|
9
|
+
include:
|
10
|
+
- rvm: 1.9.3-p392
|
11
|
+
env: branches="trunk tags/2.3.1 tags/2.2.4 tags/2.1.5 tags/2.0.4"
|
12
|
+
- rvm: 1.8.7-p371
|
13
|
+
env: branches="trunk tags/2.3.1 tags/2.2.4 tags/2.1.5 tags/2.0.4"
|
data/README.md
CHANGED
@@ -31,8 +31,9 @@ print a gentle(-ish) suggestion to use this gem instead.
|
|
31
31
|
## Status
|
32
32
|
|
33
33
|
Believed to be stable. The automated tests currently pass on Redmine trunk,
|
34
|
-
2.3.1, 2.2.4,
|
35
|
-
|
34
|
+
2.3.1, 2.2.4, 2.1.5, and 2.0.4 (which are, at the time of writing, the most
|
35
|
+
recent releases of every 2.x branch). However, this gem is not yet used by any
|
36
|
+
Redmine plugins in the wild.
|
36
37
|
|
37
38
|
## Limitations
|
38
39
|
|
@@ -49,11 +50,11 @@ some nasty monkey-patching. On the other hand, data loss is no fun at all.
|
|
49
50
|
|
50
51
|
Add it to your plugin's Gemfile:
|
51
52
|
|
52
|
-
gem 'redmine_acts_as_taggable_on', '~> 0.2'
|
53
|
+
gem 'redmine_acts_as_taggable_on', '~> 0.2.1'
|
53
54
|
|
54
55
|
Add the migration:
|
55
56
|
|
56
|
-
echo 'class AddTagsAndTaggings < RedmineActsAsTaggableOn::Migration; end'
|
57
|
+
$ echo 'class AddTagsAndTaggings < RedmineActsAsTaggableOn::Migration; end'\
|
57
58
|
> db/migrate/001_add_tags_and_taggings.rb
|
58
59
|
|
59
60
|
Declare that your plugin needs `redmine_acts_as_taggable_on` inside init.rb:
|
@@ -66,13 +67,10 @@ Declare that your plugin needs `redmine_acts_as_taggable_on` inside init.rb:
|
|
66
67
|
|
67
68
|
That's it. Your plugin will now migrate up and down intelligently. For example:
|
68
69
|
|
69
|
-
cd /path/to/redmine
|
70
|
-
|
71
|
-
cp -r /
|
72
|
-
|
73
|
-
|
74
|
-
rake redmine:plugins:migrate
|
75
|
-
|
70
|
+
$ cd /path/to/redmine
|
71
|
+
$ cp -r /some/plugin/using/this/gem plugins/redmine_foo
|
72
|
+
$ cp -r /another/plugin/using/this/gem plugins/redmine_bar
|
73
|
+
$ rake redmine:plugins:migrate
|
76
74
|
Migrating redmine_bar (Redmine bar)...
|
77
75
|
== AddTagsAndTaggings: migrating =========================================
|
78
76
|
-- create_table(:tags)
|
data/test/mk_temp_redmine.bash
CHANGED
@@ -19,12 +19,13 @@ make_temp_redmine() {
|
|
19
19
|
adapter: sqlite3
|
20
20
|
database: db/redmine.sqlite3" > config/database.yml
|
21
21
|
|
22
|
-
bundle install
|
22
|
+
bundle install \
|
23
|
+
--without="postgresql development test mysql rmagick ldap"
|
23
24
|
rake generate_secret_token db:create db:migrate
|
24
25
|
|
25
26
|
popd
|
26
27
|
popd
|
27
28
|
}
|
28
29
|
|
29
|
-
make_temp_redmine >/dev/null
|
30
|
+
make_temp_redmine "$1" >/dev/null
|
30
31
|
echo "$temp_redmine"
|
data/test/run.bash
CHANGED
@@ -3,7 +3,12 @@ set -e
|
|
3
3
|
|
4
4
|
# Run all the tests on a specific branch of Redmine.
|
5
5
|
run_tests_on_branch() {
|
6
|
-
temp_redmine_path="
|
6
|
+
temp_redmine_path="$(test/mk_temp_redmine.bash "$1")"
|
7
|
+
if [ "$?" -ne 0 ]; then
|
8
|
+
echo "failed to create temporary redmine on $1: cancelling these tests"
|
9
|
+
return 1
|
10
|
+
fi
|
11
|
+
|
7
12
|
export temp_redmine_path
|
8
13
|
|
9
14
|
[ -f test/bats/bin/bats ] || git submodule update
|
@@ -12,11 +17,12 @@ run_tests_on_branch() {
|
|
12
17
|
test/bats/bin/bats test/test.bats || test_status=1
|
13
18
|
|
14
19
|
if [ "$test_status" -eq 1 ]; then
|
15
|
-
echo "Some tests failed on
|
20
|
+
echo "Some tests failed on $1. You can inspect the tree at $temp_redmine_path"
|
16
21
|
else
|
17
22
|
rm -rf "$temp_redmine_path"
|
18
23
|
fi
|
19
24
|
|
25
|
+
temp_redmine_path=""
|
20
26
|
return $test_status
|
21
27
|
}
|
22
28
|
|
@@ -27,12 +33,14 @@ redmine_acts_as_taggable_on_path="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pw
|
|
27
33
|
export redmine_acts_as_taggable_on_path
|
28
34
|
pushd "$redmine_acts_as_taggable_on_path" >/dev/null
|
29
35
|
|
30
|
-
branches
|
36
|
+
# branches should be a space-separated string of repo paths to check out.
|
37
|
+
# We don't use an array because they're difficult to export.
|
38
|
+
[ -z "$branches" ] && branches="tags/2.3.1"
|
31
39
|
test_status=0
|
32
40
|
|
33
|
-
for branch in $
|
34
|
-
echo "testing on
|
35
|
-
echo -n "
|
41
|
+
for branch in $branches; do
|
42
|
+
echo "testing on: $branch"
|
43
|
+
echo -n "============"
|
36
44
|
# make the underline the same length as the title
|
37
45
|
echo ${branch//?/=}
|
38
46
|
|
data/test/test.bats
CHANGED
@@ -8,14 +8,14 @@ preserved_files=(db/redmine.sqlite3 db/schema.rb)
|
|
8
8
|
|
9
9
|
setup() {
|
10
10
|
pushd "$temp_redmine_path/redmine" >/dev/null
|
11
|
-
for file in $preserved_files; do
|
11
|
+
for file in ${preserved_files[@]}; do
|
12
12
|
cp $file $file.bak
|
13
13
|
done
|
14
14
|
}
|
15
15
|
|
16
16
|
teardown() {
|
17
17
|
rm -rf plugins/*
|
18
|
-
for file in $preserved_files; do
|
18
|
+
for file in ${preserved_files[@]}; do
|
19
19
|
mv $file.bak $file
|
20
20
|
done
|
21
21
|
popd >/dev/null
|
data/test/test_helpers.bash
CHANGED
@@ -19,7 +19,8 @@ mk_proper_plugin() {
|
|
19
19
|
local name="redmine_$1"
|
20
20
|
pushd plugins/$name >/dev/null
|
21
21
|
|
22
|
-
echo "
|
22
|
+
echo "source 'https://rubygems.org'
|
23
|
+
gem 'redmine_acts_as_taggable_on',
|
23
24
|
:path => '$redmine_acts_as_taggable_on_path'" > Gemfile
|
24
25
|
|
25
26
|
echo "require 'redmine_acts_as_taggable_on/initialize'
|
@@ -60,7 +61,8 @@ mk_old_style_plugin() {
|
|
60
61
|
local name="redmine_$1"
|
61
62
|
pushd plugins/$name >/dev/null
|
62
63
|
|
63
|
-
echo "
|
64
|
+
echo "source 'https://rubygems.org'
|
65
|
+
gem 'acts-as-taggable-on'" > Gemfile
|
64
66
|
bundle >/dev/null
|
65
67
|
popd >/dev/null
|
66
68
|
|
metadata
CHANGED
@@ -1,70 +1,84 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: redmine_acts_as_taggable_on
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 21
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Harry Garrood
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
17
|
+
|
18
|
+
date: 2013-05-12 00:00:00 +01:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
14
22
|
name: acts-as-taggable-on
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.3'
|
20
|
-
- - <
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '2.5'
|
23
|
-
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 5
|
30
|
+
segments:
|
31
|
+
- 2
|
32
|
+
- 3
|
33
|
+
version: "2.3"
|
30
34
|
- - <
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
33
|
-
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
hash: 9
|
37
|
+
segments:
|
38
|
+
- 2
|
39
|
+
- 5
|
40
|
+
version: "2.5"
|
41
|
+
type: :runtime
|
42
|
+
version_requirements: *id001
|
43
|
+
- !ruby/object:Gem::Dependency
|
34
44
|
name: bundler
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ~>
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '1.3'
|
40
|
-
type: :development
|
41
45
|
prerelease: false
|
42
|
-
|
43
|
-
|
46
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
47
|
+
none: false
|
48
|
+
requirements:
|
44
49
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
- - '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
hash: 9
|
52
|
+
segments:
|
53
|
+
- 1
|
54
|
+
- 3
|
55
|
+
version: "1.3"
|
54
56
|
type: :development
|
57
|
+
version_requirements: *id002
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rake
|
55
60
|
prerelease: false
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
62
|
+
none: false
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
hash: 3
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
version: "0"
|
70
|
+
type: :development
|
71
|
+
version_requirements: *id003
|
61
72
|
description: Allows multiple Redmine plugins to use tags safely
|
62
|
-
email:
|
73
|
+
email:
|
63
74
|
- hdgarrood@gmail.com
|
64
75
|
executables: []
|
76
|
+
|
65
77
|
extensions: []
|
78
|
+
|
66
79
|
extra_rdoc_files: []
|
67
|
-
|
80
|
+
|
81
|
+
files:
|
68
82
|
- .gitignore
|
69
83
|
- .gitmodules
|
70
84
|
- .travis.yml
|
@@ -82,34 +96,42 @@ files:
|
|
82
96
|
- test/run.bash
|
83
97
|
- test/test.bats
|
84
98
|
- test/test_helpers.bash
|
99
|
+
has_rdoc: true
|
85
100
|
homepage: https://github.com/hdgarrood/redmine_acts_as_taggable_on
|
86
|
-
licenses:
|
101
|
+
licenses:
|
87
102
|
- GPLv2
|
88
|
-
metadata: {}
|
89
103
|
post_install_message:
|
90
104
|
rdoc_options: []
|
91
|
-
|
105
|
+
|
106
|
+
require_paths:
|
92
107
|
- lib
|
93
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 3
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
hash: 3
|
123
|
+
segments:
|
124
|
+
- 0
|
125
|
+
version: "0"
|
103
126
|
requirements: []
|
127
|
+
|
104
128
|
rubyforge_project:
|
105
|
-
rubygems_version:
|
129
|
+
rubygems_version: 1.6.2
|
106
130
|
signing_key:
|
107
|
-
specification_version:
|
108
|
-
summary: Allows multiple Redmine plugins to use the acts_as_taggable_on gem without
|
109
|
-
|
110
|
-
test_files:
|
131
|
+
specification_version: 3
|
132
|
+
summary: Allows multiple Redmine plugins to use the acts_as_taggable_on gem without stepping on each others' toes.
|
133
|
+
test_files:
|
111
134
|
- test/mk_temp_redmine.bash
|
112
135
|
- test/run.bash
|
113
136
|
- test/test.bats
|
114
137
|
- test/test_helpers.bash
|
115
|
-
has_rdoc:
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: af36a6d9277e4b6f7ebb23802fd4df6df58549e2
|
4
|
-
data.tar.gz: 170406c9ce7d640b54d6f0958733c19a788cb8b3
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 80e76b8c0900f2770409953877d088c65555095bdef02dc073c17227b03e94f2ba35f294de25f2330689328c459b910437274dba081b0f7fb3d45c244189779c
|
7
|
-
data.tar.gz: 0400ed073a494d7e57abdbc06029d07bebe198fbad7465f1f446a5dee3a7f8008b29639cfeee0229a3afefb3ed1fe90963d2ea202761dded90cda029a8302b89
|