redmine_acts_as_taggable_on 0.3.0 → 1.0.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: 2bc9e3d024cb678113b306c60f49d40462100594
4
- data.tar.gz: 8ecbd8e715db36c5351c67494a51320dfb3440c0
3
+ metadata.gz: 7a8aebb95ce3366f4a0a5bca2b04eb5c99e92b9f
4
+ data.tar.gz: 2107a0155fafe2af5f4eec883fad6fb192de8178
5
5
  SHA512:
6
- metadata.gz: 3d7251ac7ad29c285e6a8e317093a65ea67a62ed3d3bd73508abeca025da19dd8f34962a5360e7b474080b1d1b92c1455e565472f5b5d884da76490c46556d31
7
- data.tar.gz: af42f34a2a26b8e627945a39e796cfb5a5eba32d689278763769443706ba97528e596e2d666a65bb9f5aa792890b39db9bd12d0df1f3b3ff7d86a7ca9ec0c6ca
6
+ metadata.gz: b476996b9db2467b8129b78b5f6eaae42a0a0dbc3f4f3a161c150bc93c8b935f80bc3bd5ff0eeea3b8bbba9756290bf6b541b2e85026af5f5675cb800935dfcc
7
+ data.tar.gz: f31a1fe060dff5ea5d7c170c204dc172395105ab3612bb9168c217d72fb4f1f7de1087bd6148bd76ae21db3eb6fd56f7cd7e461977350a7f69b7a701b7e8983e
@@ -1,13 +1,23 @@
1
1
  language: ruby
2
- before_install:
3
- - gem update --system 1.8.25
4
- - gem --version
2
+ install: echo 'explicitly doing nothing'
5
3
  script: ./test/run.bash
6
- rvm: 2.0.0-p0
7
- env: branches="trunk tags/2.3.1"
4
+ rvm:
5
+ - 2.0.0-p0
6
+ - 1.9.3-p392
7
+ - 1.8.7-p371
8
+ env:
9
+ - branches="trunk"
10
+ - branches="tags/2.3.1"
11
+ - branches="tags/2.2.4"
12
+ - branches="tags/2.1.5"
13
+ - branches="tags/2.0.4"
8
14
  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"
15
+ exclude:
16
+ # these versions are known not to work together, according to
17
+ # http://www.redmine.org/projects/redmine/wiki/RedmineInstall
18
+ - rvm: 2.0.0-p0
19
+ env: branches="tags/2.2.4"
20
+ - rvm: 2.0.0-p0
21
+ env: branches="tags/2.1.5"
22
+ - rvm: 2.0.0-p0
23
+ env: branches="tags/2.0.4"
data/README.md CHANGED
@@ -52,7 +52,17 @@ some nasty monkey-patching. On the other hand, data loss is no fun at all.
52
52
 
53
53
  Add it to your plugin's Gemfile:
54
54
 
55
- gem 'redmine_acts_as_taggable_on', '~> 0.3.0'
55
+ gem 'redmine_acts_as_taggable_on', '~> 1.0'
56
+
57
+ **Note**: Please use the above line _verbatim_. This is to avoid being told by
58
+ Bundler that we aren't allowed to use multiple declarations of the same gem
59
+ with different version requirements.
60
+
61
+ I've chosen the above requirement to ensure that there are no accidental
62
+ breakages -- the public API (that is, the following paragraph) will remain the
63
+ same throughout version 1.0. If it does need to change, I'll bump the major
64
+ version. This should ensure that Bundler only refuses to bundle when there is
65
+ an actual incompatibility.
56
66
 
57
67
  Add the migration:
58
68
 
@@ -1,3 +1,3 @@
1
1
  module RedmineActsAsTaggableOn
2
- VERSION = "0.3.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -1,31 +1,38 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
+ # if --verbose is given, output logging info to stdout. Otherwise, to /dev/null
5
+ if [ "$1" = "--verbose" ]; then
6
+ shift
7
+ mk_temp_redmine_out="/dev/fd/2"
8
+ else
9
+ mk_temp_redmine_out="/dev/null"
10
+ fi
11
+
4
12
  # makes a new Redmine installation in a temporary directory, using SQLite as
