petfinder 0.1.1 → 0.1.2

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,8 @@
1
+ .DS_STORE
2
+ coverage/*
3
+ pkg/*
4
+ tmp/*
5
+ *.gem
6
+ .bundle
7
+ .rvmrc
8
+ rdoc/*
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile.lock ADDED
@@ -0,0 +1,30 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ crack (0.1.6)
5
+ diff-lcs (1.1.2)
6
+ fakeweb (1.2.8)
7
+ happymapper (0.3.2)
8
+ libxml-ruby (~> 1.1.3)
9
+ httparty (0.5.2)
10
+ crack (= 0.1.6)
11
+ libxml-ruby (1.1.4)
12
+ rspec (2.0.0.beta.22)
13
+ rspec-core (= 2.0.0.beta.22)
14
+ rspec-expectations (= 2.0.0.beta.22)
15
+ rspec-mocks (= 2.0.0.beta.22)
16
+ rspec-core (2.0.0.beta.22)
17
+ rspec-expectations (2.0.0.beta.22)
18
+ diff-lcs (>= 1.1.2)
19
+ rspec-mocks (2.0.0.beta.22)
20
+ rspec-core (= 2.0.0.beta.22)
21
+ rspec-expectations (= 2.0.0.beta.22)
22
+
23
+ PLATFORMS
24
+ ruby
25
+
26
+ DEPENDENCIES
27
+ fakeweb (~> 1.2.5)
28
+ happymapper (~> 0.3.2)
29
+ httparty (~> 0.5.0)
30
+ rspec (~> 2.0.pre)
data/Rakefile CHANGED
@@ -1,152 +1,13 @@
1
- require 'rubygems'
2
1
  require 'rake'
3
- require 'date'
2
+ require 'rake/rdoctask'
4
3
  require 'rspec'
5
4
  require 'rspec/core/rake_task'
5
+ require 'bundler'
6
6
 
7
- #############################################################################
8
- #
9
- # Helper functions
10
- #
11
- #############################################################################
12
-
13
- def name
14
- @name ||= Dir['*.gemspec'].first.split('.').first
15
- end
16
-
17
- def version
18
- line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
19
- line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
20
- end
21
-
22
- def date
23
- Date.today.to_s
24
- end
25
-
26
- def rubyforge_project
27
- name
28
- end
29
-
30
- def gemspec_file
31
- "#{name}.gemspec"
32
- end
33
-
34
- def gem_file
35
- "#{name}-#{version}.gem"
36
- end
37
-
38
- def replace_header(head, header_name)
39
- head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
40
- end
41
-
42
- #############################################################################
43
- #
44
- # Standard tasks
45
- #
46
- #############################################################################
47
-
48
- task :default => :spec
7
+ Bundler::GemHelper.install_tasks
49
8
 
50
9
  Rspec::Core::RakeTask.new(:spec) do |spec|
51
10
  spec.pattern = "spec/**/*_spec.rb"
52
11
  end
53
12
 
