Skip to content

Commit

Permalink
Adding boolean and/or tag searches.
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrossman committed Dec 2, 2010
1 parent 82f2cbc commit dbef338
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
0.1.5
0.1.6
4 changes: 2 additions & 2 deletions lib/word_press_record.rb
Expand Up @@ -110,15 +110,15 @@ def self.all(params = nil)
method = 'queries.general'

if params[:category]
category = params[:category]
category = CGI.escape(params[:category])
end

if params[:search]
search = CGI.escape(params[:search].strip)
end

if params[:tagged]
tags = params[:tagged].to_s.gsub(/\s*,\s*/, '+')
tags = CGI.escape(params[:tagged].to_s.gsub(/\s*,\s*/, ',').gsub(/\s+/, ' '))
end

url = "#{WP_URL}/?json=#{method}&post_type=#{self._wp_post_type}&count=#{count}&page=#{page}#{wp_query_string}"
Expand Down
30 changes: 14 additions & 16 deletions word_press_record.gemspec
@@ -1,42 +1,40 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{word_press_record}
s.version = "0.1.4"
s.version = "0.1.6"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Adam Grossman"]
s.date = %q{2010-11-10}
s.date = %q{2010-12-02}
s.description = %q{WordPressRecord implements an ActiveModel interface for talking to a WordPress site, using the WordPress JSON API}
s.email = %q{adam@jackadam.net}
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
"README.rdoc"
]
s.files = [
".document",
".gitignore",
"LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"lib/word_press_record.rb",
"php/json-api/controllers/queries.php",
"test/helper.rb",
"test/test_word_press_record.rb",
"word_press_record.gemspec"
"LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"lib/word_press_record.rb",
"php/json-api/controllers/queries.php",
"test/helper.rb",
"test/test_word_press_record.rb",
"word_press_record.gemspec"
]
s.homepage = %q{http://github.com/thegrossman/word_press_record}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{WordPressRecord implements an ActiveModel interface for talking to a WordPress site, using the WordPress JSON API}
s.test_files = [
"test/helper.rb",
"test/test_word_press_record.rb"
"test/test_word_press_record.rb"
]

if s.respond_to? :specification_version then
Expand Down

0 comments on commit dbef338

Please sign in to comment.