foreman_proxmox 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +340 -340
- data/Rakefile +47 -47
- data/app/controllers/foreman_proxmox/hosts_controller.rb +11 -20
- data/app/controllers/foreman_proxmox/proxmox_controller.rb +15 -0
- data/app/helpers/concerns/foreman_proxmox/hosts_helper_extensions.rb +36 -13
- data/app/models/concerns/foreman_proxmox/host_extensions.rb +19 -19
- data/app/overrides/dashboard/index/sample_override.html.erb.deface +4 -4
- data/app/views/dashboard/_foreman_proxmox_widget.html.erb +2 -2
- data/app/views/foreman_proxmox/hosts/hosts/new_action.html.erb +1 -1
- data/app/views/foreman_proxmox/hosts/new_action.html.erb +1 -14
- data/config/routes.rb +3 -3
- data/lib/foreman_proxmox/engine.rb +79 -79
- data/lib/foreman_proxmox/version.rb +3 -3
- data/lib/foreman_proxmox.rb +4 -4
- data/lib/tasks/foreman_proxmox_tasks.rake +49 -49
- data/locale/Makefile +62 -62
- data/locale/en/foreman_proxmox.po +19 -19
- data/locale/foreman_proxmox.pot +19 -19
- data/locale/gemspec.rb +2 -2
- data/test/factories/foreman_proxmox_factories.rb +5 -5
- data/test/test_plugin_helper.rb +6 -6
- data/test/unit/foreman_proxmox_test.rb +11 -11
- metadata +6 -33
data/locale/Makefile
CHANGED
@@ -1,62 +1,62 @@
|
|
1
|
-
#
|
2
|
-
# Makefile for PO merging and MO generation. More info in the README.
|
3
|
-
#
|
4
|
-
# make all-mo (default) - generate MO files
|
5
|
-
# make check - check translations using translate-tool
|
6
|
-
# make tx-update - download and merge translations from Transifex
|
7
|
-
# make clean - clean everything
|
8
|
-
#
|
9
|
-
DOMAIN = foreman_proxmox
|
10
|
-
VERSION = $(shell ruby -e 'require "rubygems";spec = Gem::Specification::load(Dir.glob("../*.gemspec")[0]);puts spec.version')
|
11
|
-
POTFILE = $(DOMAIN).pot
|
12
|
-
MOFILE = $(DOMAIN).mo
|
13
|
-
POFILES = $(shell find . -name '*.po')
|
14
|
-
MOFILES = $(patsubst %.po,%.mo,$(POFILES))
|
15
|
-
POXFILES = $(patsubst %.po,%.pox,$(POFILES))
|
16
|
-
|
17
|
-
%.mo: %.po
|
18
|
-
mkdir -p $(shell dirname $@)/LC_MESSAGES
|
19
|
-
msgfmt -o $(shell dirname $@)/LC_MESSAGES/$(MOFILE) $<
|
20
|
-
|
21
|
-
# Generate MO files from PO files
|
22
|
-
all-mo: $(MOFILES)
|
23
|
-
|
24
|
-
# Check for malformed strings
|
25
|
-
%.pox: %.po
|
26
|
-
msgfmt -c $<
|
27
|
-
pofilter --nofuzzy -t variables -t blank -t urls -t emails -t long -t newlines \
|
28
|
-
-t endwhitespace -t endpunc -t puncspacing -t options -t printf -t validchars --gnome $< > $@
|
29
|
-
cat $@
|
30
|
-
! grep -q msgid $@
|
31
|
-
|
32
|
-
check: $(POXFILES)
|
33
|
-
msgfmt -c ${POTFILE}
|
34
|
-
|
35
|
-
# Merge PO files
|
36
|
-
update-po:
|
37
|
-
for f in $(shell find ./ -name "*.po") ; do \
|
38
|
-
msgmerge -N --backup=none -U $$f ${POTFILE} ; \
|
39
|
-
done
|
40
|
-
|
41
|
-
# Unify duplicate translations
|
42
|
-
uniq-po:
|
43
|
-
for f in $(shell find ./ -name "*.po") ; do \
|
44
|
-
msguniq $$f -o $$f ; \
|
45
|
-
done
|
46
|
-
|
47
|
-
tx-pull:
|
48
|
-
tx pull -f
|
49
|
-
for f in $(POFILES) ; do \
|
50
|
-
sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
|
51
|
-
done
|
52
|
-
-git commit -a -m "i18n - pulling from tx"
|
53
|
-
|
54
|
-
reset-po:
|
55
|
-
# merging po files is unnecessary when using transifex.com
|
56
|
-
git checkout -- ../locale/*/*po
|
57
|
-
|
58
|
-
tx-update: tx-pull reset-po $(MOFILES)
|
59
|
-
# amend mo files
|
60
|
-
git add ../locale/*/LC_MESSAGES
|
61
|
-
git commit -a --amend -m "i18n - pulling from tx"
|
62
|
-
-echo Changes commited!
|
1
|
+
#
|
2
|
+
# Makefile for PO merging and MO generation. More info in the README.
|
3
|
+
#
|
4
|
+
# make all-mo (default) - generate MO files
|
5
|
+
# make check - check translations using translate-tool
|
6
|
+
# make tx-update - download and merge translations from Transifex
|
7
|
+
# make clean - clean everything
|
8
|
+
#
|
9
|
+
DOMAIN = foreman_proxmox
|
10
|
+
VERSION = $(shell ruby -e 'require "rubygems";spec = Gem::Specification::load(Dir.glob("../*.gemspec")[0]);puts spec.version')
|
11
|
+
POTFILE = $(DOMAIN).pot
|
12
|
+
MOFILE = $(DOMAIN).mo
|
13
|
+
POFILES = $(shell find . -name '*.po')
|
14
|
+
MOFILES = $(patsubst %.po,%.mo,$(POFILES))
|
15
|
+
POXFILES = $(patsubst %.po,%.pox,$(POFILES))
|
16
|
+
|
17
|
+
%.mo: %.po
|
18
|
+
mkdir -p $(shell dirname $@)/LC_MESSAGES
|
19
|
+
msgfmt -o $(shell dirname $@)/LC_MESSAGES/$(MOFILE) $<
|
20
|
+
|
21
|
+
# Generate MO files from PO files
|
22
|
+
all-mo: $(MOFILES)
|
23
|
+
|
24
|
+
# Check for malformed strings
|
25
|
+
%.pox: %.po
|
26
|
+
msgfmt -c $<
|
27
|
+
pofilter --nofuzzy -t variables -t blank -t urls -t emails -t long -t newlines \
|
28
|
+
-t endwhitespace -t endpunc -t puncspacing -t options -t printf -t validchars --gnome $< > $@
|
29
|
+
cat $@
|
30
|
+
! grep -q msgid $@
|
31
|
+
|
32
|
+
check: $(POXFILES)
|
33
|
+
msgfmt -c ${POTFILE}
|
34
|
+
|
35
|
+
# Merge PO files
|
36
|
+
update-po:
|
37
|
+
for f in $(shell find ./ -name "*.po") ; do \
|
38
|
+
msgmerge -N --backup=none -U $$f ${POTFILE} ; \
|
39
|
+
done
|
40
|
+
|
41
|
+
# Unify duplicate translations
|
42
|
+
uniq-po:
|
43
|
+
for f in $(shell find ./ -name "*.po") ; do \
|
44
|
+
msguniq $$f -o $$f ; \
|
45
|
+
done
|
46
|
+
|
47
|
+
tx-pull:
|
48
|
+
tx pull -f
|
49
|
+
for f in $(POFILES) ; do \
|
50
|
+
sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
|
51
|
+
done
|
52
|
+
-git commit -a -m "i18n - pulling from tx"
|
53
|
+
|
54
|
+
reset-po:
|
55
|
+
# merging po files is unnecessary when using transifex.com
|
56
|
+
git checkout -- ../locale/*/*po
|
57
|
+
|
58
|
+
tx-update: tx-pull reset-po $(MOFILES)
|
59
|
+
# amend mo files
|
60
|
+
git add ../locale/*/LC_MESSAGES
|
61
|
+
git commit -a --amend -m "i18n - pulling from tx"
|
62
|
+
-echo Changes commited!
|
@@ -1,19 +1,19 @@
|
|
1
|
-
# foreman_proxmox
|
2
|
-
#
|
3
|
-
# This file is distributed under the same license as foreman_proxmox.
|
4
|
-
#
|
5
|
-
#, fuzzy
|
6
|
-
msgid ""
|
7
|
-
msgstr ""
|
8
|
-
"Project-Id-Version: version 0.0.1\n"
|
9
|
-
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"POT-Creation-Date: 2014-08-20 08:46+0100\n"
|
11
|
-
"PO-Revision-Date: 2014-08-20 08:54+0100\n"
|
12
|
-
"Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
|
13
|
-
"Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
|
14
|
-
"Language: \n"
|
15
|
-
"MIME-Version: 1.0\n"
|
16
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
17
|
-
"Content-Transfer-Encoding: 8bit\n"
|
18
|
-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19
|
-
|
1
|
+
# foreman_proxmox
|
2
|
+
#
|
3
|
+
# This file is distributed under the same license as foreman_proxmox.
|
4
|
+
#
|
5
|
+
#, fuzzy
|
6
|
+
msgid ""
|
7
|
+
msgstr ""
|
8
|
+
"Project-Id-Version: version 0.0.1\n"
|
9
|
+
"Report-Msgid-Bugs-To: \n"
|
10
|
+
"POT-Creation-Date: 2014-08-20 08:46+0100\n"
|
11
|
+
"PO-Revision-Date: 2014-08-20 08:54+0100\n"
|
12
|
+
"Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
|
13
|
+
"Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
|
14
|
+
"Language: \n"
|
15
|
+
"MIME-Version: 1.0\n"
|
16
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
17
|
+
"Content-Transfer-Encoding: 8bit\n"
|
18
|
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19
|
+
|
data/locale/foreman_proxmox.pot
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
# foreman_proxmox
|
2
|
-
#
|
3
|
-
# This file is distributed under the same license as foreman_proxmox.
|
4
|
-
#
|
5
|
-
#, fuzzy
|
6
|
-
msgid ""
|
7
|
-
msgstr ""
|
8
|
-
"Project-Id-Version: version 0.0.1\n"
|
9
|
-
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"POT-Creation-Date: 2014-08-20 08:46+0100\n"
|
11
|
-
"PO-Revision-Date: 2014-08-20 08:46+0100\n"
|
12
|
-
"Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
|
13
|
-
"Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
|
14
|
-
"Language: \n"
|
15
|
-
"MIME-Version: 1.0\n"
|
16
|
-
"Content-Type: text/plain; charset=UTF-8\n"
|
17
|
-
"Content-Transfer-Encoding: 8bit\n"
|
18
|
-
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
19
|
-
|
1
|
+
# foreman_proxmox
|
2
|
+
#
|
3
|
+
# This file is distributed under the same license as foreman_proxmox.
|
4
|
+
#
|
5
|
+
#, fuzzy
|
6
|
+
msgid ""
|
7
|
+
msgstr ""
|
8
|
+
"Project-Id-Version: version 0.0.1\n"
|
9
|
+
"Report-Msgid-Bugs-To: \n"
|
10
|
+
"POT-Creation-Date: 2014-08-20 08:46+0100\n"
|
11
|
+
"PO-Revision-Date: 2014-08-20 08:46+0100\n"
|
12
|
+
"Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
|
13
|
+
"Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
|
14
|
+
"Language: \n"
|
15
|
+
"MIME-Version: 1.0\n"
|
16
|
+
"Content-Type: text/plain; charset=UTF-8\n"
|
17
|
+
"Content-Transfer-Encoding: 8bit\n"
|
18
|
+
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
19
|
+
|
data/locale/gemspec.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
# Matches foreman_proxmox.gemspec
|
2
|
-
_('TODO: Description of ForemanProxmox.')
|
1
|
+
# Matches foreman_proxmox.gemspec
|
2
|
+
_('TODO: Description of ForemanProxmox.')
|
@@ -1,5 +1,5 @@
|
|
1
|
-
FactoryGirl.define do
|
2
|
-
factory :host do
|
3
|
-
name 'foreman_proxmox'
|
4
|
-
end
|
5
|
-
end
|
1
|
+
FactoryGirl.define do
|
2
|
+
factory :host do
|
3
|
+
name 'foreman_proxmox'
|
4
|
+
end
|
5
|
+
end
|
data/test/test_plugin_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# This calls the main test_helper in Foreman-core
|
2
|
-
require 'test_helper'
|
3
|
-
|
4
|
-
# Add plugin to FactoryGirl's paths
|
5
|
-
FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
|
6
|
-
FactoryGirl.reload
|
1
|
+
# This calls the main test_helper in Foreman-core
|
2
|
+
require 'test_helper'
|
3
|
+
|
4
|
+
# Add plugin to FactoryGirl's paths
|
5
|
+
FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
|
6
|
+
FactoryGirl.reload
|
@@ -1,11 +1,11 @@
|
|
1
|
-
require 'test_plugin_helper'
|
2
|
-
|
3
|
-
class ForemanProxmoxTest < ActiveSupport::TestCase
|
4
|
-
setup do
|
5
|
-
User.current = User.find_by_login 'admin'
|
6
|
-
end
|
7
|
-
|
8
|
-
test 'the truth' do
|
9
|
-
assert true
|
10
|
-
end
|
11
|
-
end
|
1
|
+
require 'test_plugin_helper'
|
2
|
+
|
3
|
+
class ForemanProxmoxTest < ActiveSupport::TestCase
|
4
|
+
setup do
|
5
|
+
User.current = User.find_by_login 'admin'
|
6
|
+
end
|
7
|
+
|
8
|
+
test 'the truth' do
|
9
|
+
assert true
|
10
|
+
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_proxmox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Isensee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: deface
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rest-client
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
13
|
- !ruby/object:Gem::Dependency
|
42
14
|
name: rubocop
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +38,7 @@ dependencies:
|
|
66
38
|
- - ">="
|
67
39
|
- !ruby/object:Gem::Version
|
68
40
|
version: '0'
|
69
|
-
description:
|
41
|
+
description: Adds Proxmox support to foreman
|
70
42
|
email:
|
71
43
|
- f.isensee@gmail.com
|
72
44
|
executables: []
|
@@ -77,6 +49,7 @@ files:
|
|
77
49
|
- README.md
|
78
50
|
- Rakefile
|
79
51
|
- app/controllers/foreman_proxmox/hosts_controller.rb
|
52
|
+
- app/controllers/foreman_proxmox/proxmox_controller.rb
|
80
53
|
- app/helpers/concerns/foreman_proxmox/hosts_helper_extensions.rb
|
81
54
|
- app/models/concerns/foreman_proxmox/host_extensions.rb
|
82
55
|
- app/overrides/dashboard/index/sample_override.html.erb.deface
|
@@ -116,11 +89,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
89
|
version: '0'
|
117
90
|
requirements: []
|
118
91
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.4.
|
92
|
+
rubygems_version: 2.4.6
|
120
93
|
signing_key:
|
121
94
|
specification_version: 4
|
122
95
|
summary: Proxmox support for foreman
|
123
96
|
test_files:
|
97
|
+
- test/unit/foreman_proxmox_test.rb
|
124
98
|
- test/factories/foreman_proxmox_factories.rb
|
125
99
|
- test/test_plugin_helper.rb
|
126
|
-
- test/unit/foreman_proxmox_test.rb
|