Skip to content

Commit

Permalink
Gem building fixed
Browse files Browse the repository at this point in the history
- Updated gemspec and gemfile
- Garb::Version -> Garb::VERSION
- Version bump
  • Loading branch information
Sija committed Aug 23, 2012
1 parent b181e32 commit ef71d20
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 101 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
*.gem
12 changes: 4 additions & 8 deletions Gemfile
@@ -1,9 +1,9 @@
source :rubygems
source "http://gems.github.com"
source 'http://rubygems.org'

gem 'rake', '~> 0.8.7'
# Specify your gem's dependencies in garb.gemspec
gemspec

gem 'i18n'
gem 'rake'

group :test do
gem 'shoulda'
Expand All @@ -12,7 +12,3 @@ group :test do
gem 'jferris-mocha', :require => false
gem 'yajl-ruby'
end

group :demo do
gem 'oauth'
end
28 changes: 0 additions & 28 deletions Gemfile.lock

This file was deleted.

29 changes: 2 additions & 27 deletions Rakefile 100644 → 100755
@@ -1,44 +1,19 @@
#!/usr/bin/env rake
require 'rake/gempackagetask'
require 'rake/testtask'
require 'bundler/gem_tasks'

$:.unshift File.expand_path('../lib', __FILE__)
require 'garb'

task :default => :test

spec = Gem::Specification.new do |s|
s.name = 'garb'
s.version = Garb::Version.to_s
s.has_rdoc = false
s.rubyforge_project = 'viget'
s.summary = "Google Analytics API Ruby Wrapper"
s.authors = ['Tony Pitale']
s.email = 'tony.pitale@viget.com'
s.homepage = 'http://github.com/vigetlabs/garb'
s.files = %w(README.md CHANGELOG.md Rakefile) + Dir.glob('lib/**/*')
s.test_files = Dir.glob("test/**/*")

s.add_dependency('crack', ['>= 0.1.6'])
s.add_dependency('activesupport', ['>= 2.2.0'])
end

Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end

Rake::TestTask.new do |t|
t.libs << 'test'
t.test_files = FileList['test/**/*_test.rb']
t.verbose = true
end

desc 'Generate the gemspec to serve this Gem from Github'
task :github do
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
File.open(file, 'w') {|f| f << spec.to_ruby }
puts "Created gemspec: #{file}"
end

begin
require 'rcov/rcovtask'

Expand Down
45 changes: 16 additions & 29 deletions garb.gemspec
@@ -1,33 +1,20 @@
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/garb/version', __FILE__)

Gem::Specification.new do |s|
s.name = %q{garb}
s.version = "0.9.3"
Gem::Specification.new do |gem|
gem.authors = ['Tony Pitale', 'Sijawusz Pur Rahnama']
gem.email = ['tony.pitale@viget.com', 'sija@sija.pl']
gem.homepage = 'http://github.com/Sija/garb'