54
- # require 'rake/testtask'
55
- # Rake::TestTask.new(:test) do |test|
56
- # test.libs << 'lib' << 'test'
57
- # test.pattern = 'test/**/test_*.rb'
58
- # test.verbose = true
59
- # end
60
-
61
- # desc "Generate RCov test coverage and open in your browser"
62
- # task :coverage do
63
- # require 'rcov'
64
- # sh "rm -fr coverage"
65
- # sh "rcov test/test_*.rb"
66
- # sh "open coverage/index.html"
67
- # end
68
-
69
- require 'rake/rdoctask'
70
- Rake::RDocTask.new do |rdoc|
71
- rdoc.rdoc_dir = 'rdoc'
72
- rdoc.title = "#{name} #{version}"
73
- rdoc.rdoc_files.include('README*')
74
- rdoc.rdoc_files.include('lib/**/*.rb')
75
- end
76
-
77
- desc "Open an irb session preloaded with this library"
78
- task :console do
79
- sh "irb -rubygems -r ./lib/#{name}.rb"
80
- end
81
-
82
- #############################################################################
83
- #
84
- # Custom tasks (add your own tasks here)
85
- #
86
- #############################################################################
87
-
88
-
89
-
90
- #############################################################################
91
- #
92
- # Packaging tasks
93
- #
94
- #############################################################################
95
-
96
- task :release => :build do
97
- unless `git branch` =~ /^\* master$/
98
- puts "You must be on the master branch to release!"
99
- exit!
100
- end
101
- sh "git commit --allow-empty -a -m 'Release #{version}'"
102
- sh "git tag v#{version}"
103
- sh "git push origin master"
104
- sh "git push origin v#{version}"
105
- sh "gem push pkg/#{name}-#{version}.gem"
106
- end
107
-
108
- task :build => :gemspec do
109
- sh "mkdir -p pkg"
110
- sh "gem build #{gemspec_file}"
111
- sh "mv #{gem_file} pkg"
112
- end
113
-
114
- task :gemspec => :validate do
115
- # read spec file and split out manifest section
116
- spec = File.read(gemspec_file)
117
- head, manifest, tail = spec.split(" # = MANIFEST =\n")
118
-
119
- # replace name version and date
120
- replace_header(head, :name)
121
- replace_header(head, :version)
122
- replace_header(head, :date)
123
- #comment this out if your rubyforge_project has a different name
124
- replace_header(head, :rubyforge_project)
125
-
126
- # determine file list from git ls-files
127
- files = `git ls-files`.
128
- split("\n").
129
- sort.
130
- reject { |file| file =~ /^\./ }.
131
- reject { |file| file =~ /^(rdoc|pkg)/ }.
132
- map { |file| " #{file}" }.
133
- join("\n")
134
-
135
- # piece file back together and write
136
- manifest = " s.files = %w[\n#{files}\n ]\n"
137
- spec = [head, manifest, tail].join(" # = MANIFEST =\n")
138
- File.open(gemspec_file, 'w') { |io| io.write(spec) }
139
- puts "Updated #{gemspec_file}"
140
- end
141
-
142
- task :validate do
143
- libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]
144
- unless libfiles.empty?
145
- puts "Directory `lib` should only contain a `#{name}.rb` file and `#{name}` dir."
146
- exit!
147
- end
148
- unless Dir['VERSION*'].empty?
149
- puts "A `VERSION` file at root level violates Gem best practices."
150
- exit!
151
- end
152
- end
13
+ task :default => :spec
@@ -0,0 +1,3 @@
1
+ module Petfinder
2
+ VERSION = "0.1.2"
3
+ end
data/petfinder.gemspec CHANGED
@@ -1,83 +1,32 @@
1
- Gem::Specification.new do |s|
2
- s.specification_version = 2 if s.respond_to? :specification_version=
3
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
4
- s.rubygems_version = '1.3.5'
5
-
6
- ## Leave these as is they will be modified for you by the rake gemspec task.
7
- ## If your rubyforge_project name is different, then edit it and comment out
8
- ## the sub! line in the Rakefile
9
- s.name = 'petfinder'
10
- s.version = '0.1.1'
11
- s.date = '2010-09-22'
12
- s.rubyforge_project = 'petfinder'
13
-
14
- ## Make sure your summary is short. The description may be as long
15
- ## as you like.
16
- s.summary = "Ruby gem wrapper for the Petfinder API."
17
- #s.description = "Ruby gem wrapper for the Petfinder API."
18
-
19
- ## List the primary authors. If there are a bunch of authors, it's probably
20
- ## better to set the email to an email list or something. If you don't have
21
- ## a custom homepage, consider using your GitHub URL or the like.
22
- s.authors = ["Eric Hutzelman"]
23
- s.email = 'ehutzelman@gmail.com'
24
- s.homepage = 'http://github.com/ehutzelman/petfinder'
25
-
26
- ## This gets added to the $LOAD_PATH so that 'lib/NAME.rb' can be required as
27
- ## require 'NAME.rb' or'/lib/NAME/file.rb' can be as require 'NAME/file.rb'
28
- s.require_paths = %w[lib]
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib/', __FILE__)
3
+ $:.unshift lib unless $:.include?(lib)
29
4
 
30
- ## This sections is only necessary if you have C extensions.
31
- # s.require_paths << 'ext'
32
- # s.extensions = %w[ext/extconf.rb]
5
+ require 'petfinder/version'
33
6
 
34
- ## If your gem includes any executables, list them here.
35
- # s.executables = ["name"]
36
- # s.default_executable = 'name'
7
+ Gem::Specification.new do |s|
8
+ s.name = "petfinder"
9
+ s.rubyforge_project = "petfinder"
10
+ s.version = Petfinder::VERSION
11
+ s.authors = ["Eric Hutzelman"]
12
+ s.email = ["ehutzelman@gmail.com"]
13
+ s.homepage = "http://github.com/ehutzelman/petfinder"
14
+ s.summary = "Ruby gem wrapper for the Petfinder API."
15
+ s.description = "REST client for the Petfinder published API."
16
+
17
+ s.add_dependency('happymapper', ["~> 0.3.2"])
18
+ s.add_dependency('httparty', ["~> 0.5.0"])
19
+ s.add_development_dependency('rspec', ["~> 2.0.pre"])
20
+ s.add_development_dependency('fakeweb', ["~> 1.2.5"])
21
+
22
+ # Standard
23
+ s.required_rubygems_version = ">= 1.3.6"
24
+ s.platform = Gem::Platform::RUBY
25
+ s.require_paths = ["lib"]
26
+ s.files = `git ls-files`.split("\n")
27
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
28
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
37
29
 
38
- ## Specify any RDoc options here. You'll want to add your README and
39
- ## LICENSE files to the extra_rdoc_files list.
40
- s.rdoc_options = ["--charset=UTF-8"]
41
30
  s.extra_rdoc_files = %w[README.rdoc LICENSE]
