dusen 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +9 -0
- data/README.md +1 -0
- data/Rakefile +4 -2
- data/lib/dusen/active_record_ext.rb +2 -0
- data/lib/dusen/description.rb +2 -0
- data/lib/dusen/parser.rb +2 -0
- data/lib/dusen/query.rb +2 -0
- data/lib/dusen/syntax.rb +2 -0
- data/lib/dusen/token.rb +2 -0
- data/lib/dusen/util.rb +3 -1
- data/lib/dusen/version.rb +3 -1
- data/lib/dusen.rb +2 -0
- data/spec/rails-2.3/Gemfile +2 -1
- data/spec/rails-2.3/app_root/config/boot.rb +2 -0
- data/spec/rails-2.3/app_root/config/environment.rb +2 -0
- data/spec/rails-2.3/app_root/config/initializers/fix_missing_source_file.rb +1 -0
- data/spec/rails-2.3/app_root/config/preinitializer.rb +2 -0
- data/spec/rails-2.3/app_root/config/routes.rb +2 -0
- data/spec/rails-2.3/{spec_helper.rb → spec/spec_helper.rb} +5 -3
- data/spec/rails-3.0/Gemfile +1 -1
- data/spec/rails-3.0/app_root/config/application.rb +2 -0
- data/spec/rails-3.0/app_root/config/boot.rb +2 -0
- data/spec/rails-3.0/app_root/config/environment.rb +2 -0
- data/spec/rails-3.0/app_root/config/environments/test.rb +2 -0
- data/spec/rails-3.0/app_root/config/initializers/backtrace_silencers.rb +2 -0
- data/spec/rails-3.0/app_root/config/initializers/inflections.rb +2 -0
- data/spec/rails-3.0/app_root/config/initializers/mime_types.rb +2 -0
- data/spec/rails-3.0/app_root/config/initializers/secret_token.rb +2 -0
- data/spec/rails-3.0/app_root/config/initializers/session_store.rb +2 -0
- data/spec/rails-3.0/app_root/config/routes.rb +2 -0
- data/spec/rails-3.0/{spec_helper.rb → spec/spec_helper.rb} +5 -3
- data/spec/rails-3.2/Gemfile +1 -1
- data/spec/rails-3.2/app_root/config/application.rb +2 -0
- data/spec/rails-3.2/app_root/config/boot.rb +2 -0
- data/spec/rails-3.2/app_root/config/environment.rb +2 -0
- data/spec/rails-3.2/app_root/config/environments/test.rb +2 -0
- data/spec/rails-3.2/app_root/config/initializers/backtrace_silencers.rb +2 -0
- data/spec/rails-3.2/app_root/config/initializers/inflections.rb +2 -0
- data/spec/rails-3.2/app_root/config/initializers/mime_types.rb +2 -0
- data/spec/rails-3.2/app_root/config/initializers/secret_token.rb +2 -0
- data/spec/rails-3.2/app_root/config/initializers/session_store.rb +2 -0
- data/spec/rails-3.2/app_root/config/routes.rb +2 -0
- data/spec/rails-3.2/{spec_helper.rb → spec/spec_helper.rb} +5 -3
- data/spec/shared/app_root/app/controllers/application_controller.rb +2 -0
- data/spec/shared/app_root/app/models/user.rb +2 -0
- data/spec/shared/app_root/db/migrate/001_create_users.rb +2 -0
- data/spec/shared/dusen/active_record_spec.rb +2 -0
- metadata +42 -56
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
Dusen - Maps Google-like queries to ActiveRecord scopes
|
2
2
|
=======================================================
|
3
3
|
|
4
|
+
[![Build Status](https://secure.travis-ci.org/makandra/dusen.png?branch=master)](https://travis-ci.org/makandra/dusen)
|
4
5
|
|
5
6
|
Dusen gives your ActiveRecord models a DSL to process Google-like queries like:
|
6
7
|
|
data/Rakefile
CHANGED
@@ -8,16 +8,18 @@ namespace :all do
|
|
8
8
|
|
9
9
|
desc "Run specs on all spec apps"
|
10
10
|
task :spec do
|
11
|
+
success = true
|
11
12
|
for_each_directory_of('spec/**/Rakefile') do |directory|
|
12
13
|
env = "SPEC=../../#{ENV['SPEC']} " if ENV['SPEC']
|
13
|
-
system("cd #{directory} && #{env} bundle exec rake spec")
|
14
|
+
success &= system("cd #{directory} && #{env} bundle exec rake spec")
|
14
15
|
end
|
16
|
+
fail "Tests failed" unless success
|
15
17
|
end
|
16
18
|
|
17
19
|
desc "Bundle all spec apps"
|
18
20
|
task :bundle do
|
19
21
|
for_each_directory_of('spec/**/Gemfile') do |directory|
|
20
|
-
system("cd #{directory} && bundle install")
|
22
|
+
system("cd #{directory} && rm -f Gemfile.lock && bundle install")
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
data/lib/dusen/description.rb
CHANGED
data/lib/dusen/parser.rb
CHANGED
data/lib/dusen/query.rb
CHANGED
data/lib/dusen/syntax.rb
CHANGED
data/lib/dusen/token.rb
CHANGED
data/lib/dusen/util.rb
CHANGED
data/lib/dusen/version.rb
CHANGED
data/lib/dusen.rb
CHANGED
data/spec/rails-2.3/Gemfile
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
MissingSourceFile::REGEXPS.push([/^cannot load such file -- (.+)$/i, 1])
|
@@ -1,10 +1,12 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
$: << File.join(File.dirname(__FILE__), "/../../lib" )
|
2
4
|
|
3
5
|
# Set the default environment to sqlite3's in_memory database
|
4
|
-
ENV['RAILS_ENV']
|
6
|
+
ENV['RAILS_ENV'] = 'in_memory'
|
5
7
|
|
6
8
|
# Load the Rails environment and testing framework
|
7
|
-
require "#{File.dirname(__FILE__)}
|
9
|
+
require "#{File.dirname(__FILE__)}/../app_root/config/environment"
|
8
10
|
require 'spec/rails'
|
9
11
|
|
10
12
|
# Undo changes to RAILS_ENV
|
data/spec/rails-3.0/Gemfile
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
$: << File.join(File.dirname(__FILE__), "/../../lib" )
|
2
4
|
|
3
5
|
# Set the default environment to sqlite3's in_memory database
|
4
|
-
ENV['RAILS_ENV']
|
6
|
+
ENV['RAILS_ENV'] = 'test'
|
5
7
|
ENV['RAILS_ROOT'] = 'app_root'
|
6
8
|
|
7
9
|
# Load the Rails environment and testing framework
|
8
|
-
require "#{File.dirname(__FILE__)}
|
10
|
+
require "#{File.dirname(__FILE__)}/../app_root/config/environment"
|
9
11
|
require 'rspec/rails'
|
10
12
|
|
11
13
|
FileUtils.rm(Dir.glob("#{Rails.root}/db/*.db"), :force => true)
|
data/spec/rails-3.2/Gemfile
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
-
|
1
|
+
# encoding: utf-8
|
2
2
|
|
3
|
-
|
3
|
+
$: << File.join(File.dirname(__FILE__), "/../../lib" )
|
4
|
+
|
5
|
+
ENV['RAILS_ENV'] = 'test'
|
4
6
|
ENV['RAILS_ROOT'] = 'app_root'
|
5
7
|
|
6
8
|
FileUtils.rm(Dir.glob("#{ENV['RAILS_ROOT']}/db/*.db"), :force => true)
|
7
9
|
|
8
10
|
# Load the Rails environment and testing framework
|
9
|
-
require "#{File.dirname(__FILE__)}
|
11
|
+
require "#{File.dirname(__FILE__)}/../app_root/config/environment"
|
10
12
|
require 'rspec/rails'
|
11
13
|
require 'database_cleaner'
|
12
14
|
|
metadata
CHANGED
@@ -1,47 +1,41 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: dusen
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 1
|
10
|
-
version: 0.2.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Henning Koch
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-11-23 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: rails
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
33
22
|
type: :runtime
|
34
|
-
|
35
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
description: Maps Google-like queries (words, "phrases", qualified:fields) to ActiveRecord
|
31
|
+
scope chains
|
36
32
|
email: henning.koch@makandra.de
|
37
33
|
executables: []
|
38
|
-
|
39
34
|
extensions: []
|
40
|
-
|
41
35
|
extra_rdoc_files: []
|
42
|
-
|
43
|
-
files:
|
36
|
+
files:
|
44
37
|
- .gitignore
|
38
|
+
- .travis.yml
|
45
39
|
- README.md
|
46
40
|
- Rakefile
|
47
41
|
- dusen.gemspec
|
@@ -64,12 +58,13 @@ files:
|
|
64
58
|
- spec/rails-2.3/app_root/config/environments/postgresql.rb
|
65
59
|
- spec/rails-2.3/app_root/config/environments/sqlite.rb
|
66
60
|
- spec/rails-2.3/app_root/config/environments/sqlite3.rb
|
61
|
+
- spec/rails-2.3/app_root/config/initializers/fix_missing_source_file.rb
|
67
62
|
- spec/rails-2.3/app_root/config/preinitializer.rb
|
68
63
|
- spec/rails-2.3/app_root/config/routes.rb
|
69
64
|
- spec/rails-2.3/app_root/log/.gitignore
|
70
65
|
- spec/rails-2.3/rcov.opts
|
71
66
|
- spec/rails-2.3/spec.opts
|
72
|
-
- spec/rails-2.3/spec_helper.rb
|
67
|
+
- spec/rails-2.3/spec/spec_helper.rb
|
73
68
|
- spec/rails-3.0/.rspec
|
74
69
|
- spec/rails-3.0/Gemfile
|
75
70
|
- spec/rails-3.0/Rakefile
|
@@ -89,7 +84,7 @@ files:
|
|
89
84
|
- spec/rails-3.0/app_root/log/.gitkeep
|
90
85
|
- spec/rails-3.0/app_root/script/rails
|
91
86
|
- spec/rails-3.0/rcov.opts
|
92
|
-
- spec/rails-3.0/spec_helper.rb
|
87
|
+
- spec/rails-3.0/spec/spec_helper.rb
|
93
88
|
- spec/rails-3.2/.rspec
|
94
89
|
- spec/rails-3.2/Gemfile
|
95
90
|
- spec/rails-3.2/Rakefile
|
@@ -107,44 +102,35 @@ files:
|
|
107
102
|
- spec/rails-3.2/app_root/config/routes.rb
|
108
103
|
- spec/rails-3.2/app_root/log/.gitignore
|
109
104
|
- spec/rails-3.2/rcov.opts
|
110
|
-
- spec/rails-3.2/spec_helper.rb
|
105
|
+
- spec/rails-3.2/spec/spec_helper.rb
|
111
106
|
- spec/shared/app_root/app/controllers/application_controller.rb
|
112
107
|
- spec/shared/app_root/app/models/user.rb
|
113
108
|
- spec/shared/app_root/db/migrate/001_create_users.rb
|
114
109
|
- spec/shared/dusen/active_record_spec.rb
|
115
|
-
has_rdoc: true
|
116
110
|
homepage: https://github.com/makandra/dusen
|
117
111
|
licenses: []
|
118
|
-
|
119
112
|
post_install_message:
|
120
113
|
rdoc_options: []
|
121
|
-
|
122
|
-
require_paths:
|
114
|
+
require_paths:
|
123
115
|
- lib
|
124
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
117
|
none: false
|
126
|
-
requirements:
|
127
|
-
- -
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
|
130
|
-
|
131
|
-
- 0
|
132
|
-
version: "0"
|
133
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ! '>='
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
123
|
none: false
|
135
|
-
requirements:
|
136
|
-
- -
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
|
139
|
-
segments:
|
140
|
-
- 0
|
141
|
-
version: "0"
|
124
|
+
requirements:
|
125
|
+
- - ! '>='
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
142
128
|
requirements: []
|
143
|
-
|
144
129
|
rubyforge_project:
|
145
|
-
rubygems_version: 1.
|
130
|
+
rubygems_version: 1.8.24
|
146
131
|
signing_key:
|
147
132
|
specification_version: 3
|
148
|
-
summary: Maps Google-like queries (words, "phrases", qualified:fields) to ActiveRecord
|
133
|
+
summary: Maps Google-like queries (words, "phrases", qualified:fields) to ActiveRecord
|
134
|
+
scope chains
|
149
135
|
test_files: []
|
150
|
-
|
136
|
+
has_rdoc:
|