danger 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f195902ac5ec8dbc7c67059f6484d9c548fa1b9b
4
- data.tar.gz: af4335f0b4691d17bc27b801b17885f01e9ead07
3
+ metadata.gz: 1063da82f82263eede8fc418f7d85a7f1e4a2c4c
4
+ data.tar.gz: f7bb1935826bf866378aa91c79cb85255ebe25fb
5
5
  SHA512:
6
- metadata.gz: 9948b94a2189dd1e4f131f2f0e2265aa666322edfb59f4df8c741d91296f01d684059f11ef67878f6957532f6edba115fbd16071c8b48db01924d36a08584dbe
7
- data.tar.gz: 44c3f8b65bd973eb45175b0b494e07749508e91514e55e8179785edcd567fffc736974eeacda00f850671761e72607463788b70ad6e1bc865e2d821c02950f9b
6
+ metadata.gz: 15724839453717cca2a7ff70da0bc9cbf6940605defde3d713205690d54a4a2900aaf8dd3843e5a6a7e4cb4a4b2d9c3f7efed806490ad70bfed218a7fe126f76
7
+ data.tar.gz: 7c55ff88479f5aba1be83f0e0a70492f30186170b15bc3815e74f56f3807599219a88efadd6f92106987d4e7aeb3d72585887e6587854ba60e3d4bdc19a66bef
@@ -84,7 +84,7 @@ module Danger
84
84
  def refresh_plugins
85
85
  plugins = ObjectSpace.each_object(Class).select { |klass| klass < Danger::Plugin }
86
86
  plugins.each do |klass|
87
- next if klass.singleton_class?
87
+ next if klass.respond_to?(:singleton_class?) && klass.singleton_class?
88
88
  plugin = klass.new(self)
89
89
  next if plugin.nil? || @plugins[klass]
90
90
 
@@ -109,7 +109,7 @@ module Danger
109
109
  def method_values_for_plugin_hashes(plugin_hashes)
110
110
  plugin_hashes.flat_map do |plugin_hash|
111
111
  plugin = plugin_hash[:plugin]
112
- methods = plugin_hash[:methods].reject { |name| plugin.method(name).arity != 0 }
112
+ methods = plugin_hash[:methods].select { |name| plugin.method(name).parameters.empty? }
113
113
 
114
114
  methods.map do |method|
115
115
  value = plugin.send(method)
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "0.8.0".freeze
2
+ VERSION = "0.8.1".freeze
3
3
  DESCRIPTION = "Automate your PR etiquette.".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox