itamae-plugin-recipe-redmine 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2e47f7aa811c960bea9d8053afddd9f1b3107f90
4
- data.tar.gz: 31bd0bd22c88482a9d3a86511d6ec66782681fa4
2
+ SHA256:
3
+ metadata.gz: fc56912ec9745e26bbb45c1e9e4a895bb14687d288ed571a63ca46f7b3d65675
4
+ data.tar.gz: 60b54680e54f0c30345129673334e50c790166c0a5607a61298d3d5aaadd8d5d
5
5
  SHA512:
6
- metadata.gz: 59db5521f76a6024614a8a5fe13c58d421b5ad6a8f4012587d9bd812ed4442f01cb5620a83ea77c763994bf2d85744ae472d0ba40a0b03681057414c39c71cd5
7
- data.tar.gz: 2d63527945e460067ae66bc076b3e13131e89716e360c297e7fb6653a241c651b780a676c486b8ff6496d055a30cceaca8b28f2f8fe13a2facbcf1355c674be2
6
+ metadata.gz: 9f61470d8536501b0fdd93319eb1a2e2ca5f37486504fd5ad35fbbce8d900f56b1bae7707d090ea8a725874d50ed21927dabae47d63ac5c67b2cd54e7f02f074
7
+ data.tar.gz: 4632ce44948e107828835ae204ff889ea36c61b1a52abbb14ed8d0c09315089a7f30910df5abbe3aaa026e5a741751b198d6fd62da251f56faa4d89f1f5a407c
@@ -1,5 +1,3 @@
1
- include_recipe 'postgresql'
2
-
3
1
  require_relative 'version'
4
2
  version = ENV['REDMINE_VERSION'] || Itamae::Plugin::Recipe::Redmine::REDMINE_VERSION
5
3
 
@@ -20,23 +18,17 @@ version = ENV['REDMINE_VERSION'] || Itamae::Plugin::Recipe::Redmine::REDMINE_VER
20
18
  end
21
19
  end
22
20
 
23
- user 'redmine' do
24
- user 'root'
25
- system_user true
26
- home '/opt/redmine/current'
27
- end
28
-
29
21
  directory '/opt/redmine' do
30
22
  user 'root'
31
- owner 'redmine'
32
- group 'redmine'
23
+ owner ENV['USER']
24
+ group ENV['USER']
33
25
  mode '755'
34
26
  end
35
27
 
36
28
  directory '/opt/redmine/tmp' do
37
29
  user 'root'
38
30
  owner ENV['USER']
39
- group 'redmine'
31
+ group ENV['USER']
40
32
  mode '755'
41
33
  end
42
34
 
@@ -54,67 +46,30 @@ execute "build redmine-#{version}" do
54
46
  set -eu
55
47
  rm -Rf redmine-#{version}/
56
48
  tar zxf redmine-#{version}.tar.gz
57
- sudo rm -Rf /opt/redmine/redmine-#{version}/
58
- sudo mv redmine-#{version} /opt/redmine/
59
- sudo chown -R redmine:redmine /opt/redmine/redmine-#{version}
60
- sudo -u redmine touch /opt/redmine/redmine-#{version}/INSTALLED
49
+ rm -Rf /opt/redmine/redmine-#{version}/
50
+ mv redmine-#{version} /opt/redmine/
51
+ touch /opt/redmine/redmine-#{version}/INSTALLED
61
52
  EOF
62
53
  not_if "test -e /opt/redmine/redmine-#{version}/INSTALLED"
63
54
  end
64
55
 
65
56
  template "/opt/redmine/redmine-#{version}/config/configuration.yml" do
66
57
  user 'root'
67
- owner 'redmine'
68
- group 'redmine'
69
- mode '644'
70
- end
71
-
72
- template "/opt/redmine/redmine-#{version}/config/database.yml" do
73
- user 'root'
74
- owner 'redmine'
75
- group 'redmine'
58
+ owner ENV['USER']
59
+ group ENV['USER']
76
60
  mode '644'
77
- variables redmine_password: ENV['REDMINE_PASSWORD'] || 'redmine'
78
- end
79
-
80
- execute 'createuser' do
81
- command "sh #{::File.join(File.dirname(__FILE__), 'create_user.sh')} #{ENV['REDMINE_PASSWORD'] || 'redmine'}"
82
- not_if "psql -c \"select * from pg_user where usename = 'redmine';\" | grep redmine"
83
61
  end
84
62
 
