smack 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 3.0.0
@@ -3,7 +3,7 @@ module Smack
3
3
  def smack_inject(substitutions)
4
4
  (class << self; self; end).instance_eval { @smack_subs = (@smack_subs || {}).merge!(substitutions) }
5
5
  end
6
- def smack_get(klass_or_mod)
6
+ def smack_score(klass_or_mod)
7
7
  [self, *(class << self; self; end).ancestors].any? { |mod| (found_mod = mod.smack_fetch(klass_or_mod)) ? (break(found_mod)) : nil } || klass_or_mod
8
8
  end
9
9
  def smack_fetch(klass_or_mod)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{smack}
8
- s.version = "2.0.0"
8
+ s.version = "3.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["ggironda"]
@@ -3,7 +3,7 @@ Smack.up
3
3
 
4
4
  class Useless
5
5
  def write_a_song
6
- smack_get(Junkie).new.write_a_song
6
+ smack_score(Junkie).new.write_a_song
7
7
  end
8
8
  end
9
9
 
@@ -49,7 +49,7 @@ module BandManager
49
49
  smack_inject Junkie => LayneStaley
50
50
 
51
51
  def get_a_song
52
- smack_get(Junkie).new.write_a_song
52
+ smack_score(Junkie).new.write_a_song
53
53
  end
54
54
 
55
55
  end
@@ -64,11 +64,11 @@ module CreativeConglomerate
64
64
  smack_inject Band => AliceInChains
65
65
 
66
66
  def get_a_band
67
- smack_get(Band).new
67
+ smack_score(Band).new
68
68
  end
69
69
 
70
70
  def sell_a_song
71
- "BUY BUY BUY " + smack_get(Junkie).new.write_a_song
71
+ "BUY BUY BUY " + smack_score(Junkie).new.write_a_song
72
72
  end
73
73
  end
74
74
 
@@ -181,7 +181,7 @@ context "Smack" do
181
181
  Useless.new
182
182
  end
183
183
 
184
- should "just return the value given to smack_get" do
184
+ should "just return the value given to smack_score" do
185
185
  topic.write_a_song
186
186
  end.equals("i'm a regular junkie, not a talented one")
187
187
  end # a class with no substitutions
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ggironda