5
13
  # the database.
6
- make_temp_redmine() {
7
- local branch="$1"
8
- [ -z "$branch" ] && branch="trunk"
14
+ branch="$1"
15
+ [ -z "$branch" ] && branch="trunk"
9
16
 
10
- # for branches which have slashes in them, like tags/2.3.0
11
- local branch_filename="${branch//\//-}"
12
- temp_redmine=`mktemp -d /tmp/redmine_acts_as_taggable_on.$branch_filename.XXXXXXX`
13
- pushd "$temp_redmine"
17
+ # for branches which have slashes in them, like tags/2.3.0
18
+ branch_filename="${branch//\//-}"
19
+ temp_redmine=`mktemp -d /tmp/redmine_acts_as_taggable_on.$branch_filename.XXXXXXX`
20
+ cd "$temp_redmine"
14
21
 
15
- svn checkout "http://svn.redmine.org/redmine/$branch" redmine
16
- pushd redmine
22
+ svn checkout "http://svn.redmine.org/redmine/$branch" redmine \
23
+ > "$mk_temp_redmine_out"
24
+ cd redmine
17
25
 
18
- echo "production:
26
+ echo "production:
19
27
  adapter: sqlite3
20
28
  database: db/redmine.sqlite3" > config/database.yml
21
29
 
22
- bundle install \
23
- --without="postgresql development test mysql rmagick ldap"
24
- rake generate_secret_token db:create db:migrate
30
+ bundle install \
31
+ --without="development test rmagick ldap mysql postgresql" \
32
+ --gemfile="$PWD/Gemfile" \
33
+ --binstubs \
34
+ > "$mk_temp_redmine_out"
25
35
 
26
- popd
27
- popd
28
- }
36
+ rake db:create db:migrate > "$mk_temp_redmine_out"
29
37
 
30
- make_temp_redmine "$1" >/dev/null
31
38
  echo "$temp_redmine"
@@ -3,18 +3,21 @@ 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="$(test/mk_temp_redmine.bash "$1")"
7
- if [ "$?" -ne 0 ]; then
6
+ local temp_redmine_path="$($redmine_acts_as_taggable_on_path/test/mk_temp_redmine.bash "$1")"
7
+ if [ "$?" -ne 0 ] || [ -z "$temp_redmine_path" ]; then
8
8
  echo "failed to create temporary redmine on $1: cancelling these tests"
9
9
  return 1
10
10
  fi
11
11
 
12
12
  export temp_redmine_path
13
-
14
- [ -f test/bats/bin/bats ] || git submodule update
13
+ cd "$temp_redmine_path/redmine"
15
14
 
16
15
  local test_status=0
17
- test/bats/bin/bats test/test.bats || test_status=1
16
+ "$redmine_acts_as_taggable_on_path/test/bats/bin/bats" \
17
+ "$redmine_acts_as_taggable_on_path/test/test.bats" || test_status=1
18
+
19
+ # avoid 'error retrieving current directory' during the next test
20
+ cd /tmp
18
21
 
19
22
  if [ "$test_status" -eq 1 ]; then
20
23
  echo "Some tests failed on $1. You can inspect the tree at $temp_redmine_path"
@@ -22,16 +25,17 @@ run_tests_on_branch() {
22
25
  rm -rf "$temp_redmine_path"
23
26
  fi
24
27
 
25
- temp_redmine_path=""
26
28
  return $test_status
27
29
  }
28
30
 
29
- RAILS_ENV="production"
30
- export RAILS_ENV
31
+ export RAILS_ENV="production"
32
+
33
+ # these are needed on Travis CI
34
+ export BUNDLE_GEMFILE=""
35
+ export PATH="./bin:$PATH"
31
36
 
32
37
  redmine_acts_as_taggable_on_path="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)"
33
38
  export redmine_acts_as_taggable_on_path
34
- pushd "$redmine_acts_as_taggable_on_path" >/dev/null
35
39
 
36
40
  # branches should be a space-separated string of repo paths to check out.
