Skip to content

Commit 6458e65

Browse files
committed
getting specs up to 1.9 sclized
sclizing gems also fix up remote user removing rcov and updating specs for ruby193 updating Rails version bugs Removing thread-dump getting openshift-cgroups to the right place add init file to files section ruby 19 changes
1 parent e9cc192 commit 6458e65

20 files changed

+529
-2476
lines changed

broker/Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'http://rubygems.org'
22

3-
gem 'rails', '~> 3.0.13'
3+
gem 'rails', '~> 3.2.8'
44
gem 'json'
55
gem 'parseconfig', '0.5.2'
66
gem 'mongo'
@@ -42,5 +42,4 @@ group :development, :test do
4242
gem 'mocha', '0.9.8', :require => nil
4343
gem 'rake', '>= 0.8.7', '<= 0.9.2.2'
4444
gem 'cucumber'
45-
gem 'rcov'
4645
end

broker/lib/tasks/rcov.rake

Lines changed: 0 additions & 42 deletions
This file was deleted.

broker/openshift-origin-broker.spec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ Requires: rubygem(rails)
2727
Requires: rubygem(xml-simple)
2828
Requires: rubygem(bson_ext)
2929
Requires: rubygem(rest-client)
30-
Requires: rubygem(thread-dump)
3130
Requires: rubygem(parseconfig)
3231
Requires: rubygem(json)
3332
Requires: rubygem(openshift-origin-controller)
3433
Requires: rubygem(passenger)
35-
Requires: rubygem(rcov)
3634
Requires: rubygem-passenger-native
3735
Requires: rubygem-passenger-native-libs
3836
%if %{with_systemd}

common/Rakefile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ Rake::TestTask.new(:test) do |t|
1818
t.pattern = 'test/unit/**/*_test.rb'
1919
end
2020

21-
desc "Coverage tests"
22-
Rcov::RcovTask.new do |t|
23-
t.libs << File.expand_path('../lib', __FILE__)
24-
t.libs << File.expand_path('../test', __FILE__)
25-
t.libs << File.expand_path('../test/unit', __FILE__)
26-
t.pattern = 'test/unit/**/*_test.rb'
27-
t.rcov_opts << "-x '/usr/lib/ruby'"
28-
t.rcov_opts << "-i 'openshift,rhc'"
29-
end
30-
3121
desc "Generate RDoc"
3222
task :doc do
3323
sh "rdoc ."

common/openshift-origin-common.gemspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@ Gem::Specification.new do |s|
2020

2121
s.add_dependency("json")
2222
s.add_dependency("activemodel")
23-
24-
s.add_development_dependency('rcov')
2523
end
Lines changed: 67 additions & 171 deletions
Original file line numberDiff line numberDiff line change
@@ -1,203 +1,99 @@
1-
%global ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
2-
%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
3-
%global gemname openshift-origin-common
4-
%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
1+
%if 0%{?fedora}%{?rhel} <= 6
2+
%global scl ruby193
3+
%global scl_prefix ruby193-
4+
%endif
5+
%{!?scl:%global pkg_name %{name}}
6+
%{?scl:%scl_package rubygem-%{gem_name}}
7+
%global gem_name openshift-origin-common
8+
%global rubyabi 1.9.1
59