gem.summary = 'Google Analytics API Ruby Wrapper'
gem.description = ''

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Tony Pitale"]
s.date = %q{2011-06-30}
s.email = %q{tony.pitale@viget.com}
s.files = ["README.md", "CHANGELOG.md", "Rakefile", "lib/garb", "lib/garb/destination.rb", "lib/garb/filter_parameters.rb", "lib/garb/management", "lib/garb/management/account.rb", "lib/garb/management/feed.rb", "lib/garb/management/goal.rb", "lib/garb/management/profile.rb", "lib/garb/management/segment.rb", "lib/garb/management/web_property.rb", "lib/garb/model.rb", "lib/garb/profile_reports.rb", "lib/garb/report_parameter.rb", "lib/garb/report_response.rb", "lib/garb/reports", "lib/garb/reports/bounces.rb", "lib/garb/reports/exits.rb", "lib/garb/reports/pageviews.rb", "lib/garb/reports/unique_pageviews.rb", "lib/garb/reports/visits.rb", "lib/garb/reports.rb", "lib/garb/request", "lib/garb/request/authentication.rb", "lib/garb/request/data.rb", "lib/garb/result_set.rb", "lib/garb/session.rb", "lib/garb/step.rb", "lib/garb/version.rb", "lib/garb.rb", "lib/garb/support.rb", "test/fixtures", "test/fixtures/cacert.pem", "test/fixtures/profile_feed.xml", "test/fixtures/report_feed.xml", "test/test_helper.rb", "test/unit", "test/unit/garb", "test/unit/garb/filter_parameters_test.rb", "test/unit/garb/management", "test/unit/garb/management/account_test.rb", "test/unit/garb/management/feed_test.rb", "test/unit/garb/management/goal_test.rb", "test/unit/garb/management/profile_test.rb", "test/unit/garb/management/segment_test.rb", "test/unit/garb/management/web_property_test.rb", "test/unit/garb/model_test.rb", "test/unit/garb/oauth_session_test.rb", "test/unit/garb/profile_reports_test.rb", "test/unit/garb/report_parameter_test.rb", "test/unit/garb/report_response_test.rb", "test/unit/garb/request", "test/unit/garb/request/authentication_test.rb", "test/unit/garb/request/data_test.rb", "test/unit/garb/session_test.rb", "test/unit/garb_test.rb", "test/unit/symbol_operator_test.rb"]
s.homepage = %q{http://github.com/vigetlabs/garb}
s.require_paths = ["lib"]
s.rubyforge_project = %q{viget}
s.rubygems_version = %q{1.6.2}
s.summary = %q{Google Analytics API Ruby Wrapper}
s.test_files = ["test/fixtures", "test/fixtures/cacert.pem", "test/fixtures/profile_feed.xml", "test/fixtures/report_feed.xml", "test/test_helper.rb", "test/unit", "test/unit/garb", "test/unit/garb/filter_parameters_test.rb", "test/unit/garb/management", "test/unit/garb/management/account_test.rb", "test/unit/garb/management/feed_test.rb", "test/unit/garb/management/goal_test.rb", "test/unit/garb/management/profile_test.rb", "test/unit/garb/management/segment_test.rb", "test/unit/garb/management/web_property_test.rb", "test/unit/garb/model_test.rb", "test/unit/garb/oauth_session_test.rb", "test/unit/garb/profile_reports_test.rb", "test/unit/garb/report_parameter_test.rb", "test/unit/garb/report_response_test.rb", "test/unit/garb/request", "test/unit/garb/request/authentication_test.rb", "test/unit/garb/request/data_test.rb", "test/unit/garb/session_test.rb", "test/unit/garb_test.rb", "test/unit/symbol_operator_test.rb"]

if s.respond_to? :specification_version then
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<crack>, [">= 0.1.6"])
s.add_runtime_dependency(%q<activesupport>, [">= 2.2.0"])
else
s.add_dependency(%q<crack>, [">= 0.1.6"])
s.add_dependency(%q<activesupport>, [">= 2.2.0"])
end
else
s.add_dependency(%q<crack>, [">= 0.1.6"])
s.add_dependency(%q<activesupport>, [">= 2.2.0"])
end
gem.files = `git ls-files`.split $\
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.name = 'garb'
gem.require_paths = ['lib']
gem.version = Garb::VERSION

gem.add_dependency 'activesupport', '>= 2.2.0'
end
8 changes: 3 additions & 5 deletions lib/garb.rb
Expand Up @@ -10,10 +10,9 @@
require 'json'
end

# FIXME: CODE SMELL
$: << File.dirname(__FILE__)

module Garb
autoload :VERSION, 'garb/version'

autoload :Attributes, 'garb/attributes'
autoload :PathAttribute, 'garb/path_attribute'
autoload :Destination, 'garb/destination'
Expand All @@ -25,7 +24,6 @@ module Garb
autoload :ResultSet, 'garb/result_set'
autoload :Session, 'garb/session'
autoload :Step, 'garb/step'
autoload :Version, 'garb/version'

module Management
autoload :Account, 'garb/management/account'
Expand Down Expand Up @@ -81,4 +79,4 @@ def symbol_operator_slugs
# probably just support open_timeout
end

require 'garb/support'
require File.expand_path('garb/support', File.dirname(__FILE__))
2 changes: 1 addition & 1 deletion lib/garb/request/authentication.rb
Expand Up @@ -17,7 +17,7 @@ def parameters
'Passwd' => @password,
'accountType' => @account_type,
'service' => 'analytics',
'source' => "sija-garb-v#{Garb::Version}"
'source' => "sija-garb-v#{Garb::VERSION}"
}
end

Expand Down
6 changes: 3 additions & 3 deletions lib/garb/version.rb
@@ -1,12 +1,12 @@
module Garb
module Version
module VERSION

MAJOR = 0
MINOR = 9
TINY = 3
TINY = 4

def self.to_s # :nodoc:
[MAJOR, MINOR, TINY].join('.')
[MAJOR, MINOR, TINY].join '.'
end

end
Expand Down

0 comments on commit ef71d20

Please sign in to comment.