Mailinglist Archive: yast-commit (883 mails)

< Previous Next >
[yast-commit] rest-service : branch, master, updated.
  • From: git version control <git@xxxxxxxxxxxxxxxx>
  • Date: Thu, 02 Jul 2009 15:44:56 +0200
  • Message-id: <E1MMMau-0001yK-BK@xxxxxxxxxxxxxxxx>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "YaST web service".

The branch, master has been updated
via 58bc65543fc9d6238c2beade79723283d69918dc (commit)
via 0fe1d73b6fdc2c239dc59cec3757f058f6a24d10 (commit)
from 181f33f2bc29427a718090af373dd7bd93ff5d2f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 58bc65543fc9d6238c2beade79723283d69918dc
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Jul 2 15:52:14 2009 +0200

simplify language tests

commit 0fe1d73b6fdc2c239dc59cec3757f058f6a24d10
Author: Josef Reidinger <jreidinger@xxxxxxx>
Date: Thu Jul 2 15:51:42 2009 +0200

initial time tests

-----------------------------------------------------------------------

Summary of changes and diff:
.../test/functional/language_controller_test.rb | 13 ++++++++-----
plugins/time/Rakefile | 20 --------------------
plugins/time/app/models/systemtime.rb | 6 +++++-
plugins/time/package/yast2-webservice-time.spec | 4 ++--
4 files changed, 15 insertions(+), 28 deletions(-)

diff --git a/plugins/language/test/functional/language_controller_test.rb
b/plugins/language/test/functional/language_controller_test.rb
index 5fc57a7..5ba28a9 100644
--- a/plugins/language/test/functional/language_controller_test.rb
+++ b/plugins/language/test/functional/language_controller_test.rb
@@ -13,8 +13,9 @@ class LanguageControllerTest < ActionController::TestCase
@request.session[:account_id] = 1 # defined in fixtures
end

- # TODO write tests
- def test_access_show
+
+
+ def test_access_index
#mock model to test only controller
Language.any_instance.stubs(:read)
get :show
@@ -65,9 +66,11 @@ class LanguageControllerTest < ActionController::TestCase

def check_update_result
assert_response :success
- assert_equal assigns["language"].language, Data[:language][:current]
- assert_equal assigns["language"].utf8, Data[:language][:utf8]
- assert_equal assigns["language"].rootlocale, Data[:language][:rootlocale]
+ lang = assigns(:language)
+ assert lang
+ assert_equal lang.language, Data[:language][:current]
+ assert_equal lang.utf8, Data[:language][:utf8]
+ assert_equal lang.rootlocale, Data[:language][:rootlocale]
end

def test_update_noparams
diff --git a/plugins/time/Rakefile b/plugins/time/Rakefile
index 84ff33a..52d2822 100644
--- a/plugins/time/Rakefile
+++ b/plugins/time/Rakefile
@@ -9,14 +9,6 @@ require 'tasks/rails'
desc 'Default: run unit tests.'
task :default => :test

-desc 'Test the systemtime plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.libs << 'test'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
desc 'Generate documentation for the systemtime plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
@@ -34,15 +26,3 @@ Rake::PackageTask.new('www', :noversion) do |p|
p.package_files.include('**/*')
p.package_files.exclude('package')
end
-
-desc "install policies"
-task :install do |t|
- Dir.glob("**/*.policy").each do |policy|
- sudo "cp #{policy} /usr/share/PolicyKit/policy"
- end
-end
-
-def sudo(cmd)
- puts "#{cmd}"
- %x[sudo -p "Password: " #{cmd}]
-end
diff --git a/plugins/time/app/models/systemtime.rb
b/plugins/time/app/models/systemtime.rb
index af9e620..52156aa 100644
--- a/plugins/time/app/models/systemtime.rb
+++ b/plugins/time/app/models/systemtime.rb
@@ -4,7 +4,7 @@ class Systemtime

attr_accessor :datetime,
:timezone,
- :utcstatus
+ :utcstatus

private
def parse_response(response)
@@ -28,6 +28,10 @@ class Systemtime

public

+ def timezones
+ return @@timezones
+ end
+
def initialize
end

diff --git a/plugins/time/package/yast2-webservice-time.spec
b/plugins/time/package/yast2-webservice-time.spec
index 0118de4..a7d5342 100644
--- a/plugins/time/package/yast2-webservice-time.spec
+++ b/plugins/time/package/yast2-webservice-time.spec
@@ -56,6 +56,8 @@ rm -rf $RPM_BUILD_ROOT
# granting all permissions for root
#
/etc/yastws/tools/policyKit-rights.rb --user root --action grant >& /dev/null
|| :
+# XXX not nice to get yastws all permissions, but now not better solution
+/etc/yastws/tools/policyKit-rights.rb --user yastws --action grant >&
/dev/null || :

%files
%defattr(-,root,root)
@@ -63,8 +65,6 @@ rm -rf $RPM_BUILD_ROOT
%dir /srv/www/%{pkg_user}/vendor
%dir /srv/www/%{pkg_user}/vendor/plugins
%dir /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}
-%dir /usr/share/PolicyKit
-%dir /usr/share/PolicyKit/policy
%config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/MIT-LICENSE
%config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/README
%config /srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/Rakefile


hooks/post-receive
--
YaST web service
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >