openstax_connect 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,10 +38,6 @@ module OpenStax::Connect
38
38
  return users
39
39
  end
40
40
 
41
- def self.default_transaction_isolation
42
- Lev::TransactionIsolation.serializable
43
- end
44
-
45
41
  end
46
42
 
47
43
  end
@@ -7,8 +7,8 @@ module OpenStax
7
7
 
8
8
  def create
9
9
  handle_with(Dev::UsersCreate,
10
- success: lambda { redirect_to dev_users_path, notice: 'Success!'},
11
- failure: lambda { render 'index', alert: 'Error' })
10
+ success: lambda { redirect_to dev_users_path },
11
+ failure: lambda { render 'index' })
12
12
  end
13
13
 
14
14
  def generate
@@ -25,39 +25,7 @@ module OpenStax::Connect::Dev
25
25
  terms = search_params.search_terms
26
26
  type = search_params.search_type
27
27
 
28
- # results[:users] = run(OpenStax::Connect::SearchUsers, terms, type.downcase.to_sym)
29
- # results[:users] = run(:openstax_connect_search_users, terms, type.downcase.to_sym)
30
28
  results[:users] = run(:search_users, terms, type.downcase.to_sym)
31
-
32
- # if terms.blank?
33
- # users = User.where{id == nil}.where{id != nil} # Empty
34
- # else
35
- # # Note: % is the wildcard. This allows the user to search
36
- # # for stuff that "begins with" but not "ends with".
37
- # case type
38
- # when 'Name'
39
- # users = User.scoped
40
- # terms.gsub(/[%,]/, '').split.each do |t|
41
- # next if t.blank?
42
- # query = t + '%'
43
- # users = users.where{(first_name =~ query) | (last_name =~ query)}
44
- # end
45
- # when 'Username'
46
- # query = terms.gsub('%', '') + '%'
47
- # users = where{username =~ query}
48
- # else # Any
49
- # users = User.scoped
50
- # terms.gsub(/[%,]/, '').split.each do |t|
51
- # next if t.blank?
52
- # query = t + '%'
53
- # users = users.where{(first_name =~ query) |
54
- # (last_name =~ query) |
55
- # (username =~ query)}
56
- # end
57
- # end
58
- # end
59
-
60
- # results[:users] = users
61
29
  end
62
30
 
63
31
  end
@@ -1,5 +1,5 @@
1
1
  module OpenStax
2
2
  module Connect
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstax_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-18 00:00:00.000000000 Z
12
+ date: 2013-09-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -75,6 +75,22 @@ dependencies:
75
75
  - - ! '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: lev
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ~>
84
+ - !ruby/object:Gem::Version
85
+ version: 0.0.3
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 0.0.3
78
94
  - !ruby/object:Gem::Dependency
79
95
  name: sqlite3
80
96
  requirement: !ruby/object:Gem::Requirement
@@ -172,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
172
188
  version: '0'
173
189
  segments:
174
190
  - 0
175
- hash: 3299630262268843915
191
+ hash: 28024144982429715
176
192
  required_rubygems_version: !ruby/object:Gem::Requirement
177
193
  none: false
178
194
  requirements:
@@ -181,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
197
  version: '0'
182
198
  segments:
183
199
  - 0
184
- hash: 3299630262268843915
200
+ hash: 28024144982429715
185
201
  requirements: []
186
202
  rubyforge_project:
187
203
  rubygems_version: 1.8.25