Permalink
Browse files

Switched to new bundler way.

  • Loading branch information...
1 parent a0ca76c commit 52054097554f38738c5c67b1ad91a4cfa2ee4850 @treeder treeder committed Jun 25, 2012
Showing with 81 additions and 94 deletions.
  1. +3 −0 Gemfile
  2. +37 −0 Gemfile.lock
  3. +0 −18 Rakefile
  4. +0 −5 VERSION.yml
  5. +23 −52 iron_mq.gemspec
  6. +1 −0 lib/iron_mq.rb
  7. +4 −12 lib/iron_mq/client.rb
  8. +1 −1 lib/iron_mq/queues.rb
  9. +3 −0 lib/iron_mq/version.rb
  10. +9 −6 test/quick_run.rb
View
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gemspec
View
@@ -0,0 +1,37 @@
+PATH
+ remote: .
+ specs:
+ iron_mq (1.8.0)
+ iron_core (>= 0.1.4)
+
+GEM
+ remote: https://rubygems.org/
+ specs:
+ beanstalk-client (1.1.1)
+ ffi (1.0.11)
+ iron_core (0.1.4)
+ bundler (> 1.0.0)
+ rest
+ rest-client
+ mime-types (1.19)
+ rake (0.9.2.2)
+ rest (1.0.0)
+ rest-client (>= 0.3.0)
+ rest-client (1.6.7)
+ mime-types (>= 1.16)
+ test-unit (2.5.0)
+ typhoeus (0.4.2)
+ ffi (~> 1.0)
+ mime-types (~> 1.18)
+ uber_config (0.0.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ beanstalk-client
+ iron_mq!
+ rake
+ test-unit
+ typhoeus
+ uber_config
View
@@ -1,24 +1,6 @@
require 'rubygems'
require 'rake'
-begin
- require 'jeweler2'
- Jeweler::Tasks.new do |gem|
- gem.name = "iron_mq"
- gem.summary = "Ruby client for IronMQ"
- gem.description = "Ruby client for IronMQ"
- gem.email = "travis@iron.io"
- gem.homepage = "http://www.iron.io"
- gem.authors = ["Travis Reeder"]
- gem.add_dependency 'iron_core', '>= 0.1.4'
- #gem.add_dependency 'typhoeus'
- gem.required_ruby_version = '>= 1.9'
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler2"
-end
-
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
View
@@ -1,5 +0,0 @@
----
-:major: 1
-:minor: 7
-:patch: 4
-:build:
View
@@ -1,58 +1,29 @@
-# Generated by jeweler
-# DO NOT EDIT THIS FILE DIRECTLY
-# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
-# -*- encoding: utf-8 -*-
+require File.expand_path('../lib/iron_mq/version', __FILE__)
-Gem::Specification.new do |s|
- s.name = "iron_mq"
- s.version = "1.7.4"
+Gem::Specification.new do |gem|
+ gem.authors = ["Travis Reeder"]
+ gem.email = ["treeder@gmail.com"]
+ gem.description = "Ruby client for IronMQ by www.iron.io"
+ gem.summary = "Ruby client for IronMQ by www.iron.io"
+ gem.homepage = "https://github.com/iron-io/iron_mq_ruby"
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
- s.authors = ["Travis Reeder"]
- s.date = "2012-06-25"
- s.description = "Ruby client for IronMQ"
- s.email = "travis@iron.io"
- s.extra_rdoc_files = [
- "README.md"
- ]
- s.files = [
- "README.md",
- "Rakefile",
- "VERSION.yml",
- "iron_mq.gemspec",
- "lib/iron_mq.rb",
- "lib/iron_mq/client.rb",
- "lib/iron_mq/messages.rb",
- "lib/iron_mq/queues.rb",
- "test/Gemfile",
- "test/Gemfile.lock",
- "test/long_run.rb",
- "test/long_run_worker.rb",
- "test/quick_run.rb",
- "test/schedule_abt.rb",
- "test/test_base.rb",
- "test/test_beanstalkd.rb",
- "test/test_iron_mq.rb"
- ]
- s.homepage = "http://www.iron.io"
- s.require_paths = ["lib"]
- s.required_ruby_version = Gem::Requirement.new(">= 1.9")
- s.rubygems_version = "1.8.24"
- s.summary = "Ruby client for IronMQ"
+ 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 = "iron_mq"
+ gem.require_paths = ["lib"]
+ gem.version = IronMQ::VERSION
+
+ gem.required_rubygems_version = ">= 1.3.6"
+ gem.required_ruby_version = Gem::Requirement.new(">= 1.9")
+ gem.add_runtime_dependency "iron_core", ">= 0.1.4"
+
+ gem.add_development_dependency "test-unit"
+ gem.add_development_dependency "rake"
+ gem.add_development_dependency "beanstalk-client"
+ gem.add_development_dependency "uber_config"
+ gem.add_development_dependency "typhoeus"
- 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<iron_core>, [">= 0"])
- s.add_runtime_dependency(%q<iron_core>, [">= 0"])
- else
- s.add_dependency(%q<iron_core>, [">= 0"])
- s.add_dependency(%q<iron_core>, [">= 0"])
- end
- else
- s.add_dependency(%q<iron_core>, [">= 0"])
- s.add_dependency(%q<iron_core>, [">= 0"])
- end
end
View
@@ -1,3 +1,4 @@
require_relative 'iron_mq/queues'
require_relative 'iron_mq/messages'
require_relative 'iron_mq/client'
+require_relative 'iron_mq/version'
View
@@ -3,17 +3,6 @@
require 'iron_core'
module IronMQ
- @@version = nil
-
- def self.version
- if @@version.nil?
- v = YAML.load(File.read(File.dirname(__FILE__) + '/../../VERSION.yml'))
- $stderr.puts v.inspect
- @@version = [v[:major].to_s, v[:minor].to_s, v[:patch].to_s].join('.')
- end
-
- @@version
- end
class Client < IronCore::Client
AWS_US_EAST_HOST = 'mq-aws-us-east-1.iron.io'
@@ -23,7 +12,10 @@ class Client < IronCore::Client
def initialize(options={})
super('mq', options, [:queue_name])
- load_from_hash('defaults', {:scheme => 'https', :host => IronMQ::Client::AWS_US_EAST_HOST, :port => 443, :api_version => 1, :user_agent => 'iron_mq_ruby-' + IronMQ.version + ' (iron_core_ruby-' + IronCore.version + ')', :queue_name => 'default'})
+ load_from_hash('defaults', {:scheme => 'https', :host => IronMQ::Client::AWS_US_EAST_HOST, :port => 443,
+ :api_version => 1,
+ :user_agent => 'iron_mq_ruby-' + IronMQ::VERSION + ' (iron_core_ruby-' + IronCore.version + ')',
+ :queue_name => 'default'})
if (not @token) || (not @project_id)
IronCore::Logger.error 'IronMQ', 'Both token and project_id must be specified'
View
@@ -43,8 +43,8 @@ def get(options={})
def post(options={})
options[:name] ||= @client.queue_name
res = @client.parse_response(@client.post(path(options), options))
- p res
res
+ p res
end
View
@@ -0,0 +1,3 @@
+module IronMQ
+ VERSION = "1.8.0"
+end
View
@@ -6,38 +6,41 @@ class QuickRun < TestBase
def setup
super
@client.queue_name = 'ironmq-gem-quick'
+ clear_queue
end
def test_basics
+
res = @client.messages.post("hello world!")
+ p res
assert res.id
post_id = res.id
assert res.msg
- p res
res = @client.messages.get()
+ p res
+ puts "post_id=" + post_id.inspect
assert res.id
- assert res.id == post_id
+ assert_equal res.id, post_id
assert res.body
- p res
res = @client.messages.delete(res["id"])
- assert res.msg
p res
+ assert res.msg
res = @client.messages.get()
p res
assert res.nil?
res = @client.messages.post("hello world!", :queue_name=>'test2')
+ p res
assert res.id
assert res.msg
- p res
res = @client.messages.get(:queue_name=>'test2')
+ p res
assert res.id
assert res.body
- p res
res = res.delete
p res

0 comments on commit 5205409

Please sign in to comment.