highrise 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg/**
data/CHANGELOG ADDED
@@ -0,0 +1,91 @@
1
+ 2009-05-27 Ken Mayer <kmayer@bitwrangler.com>
2
+
3
+ * Version 0.12.0
4
+
5
+ * Added store_options attribute, so fetches will work work with
6
+ :mem_cache_store and :expires_in
7
+
8
+ 2009-05-20 Ken Mayer <kmayer@bitwrangler.com>
9
+
10
+ * Version 0.11.0
11
+
12
+ * Added untag_id! to Taggable, in case you already know the id and don't
13
+ need to search for it again.
14
+
15
+ 2009-05-16 Ken Mayer <kmayer@bitwrangler.com>
16
+
17
+ * Version 0.10.0
18
+
19
+ * Simplified caching store interface, left configuration up to end-user with
20
+ less magic
21
+
22
+ * Removed version.rb module & tests. No one will ever use it, why clutter up
23
+ the code.
24
+
25
+ 2009-05-05 Ken Mayer <kmayer@bitwrangler.com>
26
+
27
+ * Version 0.9.2
28
+
29
+ * Refactored cachable to be more idiomatic ruby
30
+
31
+ * Dropped the SHA1 hashing from cache_key
32
+
33
+ 2009-05-04 Ken Mayer <kmayer@bitwrangler.com>
34
+
35
+ * Version 0.9.0
36
+
37
+ * Changed cache_store= interface to accept :none (to disable caching),
38
+ :rails (to use the default Rails cache, whatever that happens to be), and,
39
+ consequently, restores the lookup_store default behavior (given nil or
40
+ empty options returns a new, default cache_store).
41
+
42
+ * Documentation update. Created and back-filled CHANGELOG
43
+
44
+ 2009-05-01 Ken Mayer <kmayer@bitwrangler.com>
45
+
46
+ * Version 0.8.0
47
+
48
+ * Added caching feature
49
+
50
+ * Added example code
51
+
52
+ * Documentation update
53
+
54
+ * Updated gemspec
55
+
56
+ 2009-04-26 Ken Mayer <kmayer@bitwrangler.com>
57
+
58
+ * Version 0.7.0
59
+
60
+ * Refactored Tag & Taggable so ::Tag is a subclass of Base. This adds
61
+ ::Tag.find(:all) to your quiver of tools. All existing functionality
62
+ passes tests, but the interface to ::Tag.new has changed. You have to
63
+ treat it like all of other ARes, that is, use a Hash (instead of
64
+ positional parameters) to initialize the model.
65
+
66
+ 2009-04-22 Luis Bepop
67
+
68
+ * Version 0.6.3
69
+
70
+ * Support to tags refactored. Include curl helper to improve support for
71
+ objects without ActiveResource base like 'tag' which needs a parse in a
72
+ html document from a httprequest.
73
+
74
+ 2009-04-06 slainer68
75
+
76
+ * Version 0.6.2
77
+
78
+ * Modularize Taggable
79
+
80
+ 2009-03-31 ThiagoLelis
81
+
82
+ * Version 0.6.1
83
+
84
+ * Add Person.tag that show a array of tags, and Perton.tag(name), add a new
85
+ tag to a person.
86
+
87
+ 2009-01-14 tapajos
88
+
89
+ * Version 0.5.0
90
+
91
+ * Initial import
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Ken Mayer
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,44 @@
1
+ require 'rake'
2
+ require 'rubygems'
3
+ require 'rake/rdoctask'
4
+ require 'rake/testtask'
5
+ require 'spec/rake/spectask'
6
+ require "date"
7
+ require "fileutils"
8
+ require "rubygems"
9
+ require "rake/gempackagetask"
10
+
11
+ begin
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gemspec|
14
+ gemspec.name = "highrise"
15
+ gemspec.summary = "Ruby wrapper around Highrise API"
16
+ gemspec.email = ["marcos@tapajos.me", "kmayer@bitwrangler.com"]
17
+ gemspec.homepage = "http://github.com/tapajos/highrise"
18
+ gemspec.description = %{
19
+ Based on the original API module from DHH, http://developer.37signals.com/highrise/, this
20
+ gem is a cleaned up, tested version of the same. Contributors have added support for tags
21
+ which are not supported by the API directly
22
+
23
+ Configure by adding the following:
24
+
25
+ require 'highrise'
26
+ Highrise::Base.site = 'http://your_site.highrisehq.com/'
27
+ Highrise::Base.user = 'your_api_auth_token'
28
+ }
29
+ gemspec.authors = ["Marcos Tapajós", "Ken Mayer"]
30
+ gemspec.add_dependency('activeresource', '>= 2.1')
31
+ gemspec.add_dependency('activesupport', '>= 2.1')
32
+ end
33
+ rescue LoadError
34
+ puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gems.github.com"
35
+ end
36
+
37
+ desc 'Default: run unit tests.'
38
+ task :default => :spec
39
+
40
+ desc "Run all specs"
41
+ Spec::Rake::SpecTask.new do |t|
42
+ t.spec_files = FileList['spec/**/*_spec.rb']
43
+ t.spec_opts = ['--options', 'spec/spec.opts']
44
+ end
data/VERSION.yml CHANGED
@@ -1,4 +1,5 @@
1
- :patch: 3
2
- :build:
1
+ ---
2
+ :minor: 0
3
+ :patch: 4
3
4
  :major: 1
