diff --git a/Gemfile b/Gemfile index 31ca2d6..c80ee36 100644 --- a/Gemfile +++ b/Gemfile @@ -1,11 +1,3 @@ source "http://rubygems.org" -gem "httparty", "~> 0.10" -gem "json", ">= 1.4.6" - -group :development do - gem "rspec", "~> 2.10" - gem "jeweler", ">= 1.8.3" - gem "webmock", "~> 1.8.6" - gem "timecop", "~> 0.7.1" -end +gemspec diff --git a/Rakefile b/Rakefile index e4df23d..29ec3ad 100644 --- a/Rakefile +++ b/Rakefile @@ -1,38 +1,10 @@ -require 'rubygems' -require 'bundler' -begin - Bundler.setup(:default, :development) -rescue Bundler::BundlerError => e - $stderr.puts e.message - $stderr.puts "Run `bundle install` to install missing gems" - exit e.status_code -end require 'rake' - -require 'jeweler' -Jeweler::Tasks.new do |gem| - # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options - gem.name = "googl" - gem.homepage = "http://github.com/zigotto/googl" - gem.license = "MIT" - gem.summary = %Q{Wrapper for Google URL Shortener API} - gem.description = %Q{Small library for Google URL Shortener API} - gem.email = "jlopes@zigotto.com.br" - gem.authors = ["Jesus Lopes"] - # dependencies defined in Gemfile -end -Jeweler::RubygemsDotOrgTasks.new - require 'rspec/core' require 'rspec/core/rake_task' + RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = FileList['spec/**/*_spec.rb'] - spec.rspec_opts = %w(-fp --color) -end - -RSpec::Core::RakeTask.new(:rcov) do |spec| - spec.pattern = 'spec/**/*_spec.rb' - spec.rcov = true + spec.rspec_opts = '--color --format progress' end task :default => :spec diff --git a/VERSION b/VERSION deleted file mode 100644 index 7deb86f..0000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.7.1 \ No newline at end of file diff --git a/googl.gemspec b/googl.gemspec index 554c60f..bc7b0c1 100644 --- a/googl.gemspec +++ b/googl.gemspec @@ -1,100 +1,24 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' -# -*- encoding: utf-8 -*- -# stub: googl 0.7.1 ruby lib +$:.push File.expand_path('../lib', __FILE__) +require 'googl/version' Gem::Specification.new do |s| - s.name = "googl" - s.version = "0.7.1" + s.name = 'googl' + s.version = Googl::VERSION + s.authors = ['Jesus Lopes'] + s.homepage = 'http://github.com/zigotto/googl' + s.email = 'jlopes@zigotto.com.br' + s.licenses = ['MIT'] + s.summary = 'Wrapper for the Google URL Shortener API' + s.description = 'Wrapper for the Google URL Shortener API' - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.require_paths = ["lib"] - s.authors = ["Jesus Lopes"] - s.date = "2015-05-21" - s.description = "Small library for Google URL Shortener API" - s.email = "jlopes@zigotto.com.br" - s.extra_rdoc_files = [ - "README.markdown" - ] - s.files = [ - ".travis.yml", - "Gemfile", - "MIT-LICENSE", - "README.markdown", - "Rakefile", - "VERSION", - "googl.gemspec", - "lib/googl.rb", - "lib/googl/base.rb", - "lib/googl/client_login.rb", - "lib/googl/error.rb", - "lib/googl/expand.rb", - "lib/googl/oauth2/native.rb", - "lib/googl/oauth2/server.rb", - "lib/googl/oauth2/utils.rb", - "lib/googl/request.rb", - "lib/googl/ruby_extensions.rb", - "lib/googl/shorten.rb", - "lib/googl/utils.rb", - "spec/fixtures/client_login_invalid.json", - "spec/fixtures/client_login_valid.json", - "spec/fixtures/expand.json", - "spec/fixtures/expand_404.json", - "spec/fixtures/expand_projection_clicks.json", - "spec/fixtures/expand_projection_full.json", - "spec/fixtures/expand_projection_strings.json", - "spec/fixtures/expand_removed.json", - "spec/fixtures/history.json", - "spec/fixtures/history_projection_clicks.json", - "spec/fixtures/oauth2/native.json", - "spec/fixtures/oauth2/native_invalid.json", - "spec/fixtures/oauth2/native_token_expires.json", - "spec/fixtures/oauth2/server.json", - "spec/fixtures/oauth2/server_invalid.json", - "spec/fixtures/oauth2/server_token_expires.json", - "spec/fixtures/shorten.json", - "spec/fixtures/shorten_authenticated.json", - "spec/fixtures/shorten_invalid_content_type.json", - "spec/googl/client_spec.rb", - "spec/googl/expand_spec.rb", - "spec/googl/oauth2/native_spec.rb", - "spec/googl/oauth2/server_spec.rb", - "spec/googl/request_spec.rb", - "spec/googl/shorten_spec.rb", - "spec/shared_examples.rb", - "spec/spec_helper.rb" - ] - s.homepage = "http://github.com/zigotto/googl" - s.licenses = ["MIT"] - s.rubygems_version = "2.4.5" - s.summary = "Wrapper for Google URL Shortener API" + s.files = Dir['lib/**/*'] + %w(MIT-LICENSE Rakefile README.rdoc VERSION) + s.test_files = Dir['spec/**/*'] + s.require_paths = ['lib'] - if s.respond_to? :specification_version then - s.specification_version = 4 - - if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, ["~> 0.10"]) - s.add_runtime_dependency(%q, [">= 1.4.6"]) - s.add_development_dependency(%q, ["~> 2.10"]) - s.add_development_dependency(%q, [">= 1.8.3"]) - s.add_development_dependency(%q, ["~> 1.8.6"]) - s.add_development_dependency(%q, ["~> 0.7.1"]) - else - s.add_dependency(%q, ["~> 0.10"]) - s.add_dependency(%q, [">= 1.4.6"]) - s.add_dependency(%q, ["~> 2.10"]) - s.add_dependency(%q, [">= 1.8.3"]) - s.add_dependency(%q, ["~> 1.8.6"]) - s.add_dependency(%q, ["~> 0.7.1"]) - end - else - s.add_dependency(%q, ["~> 0.10"]) - s.add_dependency(%q, [">= 1.4.6"]) - s.add_dependency(%q, ["~> 2.10"]) - s.add_dependency(%q, [">= 1.8.3"]) - s.add_dependency(%q, ["~> 1.8.6"]) - s.add_dependency(%q, ["~> 0.7.1"]) - end + s.add_dependency('httparty', '~> 0.10.0') + s.add_dependency('json', '>= 1.4.6') + s.add_development_dependency('rake', '~> 10') + s.add_development_dependency('rspec', '~> 2.10.0') + s.add_development_dependency('timecop', '~> 0.7.1') + s.add_development_dependency('webmock', '~> 1.8.6') end - diff --git a/lib/googl.rb b/lib/googl.rb index aa0e357..c7138ae 100644 --- a/lib/googl.rb +++ b/lib/googl.rb @@ -2,6 +2,7 @@ require 'ostruct' require 'json' +require 'googl/version' require 'googl/error' require 'googl/utils' require 'googl/base' diff --git a/lib/googl/version.rb b/lib/googl/version.rb new file mode 100644 index 0000000..0fd9bfc --- /dev/null +++ b/lib/googl/version.rb @@ -0,0 +1,3 @@ +module Googl + VERSION = '0.7.1' +end