610
Summary: Cloud Development Common
7-
Name: rubygem-%{gemname}
11+
Name: rubygem-%{gem_name}
812
Version: 1.1.1
913
Release: 1%{?dist}
1014
Group: Development/Languages
1115
License: ASL 2.0
1216
URL: http://openshift.redhat.com
13-
Source0: rubygem-%{gemname}-%{version}.tar.gz
17+
Source0: rubygem-%{gem_name}-%{version}.tar.gz
1418
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
15-
Requires: ruby(abi) = 1.8
16-
Requires: rubygems
17-
Requires: rubygem(activemodel)
18-
Requires: rubygem(json)
19-
Requires: rubygem(rcov)
20-
21-
BuildRequires: ruby
22-
BuildRequires: rubygems
19+
Requires: %{?scl:%scl_prefix}ruby
20+
Requires: %{?scl:%scl_prefix}rubygems
21+
Requires: %{?scl:%scl_prefix}rubygem(activemodel)
22+
Requires: %{?scl:%scl_prefix}rubygem(json)
23+
%if 0%{?fedora}%{?rhel} <= 6
24+
BuildRequires: ruby193-build
25+
BuildRequires: scl-utils-build
26+
%endif
27+
BuildRequires: %{?scl:%scl_prefix}ruby(abi) = %{rubyabi}
28+
BuildRequires: %{?scl:%scl_prefix}ruby
29+
BuildRequires: %{?scl:%scl_prefix}rubygems
30+
BuildRequires: %{?scl:%scl_prefix}rubygems-devel
31+
BuildRequires: %{?scl:%scl_prefix}rubygem-yard
2332
BuildArch: noarch
24-
Provides: rubygem(%{gemname}) = %version
25-
26-
%package -n ruby-%{gemname}
27-
Summary: Cloud Development Common Library
28-
Requires: rubygem(%{gemname}) = %version
29-
Provides: ruby(%{gemname}) = %version
33+
Provides: rubygem(%{gem_name}) = %version
3034
Obsoletes: rubygem-stickshift-common
3135

36+
%package doc
37+
Summary: Cloud Development Common Library Documentation
38+
3239
%description
3340
This contains the Cloud Development Common packaged as a rubygem.
3441

35-
%description -n ruby-%{gemname}
36-
This contains the Cloud Development Common packaged as a ruby site library.
42+
%description doc
43+
This contains the Cloud Development Common packaged as a ruby site library
44+
documentation files.
3745