85
- execute 'createdb -E UTF-8 -l ja_JP.UTF-8 -O redmine -T template0 redmine' do
86
- user 'postgres'
87
- not_if "psql -c \"select * from pg_database where datname = 'redmine';\" | grep redmine"
88
- end
89
-
90
- gem_package 'bundler' do
91
- user 'root'
92
- version '1.17.3'
93
- end
94
-
95
- execute 'bundle _1.17.3_ install --without development test --path vendor/bundle' do
96
- user 'redmine'
63
+ execute 'bundle install --without development test --path vendor/bundle' do
97
64
  cwd "/opt/redmine/redmine-#{version}"
98
65
  command <<-EOF
99
66
  set -eu
100
- bundle _1.17.3_ install --without development test --path vendor/bundle
67
+ bundle install --without development test --path vendor/bundle
101
68
  touch BUNDLED
102
69
  EOF
103
70
  not_if "test -e /opt/redmine/redmine-#{version}/BUNDLED"
104
71
  end
105
72
 
106
- execute 'redmine initialization' do
107
- user 'redmine'
108
- cwd "/opt/redmine/redmine-#{version}"
109
- command <<-EOF
110
- set -eu
111
- bundle exec rake generate_secret_token
112
- bundle exec rake db:migrate RAILS_ENV=production
113
- touch INITIALIZED
114
- EOF
115
- not_if "test -e /opt/redmine/redmine-#{version}/INITIALIZED"
116
- end
117
-
118
73
  link 'current' do
119
74
  user 'root'
120
75
  cwd '/opt/redmine'
@@ -0,0 +1 @@
1
+ 6e29f7712384aba759797c8144d779da406f55395be7da03b79fe140d2be22aa redmine-3.2.5.tar.gz
@@ -0,0 +1 @@
1
+ 30fb5b476ccf9ff3e3a1132b881a9a14e5b3f3c3c736aea4b29cdcc7cf739421 redmine-4.0.3.tar.gz
@@ -2,12 +2,12 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module Redmine
5
- VERSION = "0.0.3"
5
+ VERSION = "0.1.0"
6
6
 
7
7
  REDMINE_VERSION = [
8
- REDMINE_VERSION_MAJOR = '3',
9
- REDMINE_VERSION_MINOR = '4',
10
- REDMINE_VERSION_PATCH = '10'
8
+ REDMINE_VERSION_MAJOR = '4',
9
+ REDMINE_VERSION_MINOR = '0',
10
+ REDMINE_VERSION_PATCH = '3'
11
11
  ].join('.')
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-redmine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - y-matsuda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-27 00:00:00.000000000 Z
11
+ date: 2020-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae
@@ -94,11 +94,11 @@ files:
94
94
  - bin/console
95
95
  - bin/setup
96
96
  - itamae-plugin-recipe-redmine.gemspec
97
- - lib/itamae/plugin/recipe/redmine/create_user.sh
98
97
  - lib/itamae/plugin/recipe/redmine/default.rb
98
+ - lib/itamae/plugin/recipe/redmine/redmine-3.2.5_sha256sum.txt
99
99
  - lib/itamae/plugin/recipe/redmine/redmine-3.4.10_sha256sum.txt
100
+ - lib/itamae/plugin/recipe/redmine/redmine-4.0.3_sha256sum.txt
100
101
  - lib/itamae/plugin/recipe/redmine/templates/configuration.yml.erb
101
- - lib/itamae/plugin/recipe/redmine/templates/database.yml.erb
102
102
  - lib/itamae/plugin/recipe/redmine/version.rb
103
103
  homepage: https://github.com/maedadev/itamae-plugin-recipe-redmine
104
104
  licenses:
@@ -119,8 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  - !ruby/object:Gem::Version
120
120
  version: '0'
121
121
  requirements: []
122
- rubyforge_project:
123
- rubygems_version: 2.5.2.3
122
+ rubygems_version: 3.0.6
124
123
  signing_key:
125
124
  specification_version: 4
126
125
  summary: itamae recipe to ease redmine installation
@@ -1,14 +0,0 @@
1
- #!/bin/bash
2
-
3
- expect -c "
4
- set timeout 5
5
- spawn sudo -u postgres LANG=en.en_US createuser -P redmine
6
-
7
- expect \"Enter password for new role\"
8
- send \"$1\n\"
9
-
10
- expect \"Enter it again\"
11
- send \"$1\n\"
12
-
13
- interact
14
- "
@@ -1,6 +0,0 @@
1
- production:
2
- adapter: postgresql
3
- database: redmine
4
- host: localhost
5
- username: redmine
6
- password: <%%= ENV['REDMINE_PASSWORD'] || '<%= @redmine_password %>' %>