druthers 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGM1OGQ0ZTM1OTliNWUwYmY3NDMxNWRkN2Q5NTRmNTRmYTJhMDNkMA==
4
+ ZTc3MmFjMzEzOTdhODIzODUxZTA4ZWY5OTY5NTNmYWU1YmQwOTk5Nw==
5
5
  data.tar.gz: !binary |-
6
- YmMyNWQ3Mjc0YzBiMTUzNGFjZDdlYTljODdhODA3MTI1ZDZhYTZjMw==
6
+ YzBlNDhiMDJiMzk3ZTBjZjMwNWYwOGI1NmRmODkxZmVjZDM0YjFlYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmJmNjJiMGY4NTI2MzlkNmQzMTg1NGFlYjgwMTEzYWI3MTI3YjdhN2RhOTdj
10
- ZjdlN2ZjNjRhZDQyY2M1Yjk4MThhY2U5YzUxZGMxMzY1NGEwMmJkOTE2YmU4
11
- NDhiM2ZlZmNjNzllMzQwY2FkYmMwNDMwMjEzYmExNTNlOGYyNGM=
9
+ ZDQ1YjZhYzhiY2QwMDJkNjA2NmRkOGMxNjZmODMyNWVkYTg4YzkzNmZmZjRi
10
+ MTIwYjM1MjMxOTE1M2E4ZmVjNjBjODg4ZmEyYjk0MzgyZjRkN2M4NmYyNmI2
11
+ NDljZjhhNzYyMDM5YTJlMTViYjdlOWIyNzk0OTNiYjJjM2MzZDI=
12
12
  data.tar.gz: !binary |-
13
- M2YyMTcwNmY0YWUyM2QxNGI4M2UyODExMDViNjM0ZDM2ZjA3Mzc5ZDc3Nzdi
14
- MWQ4NThiYzFiOWJiZjllNDg2NWU5OTZmZmVjMjZlZjJlY2M2MTdjOGQyOTgw
15
- ZmY5YTIyMGI2YzVmY2VkMmJjZDQ3MTZhODY2ZTM5YTU4YzljZmE=
13
+ ZGQ3MDdhZDg2ZTBkYjMyMTg0MzI2NTJhNjU5YWI5OWM3YmJhN2ZiM2I3Y2Iz
14
+ YzZkMDZjYjVhMzk5NzczNDUyOGIwYWRjMjIzMGY5Y2VlMzllOTA3MTYwYWRm
15
+ MDU0ZDk1MGU0M2U4NmVlOGNlMTg5ODNjNmIxZjMyZTQxN2Q0M2M=
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.0.2
4
+
5
+ ```def_druthers``` only add methods if they aren't already defined now.
6
+
3
7
  ## v0.0.1
4
8
 
5
9
  First Post!
data/lib/druthers/def.rb CHANGED
@@ -6,14 +6,14 @@ module Druthers
6
6
  def def_druthers(*keys)
7
7
  include Support
8
8
  keys.each do |ea|
9
- fail "setting keys must be alphanumeric" unless ea.to_s =~ Druthers::VALID_METHOD_NAME
9
+ fail "key names must be alphanumeric" unless ea.to_s =~ Druthers::VALID_METHOD_NAME
10
10
  class_eval <<-RUBY, __FILE__, __LINE__ + 1
11
11
  def self.#{ea}=(value)
12
12
  self.set_druther(:#{ea}, value)
13
- end
13
+ end unless respond_to?(:#{ea}=)
14
14
  def self.#{ea}
15
15
  get_druther(:#{ea})
16
- end
16
+ end unless respond_to?(:#{ea})
17
17
  RUBY
18
18
  end
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module Druthers
2
- VERSION = Gem::Version.new("0.0.1")
2
+ VERSION = Gem::Version.new("0.0.2")
3
3
  end
@@ -17,5 +17,6 @@ require 'test_models'
17
17
  require 'minitest/autorun'
18
18
  require 'minitest/great_expectations'
19
19
  require 'minitest/reporters' unless ENV['CI']
20
+ MiniTest::Reporters.use! unless ENV['CI']
20
21
 
21
22
  Thread.abort_on_exception = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: druthers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew McEachen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-11 00:00:00.000000000 Z
11
+ date: 2013-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord