kue 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +0 -5
- data/LICENSE +21 -0
- data/README.md +1 -1
- data/kue.gemspec +1 -1
- data/lib/generators/kue/install/templates/migration.rb +1 -1
- data/lib/kue.rb +1 -1
- data/lib/kue/version.rb +1 -1
- data/spec/config/database.yml +3 -2
- data/spec/kue_spec.rb +7 -7
- data/spec/spec_helper.rb +5 -5
- metadata +18 -8
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright 2011 Daniel Watson
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ Kue is a Rails ready key value store that uses active-record under the hood.
|
|
4
4
|
|
5
5
|
###Build Status
|
6
6
|
|
7
|
-
[![Build Status](https://
|
7
|
+
[![Build Status](https://travis-ci.org/dan-watson/kue.svg)](https://travis-ci.org/dan-watson/kue)
|
8
8
|
|
9
9
|
###What does Kue mean?
|
10
10
|
K(eyVal)ue
|
data/kue.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
19
|
s.require_path = 'lib'
|
20
20
|
|
21
|
-
s.add_dependency 'activerecord', '
|
21
|
+
s.add_dependency 'activerecord', '>= 4.0.0'
|
22
22
|
s.add_development_dependency 'rspec'
|
23
23
|
s.add_development_dependency 'sqlite3'
|
24
24
|
s.add_development_dependency 'pry'
|
data/lib/kue.rb
CHANGED
data/lib/kue/version.rb
CHANGED
data/spec/config/database.yml
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
sqlite3:
|
2
|
+
adapter: sqlite3
|
3
|
+
database: ":memory:"
|
data/spec/kue_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe KueStore do
|
4
4
|
it 'should have the kue_settings table correctly setup' do
|
5
|
-
ActiveRecord::Base.connection.table_exists?(:kue_settings).should
|
5
|
+
ActiveRecord::Base.connection.table_exists?(:kue_settings).should be_truthy
|
6
6
|
end
|
7
7
|
|
8
8
|
it 'should save a new key and value' do
|
@@ -27,17 +27,17 @@ describe KueStore do
|
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'should check for existance' do
|
30
|
-
KueStore.exists?(:non_existant).should
|
30
|
+
KueStore.exists?(:non_existant).should be_falsey
|
31
31
|
|
32
32
|
KueStore[:existant] = 109
|
33
|
-
KueStore.exists?(:existant).should
|
33
|
+
KueStore.exists?(:existant).should be_truthy
|
34
34
|
end
|
35
35
|
|
36
36
|
it 'should delete a key and value' do
|
37
37
|
KueStore[:delete_me] = 1098
|
38
|
-
KueStore.exists?(:delete_me).should
|
39
|
-
KueStore.delete!(:delete_me).should
|
40
|
-
KueStore.exists?(:delete_me).should
|
38
|
+
KueStore.exists?(:delete_me).should be_truthy
|
39
|
+
KueStore.delete!(:delete_me).should be_truthy
|
40
|
+
KueStore.exists?(:delete_me).should be_falsey
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'should not throw an error when deleting a key that does not exist' do
|
@@ -84,4 +84,4 @@ describe 'Using Kue::Store outside of the KueStore class - introducing BlueStore
|
|
84
84
|
BlueStore[:ok] = "One"
|
85
85
|
BlueStore[:ok].should == "One"
|
86
86
|
end
|
87
|
-
end
|
87
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -19,20 +19,20 @@ require File.expand_path('../../lib/kue', __FILE__)
|
|
19
19
|
active_record_configuration = YAML.load_file(File.expand_path('../config/database.yml', __FILE__))
|
20
20
|
|
21
21
|
ActiveRecord::Base.configurations = active_record_configuration
|
22
|
-
ActiveRecord::Base.establish_connection(
|
22
|
+
ActiveRecord::Base.establish_connection(:sqlite3)
|
23
23
|
|
24
24
|
ActiveRecord::Base.logger = Logger.new(File.join(File.dirname(__FILE__), "debug.log"))
|
25
25
|
ActiveRecord::Base.default_timezone = :utc
|
26
26
|
|
27
|
-
ActiveRecord::
|
28
|
-
|
29
|
-
load(File.expand_path('../../lib/generators/kue/install/templates/migration.rb', __FILE__))
|
30
|
-
end
|
27
|
+
ActiveRecord::Migration.verbose = false
|
28
|
+
load(File.expand_path('../../lib/generators/kue/install/templates/migration.rb', __FILE__))
|
31
29
|
|
32
30
|
#Run the migration
|
33
31
|
KueSettingsTableCreateMigration.new.up
|
34
32
|
|
35
33
|
RSpec.configure do |configuration|
|
34
|
+
configuration.expect_with(:rspec) { |c| c.syntax = :should }
|
35
|
+
|
36
36
|
configuration.after(:each) do
|
37
37
|
KueStore.destroy_all
|
38
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,24 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-04-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 4.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 4.0.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: rspec
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- .rvmrc
|
89
89
|
- .travis.yml
|
90
90
|
- Gemfile
|
91
|
+
- LICENSE
|
91
92
|
- README.md
|
92
93
|
- Rakefile
|
93
94
|
- kue.gemspec
|
@@ -110,16 +111,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
111
|
- - ! '>='
|
111
112
|
- !ruby/object:Gem::Version
|
112
113
|
version: '0'
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
hash: 3110198137919352643
|
113
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
118
|
none: false
|
115
119
|
requirements:
|
116
120
|
- - ! '>='
|
117
121
|
- !ruby/object:Gem::Version
|
118
122
|
version: '0'
|
123
|
+
segments:
|
124
|
+
- 0
|
125
|
+
hash: 3110198137919352643
|
119
126
|
requirements: []
|
120
127
|
rubyforge_project: kue
|
121
|
-
rubygems_version: 1.8.
|
128
|
+
rubygems_version: 1.8.23
|
122
129
|
signing_key:
|
123
130
|
specification_version: 3
|
124
131
|
summary: Kue is a simple key value store that uses ActiveRecord.
|
125
|
-
test_files:
|
132
|
+
test_files:
|
133
|
+
- spec/config/database.yml
|
134
|
+
- spec/kue_spec.rb
|
135
|
+
- spec/spec_helper.rb
|