libnotify 0.5.1-universal-java-1.6 → 0.5.2-universal-java-1.6

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,11 +1,10 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
- SUPPORTED_RUBIES = %w[ree 1.9.2 jruby rbx]
5
-
6
4
  require 'rake'
7
5
  require 'rake/rdoctask'
8
6
  require 'rubygems'
7
+ load 'libnotify/tasks/rubies.rake'
9
8
 
10
9
  # Test
11
10
  require 'rake/testtask'
@@ -17,20 +16,6 @@ Rake::TestTask.new(:test) do |test|
17
16
  test.libs << 'test'
18
17
  test.verbose = true
19
18
  end
20
-
21
- desc "Test with several ruby versions"
22
- task :"test:rubies" do
23
- command = "bundle check || bundle install && rake"
24
- SUPPORTED_RUBIES.each do |ruby|
25
- rvm = "#{ruby}@libnotify"
26
- puts "\n" * 3
27
- puts "RVM: #{rvm}"
28
- puts "=" * 40
29
-
30
- system %{rvm #{rvm} exec bash -c '#{command}'}
31
- end
32
- end
33
-
34
19
  # Yard
35
20
  begin
36
21
  require 'yard'
@@ -0,0 +1,45 @@
1
+ SUPPORTED_RUBIES = %w[ree 1.9.2 jruby rbx]
2
+
3
+ GEMSPEC = Bundler::GemHelper.new(Dir.pwd).gemspec
4
+
5
+ def with_rubies(command)
6
+ SUPPORTED_RUBIES.each do |ruby|
7
+ with_ruby(ruby, command)
8
+ end
9
+ end
10
+
11
+ def with_ruby(ruby, command)
12
+ rvm = "#{ruby}@#{GEMSPEC.name}"
13
+ command = %{rvm #{rvm} exec bash -c '#{command}'}
14
+
15
+ puts "\n" * 3
16
+ puts "CMD: #{command}"
17
+ puts "=" * 40
18
+
19
+ system command
20
+ end
21
+
22
+ namespace :rubies do
23
+ desc "Run tests for following supported platforms #{SUPPORTED_RUBIES.inspect}"
24
+ task :test do
25
+ command = "bundle check || bundle install && rake"
26
+ with_rubies(command)
27
+ end
28
+
29
+ desc "Build gems for following supported platforms #{SUPPORTED_RUBIES.inspect}"
30
+ task :build do
31
+ command = "rake build"
32
+ with_rubies(command)
33
+ end
34
+
35
+ desc "Pushes gems for following supported platforms #{SUPPORTED_RUBIES.inspect}"
36
+ #task :push => :build do
37
+ task :push => :build do
38
+ Dir[File.join("pkg", "#{GEMSPEC.name}-#{GEMSPEC.version}*.gem")].each do |gem|
39
+ command = "gem push #{gem}"
40
+ puts command
41
+ system command
42
+ end
43
+ end
44
+
45
+ end
@@ -1,3 +1,3 @@
1
1
  module Libnotify
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
data/libnotify.gemspec CHANGED
@@ -2,10 +2,20 @@
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
  require "libnotify"
4
4
 
5
+ platform = Gem::Platform::CURRENT
6
+ needs_ffi = true
7
+
8
+ if RUBY_PLATFORM =~ /java/
9
+ needs_ffi = false
10
+ elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /rbx/
11
+ needs_ffi = false
12
+ platform = Gem::Platform::new ['universal', 'rubinius', '1.2']
13
+ end
14
+
5
15
  Gem::Specification.new do |s|
6
16
  s.name = "libnotify"
7
17
  s.version = Libnotify::VERSION
8
- s.platform = Gem::Platform::CURRENT
18
+ s.platform = platform
9
19
  s.authors = ["Peter Suschlik"]
10
20
  s.email = ["peter-libnotify@suschlik.de"]
11
21
  s.homepage = "http://rubygems.org/gems/libnotify"
@@ -16,7 +26,7 @@ Gem::Specification.new do |s|
16
26
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
27
  s.require_paths = ["lib"]
18
28
 
19
- if RUBY_PLATFORM !~ /java/ && (defined?(RUBY_ENGINE) && RUBY_ENGINE !~ /rbx/)
29
+ if needs_ffi
20
30
  s.add_runtime_dependency 'ffi', '~> 1.0'
21
31
  end
22
32
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: libnotify
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.1
5
+ version: 0.5.2
6
6
  platform: universal-java-1.6
7
7
  authors:
8
8
  - Peter Suschlik
@@ -54,6 +54,7 @@ files:
54
54
  - lib/libnotify.rb
55
55
  - lib/libnotify/api.rb
56
56
  - lib/libnotify/ffi.rb
57
+ - lib/libnotify/tasks/rubies.rake
57
58
  - lib/libnotify/version.rb
58
59
  - libnotify.gemspec
59
60
  - libnotify.png