peterosullivan-highrise 3.0.4 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -7,8 +7,8 @@ This fork is very close to the orginal gem. I have added a few features and shor
7
7
 
8
8
  ###Tag methods
9
9
  Highrise::Tag.delete_by_name('tag_name')
10
+ Highrise::Person.tagged_with_name('tag_name')
10
11
  Highrise::Person.find(123).tagged?('tag_name')
11
- Highrise::Person.find(123).tagged_with_name('tag_name')
12
12
 
13
13
  ###Email methods
14
14
  Highrise::Person.find(123).email_address
@@ -47,7 +47,16 @@ module Highrise
47
47
  def tagged? name
48
48
  tags.any?{ | tag | tag['name'].to_s == name}
49
49
  end
50
- alias :tagged_with_name :tagged?
50
+
51
+ def self.tagged_with_name(tag_name)
52
+ tagged_with_id((Tag.find_by_name(tag_name)).id)
53
+ end
54
+
55
+ def self.tagged_with_id id
56
+ find_all_across_pages(:from => "/tags/#{id}.xml").select do |obj|
57
+ obj.kind_of?(Person)
58
+ end
59
+ end
51
60
 
52
61
  def create_subject_fields_accessors
53
62
  subject_data_fields.each do |subject_field_name, value|
@@ -10,21 +10,23 @@
10
10
  # Licensed under a Creative Commons Attribution-ShareAlike 2.5 License
11
11
  # http://creativecommons.org/licenses/by-sa/2.5/
12
12
  #
13
- module RFC822
14
- EmailAddress = begin
15
- qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]'
16
- dtext = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]'
17
- atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-' +
18
- '\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+'
19
- quoted_pair = '\\x5c[\\x00-\\x7f]'
20
- domain_literal = "\\x5b(?:#{dtext}|#{quoted_pair})*\\x5d"
21
- quoted_string = "\\x22(?:#{qtext}|#{quoted_pair})*\\x22"
22
- domain_ref = atom
23
- sub_domain = "(?:#{domain_ref}|#{domain_literal})"
24
- word = "(?:#{atom}|#{quoted_string})"
25
- domain = "#{sub_domain}(?:\\x2e#{sub_domain})*"
26
- local_part = "#{word}(?:\\x2e#{word})*"
27
- addr_spec = "#{local_part}\\x40#{domain}"
28
- pattern = /\A#{addr_spec}\z/
13
+ module Highrise
14
+ module RFC822
15
+ EmailAddress = begin
16
+ qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]'
17
+ dtext = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]'
18
+ atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-' +
19
+ '\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+'
20
+ quoted_pair = '\\x5c[\\x00-\\x7f]'
21
+ domain_literal = "\\x5b(?:#{dtext}|#{quoted_pair})*\\x5d"
22
+ quoted_string = "\\x22(?:#{qtext}|#{quoted_pair})*\\x22"
23
+ domain_ref = atom
24
+ sub_domain = "(?:#{domain_ref}|#{domain_literal})"
25
+ word = "(?:#{atom}|#{quoted_string})"
26
+ domain = "#{sub_domain}(?:\\x2e#{sub_domain})*"
27
+ local_part = "#{word}(?:\\x2e#{word})*"
28
+ addr_spec = "#{local_part}\\x40#{domain}"
29
+ pattern = /\A#{addr_spec}\z/
30
+ end
29
31
  end
30
- end
32
+ end
@@ -1,3 +1,3 @@
1
1
  module Highrise
2
- VERSION = "3.0.4"
2
+ VERSION = "3.0.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peterosullivan-highrise
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 3
8
8
  - 0
9
- - 4
10
- version: 3.0.4
9
+ - 5
10
+ version: 3.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Marcos Tapaj\xC3\xB3s"