foreman_hosts 0.0.1dev
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.
- data/LICENSE +619 -0
- data/README.md +155 -0
- data/Rakefile +47 -0
- data/app/controllers/foreman_hosts/hosts_controller.rb +27 -0
- data/app/helpers/concerns/foreman_hosts/hosts_helper_extensions.rb +20 -0
- data/app/models/concerns/foreman_hosts/host_extensions.rb +19 -0
- data/app/overrides/dashboard/index/sample_override.html.erb.deface +4 -0
- data/app/views/dashboard/_foreman_hosts_widget.html.erb +2 -0
- data/app/views/foreman_hosts/hosts/export.xlsx.axlsx +130 -0
- data/app/views/foreman_hosts/hosts/hosts/new_action.html.erb +1 -0
- data/app/views/foreman_hosts/hosts/new_action.html.erb +1 -0
- data/app/views/foreman_hosts/hosts/report_index.html.erb +46 -0
- data/app/views/foreman_hosts/layouts/layouts/new_layout.html.erb +0 -0
- data/app/views/foreman_hosts/layouts/new_layout.html.erb +0 -0
- data/bin/foreman-hosts +5 -0
- data/config/routes.rb +5 -0
- data/lib/foreman_hosts/engine.rb +86 -0
- data/lib/foreman_hosts/version.rb +3 -0
- data/lib/foreman_hosts.rb +4 -0
- data/lib/tasks/foreman_hosts_tasks.rake +49 -0
- data/locale/Makefile +62 -0
- data/locale/en/foreman_hosts.po +19 -0
- data/locale/foreman_hosts.pot +19 -0
- data/locale/gemspec.rb +2 -0
- data/test/factories/foreman_hosts_factories.rb +5 -0
- data/test/test_plugin_helper.rb +6 -0
- data/test/unit/foreman_hosts_test.rb +11 -0
- metadata +107 -0
data/locale/Makefile
ADDED
@@ -0,0 +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_hosts
|
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!
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# foreman_hosts
|
2
|
+
#
|
3
|
+
# This file is distributed under the same license as foreman_hosts.
|
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
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# foreman_hosts
|
2
|
+
#
|
3
|
+
# This file is distributed under the same license as foreman_hosts.
|
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
ADDED
metadata
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: foreman_hosts
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1dev
|
5
|
+
prerelease: 5
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- jianbo
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-09-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rubocop
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rdoc
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: Description of ForemanHosts.
|
47
|
+
email:
|
48
|
+
- jianbo.ji@shinyinfo.com.cn
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- app/models/concerns/foreman_hosts/host_extensions.rb
|
54
|
+
- app/overrides/dashboard/index/sample_override.html.erb.deface
|
55
|
+
- app/helpers/concerns/foreman_hosts/hosts_helper_extensions.rb
|
56
|
+
- app/views/dashboard/_foreman_hosts_widget.html.erb
|
57
|
+
- app/views/foreman_hosts/layouts/layouts/new_layout.html.erb
|
58
|
+
- app/views/foreman_hosts/layouts/new_layout.html.erb
|
59
|
+
- app/views/foreman_hosts/hosts/new_action.html.erb
|
60
|
+
- app/views/foreman_hosts/hosts/report_index.html.erb
|
61
|
+
- app/views/foreman_hosts/hosts/export.xlsx.axlsx
|
62
|
+
- app/views/foreman_hosts/hosts/hosts/new_action.html.erb
|
63
|
+
- app/controllers/foreman_hosts/hosts_controller.rb
|
64
|
+
- bin/foreman-hosts
|
65
|
+
- config/routes.rb
|
66
|
+
- lib/foreman_hosts.rb
|
67
|
+
- lib/foreman_hosts/engine.rb
|
68
|
+
- lib/foreman_hosts/version.rb
|
69
|
+
- lib/tasks/foreman_hosts_tasks.rake
|
70
|
+
- locale/gemspec.rb
|
71
|
+
- locale/foreman_hosts.pot
|
72
|
+
- locale/en/foreman_hosts.po
|
73
|
+
- locale/Makefile
|
74
|
+
- LICENSE
|
75
|
+
- Rakefile
|
76
|
+
- README.md
|
77
|
+
- test/factories/foreman_hosts_factories.rb
|
78
|
+
- test/unit/foreman_hosts_test.rb
|
79
|
+
- test/test_plugin_helper.rb
|
80
|
+
homepage: https://github.com/stdtnt/foreman_hosts
|
81
|
+
licenses: []
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options: []
|
84
|
+
require_paths:
|
85
|
+
- lib
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ! '>'
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: 1.3.1
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 1.8.23
|
101
|
+
signing_key:
|
102
|
+
specification_version: 3
|
103
|
+
summary: Summary of ForemanHosts.
|
104
|
+
test_files:
|
105
|
+
- test/factories/foreman_hosts_factories.rb
|
106
|
+
- test/unit/foreman_hosts_test.rb
|
107
|
+
- test/test_plugin_helper.rb
|