4
- :minor: 0
5
+ :build:
@@ -0,0 +1,3 @@
1
+ Autotest.add_discovery do
2
+ "rspec"
3
+ end
@@ -0,0 +1,12 @@
1
+ if Rails.env != 'test' then
2
+ Highrise::Base.site = 'https://example.com.i'
3
+ # For backward compatability
4
+ if Highrise::Base.respond_to? :user
5
+ Highrise::Base.user = 'my_fancy_auth_token'
6
+ else
7
+ Highrise::Base.site = 'https://my_fancy_auth_token@example.com.i'
8
+ end
9
+ # The cache store can be anything that ActiveSupport can handle
10
+ Highrise::Base.cache_store = ActiveSupport::Cache.lookup_store :mem_cache_store
11
+ Highrise::Base.store_options = { :expires_in => 60.seconds }
12
+ end
@@ -0,0 +1,31 @@
1
+ #
2
+ # Example of extending a class when you need to synthesize an attribute.
3
+ #
4
+ # Adds Highrise::Person.{phone,fax,email} to the Person class inside your
5
+ # module
6
+ #
7
+
8
+ module MyModule
9
+ include Highrise
10
+
11
+ Highrise::Person.class_eval do
12
+ class << self
13
+ def lookup(id, list, item, location)
14
+ module_eval <<-EOT
15
+ def #{id}
16
+ contact_data.#{list}.each do |i|
17
+ return i.#{item}.strip if i.location == "#{location}"
18
+ end
19
+ ''
20
+ end
21
+ EOT
22
+ end
23
+
24
+ private :lookup
25
+ end
26
+
27
+ lookup(:phone, 'phone_numbers', 'number', 'Work')
28
+ lookup(:fax, 'phone_numbers', 'number', 'Fax')
29
+ lookup(:email, 'email_addresses', 'address', 'Work')
30
+ end
31
+ end
@@ -0,0 +1,10 @@
1
+ require 'highrise'
2
+ require 'pp'
3
+
4
+ Highrise::Base.site = 'https://yoursite.highrisehq.com'
5
+ Highrise::Base.user = 'xxx'
6
+ Highrise::Base.cache_store = :memory_store
7
+
8
+ @tags = Highrise::Tag.find(:all)
9
+
10
+ pp @tags
data/highrise.gemspec ADDED
@@ -0,0 +1,119 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{highrise}
8
+ s.version = "1.0.3"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Marcos Tapaj\303\263s", "Ken Mayer"]
12
+ s.date = %q{2009-11-11}
13
+ s.description = %q{
14
+ Based on the original API module from DHH, http://developer.37signals.com/highrise/, this
15
+ gem is a cleaned up, tested version of the same. Contributors have added support for tags
16
+ which are not supported by the API directly
17
+
18
+ Configure by adding the following:
19
+
20
+ require 'highrise'
21
+ Highrise::Base.site = 'http://your_site.highrisehq.com/'
22
+ Highrise::Base.user = 'your_api_auth_token'
23
+ }
24
+ s.email = ["marcos@tapajos.me", "kmayer@bitwrangler.com"]
25
+ s.extra_rdoc_files = [
26
+ "README.mkdn"
27
+ ]
28
+ s.files = [
29
+ ".gitignore",
30
+ "CHANGELOG",
31
+ "MIT-LICENSE",
32
+ "README.mkdn",
33
+ "Rakefile",
34
+ "VERSION.yml",
35
+ "autotest/discover.rb",
36
+ "examples/config_initializers_highrise.rb",
37
+ "examples/extending.rb",
38
+ "examples/sample.rb",
39
+ "install.rb",
40
+ "lib/cachable.rb",
41
+ "lib/highrise.rb",
42
+ "lib/highrise/base.rb",
43
+ "lib/highrise/comment.rb",
44
+ "lib/highrise/company.rb",
45
+ "lib/highrise/email.rb",
46
+ "lib/highrise/group.rb",
47
+ "lib/highrise/kase.rb",
48
+ "lib/highrise/membership.rb",
49
+ "lib/highrise/note.rb",
50
+ "lib/highrise/pagination.rb",
51
+ "lib/highrise/person.rb",
52
+ "lib/highrise/subject.rb",
53
+ "lib/highrise/tag.rb",
54
+ "lib/highrise/taggable.rb",
55
+ "lib/highrise/task.rb",
56
+ "lib/highrise/user.rb",
57
+ "spec/cachable_spec.rb",
58
+ "spec/highrise/base_spec.rb",
59
+ "spec/highrise/comment_spec.rb",
60
+ "spec/highrise/company_spec.rb",
61
+ "spec/highrise/email_spec.rb",
62
+ "spec/highrise/group_spec.rb",
63
+ "spec/highrise/kase_spec.rb",
64
+ "spec/highrise/membership_spec.rb",
65
+ "spec/highrise/note_spec.rb",
66
+ "spec/highrise/pagination_spec.rb",
67
+ "spec/highrise/person_spec.rb",
68
+ "spec/highrise/subject_spec.rb",
69
+ "spec/highrise/tag_spec.rb",
70
+ "spec/highrise/task_spec.rb",
71
+ "spec/highrise/user_spec.rb",
72
+ "spec/spec.opts",
73
+ "spec/spec_helper.rb",
74
+ "uninstall.rb"
75
+ ]
76
+ s.homepage = %q{http://github.com/tapajos/highrise}
77
+ s.rdoc_options = ["--charset=UTF-8"]
78
+ s.require_paths = ["lib"]
79
+ s.rubygems_version = %q{1.3.5}
80
+ s.summary = %q{Ruby wrapper around Highrise API}
81
+ s.test_files = [
82
+ "spec/cachable_spec.rb",
83
+ "spec/highrise/base_spec.rb",
84
+ "spec/highrise/comment_spec.rb",
85
+ "spec/highrise/company_spec.rb",
86
+ "spec/highrise/email_spec.rb",
87
+ "spec/highrise/group_spec.rb",
88
+ "spec/highrise/kase_spec.rb",
89
+ "spec/highrise/membership_spec.rb",
90
+ "spec/highrise/note_spec.rb",
91
+ "spec/highrise/pagination_spec.rb",
92
+ "spec/highrise/person_spec.rb",
93
+ "spec/highrise/subject_spec.rb",
94
+ "spec/highrise/tag_spec.rb",
95
+ "spec/highrise/task_spec.rb",
96
+ "spec/highrise/user_spec.rb",
97
+ "spec/spec_helper.rb",
98
+ "examples/config_initializers_highrise.rb",
99
+ "examples/extending.rb",
100
+ "examples/sample.rb"
101
+ ]
102
+
103
+ if s.respond_to? :specification_version then
104
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
105
+ s.specification_version = 3
106
+
107
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
108
+ s.add_runtime_dependency(%q<activeresource>, [">= 2.1"])
109
+ s.add_runtime_dependency(%q<activesupport>, [">= 2.1"])
110
+ else
111
+ s.add_dependency(%q<activeresource>, [">= 2.1"])
112
+ s.add_dependency(%q<activesupport>, [">= 2.1"])
113
+ end
114
+ else
115
+ s.add_dependency(%q<activeresource>, [">= 2.1"])
116
+ s.add_dependency(%q<activesupport>, [">= 2.1"])
117
+ end
118
+ end
119
+
data/install.rb ADDED
@@ -0,0 +1 @@
1
+ # Install hook code here
data/uninstall.rb ADDED
@@ -0,0 +1 @@
1
+ # Uninstall hook code here
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highrise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Marcos Tapaj\xC3\xB3s"
@@ -41,17 +41,30 @@ description: "\n\
41
41
  require 'highrise'\n\
42
42
  Highrise::Base.site = 'http://your_site.highrisehq.com/'\n\
43
43
  Highrise::Base.user = 'your_api_auth_token'\n "
44
- email: marcos@tapajos.me
44
+ email:
45
+ - marcos@tapajos.me
46
+ - kmayer@bitwrangler.com
45
47
  executables: []
46
48
 
47
49
  extensions: []
48
50
 
49
- extra_rdoc_files: []
50
-
51
+ extra_rdoc_files:
52
+ - README.mkdn
51
53
  files:
54
+ - .gitignore
55
+ - CHANGELOG
56
+ - MIT-LICENSE
52
57
  - README.mkdn
58
+ - Rakefile
53
59
  - VERSION.yml
60
+ - autotest/discover.rb
61
+ - examples/config_initializers_highrise.rb
62
+ - examples/extending.rb
63
+ - examples/sample.rb
64
+ - highrise.gemspec
65
+ - install.rb
54
66
  - lib/cachable.rb
67
+ - lib/highrise.rb
55
68
  - lib/highrise/base.rb
56
69
  - lib/highrise/comment.rb
57
70
  - lib/highrise/company.rb
@@ -67,7 +80,6 @@ files:
67
80
  - lib/highrise/taggable.rb
68
81
  - lib/highrise/task.rb
69
82
  - lib/highrise/user.rb
70
- - lib/highrise.rb
71
83
  - spec/cachable_spec.rb
72
84
  - spec/highrise/base_spec.rb
73
85
  - spec/highrise/comment_spec.rb
@@ -85,13 +97,13 @@ files:
85
97
  - spec/highrise/user_spec.rb
86
98
  - spec/spec.opts
87
99
  - spec/spec_helper.rb
100
+ - uninstall.rb
88
101
  has_rdoc: true
89
102
  homepage: http://github.com/tapajos/highrise
90
103
  licenses: []
91
104
 
92
105
  post_install_message:
93
106
  rdoc_options:
94
- - --inline-source
95
107
  - --charset=UTF-8
96
108
  require_paths:
97
109
  - lib
@@ -114,5 +126,23 @@ rubygems_version: 1.3.5
114
126
  signing_key:
115
127
  specification_version: 3
116
128
  summary: Ruby wrapper around Highrise API
117
- test_files: []
118
-
129
+ test_files:
130
+ - spec/cachable_spec.rb
131
+ - spec/highrise/base_spec.rb
132
+ - spec/highrise/comment_spec.rb
133
+ - spec/highrise/company_spec.rb
134
+ - spec/highrise/email_spec.rb
135
+ - spec/highrise/group_spec.rb
136
+ - spec/highrise/kase_spec.rb
137
+ - spec/highrise/membership_spec.rb
138
+ - spec/highrise/note_spec.rb
139
+ - spec/highrise/pagination_spec.rb
140
+ - spec/highrise/person_spec.rb
141
+ - spec/highrise/subject_spec.rb
142
+ - spec/highrise/tag_spec.rb
143
+ - spec/highrise/task_spec.rb
144
+ - spec/highrise/user_spec.rb
145
+ - spec/spec_helper.rb
146
+ - examples/config_initializers_highrise.rb
147
+ - examples/extending.rb
148
+ - examples/sample.rb