spqr 0.3.3 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +24 -10
- data/VERSION +1 -1
- data/lib/spqr/app.rb +4 -4
- data/lib/spqr/constants.rb +0 -2
- data/ruby-spqr.spec.in +40 -20
- metadata +14 -15
- data/.gitignore +0 -21
data/Rakefile
CHANGED
@@ -28,11 +28,11 @@ def name
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def pkg_name
|
31
|
-
|
31
|
+
"ruby-#{name}"
|
32
32
|
end
|
33
33
|
|
34
34
|
def pkg_spec
|
35
|
-
|
35
|
+
"#{pkg_name}.spec"
|
36
36
|
end
|
37
37
|
|
38
38
|
def pkg_rel
|
@@ -40,7 +40,7 @@ def pkg_rel
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def pkg_source
|
43
|
-
return pkg_name
|
43
|
+
return "#{pkg_name}-#{pkg_version}.tar.gz"
|
44
44
|
end
|
45
45
|
|
46
46
|
def pkg_dir
|
@@ -56,6 +56,25 @@ task :rpmspec => :build do
|
|
56
56
|
sh "gem2rpm -t spqr.spec.in -o spqr.spec pkg/spqr-#{pkg_version}.gem"
|
57
57
|
end
|
58
58
|
|
59
|
+
def package_prefix
|
60
|
+
"#{pkg_name}-#{pkg_version}"
|
61
|
+
end
|
62
|
+
|
63
|
+
def pristine_name
|
64
|
+
"#{package_prefix}.tar.gz"
|
65
|
+
end
|
66
|
+
|
67
|
+
desc "upload a pristine tarball for the current release to fedorahosted"
|
68
|
+
task :upload_pristine => [:pristine] do
|
69
|
+
raise "Please set FH_USERNAME" unless ENV['FH_USERNAME']
|
70
|
+
sh "scp #{pristine_name} #{ENV['FH_USERNAME']}@fedorahosted.org:grid"
|
71
|
+
end
|
72
|
+
|
73
|
+
desc "generate a pristine tarball for the tag corresponding to the current version"
|
74
|
+
task :pristine do
|
75
|
+
sh "git archive --format=tar v#{pkg_version} --prefix=#{package_prefix}/ | gzip -9nv > #{pristine_name}"
|
76
|
+
end
|
77
|
+
|
59
78
|
desc "create RPMs"
|
60
79
|
task :rpms => [:build, :tarball, :gen_spec] do
|
61
80
|
FileUtils.cp pkg_spec(), 'SPECS'
|
@@ -68,13 +87,8 @@ task :gen_spec do
|
|
68
87
|
end
|
69
88
|
|
70
89
|
desc "Create a tarball"
|
71
|
-
task :tarball => [:make_rpmdirs, :gen_spec] do
|
72
|
-
FileUtils.
|
73
|
-
FileUtils.cp_r 'lib', pkg_dir()
|
74
|
-
FileUtils.cp_r 'examples', pkg_dir()
|
75
|
-
FileUtils.cp ['LICENSE', 'README.rdoc', 'CHANGES', 'TODO', 'VERSION'], pkg_dir()
|
76
|
-
sh "tar -cf #{pkg_source} #{pkg_dir}"
|
77
|
-
FileUtils.mv pkg_source(), 'SOURCES'
|
90
|
+
task :tarball => [:pristine, :make_rpmdirs, :gen_spec] do
|
91
|
+
FileUtils.cp pristine_name, 'SOURCES'
|
78
92
|
end
|
79
93
|
|
80
94
|
desc "Make dirs for building RPM"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/lib/spqr/app.rb
CHANGED
@@ -18,7 +18,7 @@ require 'logger'
|
|
18
18
|
|
19
19
|
module SPQR
|
20
20
|
class App < Qmf::AgentHandler
|
21
|
-
VALID_MECHANISMS = %w{ANONYMOUS PLAIN GSSAPI}
|
21
|
+
VALID_MECHANISMS = %w{ANONYMOUS PLAIN GSSAPI DIGEST-MD5 CRAM-MD5 OTP}
|
22
22
|
|
23
23
|
class ClassMeta < Struct.new(:object_class, :schema_class) ; end
|
24
24
|
|
@@ -56,8 +56,8 @@ module SPQR
|
|
56
56
|
@qmf_port = options[:port]
|
57
57
|
@qmf_sendUserId = options.has_key?(:send_user_id) ? options[:send_user_id] : (options.has_key?(:user) || options.has_key?(:password))
|
58
58
|
|
59
|
-
@
|
60
|
-
raise "Invalid authentication mechanism #{@
|
59
|
+
@qmf_explicit_mechanism = options[:mechanism] && options[:mechanism].upcase
|
60
|
+
raise "Invalid authentication mechanism #{@qmf_explicit_mechanism}" unless (!@qmf_explicit_mechanism || VALID_MECHANISMS.include?(@qmf_explicit_mechanism))
|
61
61
|
|
62
62
|
@qmf_user = options[:user]
|
63
63
|
@qmf_password = options[:password]
|
@@ -198,7 +198,7 @@ module SPQR
|
|
198
198
|
settings.password = @qmf_password if @qmf_sendUserId
|
199
199
|
|
200
200
|
implicit_mechanism = @qmf_sendUserId ? "PLAIN" : "ANONYMOUS"
|
201
|
-
settings.mechanism = @
|
201
|
+
settings.mechanism = @qmf_explicit_mechanism || implicit_mechanism
|
202
202
|
|
203
203
|
@connection = Qmf::Connection.new(settings)
|
204
204
|
@log.debug(" +-- @connection created: #{@connection}")
|
data/lib/spqr/constants.rb
CHANGED
data/ruby-spqr.spec.in
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
%{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')}
|
2
|
-
|
2
|
+
|
3
|
+
%if (0%{?fedora} == 0 && 0%{?rhel} <= 5)
|
4
|
+
%global building_for_el5 1
|
5
|
+
%else
|
6
|
+
%global building_for_el5 0
|
7
|
+
%endif
|
3
8
|
|
4
9
|
Summary: SPQR: {Schema Processor|Straightforward Publishing} for QMF agents in Ruby
|
5
10
|
Name: ruby-spqr
|
6
11
|
Version: SPQR_VERSION
|
7
|
-
Release: %{
|
12
|
+
Release: 1%{?dist}
|
8
13
|
Group: Applications/System
|
9
14
|
License: ASL 2.0
|
10
15
|
URL: http://git.fedorahosted.org/git/grid/spqr.git
|
11
|
-
Source0:
|
16
|
+
Source0: https://fedorahosted.org/releases/g/r/grid/%{name}-%{version}.tar.gz
|
12
17
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
13
18
|
Requires: ruby(abi) = 1.8
|
14
19
|
Requires: ruby
|
@@ -27,7 +32,8 @@ Requires: ruby(abi) = 1.8
|
|
27
32
|
Requires: ruby
|
28
33
|
|
29
34
|
%description -n spqr-gen
|
30
|
-
|
35
|
+
spqr-gen is a tool that will generate an SPQR application from an XML
|
36
|
+
QMF schema file.
|
31
37
|
|
32
38
|
%prep
|
33
39
|
%setup -q
|
@@ -35,41 +41,55 @@ A tool that will generate an spqr application from an xml schema file
|
|
35
41
|
%build
|
36
42
|
|
37
43
|
%install
|
44
|
+
%if %{building_for_el5}
|
38
45
|
rm -rf %{buildroot}
|
46
|
+
%endif
|
39
47
|
mkdir -p %{buildroot}/%{_bindir}
|
40
48
|
mkdir -p %{buildroot}/%{ruby_sitelib}/spqr
|
41
|
-
cp -f lib/spqr/app.rb %{buildroot}/%{ruby_sitelib}/spqr
|
42
|
-
cp -f lib/spqr/codegen.rb %{buildroot}/%{ruby_sitelib}/spqr
|
43
|
-
cp -f lib/spqr/constants.rb %{buildroot}/%{ruby_sitelib}/spqr
|
44
|
-
cp -f lib/spqr/event.rb %{buildroot}/%{ruby_sitelib}/spqr
|
45
|
-
cp -f lib/spqr/manageable.rb %{buildroot}/%{ruby_sitelib}/spqr
|
46
|
-
cp -f lib/spqr/spqr.rb %{buildroot}/%{ruby_sitelib}/spqr
|
47
|
-
cp -f lib/spqr/utils.rb %{buildroot}/%{ruby_sitelib}/spqr
|
48
|
-
cp -f bin/spqr-gen.rb %{buildroot}/%{_bindir}
|
49
|
-
|
49
|
+
cp -p -f lib/spqr/app.rb %{buildroot}/%{ruby_sitelib}/spqr
|
50
|
+
cp -p -f lib/spqr/codegen.rb %{buildroot}/%{ruby_sitelib}/spqr
|
51
|
+
cp -p -f lib/spqr/constants.rb %{buildroot}/%{ruby_sitelib}/spqr
|
52
|
+
cp -p -f lib/spqr/event.rb %{buildroot}/%{ruby_sitelib}/spqr
|
53
|
+
cp -p -f lib/spqr/manageable.rb %{buildroot}/%{ruby_sitelib}/spqr
|
54
|
+
cp -p -f lib/spqr/spqr.rb %{buildroot}/%{ruby_sitelib}/spqr
|
55
|
+
cp -p -f lib/spqr/utils.rb %{buildroot}/%{ruby_sitelib}/spqr
|
56
|
+
cp -p -f bin/spqr-gen.rb %{buildroot}/%{_bindir}
|
57
|
+
|
58
|
+
%if %{building_for_el5}
|
50
59
|
%clean
|
51
60
|
rm -rf %{buildroot}
|
61
|
+
%endif
|
52
62
|
|
53
63
|
%files
|
64
|
+
%if %{building_for_el5}
|
54
65
|
%defattr(-, root, root, -)
|
66
|
+
%endif
|
55
67
|
%doc LICENSE README.rdoc CHANGES TODO VERSION
|
56
68
|
%doc examples
|
57
|
-
%{ruby_sitelib}/spqr/
|
58
|
-
%{ruby_sitelib}/spqr/codegen.rb
|
59
|
-
%{ruby_sitelib}/spqr/constants.rb
|
60
|
-
%{ruby_sitelib}/spqr/event.rb
|
61
|
-
%{ruby_sitelib}/spqr/manageable.rb
|
62
|
-
%{ruby_sitelib}/spqr/spqr.rb
|
63
|
-
%{ruby_sitelib}/spqr/utils.rb
|
69
|
+
%{ruby_sitelib}/spqr/
|
64
70
|
|
65
71
|
%files -n spqr-gen
|
72
|
+
%if %{building_for_el5}
|
66
73
|
%defattr(-, root, root, -)
|
74
|
+
%endif
|
67
75
|
%doc LICENSE
|
68
76
|
%defattr(755, root, root, -)
|
69
77
|
%{_bindir}/spqr-gen.rb
|
70
78
|
|
71
79
|
%changelog
|
72
80
|
|
81
|
+
* Tue Oct 11 2011 <willb@redhat> - 0.3.4-1
|
82
|
+
- build workflow improvements
|
83
|
+
|
84
|
+
* Wed Sep 21 2011 <willb@redhat> - 0.3.3-4
|
85
|
+
- Specfile improvements
|
86
|
+
|
87
|
+
* Fri Sep 16 2011 <willb@redhat> - 0.3.3-3
|
88
|
+
- Minor packaging tweaks
|
89
|
+
|
90
|
+
* Mon Jun 6 2011 <willb@redhat> - 0.3.3-2
|
91
|
+
- Installation now preserves file mode, owner, and modification time
|
92
|
+
|
73
93
|
* Fri Feb 4 2011 <willb@redhat> - 0.3.3-1
|
74
94
|
- support for alternate authentication mechanisms (BZ 675323)
|
75
95
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spqr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 5
|
10
|
+
version: 0.3.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- William Benton
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-11-23 00:00:00 -06:00
|
19
19
|
default_executable: spqr-gen.rb
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -46,7 +46,6 @@ extra_rdoc_files:
|
|
46
46
|
- TODO
|
47
47
|
files:
|
48
48
|
- .document
|
49
|
-
- .gitignore
|
50
49
|
- CHANGES
|
51
50
|
- LICENSE
|
52
51
|
- README.rdoc
|
@@ -87,8 +86,8 @@ homepage: http://git.fedorahosted.org/git/grid/spqr.git
|
|
87
86
|
licenses: []
|
88
87
|
|
89
88
|
post_install_message:
|
90
|
-
rdoc_options:
|
91
|
-
|
89
|
+
rdoc_options: []
|
90
|
+
|
92
91
|
require_paths:
|
93
92
|
- lib
|
94
93
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -117,20 +116,20 @@ signing_key:
|
|
117
116
|
specification_version: 3
|
118
117
|
summary: "SPQR: {Schema Processor|Straightforward Publishing} for QMF agents in Ruby"
|
119
118
|
test_files:
|
120
|
-
-
|
119
|
+
- examples/hello.rb
|
120
|
+
- examples/logdaemon.rb
|
121
|
+
- examples/logservice.rb
|
121
122
|
- spec/spec_helper.rb
|
123
|
+
- spec/spqr_spec.rb
|
122
124
|
- test/example-apps.rb
|
123
|
-
- test/test_spqr_dummyprop.rb
|
124
|
-
- test/test_spqr_listarg.rb
|
125
125
|
- test/generic-agent.rb
|
126
|
-
- test/test_events.rb
|
127
126
|
- test/helper.rb
|
127
|
+
- test/test_events.rb
|
128
128
|
- test/test_failbot.rb
|
129
129
|
- test/test_spqr_boolprop.rb
|
130
130
|
- test/test_spqr_clicker.rb
|
131
|
+
- test/test_spqr_dummyprop.rb
|
132
|
+
- test/test_spqr_hello.rb
|
131
133
|
- test/test_spqr_integerprop.rb
|
134
|
+
- test/test_spqr_listarg.rb
|
132
135
|
- test/test_user_and_context.rb
|
133
|
-
- test/test_spqr_hello.rb
|
134
|
-
- examples/logdaemon.rb
|
135
|
-
- examples/hello.rb
|
136
|
-
- examples/logservice.rb
|