gem-nice-install 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f4ebbb26300012c3a27812b267b8881111faa73b
4
+ data.tar.gz: 9d5fb02970385ab36f4006ffe798e176b287f457
5
+ SHA512:
6
+ metadata.gz: d48b025999be486ca0872c5089cc97462baaf15324dc2c1f36935b03f178e43fa68cf9e204913cde12f3609d323742f8774fa46abba5233b559b43365dd4c30e
7
+ data.tar.gz: a0c29dbdc5a1a5ede4c5d511418339e2526417e6c5fd07b1254daa2a045844fa7dd06f87624880ba4228f6bc03feff51d117caa24ac425cd48599f54517c651b
Binary file
Binary file
@@ -128,6 +128,8 @@ gems:
128
128
  rsvg2-devel:
129
129
  - librsvg2-devel
130
130
  - rubygem-cairo-devel
131
+ ruby-libvirt:
132
+ - libvirt-devel
131
133
  ruby-opengl:
132
134
  - freeglut-devel
133
135
  - libGL-devel
@@ -9,6 +9,7 @@ module Gem
9
9
 
10
10
  class Installer
11
11
  module Nice
12
+ require 'rubygems/user_interaction'
12
13
  require 'rubygems/nice_install/distro_guesser'
13
14
 
14
15
  include Gem::UserInteraction
@@ -31,7 +32,7 @@ module Gem
31
32
  end
32
33
 
33
34
  unless missing_deps.empty?
34
- say "Installing native dependencies for Gem '#{spec.name}': #{missing_deps.join ' '}"
35
+ say "Trying to install native dependencies for Gem '#{spec.name}': #{missing_deps.join ' '}"
35
36
  unless ext_installer.install_ext_dependencies_for(spec.name, missing_deps)
36
37
  raise Gem::InstallError, "Failed to install native dependencies for '#{spec.name}'."
37
38
  end
@@ -17,7 +17,7 @@ module Gem::Installer::Nice
17
17
 
18
18
  def self.distro_ext_installer
19
19
  require "rubygems/nice_install/#{distro}_ext_installer"
20
- klass = Gem::Installer::Nice.const_get("#{distro.capitalize}ExtInstaller")
20
+ klass = Gem::Installer::Nice.const_get("#{distro.to_s.capitalize}ExtInstaller")
21
21
  klass.new if klass && klass != BaseExtInstaller
22
22
  end
23
23
 
@@ -18,13 +18,29 @@ module Gem::Installer::Nice
18
18
  end
19
19
 
20
20
  def install_ext_dependencies_for gem_name, deps
21
- install_using_packagekit deps
21
+ install_using_packagekit(deps) \
22
+ || install_using_dnf(deps) \
23
+ || install_using_yum(deps)
22
24
  end
23
25
 
24
26
  private
25
27
 
28
+ def install_using_dnf(names=[])
29
+ if system("dnf --help > /dev/null 2>&1")
30
+ system "su -c 'dnf install #{names.join(' ')}'"
31
+ else
32
+ say "DNF is not available."
33
+ false
34
+ end
35
+ end
36
+
26
37
  def install_using_yum(names=[])
27
- system "su -c 'yum install #{names.join(' ')}'"
38
+ if system("yum --help > /dev/null 2>&1")
39
+ system "su -c 'yum install #{names.join(' ')}'"
40
+ else
41
+ say "YUM is not available."
42
+ false
43
+ end
28
44
  end
29
45
 
30
46
  def install_using_packagekit(names=[])
@@ -35,10 +51,13 @@ module Gem::Installer::Nice
35
51
  pkg_kit['org.freedesktop.PackageKit.Modify'].InstallPackageNames(0, names, 'show-confirm-install')
36
52
  # DBus is not availabe in non-X environment.
37
53
  rescue Errno::ENOENT
38
- install_using_yum names
54
+ say "PackageKit failed. DBus activation failed."
55
+ false
39
56
  rescue LoadError
40
- say "To use PackageKit installation, 'ruby-dbus' package needs to be installed. (yum install rubygem-ruby-dbus)"
41
- install_using_yum names
57
+ say "PackageKit failed. 'rubygem-ruby-dbus' package needs to be installed."
58
+ false
59
+ else
60
+ true
42
61
  end
43
62
  end
44
63
 
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-nice-install
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Vít Ondruch
@@ -11,51 +10,69 @@ authors:
11
10
  - Michal Fojtik
12
11
  autorequire:
13
12
  bindir: bin
14
- cert_chain: []
15
- date: 2012-10-26 00:00:00.000000000 Z
13
+ cert_chain:
14
+ - |
15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Rt+6LMaQo
31
+ V3UO37rdJCCowWcP1k7rU+KsT/2V3mhBliTjYHH/RyEeqlJ9/3JazlCdYbLWobqO
32
+ m3oVhvQvTkxDCHSsYga0FQt6a26k+fX65GAyjY/fJWmceetOyax4e+5xjZ9fKEik
33
+ YpMJ590rUNfDhbfYuAY0l6VDmajngEKkdxCEP0v6KBQeOmH3/+oOxcSVnc3NAp2J
34
+ eE+DjyUv9Cq0yBFpfdrGk1fHwX/dtWcFrsKNxw==
35
+ -----END CERTIFICATE-----
36
+ date: 2015-04-16 00:00:00.000000000 Z
16
37
  dependencies: []
17
- description: ! 'A RubyGems plugin that improves gem installation user experience.
18
- If binary extension build fails,
19
-
38
+ description: |
39
+ A RubyGems plugin that improves gem installation user experience. If binary extension build fails,
20
40
  it tries to install its development dependencies.
21
-
22
- '
23
41
  email: vondruch@gmail.com
24
42
  executables: []
25
43
  extensions: []
26
44
  extra_rdoc_files: []
27
45
  files:
28
- - README.md
29
46
  - MIT
47
+ - README.md
30
48
  - data/fedora.yml
31
- - lib/rubygems/nice_install/distro_guesser.rb
49
+ - lib/rubygems/nice_install.rb
32
50
  - lib/rubygems/nice_install/base_ext_installer.rb
51
+ - lib/rubygems/nice_install/distro_guesser.rb
33
52
  - lib/rubygems/nice_install/fedora_ext_installer.rb
34
- - lib/rubygems/nice_install.rb
35
53
  - lib/rubygems_plugin.rb
36
54
  homepage: https://github.com/voxik/gem-nice-install
37
55
  licenses:
38
56
  - MIT
57
+ metadata: {}
39
58
  post_install_message:
40
59
  rdoc_options: []
41
60
  require_paths:
42
61
  - lib
43
62
  required_ruby_version: !ruby/object:Gem::Requirement
44
- none: false
45
63
  requirements:
46
- - - ! '>='
64
+ - - ">="
47
65
  - !ruby/object:Gem::Version
48
66
  version: '0'
49
67
  required_rubygems_version: !ruby/object:Gem::Requirement
50
- none: false
51
68
  requirements:
52
- - - ! '>='
69
+ - - ">="
53
70
  - !ruby/object:Gem::Version
54
71
  version: '0'
55
72
  requirements: []
56
73
  rubyforge_project:
57
- rubygems_version: 1.8.24
74
+ rubygems_version: 2.2.2
58
75
  signing_key:
59
- specification_version: 3
76
+ specification_version: 4
60
77
  summary: A RubyGems plugin that improves gem installation user experience.
61
78
  test_files: []
Binary file