37
41
  # We don't use an array because they're difficult to export.
@@ -48,5 +52,4 @@ for branch in $branches; do
48
52
  echo
49
53
  done
50
54
 
51
- popd >/dev/null
52
55
  exit $test_status
@@ -7,7 +7,6 @@ load test_helpers
7
7
  preserved_files=(db/redmine.sqlite3 db/schema.rb)
8
8
 
9
9
  setup() {
10
- pushd "$temp_redmine_path/redmine" >/dev/null
11
10
  for file in ${preserved_files[@]}; do
12
11
  cp $file $file.bak
13
12
  done
@@ -18,7 +17,6 @@ teardown() {
18
17
  for file in ${preserved_files[@]}; do
19
18
  mv $file.bak $file
20
19
  done
21
- popd >/dev/null
22
20
  }
23
21
 
24
22
  @test "migrates upwards with solitary proper plugin" {
@@ -4,12 +4,11 @@
4
4
  mk_standard_plugin() {
5
5
  local name="redmine_$1"
6
6
  mkdir plugins/$name
7
- pushd plugins/$name >/dev/null
7
+ cd plugins/$name
8
8
 
9
9
  echo "Redmine::Plugin.register(:$name) { name '$name' }" > init.rb
10
10
 
11
- popd >/dev/null
12
-
11
+ cd ../..
13
12
  echo "Created a standard redmine plugin: $name"
14
13
  }
15
14
 
@@ -17,7 +16,7 @@ mk_standard_plugin() {
17
16
  mk_proper_plugin() {
18
17
  mk_standard_plugin "$1" >/dev/null
19
18
  local name="redmine_$1"
20
- pushd plugins/$name >/dev/null
19
+ cd plugins/$name
21
20
 
22
21
  echo "source 'https://rubygems.org'
23
22
  gem 'redmine_acts_as_taggable_on',
@@ -31,10 +30,8 @@ Redmine::Plugin.register(:$name) { requires_acts_as_taggable_on }" \
31
30
  echo "class AddTagsAndTaggings < RedmineActsAsTaggableOn::Migration; end" \
32
31
  > db/migrate/001_add_tags_and_taggings.rb
33
32
 
34
- bundle >/dev/null
35
-
36
- popd >/dev/null
37
-
33
+ cd ../..
34
+ bundle --gemfile="$PWD/Gemfile"
38
35
  echo "Created a redmine plugin using redmine_acts_as_taggable_on: $name"
39
36
  }
40
37
 
@@ -43,13 +40,12 @@ Redmine::Plugin.register(:$name) { requires_acts_as_taggable_on }" \
43
40
  mk_plugin_missing_declaration() {
44
41
  mk_proper_plugin "$1" >/dev/null
45
42
  local name="redmine_$1"
46
- pushd plugins/$name >/dev/null
43
+ cd plugins/$name
47
44
 
48
45
  echo "require 'redmine_acts_as_taggable_on/initialize'
49
46
  Redmine::Plugin.register(:$name) { name '$name' }" > init.rb
50
47
 
51
- popd >/dev/null
52
-
48
+ cd ../..
53
49
  echo "Created a redmine plugin using redmine_acts_as_taggable_on"
54
50
  echo " (but without the declaration): $name"
55
51
  }
@@ -59,13 +55,13 @@ Redmine::Plugin.register(:$name) { name '$name' }" > init.rb
59
55
  mk_old_style_plugin() {
60
56
  mk_standard_plugin "$1" >/dev/null
61
57
  local name="redmine_$1"
62
- pushd plugins/$name >/dev/null
58
+ cd plugins/$name
63
59
 
64
60
  echo "source 'https://rubygems.org'
65
61
  gem 'acts-as-taggable-on'" > Gemfile
66
- bundle >/dev/null
67
- popd >/dev/null
68
62
 
63
+ cd ../..
64
+ bundle --gemfile="$PWD/Gemfile"
69
65
  echo "Created a plugin using acts-as-taggable-on without the embedded"
70
66
  echo " migration: $name"
71
67
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine_acts_as_taggable_on
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Garrood