Project

General

Profile

Revision 7be6b39c

Added by Eric Helms almost 8 years ago

Refs #9848: Move config file to config directory and provide via gem

View differences:

.gitignore
20 20
pickle-email-*.html
21 21
.project
22 22
config/initializers/secret_token.rb
23
config/*.yml
24 23
config/cli.modules.d/*.yml
25 24
!config/*.template.yml
26 25
!config/cli.modules.d/*.template.yml
config/cli.modules.d/csv.template.yml
1
# :csv:
2
#   :enable_module: true
3
#   :host:          'https://localhost'
4
#   :username:      'admin'
5
#   :password:      'changeme'
6
#   :products_sync: true
config/cli.modules.d/foreman.template.yml
1
# :foreman:
2
#   :enable_module: true
3
#   :host:          'https://localhost'
4
#   :username:      'admin'
5
#   :password:      'changeme'
config/cli.modules.d/katello.template.yml
1
# :katello:
2
#   :enable_module: true
3
#   :host:          'https://localhost'
4
#   :username:      'admin'
5
#   :password:      'changeme'
config/cli_config.template.yml
1
:ui:
2
  :interactive: true
3
  :per_page: 20
4
  :history_file: './log/history'
5

  
6
:watch_plain: true # enable/disable color output of logger in Clamp commands
7

  
8
:log_dir: './log'
9
:log_level: 'error'
10
:log_api_calls: false
11
:log_size: 5 # MB
config/csv.yml
1
:csv:
2
  :enable_module: true
csv.yml
1
:csv:
2
  :enable_module: true
hammer_cli_csv.gemspec
15 15
  spec.summary = "CSV commands for Hammer"
16 16
  spec.description = "Hammer-CLI-CSV is a plugin for Hammer to provide bulk actions against a Katello server."
17 17

  
18
  spec.files = Dir["lib/**/*.rb"]
18
  spec.files = Dir["config/**/*", "lib/**/*.rb"]
19 19
  spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20 20
  spec.require_paths = %w(lib)
21 21

  
rubygem-hammer_cli_csv.spec
1
%global gemname hammer_cli_csv
1
%global gem_name hammer_cli_csv
2 2
%global confdir hammer
3 3

  
4
%global geminstdir %{gem_dir}/gems/%{gemname}-%{version}
5

  
6 4
Summary: CSV input/output command plugin for the Hammer CLI
7
Name: rubygem-%{gemname}
5
Name: rubygem-%{gem_name}
8 6
Version: 1.0.0
9 7
Release: 5%{?dist}
10 8
Group: Development/Languages
11 9
License: GPLv3
12 10
URL: https://github.com/Katello/hammer-cli-csv
13
Source0: %{gemname}-%{version}.gem
14
Source1: csv.yml
11
Source0: %{gem_name}-%{version}.gem
15 12

  
16 13
%if 0%{?rhel} == 6
17 14
Requires: ruby(abi)
......
24 21
BuildRequires: rubygems-devel
25 22
BuildRequires: ruby
26 23
BuildArch: noarch
27
Provides: rubygem(%{gemname}) = %{version}
24
Provides: rubygem(%{gem_name}) = %{version}
28 25

  
29 26
%description
30 27
CSV input/output command plugin for the Hammer CLI.
......
46 43

  
47 44
%install
48 45
mkdir -p %{buildroot}%{_sysconfdir}/%{confdir}/cli.modules.d
49
install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{confdir}/cli.modules.d/csv.yml
46
install -m 755 .%{gem_instdir}/config/csv.yml %{buildroot}%{_sysconfdir}/%{confdir}/cli.modules.d/csv.yml
50 47
mkdir -p %{buildroot}%{gem_dir}
51 48
cp -pa .%{gem_dir}/* \
52 49
        %{buildroot}%{gem_dir}/
53 50

  
54 51
%files
55
%dir %{geminstdir}
56
%{geminstdir}/lib
52
%dir %{gem_instdir}
53
%{gem_instdir}/lib
57 54
%config(noreplace) %{_sysconfdir}/%{confdir}/cli.modules.d/csv.yml
58
%exclude %{gem_dir}/cache/%{gemname}-%{version}.gem
59
%{gem_dir}/specifications/%{gemname}-%{version}.gemspec
55
%exclude %{gem_dir}/cache/%{gem_name}-%{version}.gem
56
%{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
60 57

  
61 58
%files doc
62
%doc %{gem_dir}/doc/%{gemname}-%{version}
59
%doc %{gem_dir}/doc/%{gem_name}-%{version}
60
%doc %{gem_instdir}/config
63 61

  
64 62
%changelog
65 63
* Thu Mar 05 2015 Eric D. Helms <ericdhelms@gmail.com> 1.0.0-5

Also available in: Unified diff