3846
%prep
39-
%setup -q
47+
%{?scl:scl enable %scl "}
48+
#gem unpack %{SOURCE0}
49+
#%setup -q -D -T -n %{gem_name}-%{version}
50+
%setup -q -D -n %{gem_name}-%{version}
51+
#gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
52+
%{?scl:"}
4053

4154
%build
55+
mkdir -p ./%{gem_dir}
56+
57+
%{?scl:scl enable %scl - << \EOF}
58+
gem build %{gem_name}.gemspec
59+
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
60+
gem install -V \
61+
--local \
62+
--install-dir ./%{gem_dir} \
63+
--bindir ./%{_bindir} \
64+
--force \
65+
--rdoc \
66+
%{gem_name}-%{version}.gem
67+
%{?scl:EOF}
4268

4369
%install
44-
rm -rf %{buildroot}
45-
mkdir -p %{buildroot}%{gemdir}
46-
mkdir -p %{buildroot}%{ruby_sitelib}
47-
48-
# Build and install into the rubygem structure
49-
gem build %{gemname}.gemspec
50-
gem install --local --install-dir %{buildroot}%{gemdir} --force %{gemname}-%{version}.gem
51-
52-
# Symlink into the ruby site library directories
53-
ln -s %{geminstdir}/lib/%{gemname} %{buildroot}%{ruby_sitelib}
54-
ln -s %{geminstdir}/lib/%{gemname}.rb %{buildroot}%{ruby_sitelib}
70+
mkdir -p %{buildroot}%{gem_dir}
71+
cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
5572

5673
%clean
5774
rm -rf %{buildroot}
5875

5976
%files
60-
%defattr(-,root,root,-)
61-
%dir %{geminstdir}
62-
%doc %{geminstdir}/Gemfile
63-
%{gemdir}/doc/%{gemname}-%{version}
64-
%{gemdir}/gems/%{gemname}-%{version}
65-
%{gemdir}/cache/%{gemname}-%{version}.gem
66-
%{gemdir}/specifications/%{gemname}-%{version}.gemspec
67-
68-
%files -n ruby-%{gemname}
69-
%{ruby_sitelib}/%{gemname}
70-
%{ruby_sitelib}/%{gemname}.rb
77+
%dir %{gem_instdir}
78+
%doc %{gem_instdir}/LICENSE
79+
%doc %{gem_instdir}/COPYRIGHT
80+
%doc %{gem_instdir}/.yardoc
81+
%doc %{gem_instdir}/Gemfile
82+
%doc %{gem_instdir}/Rakefile
83+
%doc %{gem_instdir}/README.md
84+
%doc %{gem_instdir}/%{gem_name}.gemspec
85+
%{gem_spec}
86+
%{gem_libdir}
87+
88+
%exclude %{gem_cache}
89+
%exclude %{gem_instdir}/rubygem-%{gem_name}.spec
90+
91+
%files doc
92+
%doc %{gem_docdir}
7193

7294
%changelog
7395
* Thu Nov 08 2012 Adam Miller <[email protected]> 1.1.1-1
7496
- Bumping specs to at least 1.1 ([email protected])
7597

7698
* Tue Oct 30 2012 Adam Miller <[email protected]> 1.0.1-1
7799
- bumping specs to at least 1.0.0 ([email protected])
78-
79-
* Mon Oct 29 2012 Adam Miller <[email protected]> 0.16.8-1
80-
- Moving broker config to /etc/openshift/broker.conf Rails app and all oo-*
81-
scripts will load production environment unless the
82-
/etc/openshift/development marker is present Added param to specify default
83-
when looking up a config value in OpenShift::Config Moved all defaults into
84-
plugin initializers instead of separate defaults file No longer require
85-
loading 'openshift-origin-common/config' if 'openshift-origin-common' is
86-
loaded openshift-origin-common selinux module is merged into F16 selinux
87-
policy. Removing from broker %%postrun ([email protected])
88-
89-
* Thu Oct 18 2012 Adam Miller <[email protected]> 0.16.7-1
90-
- Move SELinux to Origin and use new policy definition. ([email protected])
91-
92-
* Tue Oct 16 2012 Adam Miller <[email protected]> 0.16.6-1
93-
- Merge pull request #676 from pravisankar/dev/ravi/bug/852324
94-
95-
- Fix for bug# 852324 ([email protected])
96-
97-
* Mon Oct 15 2012 Adam Miller <[email protected]> 0.16.5-1
98-
- Centralize plug-in configuration ([email protected])
99-
- Fixing a few missed references to ss-* Added command to load openshift-origin
100-
selinux module ([email protected])
101-
102-
* Mon Oct 08 2012 Dan McPherson <[email protected]> 0.16.4-1
103-
- fix obsoletes ([email protected])
104-
105-
* Fri Oct 05 2012 Krishna Raman <[email protected]> 0.16.3-1
106-
- new package built with tito
107-
108-
* Wed Oct 03 2012 Adam Miller <[email protected]> 0.16.2-1
109-
- removing Gemfile.locks ([email protected])
110-
111-
* Wed Sep 12 2012 Adam Miller <[email protected]> 0.16.1-1
112-
- bump_minor_versions for sprint 18 ([email protected])
113-
114-
* Thu Aug 23 2012 Adam Miller <[email protected]> 0.15.2-1
115-
-
116-
117-
* Wed Aug 22 2012 Adam Miller <[email protected]> 0.15.1-1
118-
- bump_minor_versions for sprint 17 ([email protected])
119-
120-
* Wed Aug 15 2012 Adam Miller <[email protected]> 0.14.3-1
121-
- Merge pull request #377 from brenton/misc1 ([email protected])
122-
- Removing duplicate require ([email protected])
123-
124-
* Tue Aug 14 2012 Adam Miller <[email protected]> 0.14.2-1
125-
- Removing unneeded mongo dep ([email protected])
126-
- gemspec refactorings based on Fedora packaging feedback ([email protected])
127-
128-
* Thu Aug 02 2012 Adam Miller <[email protected]> 0.14.1-1
129-
- bump_minor_versions for sprint 16 ([email protected])
130-
- setup broker/nod script fixes for static IP and custom ethernet devices add
131-
support for configuring different domain suffix (other than example.com)
132-
Fixing dependency to qpid library (causes fedora package conflict) Make
133-
livecd start faster by doing static configuration during cd build rather than
134-
startup Fixes some selinux policy errors which prevented scaled apps from
135-
starting ([email protected])
136-
137-
* Tue Jul 24 2012 Adam Miller <[email protected]> 0.13.3-1
138-
- Generate fields in the descriptor only if they are not empty or default value
139-
140-
141-
* Fri Jul 20 2012 Adam Miller <[email protected]> 0.13.2-1
142-
- Bug 841073 ([email protected])
143-
144-
* Wed Jul 11 2012 Adam Miller <[email protected]> 0.13.1-1
145-
- bump_minor_versions for sprint 15 ([email protected])
146-
147-
* Thu Jul 05 2012 Adam Miller <[email protected]> 0.12.4-1
148-
- cart metadata work merged; depends service added; cartridges enhanced; unit
149-
tests updated ([email protected])
150-
151-
* Tue Jul 03 2012 Adam Miller <[email protected]> 0.12.3-1
152-
- Misc selinux fixes for RHEL6.3 ([email protected])
153-
- MCollective updates - Added mcollective-qpid plugin - Added mcollective-
154-
msg-broker plugin - Added mcollective agent and facter plugins - Added
155-
option to support ignoring node profile - Added systemu dependency for
156-
mcollective-client ([email protected])
157-
158-
* Mon Jul 02 2012 Adam Miller <[email protected]> 0.12.2-1
159-
- BugFixes: 824973, 805983, 796458 ([email protected])
160-
161-
* Wed Jun 20 2012 Adam Miller <[email protected]> 0.12.1-1
162-
- bump_minor_versions for sprint 14 ([email protected])
163-
164-
* Tue Jun 12 2012 Adam Miller <[email protected]> 0.11.3-1
165-
- Strip out the unnecessary gems from rcov reports and focus it on just the
166-
OpenShift code. ([email protected])
167-
168-
* Fri Jun 08 2012 Adam Miller <[email protected]> 0.11.2-1
169-
- Updated gem info for rails 3.0.13 ([email protected])
170-
171-
* Fri Jun 01 2012 Adam Miller <[email protected]> 0.11.1-1
172-
- bumping spec versions ([email protected])
173-
174-
* Fri May 25 2012 Adam Miller <[email protected]> 0.10.3-1
175-
- code for min_gear setting ([email protected])
176-
177-
* Thu May 17 2012 Adam Miller <[email protected]> 0.10.2-1
178-
179-
- proper usage of OpenShift::Model and beginnings of usage tracking
180-
181-
- Add rcov testing to the Stickshift broker, common and controller.
182-
183-
184-
* Thu May 10 2012 Adam Miller <[email protected]> 0.10.1-1
185-
- bump spec version ([email protected])
186-
- bumping spec versions ([email protected])
187-
188-
* Thu Apr 26 2012 Adam Miller <[email protected]> 0.9.1-1
189-
- bumping spec versions ([email protected])
190-
191-
* Tue Apr 24 2012 Adam Miller <[email protected]> 0.8.7-1
192-
- CloudUser.find() not creating scaling object for user.scaling as it expectes
193-
'Hash' instead of 'BSON::OrderedHash'. Fix is to create scaling object if the
194-
record has any 'Hash type'. ([email protected])
195-
196-
* Mon Apr 23 2012 Adam Miller <[email protected]> 0.8.6-1
197-
- cleaning up spec files ([email protected])
198-
199-
* Sat Apr 21 2012 Dan McPherson <[email protected]> 0.8.5-1
200-
- forcing builds ([email protected])
201-
202-
* Sat Apr 21 2012 Dan McPherson <[email protected]> 0.8.3-1
203-
- new package built with tito

controller/Rakefile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
#require "bundler/gem_tasks"
22
require 'rake'
33
require 'rake/testtask'
4-
require 'rcov/rcovtask'
54

65
Rake::TestTask.new(:test) do |t|
76
t.libs << 'test'
87
t.test_files = FileList['test/**/*_test.rb']
98
t.verbose = true
109
end
11-
12-
desc "Coverage tests"
13-
Rcov::RcovTask.new do |t|
14-
t.libs << 'test'
15-
t.test_files = FileList['test/**/*_test.rb']
16-
t.verbose = true
17-
t.rcov_opts << "-x '/usr/lib/ruby'"
18-
t.rcov_opts << "-i 'openshift,rhc'"
19-
end

0 commit comments

Comments
 (0)