keytar 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'http://rubygems.org'
2
+ gem 'activesupport'
2
3
 
3
4
  group :development, :test do
4
5
  gem 'activerecord', '~>3.0.4' ## not needed if you're just using KeyBuilder
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.3.0
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{keytar}
8
- s.version = "1.2.1"
8
+ s.version = "1.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Schneems"]
12
- s.date = %q{2011-07-06}
12
+ s.date = %q{2011-07-13}
13
13
  s.description = %q{
14
14
  Keytar is a Ruby on Rails wrapper for KeyBuilder.
15
15
  Use KeyBuilder to automatically generate keys based on class name instead of cluttering model
@@ -32,7 +32,6 @@ Gem::Specification.new do |s|
32
32
  "lib/.DS_Store",
33
33
  "lib/keytar.rb",
34
34
  "lib/keytar/key_builder.rb",
35
- "lib/keytar/key_utility.rb",
36
35
  "license.txt",
37
36
  "spec/keytar/key_builder_spec.rb",
38
37
  "spec/keytar/keytar_spec.rb",
@@ -53,6 +52,7 @@ Gem::Specification.new do |s|
53
52
  s.specification_version = 3
54
53
 
55
54
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
55
+ s.add_runtime_dependency(%q<activesupport>, [">= 0"])
56
56
  s.add_development_dependency(%q<activerecord>, ["~> 3.0.4"])
57
57
  s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
58
58
  s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
@@ -60,6 +60,7 @@ Gem::Specification.new do |s|
60
60
  s.add_development_dependency(%q<autotest-growl>, [">= 0"])
61
61
  s.add_development_dependency(%q<rspec>, [">= 0"])
62
62
  else
63
+ s.add_dependency(%q<activesupport>, [">= 0"])
63
64
  s.add_dependency(%q<activerecord>, ["~> 3.0.4"])
64
65
  s.add_dependency(%q<rake>, ["~> 0.8.7"])
65
66
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
@@ -68,6 +69,7 @@ Gem::Specification.new do |s|
68
69
  s.add_dependency(%q<rspec>, [">= 0"])
69
70
  end
70
71
  else
72
+ s.add_dependency(%q<activesupport>, [">= 0"])
71
73
  s.add_dependency(%q<activerecord>, ["~> 3.0.4"])
72
74
  s.add_dependency(%q<rake>, ["~> 0.8.7"])
73
75
  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
@@ -1,8 +1,11 @@
1
+ require 'active_support/all'
2
+ autoload :KeyUtility, "keytar/key_utility"
3
+ autoload :KeyBuilder, 'keytar/key_builder'
1
4
 
2
5
  module Keytar
3
- autoload :KeyUtility, "keytar/key_utility"
4
- autoload :KeyBuilder, 'keytar/key_builder'
5
- def self.included(klass)
6
- klass.class_eval {include KeyBuilder}
6
+ extend ActiveSupport::Concern
7
+
8
+ included do
9
+ include KeyBuilder
7
10
  end
8
11
  end
@@ -1,5 +1,3 @@
1
- require File.join(File.dirname(__FILE__), 'key_utility') ## gives us support for Object#blank, Object#present?, String.pluralize without require ActiveSupport
2
-
3
1
  module KeyBuilder
4
2
  DEFAULTS = {:key_delimiter => ":",
5
3
  :key_order => [:shard, :prefix, :base, :name, :unique, :args, :suffix, :version, :v],
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keytar
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 2
9
- - 1
10
- version: 1.2.1
8
+ - 3
9
+ - 0
10
+ version: 1.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Schneems
@@ -15,12 +15,26 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-06 00:00:00 -05:00
18
+ date: 2011-07-13 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- type: :development
22
+ type: :runtime
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ name: activesupport
33
+ version_requirements: *id001
34
+ prerelease: false
35
+ - !ruby/object:Gem::Dependency
36
+ type: :development
37
+ requirement: &id002 !ruby/object:Gem::Requirement
24
38
  none: false
25
39
  requirements:
26
40
  - - ~>
@@ -32,11 +46,11 @@ dependencies:
32
46
  - 4
33
47
  version: 3.0.4
34
48
  name: activerecord
35
- version_requirements: *id001
49
+ version_requirements: *id002
36
50
  prerelease: false
37
51
  - !ruby/object:Gem::Dependency
38
52
  type: :development
39
- requirement: &id002 !ruby/object:Gem::Requirement
53
+ requirement: &id003 !ruby/object:Gem::Requirement
40
54
  none: false
41
55
  requirements:
42
56
  - - ~>
@@ -48,11 +62,11 @@ dependencies:
48
62
  - 7
49
63
  version: 0.8.7
50
64
  name: rake
51
- version_requirements: *id002
65
+ version_requirements: *id003
52
66
  prerelease: false
53
67
  - !ruby/object:Gem::Dependency
54
68
  type: :development
55
- requirement: &id003 !ruby/object:Gem::Requirement
69
+ requirement: &id004 !ruby/object:Gem::Requirement
56
70
  none: false
57
71
  requirements:
58
72
  - - ~>
@@ -64,11 +78,11 @@ dependencies:
64
78
  - 2
65
79
  version: 1.5.2
66
80
  name: jeweler
67
- version_requirements: *id003
81
+ version_requirements: *id004
68
82
  prerelease: false
69
83
  - !ruby/object:Gem::Dependency
70
84
  type: :development
71
- requirement: &id004 !ruby/object:Gem::Requirement
85
+ requirement: &id005 !ruby/object:Gem::Requirement
72
86
  none: false
73
87
  requirements:
74
88
  - - ">="
@@ -78,11 +92,11 @@ dependencies:
78
92
  - 0
79
93
  version: "0"
80
94
  name: autotest-standalone
81
- version_requirements: *id004
95
+ version_requirements: *id005
82
96
  prerelease: false
83
97
  - !ruby/object:Gem::Dependency
84
98
  type: :development
85
- requirement: &id005 !ruby/object:Gem::Requirement
99
+ requirement: &id006 !ruby/object:Gem::Requirement
86
100
  none: false
87
101
  requirements:
88
102
  - - ">="
@@ -92,11 +106,11 @@ dependencies:
92
106
  - 0
93
107
  version: "0"
94
108
  name: autotest-growl
95
- version_requirements: *id005
109
+ version_requirements: *id006
96
110
  prerelease: false
97
111
  - !ruby/object:Gem::Dependency
98
112
  type: :development
99
- requirement: &id006 !ruby/object:Gem::Requirement
113
+ requirement: &id007 !ruby/object:Gem::Requirement
100
114
  none: false
101
115
  requirements:
102
116
  - - ">="
@@ -106,7 +120,7 @@ dependencies:
106
120
  - 0
107
121
  version: "0"
108
122
  name: rspec
109
- version_requirements: *id006
123
+ version_requirements: *id007
110
124
  prerelease: false
111
125
  description: "\n Keytar is a Ruby on Rails wrapper for KeyBuilder.\n Use KeyBuilder to automatically generate keys based on class name instead of cluttering model\n definitions with tons of redundant key method declarations.\n "
112
126
  email: richard.schneeman@gmail.com
@@ -129,7 +143,6 @@ files:
129
143
  - lib/.DS_Store
130
144
  - lib/keytar.rb
131
145
  - lib/keytar/key_builder.rb
132
- - lib/keytar/key_utility.rb
133
146
  - license.txt
134
147
  - spec/keytar/key_builder_spec.rb
135
148
  - spec/keytar/keytar_spec.rb
@@ -1,26 +0,0 @@
1
- # Monkey patches for Object#blank?, Object.present? and String#pluralize
2
- # If active support is required, this won't be used, but
3
- # we shouldn't require a ruby project to use ActiveSupport
4
- # just for these three simple things
5
-
6
- module KeyUtility
7
- unless Object.respond_to?(:blank?)
8
- Object.class_eval do
9
- def blank?
10
- respond_to?(:empty?) ? empty? : !self
11
- end
12
-
13
- def present?
14
- !blank?
15
- end
16
- end
17
- end
18
-
19
- unless String.new.respond_to? :pluralize
20
- String.class_eval do
21
- def pluralize
22
- self[(self.length - 1), 1] =~ /s/i ? self : "#{self}s"
23
- end
24
- end
25
- end
26
- end