42
-
43
- ## List your runtime dependencies here. Runtime dependencies are those
44
- ## that are needed for an end user to actually USE your code.
45
- s.add_dependency('happymapper', [">= 0.3.2"])
46
- s.add_dependency('httparty', [">= 0.5.0"])
47
-
48
- ## List your development dependencies here. Development dependencies are
49
- ## those that are only needed during development
50
- s.add_development_dependency('rspec', [">= 2.0.pre"])
51
- s.add_development_dependency('fakeweb', [">= 1.2.5"])
52
-
53
- ## Leave this section as-is. It will be automatically generated from the
54
- ## contents of your Git repository via the gemspec task. DO NOT REMOVE
55
- ## THE MANIFEST COMMENTS, they are used as delimiters by the task.
56
- # = MANIFEST =
57
- s.files = %w[
58
- Gemfile
59
- LICENSE
60
- README.rdoc
61
- Rakefile
62
- lib/petfinder.rb
63
- lib/petfinder/auth.rb
64
- lib/petfinder/breeds.rb
65
- lib/petfinder/client.rb
66
- lib/petfinder/pet.rb
67
- lib/petfinder/shelter.rb
68
- petfinder.gemspec
69
- spec/fixtures/auth.xml
70
- spec/fixtures/breed_list.xml
71
- spec/fixtures/pet.xml
72
- spec/fixtures/pet_list.xml
73
- spec/fixtures/shelter.xml
74
- spec/fixtures/shelter_list.xml
75
- spec/petfinder_spec.rb
76
- spec/spec_helper.rb
77
- ]
78
- # = MANIFEST =
79
-
80
- ## Test files will be grabbed from the file list. Make sure the path glob
81
- ## matches what you actually use.
82
- s.test_files = s.files.select { |path| path =~ /^spec\/.*_spec\.rb/ }
31
+ s.rdoc_options = ["--charset=UTF-8"]
83
32
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Eric Hutzelman
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-22 00:00:00 -05:00
17
+ date: 2010-09-24 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
25
25
  requirements:
26
- - - ">="
26
+ - - ~>
27
27
  - !ruby/object:Gem::Version
28
28
  segments:
29
29
  - 0
@@ -38,7 +38,7 @@ dependencies:
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
- - - ">="
41
+ - - ~>
42
42
  - !ruby/object:Gem::Version
43
43
  segments:
44
44
  - 0
@@ -53,7 +53,7 @@ dependencies:
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
56
- - - ">="
56
+ - - ~>
57
57
  - !ruby/object:Gem::Version
58
58
  segments:
59
59
  - 2
@@ -68,7 +68,7 @@ dependencies:
68
68
  requirement: &id004 !ruby/object:Gem::Requirement
69
69
  none: false
70
70
  requirements:
71
- - - ">="
71
+ - - ~>
72
72
  - !ruby/object:Gem::Version
73
73
  segments:
74
74
  - 1
@@ -77,8 +77,9 @@ dependencies:
77
77
  version: 1.2.5
78
78
  type: :development
79
79
  version_requirements: *id004
80
- description:
81
- email: ehutzelman@gmail.com
80
+ description: REST client for the Petfinder published API.
81
+ email:
82
+ - ehutzelman@gmail.com
82
83
  executables: []
83
84
 
84
85
  extensions: []
@@ -87,7 +88,10 @@ extra_rdoc_files:
87
88
  - README.rdoc
88
89
  - LICENSE
89
90
  files:
91
+ - .gitignore
92
+ - .rspec
90
93
  - Gemfile
94
+ - Gemfile.lock
91
95
  - LICENSE
92
96
  - README.rdoc
93
97
  - Rakefile
@@ -97,6 +101,7 @@ files:
97
101
  - lib/petfinder/client.rb
98
102
  - lib/petfinder/pet.rb
99
103
  - lib/petfinder/shelter.rb
104
+ - lib/petfinder/version.rb
100
105
  - petfinder.gemspec
101
106
  - spec/fixtures/auth.xml
102
107
  - spec/fixtures/breed_list.xml
@@ -129,14 +134,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
134
  - - ">="
130
135
  - !ruby/object:Gem::Version
131
136
  segments:
132
- - 0
133
- version: "0"
137
+ - 1
138
+ - 3
139
+ - 6
140
+ version: 1.3.6
134
141
  requirements: []
135
142
 
136
143
  rubyforge_project: petfinder
137
144
  rubygems_version: 1.3.7
138
145
  signing_key:
139
- specification_version: 2
146
+ specification_version: 3
140
147
  summary: Ruby gem wrapper for the Petfinder API.
141
148
  test_files:
149
+ - spec/fixtures/auth.xml
150
+ - spec/fixtures/breed_list.xml
151
+ - spec/fixtures/pet.xml
152
+ - spec/fixtures/pet_list.xml
153
+ - spec/fixtures/shelter.xml
154
+ - spec/fixtures/shelter_list.xml
142
155
  - spec/petfinder_spec.rb
156
+ - spec/spec_helper.rb